Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: symfony/var-dumper
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v6.1.6
Choose a base ref
...
head repository: symfony/var-dumper
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v6.1.9
Choose a head ref
  • 9 commits
  • 3 files changed
  • 3 contributors

Commits on Nov 29, 2022

  1. Copy the full SHA
    7fa221f View commit details

Commits on Dec 9, 2022

  1. Merge branch '5.4' into 6.0

    * 5.4:
      [HttpFoundation] IPv4-mapped IPv6 addresses incorrectly rejected
      [RateLimiter] Add typecast to Reservation::wait
      [VarDumper] Ignore \Error in __debugInfo()
    nicolas-grekas committed Dec 9, 2022

    Verified

    This commit was signed with the committer’s verified signature.
    targos Michaël Zasso
    Copy the full SHA
    7d979f6 View commit details
  2. Merge branch '6.0' into 6.1

    * 6.0:
      [HttpFoundation] IPv4-mapped IPv6 addresses incorrectly rejected
      Minor (comment only), part 2
      [RateLimiter] Add typecast to Reservation::wait
      [FrameworkBundle] Remove check of undefined service in mailer assertions
      [VarDumper] Ignore \Error in __debugInfo()
    nicolas-grekas committed Dec 9, 2022

    Verified

    This commit was signed with the committer’s verified signature.
    targos Michaël Zasso
    Copy the full SHA
    356c0d6 View commit details

Commits on Dec 12, 2022

  1. Verified

    This commit was signed with the committer’s verified signature.
    targos Michaël Zasso
    Copy the full SHA
    312a862 View commit details

Commits on Dec 14, 2022

  1. Merge branch '5.4' into 6.0

    * 5.4:
      [Mailer] Include all transports' debug messages in RoundRobin transport exception
      [FrameworkBundle] fix: fix help message
      Use relative timestamps
      [Cache] Fix dealing with ext-redis' multi/exec returning a bool
      [Messenger][Amqp] Added missing rpc_timeout option
      [Serializer] Prevent GetSetMethodNormalizer from creating invalid magic method call
      [HttpFoundation] Fix dumping array cookies
      [WebProfilerBundle] Fix dump header not being displayed
      TraceableHttpClient: increase decorator's priority
      Use static methods inside data providers
      [FrameworkBundle] Allow configuring `framework.exceptions` with a config builder
      bug #48313 [Mime] Fix MessagePart serialization
      [ErrorHandler][DebugClassLoader] Fix some new return types support
      Fix getting the name of closures on PHP 8.1.11+
      [Translator] Fix typo "internal" / "interval"
      fix dumping top-level tagged values
    nicolas-grekas committed Dec 14, 2022
    Copy the full SHA
    41526e1 View commit details
  2. Merge branch '6.0' into 6.1

    * 6.0:
      [Mailer] Include all transports' debug messages in RoundRobin transport exception
      [FrameworkBundle] fix: fix help message
      Use relative timestamps
      [Cache] Fix dealing with ext-redis' multi/exec returning a bool
      [Messenger][Amqp] Added missing rpc_timeout option
      [Serializer] Prevent GetSetMethodNormalizer from creating invalid magic method call
      [HttpFoundation] Fix dumping array cookies
      [WebProfilerBundle] Fix dump header not being displayed
      TraceableHttpClient: increase decorator's priority
      Use static methods inside data providers
      [FrameworkBundle] Allow configuring `framework.exceptions` with a config builder
      bug #48313 [Mime] Fix MessagePart serialization
      [ErrorHandler][DebugClassLoader] Fix some new return types support
      Fix getting the name of closures on PHP 8.1.11+
      [Translator] Fix typo "internal" / "interval"
      fix dumping top-level tagged values
    nicolas-grekas committed Dec 14, 2022
    Copy the full SHA
    24761e8 View commit details

Commits on Dec 22, 2022

  1. Copy the full SHA
    ad74890 View commit details
  2. Merge branch '5.4' into 6.0

    * 5.4:
      Fix integration test gha
      Update RedisTrait.php
      Use static methods inside data providers
      [VarExporter] Fix exporting classes with __unserialize() but not __serialize()
      [Validator] Fix IBAN format for Tunisia and Mauritania
      [Workflow] Allow spaces in place names so the PUML dump doesn't break
    nicolas-grekas committed Dec 22, 2022
    Copy the full SHA
    7d8e7c3 View commit details
  3. Merge branch '6.0' into 6.1

    * 6.0:
      Fix integration test gha
      Update RedisTrait.php
      Use static methods inside data providers
      [VarExporter] Fix exporting classes with __unserialize() but not __serialize()
      [Validator] Fix IBAN format for Tunisia and Mauritania
      [Workflow] Allow spaces in place names so the PUML dump doesn't break
    nicolas-grekas committed Dec 22, 2022
    Copy the full SHA
    66ad854 View commit details
Showing with 17 additions and 7 deletions.
  1. +1 −1 Caster/Caster.php
  2. +1 −1 Caster/ReflectionCaster.php
  3. +15 −5 Tests/Caster/CasterTest.php
2 changes: 1 addition & 1 deletion Caster/Caster.php
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ public static function castObject(object $obj, string $class, bool $hasDebugInfo
if ($hasDebugInfo) {
try {
$debugInfo = $obj->__debugInfo();
} catch (\Exception) {
} catch (\Throwable) {
// ignore failing __debugInfo()
$hasDebugInfo = false;
}
2 changes: 1 addition & 1 deletion Caster/ReflectionCaster.php
Original file line number Diff line number Diff line change
@@ -197,7 +197,7 @@ public static function castFunctionAbstract(\ReflectionFunctionAbstract $c, arra
self::addMap($a, $c, [
'returnsReference' => 'returnsReference',
'returnType' => 'getReturnType',
'class' => 'getClosureScopeClass',
'class' => \PHP_VERSION_ID >= 80111 ? 'getClosureCalledClass' : 'getClosureScopeClass',
'this' => 'getClosureThis',
]);

20 changes: 15 additions & 5 deletions Tests/Caster/CasterTest.php
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ class CasterTest extends TestCase
{
use VarDumperTestTrait;

private $referenceArray = [
private static $referenceArray = [
'null' => null,
'empty' => false,
'public' => 'pub',
@@ -38,12 +38,12 @@ class CasterTest extends TestCase
public function testFilter($filter, $expectedDiff, $listedProperties = null)
{
if (null === $listedProperties) {
$filteredArray = Caster::filter($this->referenceArray, $filter);
$filteredArray = Caster::filter(self::$referenceArray, $filter);
} else {
$filteredArray = Caster::filter($this->referenceArray, $filter, $listedProperties);
$filteredArray = Caster::filter(self::$referenceArray, $filter, $listedProperties);
}

$this->assertSame($expectedDiff, array_diff_assoc($this->referenceArray, $filteredArray));
$this->assertSame($expectedDiff, array_diff_assoc(self::$referenceArray, $filteredArray));
}

public function provideFilter()
@@ -126,7 +126,7 @@ public function provideFilter()
],
[
Caster::EXCLUDE_NOT_IMPORTANT | Caster::EXCLUDE_VERBOSE,
$this->referenceArray,
self::$referenceArray,
['public', "\0*\0protected"],
],
[
@@ -175,4 +175,14 @@ public function testAnonymousClass()
, $c
);
}

public function testTypeErrorInDebugInfo()
{
$this->assertDumpMatchesFormat('class@anonymous {}', new class() {
public function __debugInfo(): array
{
return ['class' => \get_class(null)];
}
});
}
}