File tree Expand file tree Collapse file tree 3 files changed +24
-4
lines changed
tests/AutoMapperTest/Issue284 Expand file tree Collapse file tree 3 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -89,10 +89,6 @@ public function hasConstructor(): bool
8989 return false ;
9090 }
9191
92- if ($ constructor ->getDeclaringClass ()->isInterface () || $ constructor ->getDeclaringClass ()->isAbstract ()) {
93- return false ;
94- }
95-
9692 $ parameters = $ constructor ->getParameters ();
9793 $ mandatoryParameters = [];
9894
Original file line number Diff line number Diff line change 1+ AutoMapper\Tests\AutoMapperTest\Issue284\Banana {
2+ +weight: 1
3+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace AutoMapper \Tests \AutoMapperTest \Issue284 ;
6+
7+ use AutoMapper \Tests \AutoMapperBuilder ;
8+
9+ abstract readonly class Fruit
10+ {
11+ public function __construct (
12+ public int $ weight
13+ ) {
14+ }
15+ }
16+
17+ final readonly class Banana extends Fruit
18+ {
19+ }
20+
21+ return AutoMapperBuilder::buildAutoMapper ()->map (['weight ' => 1 ], Banana::class);
You can’t perform that action at this time.
0 commit comments