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.2.5
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.2.7
Choose a head ref
  • 11 commits
  • 17 files changed
  • 4 contributors

Commits on Jan 24, 2023

  1. Copy the full SHA
    147e212 View commit details

Commits on Feb 2, 2023

  1. Merge branch '5.4' into 6.2

    * 5.4:
      Fix LICENSE CI check
      fixes retrieving multiple values for extra fields
      [String] Remove duplicates in fold maps
      fail with a meaningful error when a needed package is missing
      [DependencyInjection] Fix combinatory explosion when autowiring union and intersection types
      Update license years (last time)
      [Tests] New iteration of removing `$this` occurrences in future static data providers
    fabpot committed Feb 2, 2023

    Verified

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

Commits on Feb 7, 2023

  1. Verified

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

Commits on Feb 14, 2023

  1. Verified

    This commit was signed with the committer’s verified signature.
    targos Michaël Zasso
    Copy the full SHA
    3c2942a View commit details
  2. Merge branch '5.4' into 6.2

    * 5.4:
      Migrate to `static` data providers using `rector/rector`
    nicolas-grekas committed Feb 14, 2023
    Copy the full SHA
    e27ea15 View commit details
  3. Fix merge

    nicolas-grekas committed Feb 14, 2023
    Copy the full SHA
    dab98eb View commit details

Commits on Feb 16, 2023

  1. CS fix

    nicolas-grekas committed Feb 16, 2023
    Copy the full SHA
    794b643 View commit details
  2. Merge branch '5.4' into 6.2

    * 5.4:
      CS fix
      Fix test provider
    nicolas-grekas committed Feb 16, 2023
    Copy the full SHA
    cd85cc7 View commit details

Commits on Feb 21, 2023

  1. Fix phpdocs in components

    nicolas-grekas authored and alamirault committed Feb 21, 2023
    Copy the full SHA
    a110fcb View commit details

Commits on Feb 23, 2023

  1. Copy the full SHA
    6c5ac3a View commit details

Commits on Feb 24, 2023

  1. Merge branch '5.4' into 6.2

    * 5.4:
      fix style of label containing new lines in PUML dump
      [TwigBridge] Allow floats in html5 input type number field
      [Translation] Handle the translation of empty strings
      [VarDumper] Fix error when reflected class has default Enum parameter in constructor
      [FrameworkBundle] Fix denyAccessUnlessGranted for mixed attributes
      [Validator] Fix translation of AtLeastOneOf constraint message
      [Validator] Sync IBAN formats with Swift IBAN registry
      [String] Use same alphabet for ByteString::fromRandom tests
      Fix phpdocs in components
    nicolas-grekas committed Feb 24, 2023
    Copy the full SHA
    cf8d4ca View commit details
