diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index dd6c11f95..4d7c7e1b1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -45,6 +45,9 @@ jobs: if: ${{ matrix.composer-stability }} run: composer config minimum-stability ${{ matrix.composer-stability }} + - name: Uninstall Doctrine ODM + run: composer remove doctrine/phpcr-odm jackalope/jackalope-doctrine-dbal --no-update --dev + - name: "Install dependencies with Composer" uses: "ramsey/composer-install@v1" with: diff --git a/composer.json b/composer.json index 647680c68..33c326caa 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ "require-dev": { "ext-pdo_sqlite": "*", "doctrine/coding-standard": "^12.0", - "doctrine/orm": "^2.14", + "doctrine/orm": "^2.14 || ^3.0", "doctrine/persistence": "^2.5.2 || ^3.0", "doctrine/phpcr-odm": "^1.5.2 || ^2.0", "jackalope/jackalope-doctrine-dbal": "^1.3", @@ -72,5 +72,6 @@ "branch-alias": { "dev-master": "3.x-dev" } - } + }, + "minimum-stability": "dev" } diff --git a/tests/Fixtures/Doctrine/XmlMapping/JMS.Serializer.Tests.Fixtures.Doctrine.Embeddable.BlogPostSeo.dcm.xml b/tests/Fixtures/Doctrine/XmlMapping/JMS.Serializer.Tests.Fixtures.Doctrine.Embeddable.BlogPostSeo.dcm.xml index 87cce5a0d..4b13399d8 100644 --- a/tests/Fixtures/Doctrine/XmlMapping/JMS.Serializer.Tests.Fixtures.Doctrine.Embeddable.BlogPostSeo.dcm.xml +++ b/tests/Fixtures/Doctrine/XmlMapping/JMS.Serializer.Tests.Fixtures.Doctrine.Embeddable.BlogPostSeo.dcm.xml @@ -1,5 +1,5 @@ - + diff --git a/tests/Serializer/Doctrine/IntegrationTest.php b/tests/Serializer/Doctrine/IntegrationTest.php index 4ce720acf..ca17e247d 100644 --- a/tests/Serializer/Doctrine/IntegrationTest.php +++ b/tests/Serializer/Doctrine/IntegrationTest.php @@ -141,6 +141,7 @@ private function createEntityManager(Connection $con) $cfg->setMetadataDriverImpl(new AttributeDriver([ __DIR__ . '/../../Fixtures/Doctrine/SingleTableInheritance', ])); + AnnotationReader::addGlobalIgnoredNamespace('Doctrine\ORM\Mapping'); } else { $cfg->setMetadataDriverImpl(new AnnotationDriver(new AnnotationReader(), [ __DIR__ . '/../../Fixtures/Doctrine/SingleTableInheritance', diff --git a/tests/Serializer/Doctrine/ObjectConstructorTest.php b/tests/Serializer/Doctrine/ObjectConstructorTest.php index f519f561f..f6725d928 100644 --- a/tests/Serializer/Doctrine/ObjectConstructorTest.php +++ b/tests/Serializer/Doctrine/ObjectConstructorTest.php @@ -58,7 +58,6 @@ use ReflectionClass; use RuntimeException; use SimpleXMLElement; - use function assert; class ObjectConstructorTest extends TestCase @@ -471,8 +470,7 @@ public function testArrayKeyExistsOnObject(): void protected function setUp(): void { $this->visitor = $this->getMockBuilder(DeserializationVisitorInterface::class)->getMock(); - $this->context = $this->getMockBuilder('JMS\Serializer\DeserializationContext')->getMock(); - + $this->context = $this->getMockBuilder(DeserializationContext::class)->getMock(); $connection = $this->createConnection(); $entityManager = $this->createEntityManager($connection); @@ -528,6 +526,7 @@ private function createEntityManager(Connection $con, ?Configuration $cfg = null $cfg = new Configuration(); if (PHP_VERSION_ID >= 80000 && class_exists(AttributeDriver::class)) { + AnnotationReader::addGlobalIgnoredNamespace('Doctrine\ORM\Mapping'); $cfg->setMetadataDriverImpl(new AttributeDriver([ __DIR__ . '/../../Fixtures/Doctrine/Entity', __DIR__ . '/../../Fixtures/Doctrine/IdentityFields',