@@ -599,13 +599,14 @@ class: "Symfony\Component\VarDumper\Tests\Caster\ReflectionCasterTest"
599599 public function testReflectionClassWithAttribute ()
600600 {
601601 $ var = new \ReflectionClass (LotsOfAttributes::class);
602+ $ dumpedAttributeNameProperty = (\PHP_VERSION_ID < 80400 ? '' : '+ ' ).'name ' ;
602603
603- $ this ->assertDumpMatchesFormat (<<< ' EOTXT'
604+ $ this ->assertDumpMatchesFormat (<<<EOTXT
604605ReflectionClass {
605606 +name: "Symfony\Component\VarDumper\Tests\Fixtures\LotsOfAttributes"
606607%A attributes: array:1 [
607608 0 => ReflectionAttribute {
608- name : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
609+ $ dumpedAttributeNameProperty : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
609610 arguments: []
610611 }
611612 ]
@@ -621,14 +622,15 @@ public function testReflectionClassWithAttribute()
621622 public function testReflectionMethodWithAttribute ()
622623 {
623624 $ var = new \ReflectionMethod (LotsOfAttributes::class, 'someMethod ' );
625+ $ dumpedAttributeNameProperty = (\PHP_VERSION_ID < 80400 ? '' : '+ ' ).'name ' ;
624626
625- $ this ->assertDumpMatchesFormat (<<< ' EOTXT'
627+ $ this ->assertDumpMatchesFormat (<<<EOTXT
626628ReflectionMethod {
627629 +name: "someMethod"
628630 +class: "Symfony\Component\VarDumper\Tests\Fixtures\LotsOfAttributes"
629631%A attributes: array:1 [
630632 0 => ReflectionAttribute {
631- name : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
633+ $ dumpedAttributeNameProperty : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
632634 arguments: array:1 [
633635 0 => "two"
634636 ]
@@ -646,14 +648,15 @@ public function testReflectionMethodWithAttribute()
646648 public function testReflectionPropertyWithAttribute ()
647649 {
648650 $ var = new \ReflectionProperty (LotsOfAttributes::class, 'someProperty ' );
651+ $ dumpedAttributeNameProperty = (\PHP_VERSION_ID < 80400 ? '' : '+ ' ).'name ' ;
649652
650- $ this ->assertDumpMatchesFormat (<<< ' EOTXT'
653+ $ this ->assertDumpMatchesFormat (<<<EOTXT
651654ReflectionProperty {
652655 +name: "someProperty"
653656 +class: "Symfony\Component\VarDumper\Tests\Fixtures\LotsOfAttributes"
654657%A attributes: array:1 [
655658 0 => ReflectionAttribute {
656- name : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
659+ $ dumpedAttributeNameProperty : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
657660 arguments: array:2 [
658661 0 => "one"
659662 "extra" => "hello"
@@ -671,22 +674,23 @@ public function testReflectionPropertyWithAttribute()
671674 public function testReflectionClassConstantWithAttribute ()
672675 {
673676 $ var = new \ReflectionClassConstant (LotsOfAttributes::class, 'SOME_CONSTANT ' );
677+ $ dumpedAttributeNameProperty = (\PHP_VERSION_ID < 80400 ? '' : '+ ' ).'name ' ;
674678
675- $ this ->assertDumpMatchesFormat (<<< ' EOTXT'
679+ $ this ->assertDumpMatchesFormat (<<<EOTXT
676680ReflectionClassConstant {
677681 +name: "SOME_CONSTANT"
678682 +class: "Symfony\Component\VarDumper\Tests\Fixtures\LotsOfAttributes"
679683 modifiers: "public"
680684 value: "some value"
681685 attributes: array:2 [
682686 0 => ReflectionAttribute {
683- name : "Symfony\Component\VarDumper\Tests\Fixtures\RepeatableAttribute"
687+ $ dumpedAttributeNameProperty : "Symfony\Component\VarDumper\Tests\Fixtures\RepeatableAttribute"
684688 arguments: array:1 [
685689 0 => "one"
686690 ]
687691 }
688692 1 => ReflectionAttribute {
689- name : "Symfony\Component\VarDumper\Tests\Fixtures\RepeatableAttribute"
693+ $ dumpedAttributeNameProperty : "Symfony\Component\VarDumper\Tests\Fixtures\RepeatableAttribute"
690694 arguments: array:1 [
691695 0 => "two"
692696 ]
@@ -703,14 +707,15 @@ public function testReflectionClassConstantWithAttribute()
703707 public function testReflectionParameterWithAttribute ()
704708 {
705709 $ var = new \ReflectionParameter ([LotsOfAttributes::class, 'someMethod ' ], 'someParameter ' );
710+ $ dumpedAttributeNameProperty = (\PHP_VERSION_ID < 80400 ? '' : '+ ' ).'name ' ;
706711
707- $ this ->assertDumpMatchesFormat (<<< ' EOTXT'
712+ $ this ->assertDumpMatchesFormat (<<<EOTXT
708713ReflectionParameter {
709714 +name: "someParameter"
710715 position: 0
711716 attributes: array:1 [
712717 0 => ReflectionAttribute {
713- name : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
718+ $ dumpedAttributeNameProperty : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
714719 arguments: array:1 [
715720 0 => "three"
716721 ]
0 commit comments