Project

General

Profile

Actions

Task #85011

closed

BUGFIX: PHP 7.1 Reflection error for default value

Added by Forger Service almost 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2018-05-15
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Sprint Focus:

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

Actions #1

Updated by Gerrit Code Review almost 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

Actions #2

Updated by Gerrit Code Review almost 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

Actions #3

Updated by Gerrit Code Review almost 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

Actions #4

Updated by Mathias Brodala almost 6 years ago

  • TYPO3 Version changed from 8 to 7
Actions #5

Updated by Daniel Siepmann almost 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.

Actions #6

Updated by Saskia Schreiber almost 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.

Actions #7

Updated by Gerrit Code Review almost 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

Actions #8

Updated by Gerrit Code Review almost 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

Actions #9

Updated by Gerrit Code Review almost 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

Actions #10

Updated by Anonymous almost 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #11

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF