Skip to content

Commit a3d7c87

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: skip tests that do not work with ICU 71.1 [DependencyInjection] Fix dumping containers with null-referenced services [Routing] Fix removing aliases pointing to removed route in RouteCollection::remove() [VarExporter] Fix lazy ghost trait when using nullsafe operator [Routing] Fix conflicting FQCN aliases with route name Fix legacy class palceholder definitions for static analysis
2 parents d97726e + 2d08ca6 commit a3d7c87

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

LazyGhostTrait.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,9 @@ public function &__get($name): mixed
108108
if ($state && (null === $scope || isset($propertyScopes["\0$scope\0$name"]))) {
109109
if (LazyObjectState::STATUS_INITIALIZED_FULL === $state->status) {
110110
// Work around php/php-src#12695
111-
$property = $propertyScopes[null === $scope ? $name : "\0$scope\0$name"][3]
112-
?? (Hydrator::$propertyScopes[$this::class] = Hydrator::getPropertyScopes($this::class))[3];
111+
$property = null === $scope ? $name : "\0$scope\0$name";
112+
$property = $propertyScopes[$property][3]
113+
?? Hydrator::$propertyScopes[$this::class][$property][3] = new \ReflectionProperty($scope ?? $class, $name);
113114
} else {
114115
$property = null;
115116
}

Tests/Fixtures/LazyGhost/ChildMagicClass.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,14 @@ class ChildMagicClass extends MagicClass implements LazyObjectInterface
1818
{
1919
use LazyGhostTrait;
2020

21+
private const LAZY_OBJECT_PROPERTY_SCOPES = [
22+
"\0".self::class."\0".'data' => [self::class, 'data', null],
23+
"\0".self::class."\0".'lazyObjectState' => [self::class, 'lazyObjectState', null],
24+
"\0".parent::class."\0".'data' => [parent::class, 'data', null],
25+
'cloneCounter' => [self::class, 'cloneCounter', null],
26+
'data' => [self::class, 'data', null],
27+
'lazyObjectState' => [self::class, 'lazyObjectState', null],
28+
];
29+
2130
private int $data = 123;
2231
}

0 commit comments

Comments
 (0)