diff --git a/Command/ClearMetadataCacheDoctrineODMCommand.php b/Command/ClearMetadataCacheDoctrineODMCommand.php index f11f02c6..a4f4f354 100644 --- a/Command/ClearMetadataCacheDoctrineODMCommand.php +++ b/Command/ClearMetadataCacheDoctrineODMCommand.php @@ -14,7 +14,7 @@ * * @internal since version 4.7.0 */ -class ClearMetadataCacheDoctrineODMCommand extends MetadataCommand +final class ClearMetadataCacheDoctrineODMCommand extends MetadataCommand { protected function configure(): void { diff --git a/Command/CreateSchemaDoctrineODMCommand.php b/Command/CreateSchemaDoctrineODMCommand.php index a94e7664..2f0454f2 100644 --- a/Command/CreateSchemaDoctrineODMCommand.php +++ b/Command/CreateSchemaDoctrineODMCommand.php @@ -15,7 +15,7 @@ * * @internal since version 4.7.0 */ -class CreateSchemaDoctrineODMCommand extends CreateCommand +final class CreateSchemaDoctrineODMCommand extends CreateCommand { protected function configure(): void { diff --git a/Command/DropSchemaDoctrineODMCommand.php b/Command/DropSchemaDoctrineODMCommand.php index 2e03b16a..f2bc6f74 100644 --- a/Command/DropSchemaDoctrineODMCommand.php +++ b/Command/DropSchemaDoctrineODMCommand.php @@ -15,7 +15,7 @@ * * @internal since version 4.7.0 */ -class DropSchemaDoctrineODMCommand extends DropCommand +final class DropSchemaDoctrineODMCommand extends DropCommand { protected function configure(): void { diff --git a/Command/GenerateHydratorsDoctrineODMCommand.php b/Command/GenerateHydratorsDoctrineODMCommand.php index ea1c5248..866424be 100644 --- a/Command/GenerateHydratorsDoctrineODMCommand.php +++ b/Command/GenerateHydratorsDoctrineODMCommand.php @@ -14,7 +14,7 @@ * * @internal since version 4.7.0 */ -class GenerateHydratorsDoctrineODMCommand extends GenerateHydratorsCommand +final class GenerateHydratorsDoctrineODMCommand extends GenerateHydratorsCommand { protected function configure(): void { diff --git a/Command/GenerateProxiesDoctrineODMCommand.php b/Command/GenerateProxiesDoctrineODMCommand.php index 15931e35..134710a5 100644 --- a/Command/GenerateProxiesDoctrineODMCommand.php +++ b/Command/GenerateProxiesDoctrineODMCommand.php @@ -14,7 +14,7 @@ * * @internal since version 4.7.0 */ -class GenerateProxiesDoctrineODMCommand extends GenerateProxiesCommand +final class GenerateProxiesDoctrineODMCommand extends GenerateProxiesCommand { protected function configure(): void { diff --git a/Command/InfoDoctrineODMCommand.php b/Command/InfoDoctrineODMCommand.php index fffc12d0..06a79758 100644 --- a/Command/InfoDoctrineODMCommand.php +++ b/Command/InfoDoctrineODMCommand.php @@ -20,7 +20,7 @@ * * @internal since version 4.7.0 */ -class InfoDoctrineODMCommand extends DoctrineODMCommand +final class InfoDoctrineODMCommand extends DoctrineODMCommand { protected function configure(): void { diff --git a/Command/LoadDataFixturesDoctrineODMCommand.php b/Command/LoadDataFixturesDoctrineODMCommand.php index 88a6182c..e43e10b5 100644 --- a/Command/LoadDataFixturesDoctrineODMCommand.php +++ b/Command/LoadDataFixturesDoctrineODMCommand.php @@ -22,7 +22,7 @@ * * @internal since version 4.7.0 */ -class LoadDataFixturesDoctrineODMCommand extends DoctrineODMCommand +final class LoadDataFixturesDoctrineODMCommand extends DoctrineODMCommand { public function __construct(ManagerRegistry $registry, private SymfonyFixturesLoaderInterface $fixturesLoader) { diff --git a/Command/QueryDoctrineODMCommand.php b/Command/QueryDoctrineODMCommand.php index 78bd8600..9d6e1289 100644 --- a/Command/QueryDoctrineODMCommand.php +++ b/Command/QueryDoctrineODMCommand.php @@ -14,7 +14,7 @@ * * @internal since version 4.7.0 */ -class QueryDoctrineODMCommand extends QueryCommand +final class QueryDoctrineODMCommand extends QueryCommand { protected function configure(): void { diff --git a/Command/ShardDoctrineODMCommand.php b/Command/ShardDoctrineODMCommand.php index d251c05b..40ee1bd7 100644 --- a/Command/ShardDoctrineODMCommand.php +++ b/Command/ShardDoctrineODMCommand.php @@ -15,7 +15,7 @@ * * @internal since version 4.7.0 */ -class ShardDoctrineODMCommand extends ShardCommand +final class ShardDoctrineODMCommand extends ShardCommand { protected function configure(): void { diff --git a/Command/UpdateSchemaDoctrineODMCommand.php b/Command/UpdateSchemaDoctrineODMCommand.php index e9cc6429..3b98414d 100644 --- a/Command/UpdateSchemaDoctrineODMCommand.php +++ b/Command/UpdateSchemaDoctrineODMCommand.php @@ -15,7 +15,7 @@ * * @internal since version 4.7.0 */ -class UpdateSchemaDoctrineODMCommand extends UpdateCommand +final class UpdateSchemaDoctrineODMCommand extends UpdateCommand { protected function configure(): void { diff --git a/DataCollector/CommandDataCollector.php b/DataCollector/CommandDataCollector.php index 7389ae93..a4916dba 100644 --- a/DataCollector/CommandDataCollector.php +++ b/DataCollector/CommandDataCollector.php @@ -20,7 +20,7 @@ use function MongoDB\BSON\toCanonicalExtendedJSON; /** @internal since version 4.7.0 */ -class CommandDataCollector extends DataCollector +final class CommandDataCollector extends DataCollector { public function __construct(private CommandLogger $commandLogger) { diff --git a/DependencyInjection/Compiler/CreateHydratorDirectoryPass.php b/DependencyInjection/Compiler/CreateHydratorDirectoryPass.php index e0d63fd1..d6d79f66 100644 --- a/DependencyInjection/Compiler/CreateHydratorDirectoryPass.php +++ b/DependencyInjection/Compiler/CreateHydratorDirectoryPass.php @@ -15,7 +15,7 @@ use function sprintf; /** @internal */ -class CreateHydratorDirectoryPass implements CompilerPassInterface +final class CreateHydratorDirectoryPass implements CompilerPassInterface { public function process(ContainerBuilder $container): void { diff --git a/DependencyInjection/Compiler/CreateProxyDirectoryPass.php b/DependencyInjection/Compiler/CreateProxyDirectoryPass.php index 72110e5a..397003fb 100644 --- a/DependencyInjection/Compiler/CreateProxyDirectoryPass.php +++ b/DependencyInjection/Compiler/CreateProxyDirectoryPass.php @@ -15,7 +15,7 @@ use function sprintf; /** @internal since version 4.7.0 */ -class CreateProxyDirectoryPass implements CompilerPassInterface +final class CreateProxyDirectoryPass implements CompilerPassInterface { public function process(ContainerBuilder $container): void { diff --git a/DependencyInjection/Compiler/DoctrineMongoDBMappingsPass.php b/DependencyInjection/Compiler/DoctrineMongoDBMappingsPass.php index e4a9a705..50e85441 100644 --- a/DependencyInjection/Compiler/DoctrineMongoDBMappingsPass.php +++ b/DependencyInjection/Compiler/DoctrineMongoDBMappingsPass.php @@ -21,7 +21,7 @@ * * @internal since version 4.7.0 */ -class DoctrineMongoDBMappingsPass extends RegisterMappingsPass +final class DoctrineMongoDBMappingsPass extends RegisterMappingsPass { /** * You should not directly instantiate this class but use one of the diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index c496959b..a9c0584d 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -9,7 +9,7 @@ UPGRADE FROM 4.x to 5.0 `findBundle` and `findBasePathForBundle` methods from `Doctrine\Bundle\MongoDBBundle\Command\DoctrineODMCommand` have been removed without replacement. -* The `Doctrine\Bundle\MongoDBBundle\Command\DoctrineODMCommand` class is now - `@internal`, you should not extend from this class. +* All command and compiler pass classes are internal and final. They cannot be + used directly or extended. * Remove support of Annotation mapping, you should use Attributes or XML instead. * Remove `--service` option from `doctrine:mongodb:fixtures:load` command