Skip to content

Commit af9b469

Browse files
Merge branch '6.4' into 7.2
* 6.4: 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 9c46038 + 13b873f commit af9b469

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
@@ -78,12 +78,14 @@ public static function castLazyObjectState($state, array $a, Stub $stub, bool $i
7878

7979
$instance = $a['realInstance'] ?? null;
8080

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

8890
if ($instance) {
8991
$a['realInstance'] = $instance;

0 commit comments

Comments
 (0)