Task #85011
closedBUGFIX: PHP 7.1 Reflection error for default value
100%
Description
In PHP 7.1 under some circumstances the exception is not caught
as expected.
Therefore we use a check, as already done in ReflectionService.php
This issue was automatically created from https://github.com/TYPO3/TYPO3.CMS/pull/108
Updated by Gerrit Code Review over 6 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56969
Updated by Gerrit Code Review over 6 years ago
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56972
Updated by Gerrit Code Review over 6 years ago
Patch set 2 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56972
Updated by Daniel Siepmann over 6 years ago
The error exists with TYPO3 CMS 7.6.27 + PHP 7.0.30-1+ubuntu18.04.1+deb.sury.org+1, 7.1.17-1+ubuntu18.04.1+deb.sury.org+1, 7.2.5-1+ubuntu18.04.1+deb.sury.org+1.
Could not reproduce the error with TYPO3 CMS 8.7.13 in any of the above PHP versions.
The issue is raised by one of the following:
- TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\TextNode::__construct argument text
- TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ObjectAccessorNode::__construct argument objectPath
- TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ArrayNode::__construct argument internalArray
Looks like none of these are reflected anymore in CMS 8.
Updated by Saskia Schreiber over 6 years ago
I can confirm this issue, in my case it occured with TYPO3 8.7.12 and PHP 7.
Error:
Warning: Uncaught ReflectionException: Internal error: Failed to retrieve the default value in /var/www/vendor/typo3/cms/typo3/sysext/extbase/Classes/Object/Container/ClassInfoFactory.php:70 Stack trace: #0 /var/www/vendor/typo3/cms/typo3/sysext/extbase/Classes/Object/Container/ClassInfoFactory.php(70): ReflectionParameter->getDefaultValue() #1 /var/www/vendor/typo3/cms/typo3/sysext/extbase/Classes/Object/Container/ClassInfoFactory.php(39): TYPO3\CMS\Extbase\Object\Container\ClassInfoFactory->getConstructorArguments(Object(ReflectionClass)) #2 /var/www/vendor/typo3/cms/typo3/sysext/extbase/Classes/Object/Container/Container.php(347): TYPO3\CMS\Extbase\Object\Container\ClassInfoFactory->buildClassInfoFromClassName('SJBR\\StaticInfo...') #3 /var/www/vendor/typo3/cms/typo3/sysext/extbase/Classes/Object/Container/Container.php(173): TYPO3\CMS\Extbase\Object\Container\Container->getClassInfo('SJBR\\StaticInfo...') #4 /var/www/vendor/typo3/cms/typo3/sysext/extbase/Classes/Object/Container/Container.php(228): TYPO3\CMS\Extba in /var/www/vendor/typo3/cms/typo3/sysext/extbase/Classes/Object/Container/ClassInfoFactory.php on line 70
The reflected class was SJBR\StaticInfoTables\Domain\Repository\TerritoryRepository, I am using the SelectViewHelper provided by the extension (https://github.com/TYPO3-extensions/static_info_tables/blob/master/Classes/ViewHelpers/Form/SelectViewHelper.php) which tries to load the repository via injection.
Updated by Gerrit Code Review over 6 years ago
Patch set 3 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56972
Updated by Gerrit Code Review over 6 years ago
Patch set 4 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56972
Updated by Gerrit Code Review over 6 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57092
Updated by Anonymous over 6 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset f7ea1c51f13dccbf1b6394f7c622527f7c7890a7.