Bug #78977

Fatal error: Failed to retrieve the reflection object in Extbase Reflection Service

Added by Stefan Rotsch almost 3 years ago. Updated 12 months ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Extbase
Target version:
Start date:
2016-12-13
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

With fixing the caching of MethodReflection objects in #78915, there is an issue now which leads to a fatal error when trying to read the reflection properties of a MethodReflection object restored from cache.

Fatal error: ReflectionFunctionAbstract::getDocComment(): Internal error: Failed to retrieve the reflection object in /var/www/htdocs/typo3_src/typo3/sysext/extbase/Classes/Reflection/MethodReflection.php on line 120

When writing a MethodReflection object to cache, the object gets serialized. As serialize does not take care of virtual properties (such as the reflection properties), the reflection information gets lost. Trying to access reflection properties on an object resumed from cache causes the fatal error.

To fix the error it seems sufficient to call the reflection object's __toString() method before serializing it.


Related issues

Follows TYPO3 Core - Bug #78915: Critical performance bug in Extbase Reflection Cache in all TYPO3 versions since 6.0 (affects submits of Extbase-Forms) Closed 2016-12-08

Associated revisions

Revision 1d0f1c2c (diff)
Added by Helmut Hummel almost 3 years ago

Revert "[BUGFIX] Reflection Cache does not save methodReflections"

Internal PHP classes including the \ReflectionMethod are not serlializable. Doing so results in a fatal error at some point.
The reported issue must be solved differently.

This reverts commit a5c1e222bf9858f5a44af1007cd9e1677b9a534d.

Reverts: #78915
Resolves: #78977
Releases: master, 7.6, 6.2
Change-Id: I1161b97eb04d0b1ba8ca59b3008d3f62c6ea1cf5
Reviewed-on: https://review.typo3.org/50963
Reviewed-by: Markus Klein <>
Tested-by: Markus Klein <>
Reviewed-by: Nicole Cordes <>
Tested-by: Nicole Cordes <>
Tested-by: TYPO3com <>

Revision 60cc6128 (diff)
Added by Helmut Hummel almost 3 years ago

Revert "[BUGFIX] Reflection Cache does not save methodReflections"

Internal PHP classes including the \ReflectionMethod are not serlializable. Doing so results in a fatal error at some point.
The reported issue must be solved differently.

This reverts commit a5c1e222bf9858f5a44af1007cd9e1677b9a534d.

Reverts: #78915
Resolves: #78977
Releases: master, 7.6, 6.2
Change-Id: I1161b97eb04d0b1ba8ca59b3008d3f62c6ea1cf5
Reviewed-on: https://review.typo3.org/50968
Reviewed-by: Stefan Rotsch <>
Tested-by: Stefan Rotsch <>
Tested-by: TYPO3com <>
Reviewed-by: Nicole Cordes <>
Tested-by: Nicole Cordes <>

Revision 18b19ea9 (diff)
Added by Nicole Cordes almost 3 years ago

Revert "[BUGFIX] Reflection Cache does not save methodReflections"

Internal PHP classes including the \ReflectionMethod are not serlializable. Doing so results in a fatal error at some point.
The reported issue must be solved differently.

This reverts commit a5c1e222bf9858f5a44af1007cd9e1677b9a534d.

Reverts: #78915
Resolves: #78977
Releases: master, 7.6, 6.2
Change-Id: I1161b97eb04d0b1ba8ca59b3008d3f62c6ea1cf5
Reviewed-on: https://review.typo3.org/50969
Reviewed-by: Stefan Rotsch <>
Tested-by: Stefan Rotsch <>
Tested-by: TYPO3com <>
Reviewed-by: Nicole Cordes <>
Tested-by: Nicole Cordes <>

Revision 5b7c3f6f (diff)
Added by Helmut Hummel almost 3 years ago

[BUGFIX] Optimize cache handling in ReflectionService

Method reflection objects are used temporarily to extract information
from methods. This information is eventually stored in the cache.
However the method reflection objects themselves must stay outside the cache
because they cannot be serialized. They also do not provide much value
as the information is stored in the cache anyway.
The only additional info these reflections provided is whether a method
existed or not in the class, which we now also cache as plain array.

Furthermore the information whether cache relevant properties were
updated and the cache needs to be saved again is now reset once it was
written. This ensures that the cache is only written once even the
ReflectionService is used multiple times.

