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: v5.2.10
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: v5.2.11
Choose a head ref
  • 4 commits
  • 3 files changed
  • 3 contributors

Commits on Jun 6, 2021

  1. Fix incompatible implicit float-to-int conversions

    Signed-off-by: Alexander M. Turek <me@derrabus.de>
    derrabus committed Jun 6, 2021
    Copy the full SHA
    a4763e9 View commit details
  2. Merge branch '4.4' into 5.2

    * 4.4:
      Fix incompatible implicit float-to-int conversions
      [Translation] Don't pass null to strtoupper()
      cs fix
      [DependencyInjection] Don't pass null to trim()
      Add return types to JsonSerializable implementations
      Fix Serializable deprecations triggered by token mocks
      Add missing security translations
    derrabus committed Jun 6, 2021
    Copy the full SHA
    2382e8e View commit details

Commits on Jun 17, 2021

  1. Copy the full SHA
    a586efd View commit details

Commits on Jun 24, 2021

  1. Merge branch '4.4' into 5.2

    * 4.4:
      [ErrorHandler] fix handling buffered SilencedErrorContext
      [HttpClient] fix Psr18Client when allow_url_fopen=0
      [DependencyInjection] Add support of PHP enumerations
      [Cache] handle prefixed redis connections when clearing pools
      [Cache] fix eventual consistency when using RedisTagAwareAdapter with a cluster
      [Validator][Translation] Add ExpressionLanguageSyntax en and fr
      [HttpKernel] [HttpCache] Keep s-maxage=0 from ESI sub-responses
      [Cache] Disable locking on Windows by default
      [DependencyInjection] Fix binding "iterable $foo" when using the PHP-DSL
      [Config] fix tracking default values that reference the parent class
      [DependencyInjection] fix accepted types on FactoryTrait::factory()
      [VarDumper] Fix tests for PHP 8.1
      [Mailer] fix encoding of addresses using SmtpTransport
      [MonologBridge] Fix the server:log help --filter sample
    nicolas-grekas committed Jun 24, 2021
    Copy the full SHA
    ca2e8ba View commit details
Showing with 74 additions and 8 deletions.
  1. +1 −1 Command/Descriptor/CliDescriptor.php
  2. +1 −1 Command/Descriptor/HtmlDescriptor.php
  3. +72 −6 Tests/Caster/ReflectionCasterTest.php
2 changes: 1 addition & 1 deletion Command/Descriptor/CliDescriptor.php
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ public function describe(OutputInterface $output, Data $data, array $context, in
$io = $output instanceof SymfonyStyle ? $output : new SymfonyStyle(new ArrayInput([]), $output);
$this->dumper->setColors($output->isDecorated());

$rows = [['date', date('r', $context['timestamp'])]];
$rows = [['date', date('r', (int) $context['timestamp'])]];
$lastIdentifier = $this->lastIdentifier;
$this->lastIdentifier = $clientId;

2 changes: 1 addition & 1 deletion Command/Descriptor/HtmlDescriptor.php
Original file line number Diff line number Diff line change
@@ -94,7 +94,7 @@ public function describe(OutputInterface $output, Data $data, array $context, in

private function extractDate(array $context, string $format = 'r'): string
{
return date($format, $context['timestamp']);
return date($format, (int) $context['timestamp']);
}

private function renderTags(array $tags): string
78 changes: 72 additions & 6 deletions Tests/Caster/ReflectionCasterTest.php
Original file line number Diff line number Diff line change
@@ -138,17 +138,31 @@ public function testReflectionParameter()
{
$var = new \ReflectionParameter(reflectionParameterFixture::class, 0);

$this->assertDumpMatchesFormat(
<<<'EOTXT'
if (\PHP_VERSION_ID < 80100) {
$this->assertDumpMatchesFormat(
<<<'EOTXT'
ReflectionParameter {
+name: "arg1"
position: 0
typeHint: "Symfony\Component\VarDumper\Tests\Fixtures\NotLoadableClass"
default: null
}
EOTXT
, $var
);
, $var
);
} else {
$this->assertDumpMatchesFormat(
<<<'EOTXT'
ReflectionParameter {
+name: "arg1"
position: 0
allowsNull: true
typeHint: "Symfony\Component\VarDumper\Tests\Fixtures\NotLoadableClass"
}
EOTXT
, $var
);
}
}

public function testReflectionParameterScalar()
@@ -422,7 +436,8 @@ public function testGenerator()
$generator = new GeneratorDemo();
$generator = $generator->baz();

$expectedDump = <<<'EODUMP'
if (\PHP_VERSION_ID < 80100) {
$expectedDump = <<<'EODUMP'
Generator {
this: Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo { …}
executing: {
@@ -436,14 +451,32 @@ public function testGenerator()
closed: false
}
EODUMP;
} else {
$expectedDump = <<<'EODUMP'
Generator {
this: Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo { …}
trace: {
./src/Symfony/Component/VarDumper/Tests/Fixtures/GeneratorDemo.php:13 {
Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo->baz()
› public function baz()
› {
› yield from bar();
}
Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo->baz() {}
}
closed: false
}
EODUMP;
}

$this->assertDumpMatchesFormat($expectedDump, $generator);

foreach ($generator as $v) {
break;
}

$expectedDump = <<<'EODUMP'
if (\PHP_VERSION_ID < 80100) {
$expectedDump = <<<'EODUMP'
array:2 [
0 => ReflectionGenerator {
this: Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo { …}
@@ -472,6 +505,39 @@ public function testGenerator()
}
]
EODUMP;
} else {
$expectedDump = <<<'EODUMP'
array:2 [
0 => ReflectionGenerator {
this: Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo { …}
trace: {
%s%eTests%eFixtures%eGeneratorDemo.php:9 {
Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo::foo()
› {
› yield 1;
› }
}
%s%eTests%eFixtures%eGeneratorDemo.php:20 { …}
%s%eTests%eFixtures%eGeneratorDemo.php:14 { …}
Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo->baz() {}
}
closed: false
}
1 => Generator {
trace: {
./src/Symfony/Component/VarDumper/Tests/Fixtures/GeneratorDemo.php:9 {
Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo::foo()
› {
› yield 1;
› }
}
Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo::foo() {}
}
closed: false
}
]
EODUMP;
}

$r = new \ReflectionGenerator($generator);
$this->assertDumpMatchesFormat($expectedDump, [$r, $r->getExecutingGenerator()]);