Skip to content

Commit

Permalink
Merge branch '6.2' into 6.3
Browse files Browse the repository at this point in the history
* 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
  ...
  • Loading branch information
xabbuh committed Dec 4, 2022
2 parents 29da1bc + 1e7544c commit 665011c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Caster/SymfonyCaster.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Symfony\Component\Uid\Ulid;
use Symfony\Component\Uid\Uuid;
use Symfony\Component\VarDumper\Cloner\Stub;
use Symfony\Component\VarExporter\Internal\LazyObjectState;

/**
* @final
Expand Down Expand Up @@ -67,6 +68,22 @@ public static function castHttpClientResponse($response, array $a, Stub $stub, b
return $a;
}

public static function castLazyObjectState($state, array $a, Stub $stub, bool $isNested)
{
if (!$isNested) {
return $a;
}

$stub->cut += \count($a) - 1;

return ['status' => new ConstStub(match ($a['status']) {
LazyObjectState::STATUS_INITIALIZED_FULL => 'INITIALIZED_FULL',
LazyObjectState::STATUS_INITIALIZED_PARTIAL => 'INITIALIZED_PARTIAL',
LazyObjectState::STATUS_UNINITIALIZED_FULL => 'UNINITIALIZED_FULL',
LazyObjectState::STATUS_UNINITIALIZED_PARTIAL => 'UNINITIALIZED_PARTIAL',
}, $a['status'])];
}

public static function castUuid(Uuid $uuid, array $a, Stub $stub, bool $isNested)
{
$a[Caster::PREFIX_VIRTUAL.'toBase58'] = $uuid->toBase58();
Expand Down
1 change: 1 addition & 0 deletions Cloner/AbstractCloner.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ abstract class AbstractCloner implements ClonerInterface
'Symfony\Component\HttpFoundation\Request' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castRequest'],
'Symfony\Component\Uid\Ulid' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castUlid'],
'Symfony\Component\Uid\Uuid' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castUuid'],
'Symfony\Component\VarExporter\Internal\LazyObjectState' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castLazyObjectState'],
'Symfony\Component\VarDumper\Exception\ThrowingCasterException' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castThrowingCasterException'],
'Symfony\Component\VarDumper\Caster\TraceStub' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castTraceStub'],
'Symfony\Component\VarDumper\Caster\FrameStub' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castFrameStub'],
Expand Down

0 comments on commit 665011c

Please sign in to comment.