[QUESTION] Disable Extension on environments without redis on TYPO3 11
Closed this issue · 1 comments
npoggenburg commented
Hello fellow TYPO3 enthusiasts,
I have a question about the extension and TYPO3 11.
Under TYPO3 11 all extensions are activated, which are in the composer.lock. When developing I have the following environments:
- dev: redis installed but not used.
- staging server: Redis not installed
- live server: Redis installed and used
This can lead to the following problems on the systems above:
- dev: the extension throws an error if no configuration is set. After setting the array keys, everything works.
$GLOBALS['TYPO3_CONF_VARS']['SYS']['locking']['redis'] = [
'hostname' => '',
'database' => 0
];
- staging: the extension throws an error if no configuration is set. If a configuration is set, the extension throws an error that the redis class cannot be found.
- live: everything works
Is there a nice way to enable the extension under TYPO3 11 only on certain systems, or is this not provided?
Thank you so much for developing and maintaining this extension,
best regards Nico <3
baschny commented
I just stumbled on this same issue and made a quick patch - which works for us right now. Feel free to test it @npoggenburg :
composer config repositories.cron git https://github.com/cron-eu/distributed-locks.git
composer require b13/distributed-locks:dev-14-disable-redis-locking
Maybe @bmack can take a look at it and integrate and release a new version with this option. Thanks for the cool work on it, B13!