diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 8c601a0c..15a6991f 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -43,13 +43,6 @@ jobs: driver-version: "1.5.0" stability: "stable" symfony-version: "4.4.*" - # Remove this job when releasing mongodb-odm 2.5 - - dependencies: "highest" - os: "ubuntu-20.04" - php-version: "8.2" - driver-version: "stable" - stability: "dev" - symfony-version: "6.2.*" exclude: - php-version: "7.4" symfony-version: "6.2.x" diff --git a/DataCollector/CommandDataCollector.php b/DataCollector/CommandDataCollector.php index a3d02d2d..57606144 100644 --- a/DataCollector/CommandDataCollector.php +++ b/DataCollector/CommandDataCollector.php @@ -43,12 +43,12 @@ static function (Command $command): array { 'durationMicros' => $command->getDurationMicros(), ]; }, - $this->commandLogger->getAll() + $this->commandLogger->getAll(), ), 'time' => array_reduce( $this->commandLogger->getAll(), static fn (int $total, Command $command): int => $total + $command->getDurationMicros(), - 0 + 0, ), ]; } diff --git a/DependencyInjection/Compiler/CacheCompatibilityPass.php b/DependencyInjection/Compiler/CacheCompatibilityPass.php index c06c32ca..31bf2162 100644 --- a/DependencyInjection/Compiler/CacheCompatibilityPass.php +++ b/DependencyInjection/Compiler/CacheCompatibilityPass.php @@ -73,7 +73,7 @@ private function createCompatibilityLayerDefinition(ContainerBuilder $container, 'doctrine/mongodb-odm-bundle', '4.4', 'Configuring doctrine/cache is deprecated. Please update the cache service "%s" to use a PSR-6 cache.', - $definitionId + $definitionId, ); } @@ -90,7 +90,7 @@ private function wrapIfNecessary(ContainerBuilder $container, ?string $aliasId, return; } - $aliasId = $aliasId ?? $definitionId; + $aliasId ??= $definitionId; $compatibilityLayerId = $definitionId . '.compatibility_layer'; $container->setDefinition($compatibilityLayerId, $compatibilityLayer); diff --git a/DependencyInjection/Compiler/CreateHydratorDirectoryPass.php b/DependencyInjection/Compiler/CreateHydratorDirectoryPass.php index 942150cd..82b9498d 100644 --- a/DependencyInjection/Compiler/CreateHydratorDirectoryPass.php +++ b/DependencyInjection/Compiler/CreateHydratorDirectoryPass.php @@ -33,12 +33,12 @@ public function process(ContainerBuilder $container) if (! is_dir($hydratorCacheDir)) { if (@mkdir($hydratorCacheDir, 0775, true) === false && ! is_dir($hydratorCacheDir)) { throw new RuntimeException( - sprintf('Unable to create the Doctrine Hydrator directory (%s)', dirname($hydratorCacheDir)) + sprintf('Unable to create the Doctrine Hydrator directory (%s)', dirname($hydratorCacheDir)), ); } } elseif (! is_writable($hydratorCacheDir)) { throw new RuntimeException( - sprintf('Unable to write in the Doctrine Hydrator directory (%s)', $hydratorCacheDir) + sprintf('Unable to write in the Doctrine Hydrator directory (%s)', $hydratorCacheDir), ); } } diff --git a/DependencyInjection/Compiler/CreateProxyDirectoryPass.php b/DependencyInjection/Compiler/CreateProxyDirectoryPass.php index ca8e8a21..5139534e 100644 --- a/DependencyInjection/Compiler/CreateProxyDirectoryPass.php +++ b/DependencyInjection/Compiler/CreateProxyDirectoryPass.php @@ -33,12 +33,12 @@ public function process(ContainerBuilder $container) if (! is_dir($proxyCacheDir)) { if (@mkdir($proxyCacheDir, 0775, true) === false && ! is_dir($proxyCacheDir)) { throw new RuntimeException( - sprintf('Unable to create the Doctrine Proxy directory (%s)', dirname($proxyCacheDir)) + sprintf('Unable to create the Doctrine Proxy directory (%s)', dirname($proxyCacheDir)), ); } } elseif (! is_writable($proxyCacheDir)) { throw new RuntimeException( - sprintf('Unable to write in the Doctrine Proxy directory (%s)', $proxyCacheDir) + sprintf('Unable to write in the Doctrine Proxy directory (%s)', $proxyCacheDir), ); } } diff --git a/DependencyInjection/Compiler/DoctrineMongoDBMappingsPass.php b/DependencyInjection/Compiler/DoctrineMongoDBMappingsPass.php index 92d83f15..d7e39f3c 100644 --- a/DependencyInjection/Compiler/DoctrineMongoDBMappingsPass.php +++ b/DependencyInjection/Compiler/DoctrineMongoDBMappingsPass.php @@ -45,7 +45,7 @@ public function __construct($driver, array $namespaces, array $managerParameters $enabledParameter, 'doctrine_mongodb.odm.%s_configuration', 'addDocumentNamespace', - $aliasMap + $aliasMap, ); } diff --git a/DependencyInjection/DoctrineMongoDBExtension.php b/DependencyInjection/DoctrineMongoDBExtension.php index 42cc54ea..723a283b 100644 --- a/DependencyInjection/DoctrineMongoDBExtension.php +++ b/DependencyInjection/DoctrineMongoDBExtension.php @@ -112,7 +112,7 @@ public function load(array $configs, ContainerBuilder $container) $config['document_managers'], $config['default_document_manager'], $config['default_database'], - $container + $container, ); if ($config['resolve_target_documents']) { @@ -237,7 +237,7 @@ protected function loadDocumentManagers(array $dmConfigs, $defaultDM, $defaultDB $documentManager, $defaultDM, $defaultDB, - $container + $container, ); $dms[$name] = sprintf('doctrine_mongodb.odm.%s_document_manager', $name); } @@ -263,7 +263,7 @@ protected function loadDocumentManager(array $documentManager, $defaultDM, $defa $odmConfigDef->addTag(self::CONFIGURATION_TAG); $container->setDefinition( $configurationId, - $odmConfigDef + $odmConfigDef, ); $this->loadDocumentManagerBundlesMappingInformation($documentManager, $odmConfigDef, $container); @@ -298,7 +298,7 @@ protected function loadDocumentManager(array $documentManager, $defaultDM, $defa $container->getAlias('doctrine_mongodb.odm.command_logger') ->setDeprecated(...$this->buildDeprecationArgs( '4.4', - 'The service %alias_id% is deprecated and will be dropped in DoctrineMongoDBBundle 5.0. Use "doctrine_mongodb.odm.psr_command_logger" instead.' + 'The service %alias_id% is deprecated and will be dropped in DoctrineMongoDBBundle 5.0. Use "doctrine_mongodb.odm.psr_command_logger" instead.', )); // logging @@ -336,7 +336,7 @@ protected function loadDocumentManager(array $documentManager, $defaultDM, $defa $container ->setDefinition( $managerConfiguratorName, - new ChildDefinition('doctrine_mongodb.odm.manager_configurator.abstract') + new ChildDefinition('doctrine_mongodb.odm.manager_configurator.abstract'), ) ->replaceArgument(0, $enabledFilters); @@ -369,13 +369,13 @@ protected function loadDocumentManager(array $documentManager, $defaultDM, $defa $container->setAlias( 'doctrine_mongodb.odm.document_manager', - new Alias(sprintf('doctrine_mongodb.odm.%s_document_manager', $documentManager['name'])) + new Alias(sprintf('doctrine_mongodb.odm.%s_document_manager', $documentManager['name'])), ); $container->getAlias('doctrine_mongodb.odm.document_manager')->setPublic(true); $container->setAlias( 'doctrine_mongodb.odm.event_manager', - new Alias(sprintf('doctrine_mongodb.odm.%s_connection.event_manager', $connectionName)) + new Alias(sprintf('doctrine_mongodb.odm.%s_connection.event_manager', $connectionName)), ); } @@ -393,13 +393,13 @@ protected function loadConnections(array $connections, ContainerBuilder $contain $eventManagerId = sprintf('doctrine_mongodb.odm.%s_connection.event_manager', $name); $container->setDefinition( $eventManagerId, - new ChildDefinition('doctrine_mongodb.odm.connection.event_manager') + new ChildDefinition('doctrine_mongodb.odm.connection.event_manager'), ); $configurationId = sprintf('doctrine_mongodb.odm.%s_configuration', $name); $container->setDefinition( $configurationId, - new Definition('%doctrine_mongodb.odm.configuration.class%') + new Definition('%doctrine_mongodb.odm.configuration.class%'), ); $odmConnArgs = [ diff --git a/Form/DoctrineMongoDBTypeGuesser.php b/Form/DoctrineMongoDBTypeGuesser.php index 54358550..7f77da90 100644 --- a/Form/DoctrineMongoDBTypeGuesser.php +++ b/Form/DoctrineMongoDBTypeGuesser.php @@ -68,7 +68,7 @@ public function guessType($class, $property) 'multiple' => $multiple, 'expanded' => $multiple, ], - Guess::HIGH_CONFIDENCE + Guess::HIGH_CONFIDENCE, ); } @@ -78,7 +78,7 @@ public function guessType($class, $property) return new TypeGuess( CollectionType::class, [], - Guess::MEDIUM_CONFIDENCE + Guess::MEDIUM_CONFIDENCE, ); case Type::BOOL: @@ -86,7 +86,7 @@ public function guessType($class, $property) return new TypeGuess( CheckboxType::class, [], - Guess::HIGH_CONFIDENCE + Guess::HIGH_CONFIDENCE, ); case Type::DATE: @@ -94,14 +94,14 @@ public function guessType($class, $property) return new TypeGuess( DateTimeType::class, [], - Guess::HIGH_CONFIDENCE + Guess::HIGH_CONFIDENCE, ); case Type::FLOAT: return new TypeGuess( NumberType::class, [], - Guess::MEDIUM_CONFIDENCE + Guess::MEDIUM_CONFIDENCE, ); case Type::INT: @@ -109,14 +109,14 @@ public function guessType($class, $property) return new TypeGuess( IntegerType::class, [], - Guess::MEDIUM_CONFIDENCE + Guess::MEDIUM_CONFIDENCE, ); case Type::STRING: return new TypeGuess( TextType::class, [], - Guess::MEDIUM_CONFIDENCE + Guess::MEDIUM_CONFIDENCE, ); } } @@ -134,13 +134,13 @@ public function guessRequired($class, $property) if (! $ret[0]->isNullable($property)) { return new ValueGuess( true, - Guess::HIGH_CONFIDENCE + Guess::HIGH_CONFIDENCE, ); } return new ValueGuess( false, - Guess::MEDIUM_CONFIDENCE + Guess::MEDIUM_CONFIDENCE, ); } diff --git a/Form/Type/DocumentType.php b/Form/Type/DocumentType.php index 7329616d..538eb78a 100644 --- a/Form/Type/DocumentType.php +++ b/Form/Type/DocumentType.php @@ -30,7 +30,7 @@ public function getLoader(ObjectManager $manager, $queryBuilder, $class): Entity return new MongoDBQueryBuilderLoader( $queryBuilder, $manager, - $class + $class, ); } diff --git a/Loader/SymfonyFixturesLoader.php b/Loader/SymfonyFixturesLoader.php index 8d7494d0..b29eb00d 100644 --- a/Loader/SymfonyFixturesLoader.php +++ b/Loader/SymfonyFixturesLoader.php @@ -81,7 +81,7 @@ protected function createFixture($class) throw new LogicException(sprintf( 'The "%s" fixture class is trying to be loaded, but is not available. Make sure this class is defined as a service and tagged with "%s".', $class, - FixturesCompilerPass::FIXTURE_TAG + FixturesCompilerPass::FIXTURE_TAG, )); } diff --git a/Repository/ServiceRepositoryTrait.php b/Repository/ServiceRepositoryTrait.php index e9f9f8ce..9246a7a2 100644 --- a/Repository/ServiceRepositoryTrait.php +++ b/Repository/ServiceRepositoryTrait.php @@ -26,7 +26,7 @@ public function __construct(ManagerRegistry $registry, $documentClass) if ($manager === null) { throw new LogicException(sprintf( 'Could not find the document manager for class "%s". Check your Doctrine configuration to make sure it is configured to load this document’s metadata.', - $documentClass + $documentClass, )); } diff --git a/Tests/DependencyInjection/AbstractMongoDBExtensionTest.php b/Tests/DependencyInjection/AbstractMongoDBExtensionTest.php index a0d25bd9..37008a9f 100644 --- a/Tests/DependencyInjection/AbstractMongoDBExtensionTest.php +++ b/Tests/DependencyInjection/AbstractMongoDBExtensionTest.php @@ -283,7 +283,7 @@ public function testBundleDocumentAliases(): void $loader = new DoctrineMongoDBExtension(); $config = DoctrineMongoDBExtensionTest::buildConfiguration( - ['document_managers' => ['default' => ['mappings' => ['XmlBundle' => []]]]] + ['document_managers' => ['default' => ['mappings' => ['XmlBundle' => []]]]], ); $loader->load($config, $container); @@ -298,7 +298,7 @@ public function testXmlBundleMappingDetection(): void $container = $this->getContainer('XmlBundle'); $loader = new DoctrineMongoDBExtension(); $config = DoctrineMongoDBExtensionTest::buildConfiguration( - ['document_managers' => ['default' => ['mappings' => ['XmlBundle' => []]]]] + ['document_managers' => ['default' => ['mappings' => ['XmlBundle' => []]]]], ); $loader->load($config, $container); @@ -316,7 +316,7 @@ public function testNewBundleStructureXmlBundleMappingDetection(): void $container = $this->getContainer('NewXmlBundle'); $loader = new DoctrineMongoDBExtension(); $config = DoctrineMongoDBExtensionTest::buildConfiguration( - ['document_managers' => ['default' => ['mappings' => ['NewXmlBundle' => []]]]] + ['document_managers' => ['default' => ['mappings' => ['NewXmlBundle' => []]]]], ); $loader->load($config, $container); @@ -330,7 +330,7 @@ public function testAnnotationsBundleMappingDetection(): void $container = $this->getContainer('AnnotationsBundle'); $loader = new DoctrineMongoDBExtension(); $config = DoctrineMongoDBExtensionTest::buildConfiguration( - ['document_managers' => ['default' => ['mappings' => ['AnnotationsBundle' => []]]]] + ['document_managers' => ['default' => ['mappings' => ['AnnotationsBundle' => []]]]], ); $loader->load($config, $container); @@ -349,7 +349,7 @@ public function testAttributesBundleMappingDetection(): void $container = $this->getContainer('AttributesBundle'); $loader = new DoctrineMongoDBExtension(); $config = DoctrineMongoDBExtensionTest::buildConfiguration( - ['document_managers' => ['default' => ['mappings' => ['AttributesBundle' => 'attribute']]]] + ['document_managers' => ['default' => ['mappings' => ['AttributesBundle' => 'attribute']]]], ); $loader->load($config, $container); diff --git a/Tests/DependencyInjection/Compiler/CacheCompatibilityPassTest.php b/Tests/DependencyInjection/Compiler/CacheCompatibilityPassTest.php index e320a748..9502b36b 100644 --- a/Tests/DependencyInjection/Compiler/CacheCompatibilityPassTest.php +++ b/Tests/DependencyInjection/Compiler/CacheCompatibilityPassTest.php @@ -32,11 +32,11 @@ public function registerContainerConfiguration(LoaderInterface $loader): void $loader->load(static function (ContainerBuilder $containerBuilder): void { $containerBuilder->loadFromExtension( 'doctrine_mongodb', - ['document_managers' => ['default' => ['metadata_cache_driver' => ['type' => 'service', 'id' => 'custom_cache_service']]]] + ['document_managers' => ['default' => ['metadata_cache_driver' => ['type' => 'service', 'id' => 'custom_cache_service']]]], ); $containerBuilder->setDefinition( 'custom_cache_service', - new Definition(ArrayAdapter::class) + new Definition(ArrayAdapter::class), ); }); } @@ -57,13 +57,13 @@ public function registerContainerConfiguration(LoaderInterface $loader): void $loader->load(static function (ContainerBuilder $containerBuilder): void { $containerBuilder->loadFromExtension( 'doctrine_mongodb', - ['document_managers' => ['default' => ['metadata_cache_driver' => ['type' => 'service', 'id' => 'custom_cache_service']]]] + ['document_managers' => ['default' => ['metadata_cache_driver' => ['type' => 'service', 'id' => 'custom_cache_service']]]], ); $containerBuilder->setDefinition( 'custom_cache_service', (new Definition(DoctrineProvider::class)) ->setArguments([new Definition(ArrayAdapter::class)]) - ->setFactory([DoctrineProvider::class, 'wrap']) + ->setFactory([DoctrineProvider::class, 'wrap']), ); }); } diff --git a/Tests/DependencyInjection/DoctrineMongoDBExtensionTest.php b/Tests/DependencyInjection/DoctrineMongoDBExtensionTest.php index 06f7449d..5fca1d94 100644 --- a/Tests/DependencyInjection/DoctrineMongoDBExtensionTest.php +++ b/Tests/DependencyInjection/DoctrineMongoDBExtensionTest.php @@ -34,7 +34,7 @@ public static function buildConfiguration(array $settings = []): array 'connections' => ['default' => []], 'document_managers' => ['default' => []], ], - $settings + $settings, ), ]; } @@ -230,7 +230,7 @@ public function testAutomapping(array $documentManagers): void 'document_managers' => $documentManagers, ], ], - $container + $container, ); $configDm1 = $container->getDefinition('doctrine_mongodb.odm.dm1_configuration'); @@ -244,7 +244,7 @@ public function testAutomapping(array $documentManagers): void ['OtherXmlBundle' => 'Doctrine\Bundle\MongoDBBundle\Tests\DependencyInjection\Fixtures\Bundles\OtherXmlBundle\Document'], ], ], - $configDm1->getMethodCalls() + $configDm1->getMethodCalls(), ); $this->assertContains( @@ -254,7 +254,7 @@ public function testAutomapping(array $documentManagers): void ['XmlBundle' => 'Doctrine\Bundle\MongoDBBundle\Tests\DependencyInjection\Fixtures\Bundles\XmlBundle\Document'], ], ], - $configDm2->getMethodCalls() + $configDm2->getMethodCalls(), ); $this->assertContains( @@ -264,7 +264,7 @@ public function testAutomapping(array $documentManagers): void ['NewXmlBundle' => 'Doctrine\Bundle\MongoDBBundle\Tests\DependencyInjection\Fixtures\Bundles\NewXmlBundle\Document'], ], ], - $configDm3->getMethodCalls() + $configDm3->getMethodCalls(), ); } @@ -290,7 +290,7 @@ public function testFactoriesAreRegistered(): void ], ], ], - $container + $container, ); $configDm1 = $container->getDefinition('doctrine_mongodb.odm.dm1_configuration'); diff --git a/Tests/DependencyInjection/Fixtures/Bundles/AnnotationsBundle/Document/Test.php b/Tests/DependencyInjection/Fixtures/Bundles/AnnotationsBundle/Document/Test.php index da46dcc0..b7f4c0ea 100644 --- a/Tests/DependencyInjection/Fixtures/Bundles/AnnotationsBundle/Document/Test.php +++ b/Tests/DependencyInjection/Fixtures/Bundles/AnnotationsBundle/Document/Test.php @@ -6,9 +6,7 @@ use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB; -/** - * @MongoDB\Document - */ +/** @MongoDB\Document */ class Test { } diff --git a/Tests/DependencyInjection/Fixtures/Bundles/RepositoryServiceBundle/Document/TestCustomClassRepoDocument.php b/Tests/DependencyInjection/Fixtures/Bundles/RepositoryServiceBundle/Document/TestCustomClassRepoDocument.php index b98388bc..e051d69b 100644 --- a/Tests/DependencyInjection/Fixtures/Bundles/RepositoryServiceBundle/Document/TestCustomClassRepoDocument.php +++ b/Tests/DependencyInjection/Fixtures/Bundles/RepositoryServiceBundle/Document/TestCustomClassRepoDocument.php @@ -7,9 +7,7 @@ use Doctrine\Bundle\MongoDBBundle\Tests\DependencyInjection\Fixtures\Bundles\RepositoryServiceBundle\Repository\TestCustomClassRepoRepository; use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM; -/** - * @ODM\Document(repositoryClass=TestCustomClassRepoRepository::class) - */ +/** @ODM\Document(repositoryClass=TestCustomClassRepoRepository::class) */ class TestCustomClassRepoDocument { /** diff --git a/Tests/DependencyInjection/Fixtures/Bundles/RepositoryServiceBundle/Document/TestCustomServiceRepoDocument.php b/Tests/DependencyInjection/Fixtures/Bundles/RepositoryServiceBundle/Document/TestCustomServiceRepoDocument.php index 64211fe4..ae250f04 100644 --- a/Tests/DependencyInjection/Fixtures/Bundles/RepositoryServiceBundle/Document/TestCustomServiceRepoDocument.php +++ b/Tests/DependencyInjection/Fixtures/Bundles/RepositoryServiceBundle/Document/TestCustomServiceRepoDocument.php @@ -7,9 +7,7 @@ use Doctrine\Bundle\MongoDBBundle\Tests\DependencyInjection\Fixtures\Bundles\RepositoryServiceBundle\Repository\TestCustomServiceRepoDocumentRepository; use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM; -/** - * @ODM\Document(repositoryClass=TestCustomServiceRepoDocumentRepository::class) - */ +/** @ODM\Document(repositoryClass=TestCustomServiceRepoDocumentRepository::class) */ class TestCustomServiceRepoDocument { /** diff --git a/Tests/DependencyInjection/Fixtures/Bundles/RepositoryServiceBundle/Document/TestDefaultRepoDocument.php b/Tests/DependencyInjection/Fixtures/Bundles/RepositoryServiceBundle/Document/TestDefaultRepoDocument.php index 5472c8da..9ae24884 100644 --- a/Tests/DependencyInjection/Fixtures/Bundles/RepositoryServiceBundle/Document/TestDefaultRepoDocument.php +++ b/Tests/DependencyInjection/Fixtures/Bundles/RepositoryServiceBundle/Document/TestDefaultRepoDocument.php @@ -6,9 +6,7 @@ use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM; -/** - * @ODM\Document - */ +/** @ODM\Document */ class TestDefaultRepoDocument { /** diff --git a/Tests/FixtureIntegrationTest.php b/Tests/FixtureIntegrationTest.php index 97d6e0ad..836471dc 100644 --- a/Tests/FixtureIntegrationTest.php +++ b/Tests/FixtureIntegrationTest.php @@ -108,7 +108,7 @@ public function testExceptionIfDependentFixtureNotWired(): void $this->expectExceptionMessage(sprintf( 'The "%s" fixture class is trying to be loaded, but is not available.' . ' Make sure this class is defined as a service and tagged with "doctrine.fixture.odm.mongodb".', - RequiredConstructorArgsFixtures::class + RequiredConstructorArgsFixtures::class, )); $loader = $container->get('test.doctrine_mongodb.odm.symfony.fixtures.loader'); @@ -199,7 +199,7 @@ public function testLoadFixturesViaGroupWithMissingDependency(): void 'Fixture "%s" was declared as a dependency for fixture "%s",' . ' but it was not included in any of the loaded fixture groups.', OtherFixtures::class, - WithDependenciesFixtures::class + WithDependenciesFixtures::class, )); $loader->getFixtures(['missingDependencyGroup']); diff --git a/Tests/Fixtures/CommandBundle/Document/User.php b/Tests/Fixtures/CommandBundle/Document/User.php index 38bf3bcb..3d4f1266 100644 --- a/Tests/Fixtures/CommandBundle/Document/User.php +++ b/Tests/Fixtures/CommandBundle/Document/User.php @@ -6,9 +6,7 @@ use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM; -/** - * @ODM\Document - */ +/** @ODM\Document */ class User { /** diff --git a/Tests/Form/Type/DocumentTypeTest.php b/Tests/Form/Type/DocumentTypeTest.php index dbb125d6..98cf9651 100644 --- a/Tests/Form/Type/DocumentTypeTest.php +++ b/Tests/Form/Type/DocumentTypeTest.php @@ -104,7 +104,7 @@ public function testManyToManyReferences(): void 'multiple' => true, 'expanded' => true, 'document_manager' => 'default', - ] + ], ); $view = $form->createView(); diff --git a/Tests/Mapping/Driver/AbstractDriverTest.php b/Tests/Mapping/Driver/AbstractDriverTest.php index 4918f300..5d31c83d 100644 --- a/Tests/Mapping/Driver/AbstractDriverTest.php +++ b/Tests/Mapping/Driver/AbstractDriverTest.php @@ -23,7 +23,7 @@ public function testFindMappingFile(): void $this->assertEquals( $this->getFixtureDir() . '/Foo' . $this->getFileExtension(), - $locator->findMappingFile('MyNamespace\MyBundle\Document\Foo') + $locator->findMappingFile('MyNamespace\MyBundle\Document\Foo'), ); } @@ -35,7 +35,7 @@ public function testFindMappingFileInSubnamespace(): void $this->assertEquals( $this->getFixtureDir() . '/Foo.Bar' . $this->getFileExtension(), - $locator->findMappingFile('MyNamespace\MyBundle\Document\Foo\Bar') + $locator->findMappingFile('MyNamespace\MyBundle\Document\Foo\Bar'), ); } diff --git a/Tests/Repository/ContainerRepositoryFactoryTest.php b/Tests/Repository/ContainerRepositoryFactoryTest.php index 74ec3405..7e82c2d3 100644 --- a/Tests/Repository/ContainerRepositoryFactoryTest.php +++ b/Tests/Repository/ContainerRepositoryFactoryTest.php @@ -71,7 +71,7 @@ public function testServiceRepositoriesMustExtendDocumentRepository(): void $factory = new ContainerRepositoryFactory($container); $this->expectExceptionMessage( - 'The service "my_repo" must extend DocumentRepository (or a base class, like ServiceDocumentRepository).' + 'The service "my_repo" must extend DocumentRepository (or a base class, like ServiceDocumentRepository).', ); $this->expectException(RuntimeException::class); $factory->getRepository($dm, CoolDocument::class); @@ -91,7 +91,7 @@ public function testRepositoryMatchesServiceInterfaceButServiceNotFound(): void 'The "%s" document repository implements "%s", but its service could not be found.' . ' Make sure the service exists and is tagged with "doctrine_mongodb.odm.repository_service".', StubServiceRepository::class, - ServiceDocumentRepositoryInterface::class + ServiceDocumentRepositoryInterface::class, )); $this->expectException(RuntimeException::class); @@ -111,7 +111,7 @@ public function testCustomRepositoryIsNotAValidClass(): void 'The "%s" document has a repositoryClass set to "not_a_real_class", but this is not a valid class.' . ' Check your class naming. If this is meant to be a service id, make sure this service exists and' . ' is tagged with "doctrine_mongodb.odm.repository_service".', - CoolDocument::class + CoolDocument::class, )); $factory->getRepository($dm, CoolDocument::class); } diff --git a/Tests/ServiceRepositoryTest.php b/Tests/ServiceRepositoryTest.php index bf4de926..93733c1e 100644 --- a/Tests/ServiceRepositoryTest.php +++ b/Tests/ServiceRepositoryTest.php @@ -141,7 +141,7 @@ public function testInstantiatingServiceRepositoryForUnmappedClass(): void $this->expectExceptionMessage(sprintf( 'Could not find the document manager for class "%s".' . ' Check your Doctrine configuration to make sure it is configured to load this document’s metadata.', - TestUnmappedDocument::class + TestUnmappedDocument::class, )); $this->expectException(LogicException::class); new TestUnmappedDocumentRepository($this->container->get('doctrine_mongodb')); diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 6730a7d2..0baa167f 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -9,7 +9,7 @@ - + . @@ -22,7 +22,6 @@ - @@ -44,10 +43,8 @@ Tests/* - - - Tests/Fixtures/CommandBundle/Document/* - Tests/DependencyInjection/Fixtures/Bundles/RepositoryServiceBundle/Document/* - Tests/DependencyInjection/Fixtures/Bundles/AnnotationsBundle/Document/* + + + Command/*