Summary
Since 3.2.1 the extension contains PHP 8.1 syntax, but it still declares support for TYPO3 v11.5 and does not declare a php requirement at all. On a TYPO3 11.5 installation running PHP 7.4 or 8.0, Composer happily installs 3.2.3 and the site dies with a parse error during bootstrap.
The code
Classes/Domain/Core/RecordWithRenderedGrid.php (added in 3.2.1) uses constructor property promotion together with readonly:
public function __construct(
protected readonly Record $coreRecord,
protected readonly ?string $renderedGrid
) {
}
Promotion requires PHP 8.0, readonly requires PHP 8.1.
Why Composer does not prevent it
composer.json of 3.2.3:
"require": {
"typo3/cms-backend": "^11.5 || ^12.4 || ^13.4 || ^14.0"
}
There is no php entry, so a project that pins its platform to PHP 7.4 (config.platform.php) gets no conflict — the constraint simply is not there. ext_emconf.php points the same way:
'depends' => ['typo3' => '11.5.0-14.99.99'],
TYPO3 11.5 supports PHP 7.4 through 8.2, so "TYPO3 11.5 compatible" and "needs PHP 8.1" cannot both be true.
Steps to reproduce
- TYPO3 11.5 project on PHP 7.4,
"b13/container": "^3"
composer update b13/container → resolves to 3.2.3
- Any request:
Uncaught TYPO3 Exception syntax error, unexpected 'protected' (T_PROTECTED), expecting variable
thrown in file .../typo3conf/ext/container/Classes/Domain/Core/RecordWithRenderedGrid.php in line 26
Expected
Either add "php": ">=8.1" to composer.json (and the matching PHP note to the docs), or drop ^11.5 from typo3/cms-backend and narrow ext_emconf.php accordingly — whichever matches the intended support matrix. Right now Composer has no way to keep a PHP 7.4 project off the broken version.
Affected versions
- 3.2.0 — fine, no PHP 8 syntax
- 3.2.1, 3.2.2, 3.2.3 — affected
Workaround for anyone hitting this: constrain to ^3 <3.2.1.
Summary
Since 3.2.1 the extension contains PHP 8.1 syntax, but it still declares support for TYPO3 v11.5 and does not declare a
phprequirement at all. On a TYPO3 11.5 installation running PHP 7.4 or 8.0, Composer happily installs 3.2.3 and the site dies with a parse error during bootstrap.The code
Classes/Domain/Core/RecordWithRenderedGrid.php(added in 3.2.1) uses constructor property promotion together withreadonly:Promotion requires PHP 8.0,
readonlyrequires PHP 8.1.Why Composer does not prevent it
composer.jsonof 3.2.3:There is no
phpentry, so a project that pins its platform to PHP 7.4 (config.platform.php) gets no conflict — the constraint simply is not there.ext_emconf.phppoints the same way:TYPO3 11.5 supports PHP 7.4 through 8.2, so "TYPO3 11.5 compatible" and "needs PHP 8.1" cannot both be true.
Steps to reproduce
"b13/container": "^3"composer update b13/container→ resolves to 3.2.3Expected
Either add
"php": ">=8.1"tocomposer.json(and the matching PHP note to the docs), or drop^11.5fromtypo3/cms-backendand narrowext_emconf.phpaccordingly — whichever matches the intended support matrix. Right now Composer has no way to keep a PHP 7.4 project off the broken version.Affected versions
Workaround for anyone hitting this: constrain to
^3 <3.2.1.