From 57185bb005e86407dc92a5a3d5ac2212d5031c87 Mon Sep 17 00:00:00 2001 From: Soliman Date: Tue, 7 Jan 2020 15:02:10 +0100 Subject: [PATCH] Update doctrine persistence to remove deprecation --- composer.json | 2 +- composer.lock | 21 ++++++++++--------- .../ORM/Decorator/EntityManagerDecorator.php | 2 +- tests/Doctrine/Tests/ORM/UnitOfWorkTest.php | 4 ++-- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/composer.json b/composer.json index dc5c6985431..1733dd42060 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "doctrine/dbal": "^2.10.0", "doctrine/event-manager": "^1.1", "doctrine/instantiator": "^1.3", - "doctrine/persistence": "^1.2", + "doctrine/persistence": "^1.3", "symfony/console": "^3.0|^4.0|^5.0" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 506dd61087e..12dd2badbba 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8a38d5db0a7129c5e93e7bda94f7f598", + "content-hash": "b7733b6c49a73d868a33201033785059", "packages": [ { "name": "doctrine/annotations", @@ -660,16 +660,16 @@ }, { "name": "doctrine/persistence", - "version": "1.2.0", + "version": "1.3.3", "source": { "type": "git", "url": "https://github.com/doctrine/persistence.git", - "reference": "43526ae63312942e5316100bb3ed589ba1aba491" + "reference": "99b196bbd4715a94fa100fac664a351ffa46d6a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/persistence/zipball/43526ae63312942e5316100bb3ed589ba1aba491", - "reference": "43526ae63312942e5316100bb3ed589ba1aba491", + "url": "https://api.github.com/repos/doctrine/persistence/zipball/99b196bbd4715a94fa100fac664a351ffa46d6a5", + "reference": "99b196bbd4715a94fa100fac664a351ffa46d6a5", "shasum": "" }, "require": { @@ -684,19 +684,20 @@ "doctrine/common": "<2.10@dev" }, "require-dev": { - "doctrine/coding-standard": "^5.0", - "phpstan/phpstan": "^0.8", + "doctrine/coding-standard": "^6.0", + "phpstan/phpstan": "^0.11", "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { "psr-4": { - "Doctrine\\Common\\": "lib/Doctrine/Common" + "Doctrine\\Common\\": "lib/Doctrine/Common", + "Doctrine\\Persistence\\": "lib/Doctrine/Persistence" } }, "notification-url": "https://packagist.org/downloads/", @@ -738,7 +739,7 @@ "orm", "persistence" ], - "time": "2019-04-23T12:39:21+00:00" + "time": "2019-12-13T10:43:02+00:00" }, { "name": "doctrine/reflection", diff --git a/lib/Doctrine/ORM/Decorator/EntityManagerDecorator.php b/lib/Doctrine/ORM/Decorator/EntityManagerDecorator.php index 69cc6f50739..4dd9cad6ab6 100644 --- a/lib/Doctrine/ORM/Decorator/EntityManagerDecorator.php +++ b/lib/Doctrine/ORM/Decorator/EntityManagerDecorator.php @@ -21,7 +21,7 @@ use Doctrine\ORM\Query\ResultSetMapping; use Doctrine\ORM\EntityManagerInterface; -use Doctrine\Common\Persistence\ObjectManagerDecorator; +use Doctrine\Persistence\ObjectManagerDecorator; /** * Base class for EntityManager decorators diff --git a/tests/Doctrine/Tests/ORM/UnitOfWorkTest.php b/tests/Doctrine/Tests/ORM/UnitOfWorkTest.php index fb56528fd79..cb0a9dfee7b 100644 --- a/tests/Doctrine/Tests/ORM/UnitOfWorkTest.php +++ b/tests/Doctrine/Tests/ORM/UnitOfWorkTest.php @@ -801,8 +801,8 @@ public function testCommitThrowOptimisticLockExceptionWhenConnectionCommitReturn ->setConstructorArgs([[], new DriverMock()]) ->setMethods(['commit']) ->getMock(); - $this->_emMock = EntityManagerMock::create($this->_connectionMock, null, $this->eventManager); - $this->_unitOfWork = new UnitOfWorkMock($this->_emMock); + $this->_emMock = EntityManagerMock::create($this->_connectionMock, null, $this->eventManager); + $this->_unitOfWork = new UnitOfWorkMock($this->_emMock); $this->_emMock->setUnitOfWork($this->_unitOfWork); $this->_connectionMock->method('commit')->willReturn(false);