Skip to content

Compatibility of caretaker and caretaker_instance with TYPO3 12.4 #4

@tobiasschaeferptb

Description

@tobiasschaeferptb

Hello,

I tried to get the v12 version of caretaker (https://github.com/in2code-de/caretaker/tree/feature/V12) and caretaker_instance (https://github.com/in2code-de/caretaker_instance/tree/feature/V12) working under a freshly installed TYPO3 12.4 with introduction package.
Since there are a lot of TYPO3_MODE in the code of the Ext:caretaker it didn't work.
So, I tried to get the code of both extensions updated with rector. It worked with caretaker_instance, but rector failed with caretaker:
./vendor/bin/rector process packages/caretaker --dry-run
Cannot load Xdebug - it was already loaded
1/1 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

[ERROR] Could not process "/srv/www/vhosts/s23261/caretaker/packages/caretaker/ext_tables.php" file, due to:
"System error: "Rector\PhpParser\Node\Value\ValueResolver::resolveExprValueForConst(): Argument #1 ($expr) must
be of type PhpParser\Node\Expr, null given, called in
vendor/rector/rector/src/PhpParser/Node/Value/ValueResolver.php110"
Run Rector with "--debug" option and post the report here: https://github.com/rectorphp/rector/issues/new". On line: 171

After renaming ext_tables.php to ext_tables.php_ rector was kind of successful with the rest, but unfortunately there are still ~30 occurances of TYPO3_MODE in the code.
I tried to fix ext_tables.php manually, but at the end I'm stuck with this error:
PHP Fatal error: Uncaught LogicException: TYPO3\CMS\Core\Cache\CacheManager can not be injected/instantiated during ext_localconf.php or TCA loading. Use lazy loading instead. in /srv/www/vhosts/s23261/caretaker/vendor/typo3/cms-core/Classes/ServiceProvider.php:134\nStack trace:\n#0 /srv/www/vhosts/s23261/caretaker/var/cache/code/di/DependencyInjectionContainer_8278c7ea2cfd8dab9972d29b6b4b27b2f12a2434.php(6442): TYPO3\CMS\Core\ServiceProvider::getCacheManager()\n#1 /srv/www/vhosts/s23261/caretaker/vendor/symfony/dependency-injection/Container.php(231): DependencyInjectionContainer_8278c7ea2cfd8dab9972d29b6b4b27b2f12a2434::getCacheManagerService()\n#2 /srv/www/vhosts/s23261/caretaker/vendor/symfony/dependency-injection/Container.php(211): Symfony\Component\DependencyInjection\Container::make()\n#3 /srv/www/vhosts/s23261/caretaker/vendor/typo3/cms-core/Classes/ServiceProvider.php(385): Symfony\Component\DependencyInjection\Container->get()\n#4 /srv/www/vhosts/s23261/caretaker/var/cache/code/di/DependencyInjectionContainer_8278c7ea2cfd8dab9972d29b6b4b27b2f12a2434.php(7173): TYPO3\CMS\Core\ServiceProvider::getLocalizationFactory()\n#5 /srv/www/vhosts/s23261/caretaker/vendor/symfony/dependency-injection/Container.php(231): DependencyInjectionContainer_8278c7ea2cfd8dab9972d29b6b4b27b2f12a2434::getLocalizationFactoryService()\n#6 /srv/www/vhosts/s23261/caretaker/vendor/symfony/dependency-injection/Container.php(211): Symfony\Component\DependencyInjection\Container::make()\n#7 /srv/www/vhosts/s23261/caretaker/vendor/typo3/cms-core/Classes/ServiceProvider.php(366): Symfony\Component\DependencyInjection\Container->get()\n#8 /srv/www/vhosts/s23261/caretaker/var/cache/code/di/DependencyInjectionContainer_8278c7ea2cfd8dab9972d29b6b4b27b2f12a2434.php(7143): TYPO3\CMS\Core\ServiceProvider::getLanguageServiceFactory()\n#9 /srv/www/vhosts/s23261/caretaker/vendor/symfony/dependency-injection/Container.php(231): DependencyInjectionContainer_8278c7ea2cfd8dab9972d29b6b4b27b2f12a2434::getLanguageServiceFactoryService()\n#10 /srv/www/vhosts/s23261/caretaker/vendor/symfony/dependency-injection/Container.php(211): Symfony\Component\DependencyInjection\Container::make()\n#11 /srv/www/vhosts/s23261/caretaker/vendor/typo3/cms-core/Classes/Utility/GeneralUtility.php(2981): Symfony\Component\DependencyInjection\Container->get()\n#12 /srv/www/vhosts/s23261/caretaker/vendor/typo3/cms-core/Classes/Information/Typo3Information.php(42): TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance()\n#13 /srv/www/vhosts/s23261/caretaker/vendor/typo3/cms-core/Classes/Utility/GeneralUtility.php(2985): TYPO3\CMS\Core\Information\Typo3Information->__construct()\n#14 /srv/www/vhosts/s23261/caretaker/vendor/typo3/cms-core/Classes/Controller/ErrorPageController.php(71): TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance()\n#15 /srv/www/vhosts/s23261/caretaker/vendor/typo3/cms-core/Classes/Error/ProductionExceptionHandler.php(63): TYPO3\CMS\Core\Controller\ErrorPageController->errorAction()\n#16 /srv/www/vhosts/s23261/caretaker/vendor/typo3/cms-core/Classes/Error/AbstractExceptionHandler.php(79): TYPO3\CMS\Core\Error\ProductionExceptionHandler->echoExceptionWeb()\n#17 [internal function]: TYPO3\CMS\Core\Error\AbstractExceptionHandler->handleException()\n#18 {main}\n thrown in /srv/www/vhosts/s23261/caretaker/vendor/typo3/cms-core/Classes/ServiceProvider.php on line 134, referer: https://s23261.bs.ptb.de/caretaker/public/typo3/main?token=

So in short: is it possible to get caretaker and caretaker_instance working under TYPO3 12.4?

Besr regards,
Tobias Schaefer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions