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

Upgrade to doctrine/persistence v3 #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"require": {
"php": "^8.1",
"doctrine/orm": "^2.13",
"doctrine/persistence": "^2.0",
"doctrine/persistence": "^3.1",
"psr/container": "^1.1 || ^2.0",
"webonyx/graphql-php": "^14.11"
},
Expand Down
34 changes: 15 additions & 19 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Factory/AbstractFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Doctrine\Common\Annotations\Reader;
use Doctrine\ORM\EntityManager;
use Doctrine\Persistence\Mapping\Driver\AnnotationDriver;
use Doctrine\ORM\Mapping\Driver\AnnotationDriver;
use Doctrine\Persistence\Mapping\Driver\MappingDriverChain;
use GraphQL\Doctrine\Annotation\Exclude;
use GraphQL\Doctrine\Exception;
Expand Down
2 changes: 1 addition & 1 deletion src/Factory/MetadataReader/MappingDriverChainAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace GraphQL\Doctrine\Factory\MetadataReader;

use Doctrine\Common\Annotations\Reader;
use Doctrine\Persistence\Mapping\Driver\AnnotationDriver;
use Doctrine\ORM\Mapping\Driver\AnnotationDriver;
use Doctrine\Persistence\Mapping\Driver\MappingDriverChain;
use GraphQL\Doctrine\Exception;
use ReflectionClass;
Expand Down
4 changes: 2 additions & 2 deletions tests/TypesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function testDoctrineWithMappingDriverChainMissingNamespace(): void
$type = $this->types->getOutput(Post::class);

$config->setMetadataDriverImpl($chain);
$this->expectExceptionMessage('graphql-doctrine requires GraphQLTests\Doctrine\Blog\Model\Post entity to be configured with a `Doctrine\Persistence\Mapping\Driver\AnnotationDriver`.');
$this->expectExceptionMessage('graphql-doctrine requires GraphQLTests\Doctrine\Blog\Model\Post entity to be configured with a `Doctrine\ORM\Mapping\Driver\AnnotationDriver`.');
$type->getFields();
}

Expand All @@ -161,7 +161,7 @@ public function testDoctrineWithoutAnnotationDriverMustThrow(): void
$type = $this->types->getOutput(Post::class);

$config->setMetadataDriverImpl(new XmlDriver([]));
$this->expectExceptionMessage('graphql-doctrine requires Doctrine to be configured with a `Doctrine\Persistence\Mapping\Driver\AnnotationDriver`.');
$this->expectExceptionMessage('graphql-doctrine requires Doctrine to be configured with a `Doctrine\ORM\Mapping\Driver\AnnotationDriver`.');
$type->getFields();
}

Expand Down