In v1.1 some features were added which are not compatible with PHP 5.6 anymore, mainly due to usage of type hints ("string"), i.e. in IncludeFile.php:
protected function getIncludeFileContent(string $includeFilePath)
Type hinting for the main scalars was only introduced in PHP 7.0. This change was not reflected in this packages main composer requirements, which still shows "php": ">=5.3.7",.
While this might sound like ancient history and irrelevant, it breaks updating on older installations (running with PHP 5.6) which still want to keep up-to-date with composer (i.e. when using ELTS versions of all software):
Generating autoload files
[ErrorException]
Argument 1 passed to TYPO3\ClassAliasLoader\IncludeFile::getIncludeFileContent() must be an instance of TYPO3\ClassAliasLoader\string, string given, c
alled in /app/vendor/typo3/class-alias-loader/src/IncludeFile.php on line 63 and defined
Solution for my project was to pin to the older version in composer.json:
So this issue is a request to keep the main composer.json dependencies in mind and up-to-date when adding new code, and also as a note for people stumbling over the issue and error with a proven solution.
In v1.1 some features were added which are not compatible with PHP 5.6 anymore, mainly due to usage of type hints ("string"), i.e. in
IncludeFile.php
:Type hinting for the main scalars was only introduced in PHP 7.0. This change was not reflected in this packages main composer requirements, which still shows
"php": ">=5.3.7",
.While this might sound like ancient history and irrelevant, it breaks updating on older installations (running with PHP 5.6) which still want to keep up-to-date with composer (i.e. when using ELTS versions of all software):
Solution for my project was to pin to the older version in
composer.json
:So this issue is a request to keep the main composer.json dependencies in mind and up-to-date when adding new code, and also as a note for people stumbling over the issue and error with a proven solution.