Project

General

Profile

Actions

Bug #103531

closed

Ensure correct access for LazyLoadingProxy test

Added by Stefan Bürk about 1 month ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
Extbase
Target version:
-
Start date:
2024-04-04
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

To harden the Extbase LazyLoadingProxy implementation
a new test has been added with #101400, which creates
a proxy directly and using ObjectAccess::getProperty()
to access a property of the not loadable child proxy
class instance.

Due to the use of magic methods`__get()` and `__isset()`
methods in the `LazyLoadingProxy` class and some wrong
assumptions of the Symfony PropertyAccessor simply null
has been retrieved even if the concrete class could not
been retrieved (property on a null value instead of an
object). The property accessor is used under the hood
within the Extbase internal ObjectAccess implementation.

The Symfony Team recently declared that behaviour a bug
and fixed it with releases `7.0.6` and `6.4.6` and now
correctly throwing the `PropertyNotAccessibleException`.

Failing nightlies with Symfony releases containing the
bugfix revealed a incorrect test implementation, using
a constructed and unrealistic construct.

[1] https://github.com/symfony/symfony/releases/tag/v7.0.6
[2] https://github.com/symfony/symfony/releases/tag/v6.4.6
[3] https://github.com/symfony/symfony/pull/54194


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #101400: GenericObjectValidator throws exception with lazy loaded objectsResolvedTorben Hansen2023-07-20

Actions
Actions #1

Updated by Stefan Bürk about 1 month ago

  • Related to Bug #101400: GenericObjectValidator throws exception with lazy loaded objects added
Actions #2

Updated by Gerrit Code Review about 1 month ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83645

Actions #3

Updated by Gerrit Code Review about 1 month ago

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83658

Actions #4

Updated by Stefan Bürk about 1 month ago

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

Also available in: Atom PDF