Skip to content

Commit 24e83d1

Browse files
committed
Allow doctrine/common:3.0 (#18)
1 parent faa49c7 commit 24e83d1

4 files changed

Lines changed: 10 additions & 8 deletions

File tree

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@
2525
"require": {
2626
"php": ">=5.6.0",
2727
"portphp/portphp": "^1.0.0",
28-
"doctrine/common": "^2.2"
28+
"doctrine/common": "^2.13 || ^3.0"
2929
},
3030
"require-dev": {
3131
"phpunit/phpunit": "^5.2",
3232
"ext-sqlite3": "*",
33-
"doctrine/orm": "~2.4",
34-
"doctrine/mongodb-odm": "^1.0"
33+
"doctrine/orm": "~2.8",
34+
"doctrine/mongodb-odm": "^2.0",
35+
"doctrine/cache": "^1.11"
3536
},
3637
"autoload": {
3738
"psr-4": {

src/DoctrineReader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Port\Doctrine;
44

5-
use Doctrine\Common\Persistence\ObjectManager;
5+
use Doctrine\Persistence\ObjectManager;
66
use Doctrine\ORM\Internal\Hydration\IterableResult;
77
use Doctrine\ORM\Query;
88
use Doctrine\ORM\QueryBuilder;

src/DoctrineWriter.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
namespace Port\Doctrine;
44

5+
use Doctrine\Persistence\ObjectRepository;
56
use Port\Doctrine\Exception\UnsupportedDatabaseTypeException;
67
use Port\Writer;
7-
use Doctrine\Common\Util\Inflector;
8+
use Doctrine\Inflector\Inflector;
89
use Doctrine\DBAL\Logging\SQLLogger;
9-
use Doctrine\Common\Persistence\ObjectManager;
10-
use Doctrine\Common\Persistence\Mapping\ClassMetadata;
10+
use Doctrine\Persistence\ObjectManager;
11+
use Doctrine\Persistence\Mapping\ClassMetadata;
1112

1213
/**
1314
* A bulk Doctrine writer

tests/DoctrineWriterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function testWriteItemMongodb()
4949
public function testUnsupportedDatabaseTypeException()
5050
{
5151
$this->expectException('Port\Doctrine\Exception\UnsupportedDatabaseTypeException');
52-
$em = $this->getMockBuilder('Doctrine\Common\Persistence\ObjectManager')
52+
$em = $this->getMockBuilder('Doctrine\Persistence\ObjectManager')
5353
->getMock();
5454
new DoctrineWriter($em, 'Port:TestEntity');
5555
}

0 commit comments

Comments
 (0)