To use the global variable in TYPO3_REQUEST is in a TYPO3 v12 Symfony command not possible. It works if I start the command manually in the scheduler task module. But when the task is executed as cron tab $GLOABLS['TYPO3_REQUEST'] is null.
Is there an other workaround to use the TYPO3 request object in symfony commands? I only found in vendor/typo3/cms-backend/Classes/Command/ResetPasswordCommand.php a workaround with a fake request. Is this the recommended way?
In the docs I couldn't find a hint https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/RequestLifeCycle/Typo3Request.html
Usually a backend task is not bound to a request, so yes you can only "fake" it.
However; what is your specific use case, what would you need from the request, maybe you can handle it differently?