Migrate TYPO3 Extbase task to Symphony command

I’m trying to migrate the extension pb_social to TYPO3 10 LTS but I’m stuck in the migration of the scheduler task that updates TYPO3 data from the social feeds.

I learned how to register a Symfony Console Command with the Services.yaml file so I can execute the command.

The problem is that the pb_social extension relies on Extbase same as its actual updateFeedDataCommand command.

So I tried to create a new command in the Symfony style and in its method execute() I instantiated:

$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
/** @var PBSocialCommandController $controller */
$controller = $objectManager->get(PBSocialCommandController::class);

I already updated the properties of pb_social methods to use the new @TYPO3CMSExtbaseAnnotationInject but still the injections seems not to work.

E.g. with:

/**
* @var TYPO3CMSExtbaseConfigurationConfigurationManagerInterface
* @TYPO3CMSExtbaseAnnotationInject
*/
protected $configurationManager;

$this->configurationManager is null when used.

What could be the problem?

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *