Skip to content

Commit 12d5368

Browse files
Merge branch '7.2' into 7.3
* 7.2: [DependencyInjection] Fix `ServiceLocatorTagPass` indexes handling Improve docblock on compile() [VarDumper] Fix dumping LazyObjectState when using VarExporter v8 Allow NumberToLocalizedStringTransformer empty values [Intl] Ensure data consistency between alpha and numeric codes [Intl] Add missing currency (NOK) localization (en_NO)
2 parents 3751f53 + af9b469 commit 12d5368

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Caster/SymfonyCaster.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,14 @@ public static function castLazyObjectState($state, array $a, Stub $stub, bool $i
8080

8181
$instance = $a['realInstance'] ?? null;
8282

83-
$a = ['status' => new ConstStub(match ($a['status']) {
84-
LazyObjectState::STATUS_INITIALIZED_FULL => 'INITIALIZED_FULL',
85-
LazyObjectState::STATUS_INITIALIZED_PARTIAL => 'INITIALIZED_PARTIAL',
86-
LazyObjectState::STATUS_UNINITIALIZED_FULL => 'UNINITIALIZED_FULL',
87-
LazyObjectState::STATUS_UNINITIALIZED_PARTIAL => 'UNINITIALIZED_PARTIAL',
88-
}, $a['status'])];
83+
if (isset($a['status'])) { // forward-compat with Symfony 8
84+
$a = ['status' => new ConstStub(match ($a['status']) {
85+
LazyObjectState::STATUS_INITIALIZED_FULL => 'INITIALIZED_FULL',
86+
LazyObjectState::STATUS_INITIALIZED_PARTIAL => 'INITIALIZED_PARTIAL',
87+
LazyObjectState::STATUS_UNINITIALIZED_FULL => 'UNINITIALIZED_FULL',
88+
LazyObjectState::STATUS_UNINITIALIZED_PARTIAL => 'UNINITIALIZED_PARTIAL',
89+
}, $a['status'])];
90+
}
8991

9092
if ($instance) {
9193
$a['realInstance'] = $instance;

0 commit comments

Comments
 (0)