From 821393e6fcc39ccc917143dc99c34a4d2c4e1947 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 15:48:25 +0000 Subject: [PATCH 1/4] Bump doctrine/.github from 5.1.0 to 5.2.0 Bumps [doctrine/.github](https://github.com/doctrine/.github) from 5.1.0 to 5.2.0. - [Release notes](https://github.com/doctrine/.github/releases) - [Commits](https://github.com/doctrine/.github/compare/5.1.0...5.2.0) --- updated-dependencies: - dependency-name: doctrine/.github dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/coding-standards.yml | 2 +- .github/workflows/composer-lint.yml | 2 +- .github/workflows/documentation.yml | 2 +- .github/workflows/release-on-milestone-closed.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index fcedea1f..b8c41580 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -12,6 +12,6 @@ on: jobs: coding-standards: name: "Coding Standards" - uses: "doctrine/.github/.github/workflows/coding-standards.yml@5.1.0" + uses: "doctrine/.github/.github/workflows/coding-standards.yml@5.2.0" with: composer-options: "--prefer-dist --prefer-stable" diff --git a/.github/workflows/composer-lint.yml b/.github/workflows/composer-lint.yml index ce49a02a..c6c88e31 100644 --- a/.github/workflows/composer-lint.yml +++ b/.github/workflows/composer-lint.yml @@ -15,4 +15,4 @@ on: jobs: composer-lint: name: "Composer Lint" - uses: "doctrine/.github/.github/workflows/composer-lint.yml@5.1.0" + uses: "doctrine/.github/.github/workflows/composer-lint.yml@5.2.0" diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 0518880f..8964dafd 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -17,4 +17,4 @@ on: jobs: documentation: name: "Documentation" - uses: "doctrine/.github/.github/workflows/documentation.yml@5.1.0" \ No newline at end of file + uses: "doctrine/.github/.github/workflows/documentation.yml@5.2.0" \ No newline at end of file diff --git a/.github/workflows/release-on-milestone-closed.yml b/.github/workflows/release-on-milestone-closed.yml index e193d87b..67a81bf8 100644 --- a/.github/workflows/release-on-milestone-closed.yml +++ b/.github/workflows/release-on-milestone-closed.yml @@ -8,7 +8,7 @@ on: jobs: release: name: "Git tag, release & create merge-up PR" - uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@5.1.0" + uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@5.2.0" secrets: GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }} GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }} From 7bfb8e834aa1e82d107d5f7cfa139c0c5eb45581 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Ostroluck=C3=BD?= Date: Mon, 21 Oct 2024 21:49:51 +0200 Subject: [PATCH 2/4] Fix Symfony 7.2 tests --- tests/CacheSchemaSubscriberTest.php | 4 ++++ tests/DependencyInjection/Compiler/IdGeneratorPassTest.php | 4 ++++ tests/LockStoreSchemaListenerTest.php | 4 ++++ tests/ServiceRepositoryTest.php | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/tests/CacheSchemaSubscriberTest.php b/tests/CacheSchemaSubscriberTest.php index defc2b8f..22bcc169 100644 --- a/tests/CacheSchemaSubscriberTest.php +++ b/tests/CacheSchemaSubscriberTest.php @@ -49,6 +49,10 @@ public function testSchemaSubscriberWiring(string $adapterId, string $subscriber 'kernel.container_class' => ContainerBuilder::class, 'kernel.secret' => 'test', 'env(base64:default::SYMFONY_DECRYPTION_SECRET)' => 'foo', + 'env(bool:default::SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER)' => '', + 'env(default::SYMFONY_TRUSTED_HOSTS)' => '', + 'env(default::SYMFONY_TRUSTED_PROXIES)' => '', + 'env(default::SYMFONY_TRUSTED_HEADERS)' => '', 'debug.file_link_format' => null, ])); diff --git a/tests/DependencyInjection/Compiler/IdGeneratorPassTest.php b/tests/DependencyInjection/Compiler/IdGeneratorPassTest.php index c3525f54..f83cf725 100644 --- a/tests/DependencyInjection/Compiler/IdGeneratorPassTest.php +++ b/tests/DependencyInjection/Compiler/IdGeneratorPassTest.php @@ -80,6 +80,10 @@ public function testRepositoryServiceWiring(): void 'kernel.secret' => 'test', 'container.build_id' => uniqid(), 'env(base64:default::SYMFONY_DECRYPTION_SECRET)' => 'foo', + 'env(bool:default::SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER)' => '', + 'env(default::SYMFONY_TRUSTED_HOSTS)' => '', + 'env(default::SYMFONY_TRUSTED_PROXIES)' => '', + 'env(default::SYMFONY_TRUSTED_HEADERS)' => '', 'debug.file_link_format' => null, ])); diff --git a/tests/LockStoreSchemaListenerTest.php b/tests/LockStoreSchemaListenerTest.php index f2d62e34..93f4a182 100644 --- a/tests/LockStoreSchemaListenerTest.php +++ b/tests/LockStoreSchemaListenerTest.php @@ -47,6 +47,10 @@ public function testLockStoreSchemaSubscriberWiring(array $config, int $expected 'kernel.container_class' => ContainerBuilder::class, 'kernel.secret' => 'test', 'env(base64:default::SYMFONY_DECRYPTION_SECRET)' => 'foo', + 'env(bool:default::SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER)' => '', + 'env(default::SYMFONY_TRUSTED_HOSTS)' => '', + 'env(default::SYMFONY_TRUSTED_PROXIES)' => '', + 'env(default::SYMFONY_TRUSTED_HEADERS)' => '', 'debug.file_link_format' => null, ])); diff --git a/tests/ServiceRepositoryTest.php b/tests/ServiceRepositoryTest.php index 3f2a3e5c..e064f5a0 100644 --- a/tests/ServiceRepositoryTest.php +++ b/tests/ServiceRepositoryTest.php @@ -60,6 +60,10 @@ public function testRepositoryServiceWiring(): void 'kernel.secret' => 'test', 'container.build_id' => uniqid(), 'env(base64:default::SYMFONY_DECRYPTION_SECRET)' => 'foo', + 'env(bool:default::SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER)' => '', + 'env(default::SYMFONY_TRUSTED_HOSTS)' => '', + 'env(default::SYMFONY_TRUSTED_PROXIES)' => '', + 'env(default::SYMFONY_TRUSTED_HEADERS)' => '', 'debug.file_link_format' => null, ])); From eda148b2b2cc832efa8588770fb3f8ec23cf7011 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Wed, 6 Nov 2024 12:16:39 +0100 Subject: [PATCH 3/4] Fix wiring of PHP metadata drivers on doctrine/orm 3.x (#1832) --- composer.json | 2 +- psalm.xml.dist | 2 + src/DependencyInjection/DoctrineExtension.php | 38 +++++++++++++- .../AbstractDoctrineExtensionTest.php | 50 ++++--------------- .../DoctrineExtensionTest.php | 49 ++---------------- .../xml/orm_multiple_em_bundle_mappings.xml | 1 - .../xml/orm_single_em_bundle_mappings.xml | 1 - .../orm_single_em_default_table_options.xml | 1 - .../yml/orm_multiple_em_bundle_mappings.yml | 1 - .../yml/orm_single_em_bundle_mappings.yml | 1 - .../orm_single_em_default_table_options.yml | 1 - 11 files changed, 53 insertions(+), 94 deletions(-) diff --git a/composer.json b/composer.json index 7dfce1cf..0347ad01 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ "symfony/console": "^5.4 || ^6.0 || ^7.0", "symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0", "symfony/deprecation-contracts": "^2.1 || ^3", - "symfony/doctrine-bridge": "^5.4.19 || ^6.0.7 || ^7.0", + "symfony/doctrine-bridge": "^5.4.46 || ^6.4.3 || ^7.0.3", "symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0", "symfony/polyfill-php80": "^1.15", "symfony/service-contracts": "^1.1.1 || ^2.0 || ^3" diff --git a/psalm.xml.dist b/psalm.xml.dist index 16e9f0db..931a530a 100644 --- a/psalm.xml.dist +++ b/psalm.xml.dist @@ -40,6 +40,8 @@ + + diff --git a/src/DependencyInjection/DoctrineExtension.php b/src/DependencyInjection/DoctrineExtension.php index 30cbfa6f..bea0b8e9 100644 --- a/src/DependencyInjection/DoctrineExtension.php +++ b/src/DependencyInjection/DoctrineExtension.php @@ -22,13 +22,21 @@ use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\Events; use Doctrine\ORM\Id\AbstractIdGenerator; +use Doctrine\ORM\Mapping\Driver\AnnotationDriver; +use Doctrine\ORM\Mapping\Driver\AttributeDriver; +use Doctrine\ORM\Mapping\Driver\PHPDriver as LegacyPHPDriver; use Doctrine\ORM\Mapping\Driver\SimplifiedXmlDriver; +use Doctrine\ORM\Mapping\Driver\SimplifiedYamlDriver; +use Doctrine\ORM\Mapping\Driver\StaticPHPDriver as LegacyStaticPHPDriver; use Doctrine\ORM\Proxy\Autoloader; use Doctrine\ORM\Proxy\ProxyFactory; use Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand; use Doctrine\ORM\Tools\Console\Command\EnsureProductionSettingsCommand; use Doctrine\ORM\Tools\Export\ClassMetadataExporter; use Doctrine\ORM\UnitOfWork; +use Doctrine\Persistence\Mapping\Driver\MappingDriverChain; +use Doctrine\Persistence\Mapping\Driver\PHPDriver; +use Doctrine\Persistence\Mapping\Driver\StaticPHPDriver; use Doctrine\Persistence\Reflection\RuntimeReflectionProperty; use InvalidArgumentException; use LogicException; @@ -1163,7 +1171,35 @@ public function getConfiguration(array $config, ContainerBuilder $container): Co protected function getMetadataDriverClass(string $driverType): string { - return '%' . $this->getObjectManagerElementName('metadata.' . $driverType . '.class') . '%'; + switch ($driverType) { + case 'driver_chain': + return MappingDriverChain::class; + + case 'annotation': + if (! class_exists(AnnotationDriver::class)) { + throw new LogicException('The annotation driver is only available in doctrine/orm v2.'); + } + + return AnnotationDriver::class; + + case 'xml': + return SimplifiedXmlDriver::class; + + case 'yml': + return SimplifiedYamlDriver::class; + + case 'php': + return class_exists(PHPDriver::class) ? PHPDriver::class : LegacyPHPDriver::class; + + case 'staticphp': + return class_exists(StaticPHPDriver::class) ? StaticPHPDriver::class : LegacyStaticPHPDriver::class; + + case 'attribute': + return AttributeDriver::class; + + default: + throw new LogicException(sprintf('Unknown "%s" metadata driver type.', $driverType)); + } } private function loadMessengerServices(ContainerBuilder $container): void diff --git a/tests/DependencyInjection/AbstractDoctrineExtensionTest.php b/tests/DependencyInjection/AbstractDoctrineExtensionTest.php index 4c91dc2f..90918bdc 100644 --- a/tests/DependencyInjection/AbstractDoctrineExtensionTest.php +++ b/tests/DependencyInjection/AbstractDoctrineExtensionTest.php @@ -40,13 +40,11 @@ use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\ServiceLocator; use Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler; -use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Security\Core\User\UserInterface; use function array_filter; use function array_intersect_key; use function array_keys; -use function array_merge; use function array_values; use function assert; use function class_exists; @@ -57,7 +55,6 @@ use function sprintf; use function sys_get_temp_dir; use function uniqid; -use function version_compare; use const DIRECTORY_SEPARATOR; @@ -543,40 +540,30 @@ public function testSingleEntityManagerMultipleMappingBundleDefinitions(): void self::markTestSkipped('This test requires ORM'); } - $container = $this->loadContainer('orm_single_em_bundle_mappings', ['YamlBundle', 'AnnotationsBundle', 'XmlBundle', 'AttributesBundle']); + $container = $this->loadContainer('orm_single_em_bundle_mappings', ['YamlBundle', 'XmlBundle', 'AttributesBundle']); $definition = $container->getDefinition('doctrine.orm.default_metadata_driver'); $this->assertDICDefinitionMethodCallAt(0, $definition, 'addDriver', [ - new Reference(version_compare(Kernel::VERSION, '7.0.0', '<') ? 'doctrine.orm.default_annotation_metadata_driver' : 'doctrine.orm.default_attribute_metadata_driver'), - 'Fixtures\Bundles\AnnotationsBundle\Entity', - ]); - - $this->assertDICDefinitionMethodCallAt(1, $definition, 'addDriver', [ new Reference('doctrine.orm.default_attribute_metadata_driver'), 'Fixtures\Bundles\AttributesBundle\Entity', ]); - $this->assertDICDefinitionMethodCallAt(2, $definition, 'addDriver', [ + $this->assertDICDefinitionMethodCallAt(1, $definition, 'addDriver', [ new Reference('doctrine.orm.default_yml_metadata_driver'), 'Fixtures\Bundles\YamlBundle\Entity', ]); - $this->assertDICDefinitionMethodCallAt(3, $definition, 'addDriver', [ + $this->assertDICDefinitionMethodCallAt(2, $definition, 'addDriver', [ new Reference('doctrine.orm.default_xml_metadata_driver'), 'Fixtures\Bundles\XmlBundle', ]); $attrDef = $container->getDefinition('doctrine.orm.default_attribute_metadata_driver'); $this->assertDICConstructorArguments($attrDef, [ - array_merge( - ! version_compare(Kernel::VERSION, '7.0.0', '<') ? [ - __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures' . DIRECTORY_SEPARATOR . 'Bundles' . DIRECTORY_SEPARATOR . 'AnnotationsBundle' . DIRECTORY_SEPARATOR . 'Entity', - ] : [], - [ - __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures' . DIRECTORY_SEPARATOR . 'Bundles' . DIRECTORY_SEPARATOR . 'AttributesBundle' . DIRECTORY_SEPARATOR . 'Entity', - ], - ), + [ + __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures' . DIRECTORY_SEPARATOR . 'Bundles' . DIRECTORY_SEPARATOR . 'AttributesBundle' . DIRECTORY_SEPARATOR . 'Entity', + ], ! class_exists(AnnotationDriver::class), ]); @@ -600,21 +587,15 @@ public function testMultipleEntityManagersMappingBundleDefinitions(): void self::markTestSkipped('This test requires ORM'); } - $container = $this->loadContainer('orm_multiple_em_bundle_mappings', ['YamlBundle', 'AnnotationsBundle', 'XmlBundle', 'AttributesBundle']); + $container = $this->loadContainer('orm_multiple_em_bundle_mappings', ['YamlBundle', 'XmlBundle', 'AttributesBundle']); $this->assertEquals(['em1' => 'doctrine.orm.em1_entity_manager', 'em2' => 'doctrine.orm.em2_entity_manager'], $container->getParameter('doctrine.entity_managers'), 'Set of the existing EntityManagers names is incorrect.'); $this->assertEquals('%doctrine.entity_managers%', $container->getDefinition('doctrine')->getArgument(2), 'Set of the existing EntityManagers names is incorrect.'); - $def1 = $container->getDefinition('doctrine.orm.em1_metadata_driver'); - $def2 = $container->getDefinition('doctrine.orm.em2_metadata_driver'); - $def1Id = version_compare(Kernel::VERSION, '7.0.0', '<') ? 'doctrine.orm.em1_annotation_metadata_driver' : 'doctrine.orm.em1_attribute_metadata_driver'; + $def1 = $container->getDefinition('doctrine.orm.em1_metadata_driver'); + $def2 = $container->getDefinition('doctrine.orm.em2_metadata_driver'); $this->assertDICDefinitionMethodCallAt(0, $def1, 'addDriver', [ - new Reference($def1Id), - 'Fixtures\Bundles\AnnotationsBundle\Entity', - ]); - - $this->assertDICDefinitionMethodCallAt(1, $def1, 'addDriver', [ new Reference('doctrine.orm.em1_attribute_metadata_driver'), 'Fixtures\Bundles\AttributesBundle\Entity', ]); @@ -629,17 +610,6 @@ public function testMultipleEntityManagersMappingBundleDefinitions(): void 'Fixtures\Bundles\XmlBundle', ]); - if (version_compare(Kernel::VERSION, '7.0.0', '<')) { - $annDef = $container->getDefinition($def1Id); - $this->assertDICConstructorArguments($annDef, [ - new Reference('doctrine.orm.metadata.annotation_reader'), - [ - __DIR__ . DIRECTORY_SEPARATOR . 'Fixtures' . DIRECTORY_SEPARATOR . 'Bundles' . DIRECTORY_SEPARATOR . 'AnnotationsBundle' . DIRECTORY_SEPARATOR . 'Entity', - ], - ! class_exists(AnnotationDriver::class), - ]); - } - $ymlDef = $container->getDefinition('doctrine.orm.em2_yml_metadata_driver'); $this->assertDICConstructorArguments($ymlDef, [ [__DIR__ . DIRECTORY_SEPARATOR . 'Fixtures' . DIRECTORY_SEPARATOR . 'Bundles' . DIRECTORY_SEPARATOR . 'YamlBundle' . DIRECTORY_SEPARATOR . 'Resources' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'doctrine' => 'Fixtures\Bundles\YamlBundle\Entity'], @@ -659,7 +629,7 @@ public function testSingleEntityManagerDefaultTableOptions(): void self::markTestSkipped('This test requires ORM'); } - $container = $this->loadContainer('orm_single_em_default_table_options', ['YamlBundle', 'AnnotationsBundle', 'XmlBundle', 'AttributesBundle']); + $container = $this->loadContainer('orm_single_em_default_table_options', ['YamlBundle', 'XmlBundle', 'AttributesBundle']); $param = $container->getDefinition('doctrine.dbal.default_connection')->getArgument(0); diff --git a/tests/DependencyInjection/DoctrineExtensionTest.php b/tests/DependencyInjection/DoctrineExtensionTest.php index f1d2f005..c3d25d8c 100644 --- a/tests/DependencyInjection/DoctrineExtensionTest.php +++ b/tests/DependencyInjection/DoctrineExtensionTest.php @@ -50,7 +50,6 @@ use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\Messenger\Bridge\Doctrine\Transport\DoctrineTransportFactory; use Symfony\Component\Messenger\MessageBusInterface; -use Symfony\Component\Validator\Mapping\Loader\AnnotationLoader; use function array_values; use function class_exists; @@ -823,39 +822,6 @@ public function testXmlBundleMappingDetection(): void ]); } - public function testAnnotationsBundleMappingDetection(): void - { - if (! interface_exists(EntityManagerInterface::class)) { - self::markTestSkipped('This test requires ORM'); - } - - $container = $this->getContainer(['AnnotationsBundle']); - $extension = new DoctrineExtension(); - - $config = BundleConfigurationBuilder::createBuilder() - ->addBaseConnection() - ->addEntityManager([ - 'default_entity_manager' => 'default', - 'entity_managers' => [ - 'default' => [ - 'mappings' => [ - 'AnnotationsBundle' => [], - ], - ], - ], - ]) - ->build(); - $extension->load([$config], $container); - - $definition = $container->getDefinition('doctrine.orm.default_metadata_driver'); - $this->assertDICDefinitionMethodCallOnce($definition, 'addDriver', [ - new Reference(class_exists(AnnotationLoader::class) - ? 'doctrine.orm.default_annotation_metadata_driver' - : 'doctrine.orm.default_attribute_metadata_driver'), - 'Fixtures\Bundles\AnnotationsBundle\Entity', - ]); - } - /** @requires PHP 8 */ public function testAttributesBundleMappingDetection(): void { @@ -898,7 +864,7 @@ public function testOrmMergeConfigs(): void self::markTestSkipped('This test requires ORM'); } - $container = $this->getContainer(['XmlBundle', 'AnnotationsBundle', 'AttributesBundle']); + $container = $this->getContainer(['XmlBundle', 'AttributesBundle']); $extension = new DoctrineExtension(); $config1 = BundleConfigurationBuilder::createBuilder() @@ -908,10 +874,7 @@ public function testOrmMergeConfigs(): void 'default_entity_manager' => 'default', 'entity_managers' => [ 'default' => [ - 'mappings' => [ - 'AnnotationsBundle' => [], - 'AttributesBundle' => ['type' => 'attribute'], - ], + 'mappings' => ['AttributesBundle' => ['type' => 'attribute']], ], ], ]) @@ -934,16 +897,10 @@ public function testOrmMergeConfigs(): void $definition = $container->getDefinition('doctrine.orm.default_metadata_driver'); $this->assertDICDefinitionMethodCallAt(0, $definition, 'addDriver', [ - new Reference(class_exists(AnnotationLoader::class) - ? 'doctrine.orm.default_annotation_metadata_driver' - : 'doctrine.orm.default_attribute_metadata_driver'), - 'Fixtures\Bundles\AnnotationsBundle\Entity', - ]); - $this->assertDICDefinitionMethodCallAt(1, $definition, 'addDriver', [ new Reference('doctrine.orm.default_attribute_metadata_driver'), 'Fixtures\Bundles\AttributesBundle\Entity', ]); - $this->assertDICDefinitionMethodCallAt(2, $definition, 'addDriver', [ + $this->assertDICDefinitionMethodCallAt(1, $definition, 'addDriver', [ new Reference('doctrine.orm.default_xml_metadata_driver'), 'Fixtures\Bundles\XmlBundle\Entity', ]); diff --git a/tests/DependencyInjection/Fixtures/config/xml/orm_multiple_em_bundle_mappings.xml b/tests/DependencyInjection/Fixtures/config/xml/orm_multiple_em_bundle_mappings.xml index 07439af9..b85d2e40 100644 --- a/tests/DependencyInjection/Fixtures/config/xml/orm_multiple_em_bundle_mappings.xml +++ b/tests/DependencyInjection/Fixtures/config/xml/orm_multiple_em_bundle_mappings.xml @@ -13,7 +13,6 @@ - diff --git a/tests/DependencyInjection/Fixtures/config/xml/orm_single_em_bundle_mappings.xml b/tests/DependencyInjection/Fixtures/config/xml/orm_single_em_bundle_mappings.xml index 9e1a87e5..3022d034 100644 --- a/tests/DependencyInjection/Fixtures/config/xml/orm_single_em_bundle_mappings.xml +++ b/tests/DependencyInjection/Fixtures/config/xml/orm_single_em_bundle_mappings.xml @@ -12,7 +12,6 @@ - - Date: Fri, 8 Nov 2024 00:41:14 +0100 Subject: [PATCH 4/4] docs: fix page for CustomIdGenerator attribute --- docs/en/custom-id-generators.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/en/custom-id-generators.rst b/docs/en/custom-id-generators.rst index 11de3d76..f107644e 100644 --- a/docs/en/custom-id-generators.rst +++ b/docs/en/custom-id-generators.rst @@ -23,9 +23,7 @@ are provided: ``doctrine.ulid_generator`` to generate ULIDs, and use Doctrine\ORM\Mapping as ORM; - /** - * @ORM\Entity - */ + #[ORM\Entity] class User { #[ORM\Id] @@ -38,5 +36,5 @@ are provided: ``doctrine.ulid_generator`` to generate ULIDs, and } See also -https://www.doctrine-project.org/projects/doctrine-orm/en/2.8/reference/annotations-reference.html#annref_customidgenerator +https://www.doctrine-project.org/projects/doctrine-orm/en/3.3/reference/attributes-reference.html#attrref_customidgenerator for more info about custom ID generators.