Skip to content

Commit

Permalink
update to doctrine/persistence 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominik Zogg committed Dec 16, 2019
1 parent 4a01399 commit ed386fe
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -17,7 +17,7 @@
"require-dev": {
"chubbyphp/chubbyphp-container": "^1.0",
"chubbyphp/chubbyphp-mock": "^1.4.2",
"doctrine/common": "^2.7",
"doctrine/persistence": "^1.3",
"friendsofphp/php-cs-fixer": "^2.16.1",
"infection/infection": "^0.14.3",
"mavimo/phpstan-junit": "^0.2.3",
Expand Down
4 changes: 2 additions & 2 deletions src/Accessor/PropertyAccessor.php
Expand Up @@ -5,7 +5,7 @@
namespace Chubbyphp\Deserialization\Accessor;

use Chubbyphp\Deserialization\DeserializerLogicException;
use Doctrine\Common\Persistence\Proxy;
use Doctrine\Persistence\Proxy;

final class PropertyAccessor implements AccessorInterface
{
Expand Down Expand Up @@ -71,7 +71,7 @@ function ($property) {
*/
private function getClass($object): string
{
if (interface_exists('Doctrine\Common\Persistence\Proxy') && $object instanceof Proxy) {
if (interface_exists('Doctrine\Persistence\Proxy') && $object instanceof Proxy) {
if (!$object->__isInitialized()) {
$object->__load();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Denormalizer/DenormalizerObjectMappingRegistry.php
Expand Up @@ -29,7 +29,7 @@ public function getObjectMapping(string $class): DenormalizationObjectMappingInt
{
$reflectionClass = new \ReflectionClass($class);

if (in_array('Doctrine\Common\Persistence\Proxy', $reflectionClass->getInterfaceNames(), true)) {
if ($reflectionClass->implementsInterface('Doctrine\Persistence\Proxy')) {
$reflectionParentClass = (new \ReflectionClass($class))->getParentClass();
if ($reflectionParentClass instanceof \ReflectionClass) {
$class = $reflectionParentClass->getName();
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Accessor/PropertyAccessorTest.php
Expand Up @@ -7,7 +7,7 @@
use Chubbyphp\Deserialization\Accessor\PropertyAccessor;
use Chubbyphp\Deserialization\DeserializerLogicException;
use Chubbyphp\Tests\Deserialization\Resources\Model\AbstractManyModel;
use Doctrine\Common\Persistence\Proxy;
use Doctrine\Persistence\Proxy;
use PHPUnit\Framework\TestCase;

/**
Expand Down
Expand Up @@ -10,7 +10,7 @@
use Chubbyphp\Mock\Call;
use Chubbyphp\Mock\MockByCallsTrait;
use Chubbyphp\Tests\Deserialization\Resources\Model\AbstractManyModel;
use Doctrine\Common\Persistence\Proxy;
use Doctrine\Persistence\Proxy;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;

Expand Down

0 comments on commit ed386fe

Please sign in to comment.