Skip to content

Commit

Permalink
Make final classes that can be
Browse files Browse the repository at this point in the history
This allows us to adapt to upstream changes without that being a
breaking change.
  • Loading branch information
greg0ire committed Nov 30, 2024
1 parent 347d92d commit 4530215
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
UPGRADE to 4.0
==============

## Final classes

Some classes have been marked as `final` because they are not supposed to be
extended. Consider using composition instead of inheritance.

## Mandatory ManagerRegistry argument

It is now mandatory to pass a `ManagerRegistry` instance to the constructor of
Expand Down
2 changes: 1 addition & 1 deletion src/Command/LoadDataFixturesDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/**
* Load data fixtures from bundles.
*/
class LoadDataFixturesDoctrineCommand extends DoctrineCommand
final class LoadDataFixturesDoctrineCommand extends DoctrineCommand
{
/** @param PurgerFactory[] $purgerFactories */
public function __construct(
Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/DoctrineFixturesExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use function dirname;

class DoctrineFixturesExtension extends Extension
final class DoctrineFixturesExtension extends Extension
{
/**
* {@inheritDoc}
Expand Down
2 changes: 1 addition & 1 deletion src/DoctrineFixturesBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

use function dirname;

class DoctrineFixturesBundle extends Bundle
final class DoctrineFixturesBundle extends Bundle
{
public function build(ContainerBuilder $container): void
{
Expand Down

0 comments on commit 4530215

Please sign in to comment.