Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowdoctrine/orm 3.0 #1523

Merged
merged 2 commits into from
Dec 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -72,5 +72,6 @@
"branch-alias": {
"dev-master": "3.x-dev"
}
}
},
"minimum-stability": "dev"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xsi="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping">
<embeddable name="JMS\Serializer\Tests\Fixtures\Doctrine\Embeddable\BlogPostSeo">
<field name="metaTitle" column="meta_title" type="string" nullable="false"/>
</embeddable>
Expand Down
1 change: 1 addition & 0 deletions tests/Serializer/Doctrine/IntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
5 changes: 2 additions & 3 deletions tests/Serializer/Doctrine/ObjectConstructorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@
use ReflectionClass;
use RuntimeException;
use SimpleXMLElement;

use function assert;

Check failure on line 61 in tests/Serializer/Doctrine/ObjectConstructorTest.php

View workflow job for this annotation

GitHub Actions / Coding Standards (7.2)

Expected 1 line between different types of use statement, found 0.

class ObjectConstructorTest extends TestCase
{
Expand Down Expand Up @@ -471,8 +470,7 @@
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);

Expand Down Expand Up @@ -528,6 +526,7 @@
$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',
Expand Down
Loading