Skip to content

Commit 665011c

Browse files
committed
Merge branch '6.2' into 6.3
* 6.2: (21 commits) prevent the installation of unstable phpdocumentor/type-resolver releases Update UPGRADE-6.2.md [VarExporter] Fix possible memory-leak when using lazy-objects [Framework] Fix Infobip Mailer transport factory import [WebProfilerBundle] Fix form panel expanders chore: fix typo 'do' verb [Twig Bridge] Add PHPdoc information to some email methods [TwigBridge] Fix casing of currentRoute/currentRouteParameters methods Amend MoneyType twig to include a space. [DependencyInjection][ErrorHandler][FrameworkBundle][HttpKernel][TwigBridge] Fix "a" before "URL" [FrameworkBundle] Add alximy as backer of v6.2 Fixed undefined variable error [Security] Fix deprecated namespace Update UPGRADE-6.2.md don't register the MailerTestCommand symfony/console is not installed Bump Symfony version to 6.2.1 Update VERSION for 6.2.0 Update CHANGELOG for 6.2.0 [GHA] Fix scorecards Convert previously defined date attribute to the expected class ...
2 parents 29da1bc + 1e7544c commit 665011c

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

Caster/SymfonyCaster.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Component\Uid\Ulid;
1616
use Symfony\Component\Uid\Uuid;
1717
use Symfony\Component\VarDumper\Cloner\Stub;
18+
use Symfony\Component\VarExporter\Internal\LazyObjectState;
1819

1920
/**
2021
* @final
@@ -67,6 +68,22 @@ public static function castHttpClientResponse($response, array $a, Stub $stub, b
6768
return $a;
6869
}
6970

71+
public static function castLazyObjectState($state, array $a, Stub $stub, bool $isNested)
72+
{
73+
if (!$isNested) {
74+
return $a;
75+
}
76+
77+
$stub->cut += \count($a) - 1;
78+
79+
return ['status' => new ConstStub(match ($a['status']) {
80+
LazyObjectState::STATUS_INITIALIZED_FULL => 'INITIALIZED_FULL',
81+
LazyObjectState::STATUS_INITIALIZED_PARTIAL => 'INITIALIZED_PARTIAL',
82+
LazyObjectState::STATUS_UNINITIALIZED_FULL => 'UNINITIALIZED_FULL',
83+
LazyObjectState::STATUS_UNINITIALIZED_PARTIAL => 'UNINITIALIZED_PARTIAL',
84+
}, $a['status'])];
85+
}
86+
7087
public static function castUuid(Uuid $uuid, array $a, Stub $stub, bool $isNested)
7188
{
7289
$a[Caster::PREFIX_VIRTUAL.'toBase58'] = $uuid->toBase58();

Cloner/AbstractCloner.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ abstract class AbstractCloner implements ClonerInterface
8989
'Symfony\Component\HttpFoundation\Request' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castRequest'],
9090
'Symfony\Component\Uid\Ulid' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castUlid'],
9191
'Symfony\Component\Uid\Uuid' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castUuid'],
92+
'Symfony\Component\VarExporter\Internal\LazyObjectState' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castLazyObjectState'],
9293
'Symfony\Component\VarDumper\Exception\ThrowingCasterException' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castThrowingCasterException'],
9394
'Symfony\Component\VarDumper\Caster\TraceStub' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castTraceStub'],
9495
'Symfony\Component\VarDumper\Caster\FrameStub' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castFrameStub'],

0 commit comments

Comments
 (0)