Skip to content

Commit

Permalink
Merge pull request #156 from IonBazan/bugfix/final-class-reflection
Browse files Browse the repository at this point in the history
Fix generating final classes from reflection
  • Loading branch information
Ocramius authored Nov 21, 2022
2 parents 0337d92 + 281746e commit 91aabc0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Generator/ClassGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public static function fromReflection(ClassReflection $classReflection)
}

$cg->setAbstract($classReflection->isAbstract());
$cg->setFinal($classReflection->isFinal());

// set the namespace
if ($classReflection->inNamespace()) {
Expand Down
2 changes: 1 addition & 1 deletion test/Generator/ClassGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1395,7 +1395,7 @@ public function testClassWithPromotedParameterFromReflection(): void
$expectedOutput = <<<EOS
namespace LaminasTest\Code\Generator\TestAsset;
class ClassWithPromotedParameter
final class ClassWithPromotedParameter
{
public function __construct(private string \$promotedParameter)
{
Expand Down

0 comments on commit 91aabc0

Please sign in to comment.