Resolves: #78915
Resolves: #78977
Releases: master, 7.6, 6.2
Change-Id: I1d00f596633adab886c0db0dfddd71358fb67303
Reviewed-on: https://review.typo3.org/50953
Tested-by: TYPO3com <>
Reviewed-by: Tymoteusz Motylewski <>
Tested-by: Tymoteusz Motylewski <>
Reviewed-by: Stefan Rotsch <>
Tested-by: Stefan Rotsch <>
Reviewed-by: Markus Klein <>
Tested-by: Markus Klein <>

Revision 49839358 (diff)
Added by Helmut Hummel almost 3 years ago

[BUGFIX] Optimize cache handling in ReflectionService

Method reflection objects are used temporarily to extract information
from methods. This information is eventually stored in the cache.
However the method reflection objects themselves must stay outside the cache
because they cannot be serialized. They also do not provide much value
as the information is stored in the cache anyway.
The only additional info these reflections provided is whether a method
existed or not in the class, which we now also cache as plain array.

Furthermore the information whether cache relevant properties were
updated and the cache needs to be saved again is now reset once it was
written. This ensures that the cache is only written once even the
ReflectionService is used multiple times.

Resolves: #78915
Resolves: #78977
Releases: master, 7.6, 6.2
Change-Id: I1d00f596633adab886c0db0dfddd71358fb67303
Reviewed-on: https://review.typo3.org/50980
Tested-by: TYPO3com <>
Reviewed-by: Markus Klein <>
Tested-by: Markus Klein <>

Revision 5124e88a (diff)
Added by Helmut Hummel almost 3 years ago

[BUGFIX] Optimize cache handling in ReflectionService

Method reflection objects are used temporarily to extract information
from methods. This information is eventually stored in the cache.
However the method reflection objects themselves must stay outside the cache
because they cannot be serialized. They also do not provide much value
as the information is stored in the cache anyway.
The only additional info these reflections provided is whether a method
existed or not in the class, which we now also cache as plain array.

Furthermore the information whether cache relevant properties were
updated and the cache needs to be saved again is now reset once it was
written. This ensures that the cache is only written once even the
ReflectionService is used multiple times.

Resolves: #78915
Resolves: #78977
Releases: master, 7.6, 6.2
Change-Id: I1d00f596633adab886c0db0dfddd71358fb67303
Reviewed-on: https://review.typo3.org/50984
Tested-by: TYPO3com <>
Reviewed-by: Nicole Cordes <>
Tested-by: Nicole Cordes <>

History

#1 Updated by Gerrit Code Review almost 3 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/50953

#2 Updated by Gerrit Code Review almost 3 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50953

#3 Updated by Gerrit Code Review almost 3 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50953

#4 Updated by Gerrit Code Review almost 3 years ago

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/50963

#5 Updated by Gerrit Code Review almost 3 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50963

#6 Updated by Gerrit Code Review almost 3 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50953

#7 Updated by Gerrit Code Review almost 3 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50953

#8 Updated by Gerrit Code Review almost 3 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50953

#9 Updated by Gerrit Code Review almost 3 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50953

#10 Updated by Gerrit Code Review almost 3 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50963

#11 Updated by Gerrit Code Review almost 3 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/50967

#12 Updated by Gerrit Code Review almost 3 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/50967

#13 Updated by Helmut Hummel almost 3 years ago

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

#14 Updated by Gerrit Code Review almost 3 years ago

  • Status changed from Resolved to Under Review

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/50968

#15 Updated by Gerrit Code Review almost 3 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50969

#16 Updated by Helmut Hummel almost 3 years ago

  • Status changed from Under Review to Resolved

#17 Updated by Gerrit Code Review almost 3 years ago

  • Status changed from Resolved to Under Review

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/50980

#18 Updated by Helmut Hummel almost 3 years ago

  • Status changed from Under Review to Resolved

#19 Updated by Gerrit Code Review almost 3 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50984

#20 Updated by Gerrit Code Review almost 3 years ago

Patch set 2 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50984

#21 Updated by Helmut Hummel almost 3 years ago

  • Status changed from Under Review to Resolved

#22 Updated by Gerrit Code Review almost 3 years ago

  • Status changed from Resolved to Under Review

Patch set 3 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50984

#23 Updated by Helmut Hummel almost 3 years ago

  • Status changed from Under Review to Resolved

#24 Updated by Benni Mack 12 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF