Skip to content

Commit

Permalink
Allow doctrine/common:3.0 (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
slashrsm committed Mar 6, 2022
1 parent faa49c7 commit 24e83d1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@
"require": {
"php": ">=5.6.0",
"portphp/portphp": "^1.0.0",
"doctrine/common": "^2.2"
"doctrine/common": "^2.13 || ^3.0"
},
"require-dev": {
"phpunit/phpunit": "^5.2",
"ext-sqlite3": "*",
"doctrine/orm": "~2.4",
"doctrine/mongodb-odm": "^1.0"
"doctrine/orm": "~2.8",
"doctrine/mongodb-odm": "^2.0",
"doctrine/cache": "^1.11"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion src/DoctrineReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Port\Doctrine;

use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\Persistence\ObjectManager;
use Doctrine\ORM\Internal\Hydration\IterableResult;
use Doctrine\ORM\Query;
use Doctrine\ORM\QueryBuilder;
Expand Down
7 changes: 4 additions & 3 deletions src/DoctrineWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

namespace Port\Doctrine;

use Doctrine\Persistence\ObjectRepository;
use Port\Doctrine\Exception\UnsupportedDatabaseTypeException;
use Port\Writer;
use Doctrine\Common\Util\Inflector;
use Doctrine\Inflector\Inflector;
use Doctrine\DBAL\Logging\SQLLogger;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\Common\Persistence\Mapping\ClassMetadata;
use Doctrine\Persistence\ObjectManager;
use Doctrine\Persistence\Mapping\ClassMetadata;

/**
* A bulk Doctrine writer
Expand Down
2 changes: 1 addition & 1 deletion tests/DoctrineWriterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function testWriteItemMongodb()
public function testUnsupportedDatabaseTypeException()
{
$this->expectException('Port\Doctrine\Exception\UnsupportedDatabaseTypeException');
$em = $this->getMockBuilder('Doctrine\Common\Persistence\ObjectManager')
$em = $this->getMockBuilder('Doctrine\Persistence\ObjectManager')
->getMock();
new DoctrineWriter($em, 'Port:TestEntity');
}
Expand Down

0 comments on commit 24e83d1

Please sign in to comment.