diff --git a/UPGRADE-5.3.md b/UPGRADE-5.3.md index 707e5d26dd..ff5a181d1d 100644 --- a/UPGRADE-5.3.md +++ b/UPGRADE-5.3.md @@ -6,6 +6,11 @@ Asset * Deprecated `RemoteJsonManifestVersionStrategy`, use `JsonManifestVersionStrategy` instead +DoctrineBridge +-------------- + + * Remove `UuidV*Generator` classes + DomCrawler ---------- diff --git a/src/Symfony/Bridge/Doctrine/CHANGELOG.md b/src/Symfony/Bridge/Doctrine/CHANGELOG.md index e72b8d35e9..84d3fc55cf 100644 --- a/src/Symfony/Bridge/Doctrine/CHANGELOG.md +++ b/src/Symfony/Bridge/Doctrine/CHANGELOG.md @@ -4,7 +4,8 @@ CHANGELOG 5.3 --- - * deprecated `DoctrineTestHelper` and `TestRepositoryFactory` + * Deprecate `DoctrineTestHelper` and `TestRepositoryFactory` + * [BC BREAK] Remove `UuidV*Generator` classes 5.2.0 ----- diff --git a/src/Symfony/Bridge/Doctrine/IdGenerator/UlidGenerator.php b/src/Symfony/Bridge/Doctrine/IdGenerator/UlidGenerator.php index 364bf3b3ac..8953038860 100644 --- a/src/Symfony/Bridge/Doctrine/IdGenerator/UlidGenerator.php +++ b/src/Symfony/Bridge/Doctrine/IdGenerator/UlidGenerator.php @@ -15,9 +15,6 @@ use Doctrine\ORM\EntityManager; use Doctrine\ORM\Id\AbstractIdGenerator; use Symfony\Component\Uid\Ulid; -/** - * @experimental in 5.2 - */ final class UlidGenerator extends AbstractIdGenerator { public function generate(EntityManager $em, $entity): Ulid diff --git a/src/Symfony/Bridge/Doctrine/IdGenerator/UuidV1Generator.php b/src/Symfony/Bridge/Doctrine/IdGenerator/UuidV1Generator.php deleted file mode 100644 index 55f6eb1eb2..0000000000 --- a/src/Symfony/Bridge/Doctrine/IdGenerator/UuidV1Generator.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Doctrine\IdGenerator; - -use Doctrine\ORM\EntityManager; -use Doctrine\ORM\Id\AbstractIdGenerator; -use Symfony\Component\Uid\UuidV1; - -/** - * @experimental in 5.2 - */ -final class UuidV1Generator extends AbstractIdGenerator -{ - public function generate(EntityManager $em, $entity): UuidV1 - { - return new UuidV1(); - } -} diff --git a/src/Symfony/Bridge/Doctrine/IdGenerator/UuidV4Generator.php b/src/Symfony/Bridge/Doctrine/IdGenerator/UuidV4Generator.php deleted file mode 100644 index 8731daa641..0000000000 --- a/src/Symfony/Bridge/Doctrine/IdGenerator/UuidV4Generator.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Doctrine\IdGenerator; - -use Doctrine\ORM\EntityManager; -use Doctrine\ORM\Id\AbstractIdGenerator; -use Symfony\Component\Uid\UuidV4; - -/** - * @experimental in 5.2 - */ -final class UuidV4Generator extends AbstractIdGenerator -{ - public function generate(EntityManager $em, $entity): UuidV4 - { - return new UuidV4(); - } -} diff --git a/src/Symfony/Bridge/Doctrine/IdGenerator/UuidV6Generator.php b/src/Symfony/Bridge/Doctrine/IdGenerator/UuidV6Generator.php deleted file mode 100644 index cdcd908e93..0000000000 --- a/src/Symfony/Bridge/Doctrine/IdGenerator/UuidV6Generator.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Doctrine\IdGenerator; - -use Doctrine\ORM\EntityManager; -use Doctrine\ORM\Id\AbstractIdGenerator; -use Symfony\Component\Uid\UuidV6; - -/** - * @experimental in 5.2 - */ -final class UuidV6Generator extends AbstractIdGenerator -{ - public function generate(EntityManager $em, $entity): UuidV6 - { - return new UuidV6(); - } -} diff --git a/src/Symfony/Bridge/Doctrine/Tests/IdGenerator/UuidV1GeneratorTest.php b/src/Symfony/Bridge/Doctrine/Tests/IdGenerator/UuidV1GeneratorTest.php deleted file mode 100644 index b9010afe41..0000000000 --- a/src/Symfony/Bridge/Doctrine/Tests/IdGenerator/UuidV1GeneratorTest.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Doctrine\Tests\IdGenerator; - -use Doctrine\ORM\Mapping\Entity; -use PHPUnit\Framework\TestCase; -use Symfony\Bridge\Doctrine\IdGenerator\UuidV1Generator; -use Symfony\Component\Uid\AbstractUid; -use Symfony\Component\Uid\UuidV1; - -class UuidV1GeneratorTest extends TestCase -{ - public function testUuidv1CanBeGenerated() - { - $em = new EntityManager(); - $generator = new UuidV1Generator(); - - $uuid = $generator->generate($em, new Entity()); - - $this->assertInstanceOf(AbstractUid::class, $uuid); - $this->assertInstanceOf(UuidV1::class, $uuid); - $this->assertTrue(UuidV1::isValid($uuid)); - } -} diff --git a/src/Symfony/Bridge/Doctrine/Tests/IdGenerator/UuidV4GeneratorTest.php b/src/Symfony/Bridge/Doctrine/Tests/IdGenerator/UuidV4GeneratorTest.php deleted file mode 100644 index cc87f74428..0000000000 --- a/src/Symfony/Bridge/Doctrine/Tests/IdGenerator/UuidV4GeneratorTest.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Doctrine\Tests\IdGenerator; - -use Doctrine\ORM\Mapping\Entity; -use PHPUnit\Framework\TestCase; -use Symfony\Bridge\Doctrine\IdGenerator\UuidV4Generator; -use Symfony\Component\Uid\AbstractUid; -use Symfony\Component\Uid\UuidV4; - -class UuidV4GeneratorTest extends TestCase -{ - public function testUuidv4CanBeGenerated() - { - $em = new EntityManager(); - $generator = new UuidV4Generator(); - - $uuid = $generator->generate($em, new Entity()); - - $this->assertInstanceOf(AbstractUid::class, $uuid); - $this->assertInstanceOf(UuidV4::class, $uuid); - $this->assertTrue(UuidV4::isValid($uuid)); - } -} diff --git a/src/Symfony/Bridge/Doctrine/Tests/IdGenerator/UuidV6GeneratorTest.php b/src/Symfony/Bridge/Doctrine/Tests/IdGenerator/UuidV6GeneratorTest.php deleted file mode 100644 index f0697b272c..0000000000 --- a/src/Symfony/Bridge/Doctrine/Tests/IdGenerator/UuidV6GeneratorTest.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\Doctrine\Tests\IdGenerator; - -use Doctrine\ORM\Mapping\Entity; -use PHPUnit\Framework\TestCase; -use Symfony\Bridge\Doctrine\IdGenerator\UuidV6Generator; -use Symfony\Component\Uid\AbstractUid; -use Symfony\Component\Uid\UuidV6; - -class UuidV6GeneratorTest extends TestCase -{ - public function testUuidv6CanBeGenerated() - { - $em = new EntityManager(); - $generator = new UuidV6Generator(); - - $uuid = $generator->generate($em, new Entity()); - - $this->assertInstanceOf(AbstractUid::class, $uuid); - $this->assertInstanceOf(UuidV6::class, $uuid); - $this->assertTrue(UuidV6::isValid($uuid)); - } -}