@@ -531,13 +531,14 @@ class: "Symfony\Component\VarDumper\Tests\Caster\ReflectionCasterTest"
531531 public function testReflectionClassWithAttribute ()
532532 {
533533 $ var = new \ReflectionClass (LotsOfAttributes::class);
534+ $ dumpedAttributeNameProperty = (\PHP_VERSION_ID < 80400 ? '' : '+ ' ).'name ' ;
534535
535- $ this ->assertDumpMatchesFormat (<<< ' EOTXT'
536+ $ this ->assertDumpMatchesFormat (<<<EOTXT
536537ReflectionClass {
537538 +name: "Symfony\Component\VarDumper\Tests\Fixtures\LotsOfAttributes"
538539%A attributes: array:1 [
539540 0 => ReflectionAttribute {
540- name : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
541+ $ dumpedAttributeNameProperty : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
541542 arguments: []
542543 }
543544 ]
@@ -550,14 +551,15 @@ public function testReflectionClassWithAttribute()
550551 public function testReflectionMethodWithAttribute ()
551552 {
552553 $ var = new \ReflectionMethod (LotsOfAttributes::class, 'someMethod ' );
554+ $ dumpedAttributeNameProperty = (\PHP_VERSION_ID < 80400 ? '' : '+ ' ).'name ' ;
553555
554- $ this ->assertDumpMatchesFormat (<<< ' EOTXT'
556+ $ this ->assertDumpMatchesFormat (<<<EOTXT
555557ReflectionMethod {
556558 +name: "someMethod"
557559 +class: "Symfony\Component\VarDumper\Tests\Fixtures\LotsOfAttributes"
558560%A attributes: array:1 [
559561 0 => ReflectionAttribute {
560- name : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
562+ $ dumpedAttributeNameProperty : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
561563 arguments: array:1 [
562564 0 => "two"
563565 ]
@@ -572,14 +574,15 @@ public function testReflectionMethodWithAttribute()
572574 public function testReflectionPropertyWithAttribute ()
573575 {
574576 $ var = new \ReflectionProperty (LotsOfAttributes::class, 'someProperty ' );
577+ $ dumpedAttributeNameProperty = (\PHP_VERSION_ID < 80400 ? '' : '+ ' ).'name ' ;
575578
576- $ this ->assertDumpMatchesFormat (<<< ' EOTXT'
579+ $ this ->assertDumpMatchesFormat (<<<EOTXT
577580ReflectionProperty {
578581 +name: "someProperty"
579582 +class: "Symfony\Component\VarDumper\Tests\Fixtures\LotsOfAttributes"
580583%A attributes: array:1 [
581584 0 => ReflectionAttribute {
582- name : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
585+ $ dumpedAttributeNameProperty : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
583586 arguments: array:2 [
584587 0 => "one"
585588 "extra" => "hello"
@@ -594,22 +597,23 @@ public function testReflectionPropertyWithAttribute()
594597 public function testReflectionClassConstantWithAttribute ()
595598 {
596599 $ var = new \ReflectionClassConstant (LotsOfAttributes::class, 'SOME_CONSTANT ' );
600+ $ dumpedAttributeNameProperty = (\PHP_VERSION_ID < 80400 ? '' : '+ ' ).'name ' ;
597601
598- $ this ->assertDumpMatchesFormat (<<< ' EOTXT'
602+ $ this ->assertDumpMatchesFormat (<<<EOTXT
599603ReflectionClassConstant {
600604 +name: "SOME_CONSTANT"
601605 +class: "Symfony\Component\VarDumper\Tests\Fixtures\LotsOfAttributes"
602606 modifiers: "public"
603607 value: "some value"
604608 attributes: array:2 [
605609 0 => ReflectionAttribute {
606- name : "Symfony\Component\VarDumper\Tests\Fixtures\RepeatableAttribute"
610+ $ dumpedAttributeNameProperty : "Symfony\Component\VarDumper\Tests\Fixtures\RepeatableAttribute"
607611 arguments: array:1 [
608612 0 => "one"
609613 ]
610614 }
611615 1 => ReflectionAttribute {
612- name : "Symfony\Component\VarDumper\Tests\Fixtures\RepeatableAttribute"
616+ $ dumpedAttributeNameProperty : "Symfony\Component\VarDumper\Tests\Fixtures\RepeatableAttribute"
613617 arguments: array:1 [
614618 0 => "two"
615619 ]
@@ -623,14 +627,15 @@ public function testReflectionClassConstantWithAttribute()
623627 public function testReflectionParameterWithAttribute ()
624628 {
625629 $ var = new \ReflectionParameter ([LotsOfAttributes::class, 'someMethod ' ], 'someParameter ' );
630+ $ dumpedAttributeNameProperty = (\PHP_VERSION_ID < 80400 ? '' : '+ ' ).'name ' ;
626631
627- $ this ->assertDumpMatchesFormat (<<< ' EOTXT'
632+ $ this ->assertDumpMatchesFormat (<<<EOTXT
628633ReflectionParameter {
629634 +name: "someParameter"
630635 position: 0
631636 attributes: array:1 [
632637 0 => ReflectionAttribute {
633- name : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
638+ $ dumpedAttributeNameProperty : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
634639 arguments: array:1 [
635640 0 => "three"
636641 ]
0 commit comments