2 changes: 1 addition & 1 deletion Caster/Caster.php
Original file line number Diff line number Diff line change
@@ -115,7 +115,7 @@ public static function castObject(object $obj, string $class, bool $hasDebugInfo
* @param array $a The array containing the properties to filter
* @param int $filter A bit field of Caster::EXCLUDE_* constants specifying which properties to filter out
* @param string[] $listedProperties List of properties to exclude when Caster::EXCLUDE_VERBOSE is set, and to preserve when Caster::EXCLUDE_NOT_IMPORTANT is set
* @param int &$count Set to the number of removed properties
* @param int|null &$count Set to the number of removed properties
*/
public static function filter(array $a, int $filter, array $listedProperties = [], ?int &$count = 0): array
{
2 changes: 1 addition & 1 deletion Caster/ReflectionCaster.php
Original file line number Diff line number Diff line change
@@ -292,7 +292,7 @@ public static function castParameter(\ReflectionParameter $c, array $a, Stub $st
if ($c->isOptional()) {
try {
$a[$prefix.'default'] = $v = $c->getDefaultValue();
if ($c->isDefaultValueConstant()) {
if ($c->isDefaultValueConstant() && !\is_object($v)) {
$a[$prefix.'default'] = new ConstStub($c->getDefaultValueConstantName(), $v);
}
if (null === $v) {
11 changes: 10 additions & 1 deletion Caster/SymfonyCaster.php
Original file line number Diff line number Diff line change
@@ -76,12 +76,21 @@ public static function castLazyObjectState($state, array $a, Stub $stub, bool $i

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

return ['status' => new ConstStub(match ($a['status']) {
$instance = $a['realInstance'] ?? null;

$a = ['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'])];

if ($instance) {
$a['realInstance'] = $instance;
--$stub->cut;
}

return $a;
}

public static function castUuid(Uuid $uuid, array $a, Stub $stub, bool $isNested)
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014-2023 Fabien Potencier
Copyright (c) 2014-present Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
2 changes: 1 addition & 1 deletion Tests/Caster/CasterTest.php
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@ public function testFilter($filter, $expectedDiff, $listedProperties = null)
$this->assertSame($expectedDiff, array_diff_assoc(self::$referenceArray, $filteredArray));
}

public function provideFilter()
public static function provideFilter()
{
return [
[
8 changes: 4 additions & 4 deletions Tests/Caster/DateCasterTest.php
Original file line number Diff line number Diff line change
@@ -90,7 +90,7 @@ public function testCastDateTime($time, $timezone, $xDate, $xTimestamp, $xInfos)
$this->assertDumpMatchesFormat($xDump, $cast["\0~\0date"]);
}

public function provideDateTimes()
public static function provideDateTimes()
{
return [
['2017-04-30 00:00:00.000000', 'Europe/Zurich', '2017-04-30 00:00:00.0 Europe/Zurich (+02:00)', 1493503200, 'Sunday, April 30, 2017%Afrom now%ADST On'],
@@ -210,7 +210,7 @@ public function testCastInterval($intervalSpec, $ms, $invert, $xInterval, $xSeco
$this->assertDumpMatchesFormat($xDump, $cast["\0~\0interval"]);
}

public function provideIntervals()
public static function provideIntervals()
{
return [
['PT0S', 0, 0, '0s', '0s'],
@@ -309,7 +309,7 @@ public function testCastTimeZone($timezone, $xTimezone, $xRegion)
$this->assertDumpMatchesFormat($xDump, $cast["\0~\0timezone"]);
}

public function provideTimeZones()
public static function provideTimeZones()
{
$xRegion = \extension_loaded('intl') ? '%s' : '';

@@ -386,7 +386,7 @@ public function testCastPeriod($start, $interval, $end, $options, $xPeriod, $xDa
$this->assertDumpMatchesFormat($xDump, $cast["\0~\0period"]);
}

public function providePeriods()
public static function providePeriods()
{
$periods = [
['2017-01-01', 'P1D', '2017-01-03', 0, 'every + 1d, from [2017-01-01 00:00:00.0 to 2017-01-03 00:00:00.0[', '1) 2017-01-01%a2) 2017-01-02'],
2 changes: 1 addition & 1 deletion Tests/Caster/FFICasterTest.php
Original file line number Diff line number Diff line change
@@ -90,7 +90,7 @@ public function testCastNamedEnum()
PHP, \FFI::new('enum Example { a, b }'));
}

public function scalarsDataProvider(): array
public static function scalarsDataProvider(): array
{
return [
'int8_t' => ['int8_t', '0', 1, 1],
1 change: 1 addition & 0 deletions Tests/Caster/MysqliCasterTest.php
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@

/**
* @requires extension mysqli
*
* @group integration
*/
class MysqliCasterTest extends TestCase
1 change: 1 addition & 0 deletions Tests/Caster/RdKafkaCasterTest.php
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@

/**
* @requires extension rdkafka
*
* @group integration
*/
class RdKafkaCasterTest extends TestCase
2 changes: 2 additions & 0 deletions Tests/Caster/RedisCasterTest.php
Original file line number Diff line number Diff line change
@@ -16,7 +16,9 @@

/**
* @author Nicolas Grekas <p@tchwork.com>
*
* @requires extension redis
*
* @group integration
*/
class RedisCasterTest extends TestCase
4 changes: 2 additions & 2 deletions Tests/Caster/SplCasterTest.php
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ class SplCasterTest extends TestCase
{
use VarDumperTestTrait;

public function getCastFileInfoTests()
public static function getCastFileInfoTests()
{
return [
[__FILE__, <<<'EOTXT'
@@ -135,7 +135,7 @@ public function testCastSplDoublyLinkedList($modeValue, $modeDump)
$this->assertDumpMatchesFormat($dump, $var);
}

public function provideCastSplDoublyLinkedList()
public static function provideCastSplDoublyLinkedList()
{
return [
[\SplDoublyLinkedList::IT_MODE_FIFO, 'IT_MODE_FIFO | IT_MODE_KEEP'],
2 changes: 1 addition & 1 deletion Tests/Caster/XmlReaderCasterTest.php
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ public function testNodes($seek, $expectedDump)
$this->assertDumpMatchesFormat($expectedDump, $this->reader);
}

public function provideNodes()
public static function provideNodes()
{
return [
[0, <<<'EODUMP'
2 changes: 1 addition & 1 deletion Tests/Command/Descriptor/CliDescriptorTest.php
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@ public function testDescribe(array $context, string $expectedOutput, bool $decor
$this->assertStringMatchesFormat(trim($expectedOutput), str_replace(\PHP_EOL, "\n", trim($output->fetch())));
}

public function provideContext()
public static function provideContext()
{
yield 'source' => [
[
2 changes: 1 addition & 1 deletion Tests/Command/Descriptor/HtmlDescriptorTest.php
Original file line number Diff line number Diff line change
@@ -63,7 +63,7 @@ public function testDescribe(array $context, string $expectedOutput)
$this->assertStringMatchesFormat(trim($expectedOutput), trim(preg_replace('@<style>.*</style><script>.*</script>@s', '', $output->fetch())));
}

public function provideContext()
public static function provideContext()
{
yield 'source' => [
[
2 changes: 1 addition & 1 deletion Tests/Command/ServerDumpCommandTest.php
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ public function testComplete(array $input, array $expectedSuggestions)
$this->assertSame($expectedSuggestions, $tester->complete($input));
}

public function provideCompletionSuggestions()
public static function provideCompletionSuggestions()
{
yield 'option --format' => [
['--format', ''],
4 changes: 2 additions & 2 deletions Tests/Dumper/CliDumperTest.php
Original file line number Diff line number Diff line change
@@ -157,7 +157,7 @@ public function testDumpWithCommaFlagsAndExceptionCodeExcerpt()
, $dump);
}

public function provideDumpWithCommaFlagTests()
public static function provideDumpWithCommaFlagTests()
{
$expected = <<<'EOTXT'
array:3 [
@@ -398,7 +398,7 @@ public function testIncompleteClass()
);
}

public function provideDumpArrayWithColor()
public static function provideDumpArrayWithColor()
{
yield [
['foo' => 'bar'],
2 changes: 1 addition & 1 deletion Tests/Dumper/HtmlDumperTest.php
Original file line number Diff line number Diff line change
@@ -180,7 +180,7 @@ public function testDumpString($var, $needle)
$this->assertStringContainsString($needle, $out);
}

public function varToDumpProvider()
public static function varToDumpProvider()
{
return [
[['dummy' => new ImgStub('dummy', 'img/png', '100em')], '<img src="data:img/png;base64,ZHVtbXk=" />'],