typo3typo3-extensions

Error if I try to activate extension in TYPO3 13.4


When I try to activate the extension `wacon_cookie_management`, I get the following error message:

./vendor/bin/typo3 extension:activate wacon-cookie-management PHP Parse error: syntax error, unexpected '?' in /var/www/vhosts/.../vendor/typo3/cms-cli/typo3 on line 20

I use TYPO3 13.4. with an installation via Composer.


Solution

  • There are a few details missing but it sounds like you run a PHP version older than 7 on CLI. The line your error mentions uses the null coalescing operator, introduced with PHP 7.

    You can run this to check the version:

    env php --version
    

    This must be PHP 8.2 or newer for TYPO3v13.

    In any case this is unlikely to be related to the mentioned extension.