You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used to call bin/typo3 cron_poeditor:termssummary (with typo3-cli) and it worked fine.
Now I am trying to use typo3-console v5 and calling bin/typo3cms cron_poeditor:termssummary as I used to.
I need to have access to the TYPO3 configuration (i.e. $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['cron_poeditor']); - which used to contain our TYPO3 configuration populated - also considering AdditionalConfiguration and stuff that handles the "Context" overrides in our environments.
$GLOBALS['TYPO3_CONF_VARS'] seems to be completely empty when running the code via typo3-console v5.
Any hints on how to achieve that with typo3-console only? Again: bug or something I should be doing differently in my code?
The text was updated successfully, but these errors were encountered:
Ok, I found the problem: I was accessing TYPO3_CONF_VARS in the __construct of my Command, which is too early.
Moving that part to the initialize method, made it work:
- public function __construct()
+ /** @see Command::initialize() */
+ public function initialize(InputInterface $input, OutputInterface $output)
{
$extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['cron_poeditor']);
So you might want to close this issue.
I was in touch with @helhum via Slack, and he will think if it makes sense to change the bootstrapping of typo3-console to cope with that case too. So I keep it open for now. Helmut feel free to close if you think this is ok.
I'll fix this, because I claim TYPO3 Console is a drop in replacement for the typo3 cli binary, which isn't true any more, if you need to re-write your commands to satisfy TYPO3 Console
I used to call
bin/typo3 cron_poeditor:termssummary
(withtypo3-cli
) and it worked fine.Now I am trying to use typo3-console v5 and calling
bin/typo3cms cron_poeditor:termssummary
as I used to.I need to have access to the TYPO3 configuration (i.e.
$extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['cron_poeditor']);
- which used to contain our TYPO3 configuration populated - also considering AdditionalConfiguration and stuff that handles the "Context" overrides in our environments.$GLOBALS['TYPO3_CONF_VARS']
seems to be completely empty when running the code via typo3-console v5.Any hints on how to achieve that with typo3-console only? Again: bug or something I should be doing differently in my code?
The text was updated successfully, but these errors were encountered: