@@ -534,13 +534,14 @@ class: "Symfony\Component\VarDumper\Tests\Caster\ReflectionCasterTest"
534534 public function testReflectionClassWithAttribute ()
535535 {
536536 $ var = new \ReflectionClass (LotsOfAttributes::class);
537+ $ dumpedAttributeNameProperty = (\PHP_VERSION_ID < 80400 ? '' : '+ ' ).'name ' ;
537538
538- $ this ->assertDumpMatchesFormat (<<< ' EOTXT'
539+ $ this ->assertDumpMatchesFormat (<<<EOTXT
539540ReflectionClass {
540541 +name: "Symfony\Component\VarDumper\Tests\Fixtures\LotsOfAttributes"
541542%A attributes: array:1 [
542543 0 => ReflectionAttribute {
543- name : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
544+ $ dumpedAttributeNameProperty : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
544545 arguments: []
545546 }
546547 ]
@@ -553,14 +554,15 @@ public function testReflectionClassWithAttribute()
553554 public function testReflectionMethodWithAttribute ()
554555 {
555556 $ var = new \ReflectionMethod (LotsOfAttributes::class, 'someMethod ' );
557+ $ dumpedAttributeNameProperty = (\PHP_VERSION_ID < 80400 ? '' : '+ ' ).'name ' ;
556558
557- $ this ->assertDumpMatchesFormat (<<< ' EOTXT'
559+ $ this ->assertDumpMatchesFormat (<<<EOTXT
558560ReflectionMethod {
559561 +name: "someMethod"
560562 +class: "Symfony\Component\VarDumper\Tests\Fixtures\LotsOfAttributes"
561563%A attributes: array:1 [
562564 0 => ReflectionAttribute {
563- name : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
565+ $ dumpedAttributeNameProperty : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
564566 arguments: array:1 [
565567 0 => "two"
566568 ]
@@ -575,14 +577,15 @@ public function testReflectionMethodWithAttribute()
575577 public function testReflectionPropertyWithAttribute ()
576578 {
577579 $ var = new \ReflectionProperty (LotsOfAttributes::class, 'someProperty ' );
580+ $ dumpedAttributeNameProperty = (\PHP_VERSION_ID < 80400 ? '' : '+ ' ).'name ' ;
578581
579- $ this ->assertDumpMatchesFormat (<<< ' EOTXT'
582+ $ this ->assertDumpMatchesFormat (<<<EOTXT
580583ReflectionProperty {
581584 +name: "someProperty"
582585 +class: "Symfony\Component\VarDumper\Tests\Fixtures\LotsOfAttributes"
583586%A attributes: array:1 [
584587 0 => ReflectionAttribute {
585- name : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
588+ $ dumpedAttributeNameProperty : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
586589 arguments: array:2 [
587590 0 => "one"
588591 "extra" => "hello"
@@ -597,22 +600,23 @@ public function testReflectionPropertyWithAttribute()
597600 public function testReflectionClassConstantWithAttribute ()
598601 {
599602 $ var = new \ReflectionClassConstant (LotsOfAttributes::class, 'SOME_CONSTANT ' );
603+ $ dumpedAttributeNameProperty = (\PHP_VERSION_ID < 80400 ? '' : '+ ' ).'name ' ;
600604
601- $ this ->assertDumpMatchesFormat (<<< ' EOTXT'
605+ $ this ->assertDumpMatchesFormat (<<<EOTXT
602606ReflectionClassConstant {
603607 +name: "SOME_CONSTANT"
604608 +class: "Symfony\Component\VarDumper\Tests\Fixtures\LotsOfAttributes"
605609 modifiers: "public"
606610 value: "some value"
607611 attributes: array:2 [
608612 0 => ReflectionAttribute {
609- name : "Symfony\Component\VarDumper\Tests\Fixtures\RepeatableAttribute"
613+ $ dumpedAttributeNameProperty : "Symfony\Component\VarDumper\Tests\Fixtures\RepeatableAttribute"
610614 arguments: array:1 [
611615 0 => "one"
612616 ]
613617 }
614618 1 => ReflectionAttribute {
615- name : "Symfony\Component\VarDumper\Tests\Fixtures\RepeatableAttribute"
619+ $ dumpedAttributeNameProperty : "Symfony\Component\VarDumper\Tests\Fixtures\RepeatableAttribute"
616620 arguments: array:1 [
617621 0 => "two"
618622 ]
@@ -626,14 +630,15 @@ public function testReflectionClassConstantWithAttribute()
626630 public function testReflectionParameterWithAttribute ()
627631 {
628632 $ var = new \ReflectionParameter ([LotsOfAttributes::class, 'someMethod ' ], 'someParameter ' );
633+ $ dumpedAttributeNameProperty = (\PHP_VERSION_ID < 80400 ? '' : '+ ' ).'name ' ;
629634
630- $ this ->assertDumpMatchesFormat (<<< ' EOTXT'
635+ $ this ->assertDumpMatchesFormat (<<<EOTXT
631636ReflectionParameter {
632637 +name: "someParameter"
633638 position: 0
634639 attributes: array:1 [
635640 0 => ReflectionAttribute {
636- name : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
641+ $ dumpedAttributeNameProperty : "Symfony\Component\VarDumper\Tests\Fixtures\MyAttribute"
637642 arguments: array:1 [
638643 0 => "three"
639644 ]
0 commit comments