Skip to content

Commit 785ac03

Browse files
authored
Merge pull request #2204 from fruitwasp/doctrine/persistence
Allow doctrine/persistence 2.x
2 parents 96d95b1 + 171cf4e commit 785ac03

7 files changed

Lines changed: 13 additions & 13 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"doctrine/collections": "^1.5",
3030
"doctrine/event-manager": "^1.0",
3131
"doctrine/instantiator": "^1.1",
32-
"doctrine/persistence": "^1.3.5",
32+
"doctrine/persistence": "^1.3.5|^2.0",
3333
"doctrine/reflection": "1.2.1",
3434
"jean85/pretty-package-versions": "^1.3.0",
3535
"mongodb/mongodb": "^1.2.0",

docs/en/cookbook/implementing-the-notify-changetracking-policy.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ implement the ``NotifyPropertyChanged`` interface from the
2323
2424
<?php
2525
26-
use Doctrine\Common\NotifyPropertyChanged,
27-
Doctrine\Common\PropertyChangedListener;
26+
use Doctrine\Persistence\NotifyPropertyChanged,
27+
Doctrine\Persistence\PropertyChangedListener;
2828
2929
abstract class DomainObject implements NotifyPropertyChanged
3030
{
@@ -72,4 +72,4 @@ listeners:
7272
The check whether the new value is different from the old one is
7373
not mandatory but recommended. That way you can avoid unnecessary
7474
updates and also have full control over when you consider a
75-
property changed.
75+
property changed.

docs/en/reference/change-tracking-policies.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ follows:
7373
7474
<?php
7575
76-
use Doctrine\Common\NotifyPropertyChanged,
77-
Doctrine\Common\PropertyChangedListener;
76+
use Doctrine\Persistence\NotifyPropertyChanged,
77+
Doctrine\Persistence\PropertyChangedListener;
7878
7979
/**
8080
* @Document

lib/Doctrine/ODM/MongoDB/Proxy/Factory/StaticProxyFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
namespace Doctrine\ODM\MongoDB\Proxy\Factory;
66

77
use Closure;
8-
use Doctrine\Common\NotifyPropertyChanged;
98
use Doctrine\ODM\MongoDB\DocumentManager;
109
use Doctrine\ODM\MongoDB\DocumentNotFoundException;
1110
use Doctrine\ODM\MongoDB\Mapping\ClassMetadata;
1211
use Doctrine\ODM\MongoDB\Persisters\DocumentPersister;
1312
use Doctrine\ODM\MongoDB\UnitOfWork;
1413
use Doctrine\ODM\MongoDB\Utility\LifecycleEventManager;
14+
use Doctrine\Persistence\NotifyPropertyChanged;
1515
use ProxyManager\Factory\LazyLoadingGhostFactory;
1616
use ProxyManager\Proxy\GhostObjectInterface;
1717
use ReflectionProperty;

lib/Doctrine/ODM/MongoDB/UnitOfWork.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
use Doctrine\Common\Collections\ArrayCollection;
88
use Doctrine\Common\Collections\Collection;
99
use Doctrine\Common\EventManager;
10-
use Doctrine\Common\NotifyPropertyChanged;
11-
use Doctrine\Common\PropertyChangedListener;
1210
use Doctrine\ODM\MongoDB\Hydrator\HydratorFactory;
1311
use Doctrine\ODM\MongoDB\Mapping\ClassMetadata;
1412
use Doctrine\ODM\MongoDB\Mapping\MappingException;
@@ -23,6 +21,8 @@
2321
use Doctrine\ODM\MongoDB\Utility\LifecycleEventManager;
2422
use Doctrine\Persistence\Mapping\ReflectionService;
2523
use Doctrine\Persistence\Mapping\RuntimeReflectionService;
24+
use Doctrine\Persistence\NotifyPropertyChanged;
25+
use Doctrine\Persistence\PropertyChangedListener;
2626
use InvalidArgumentException;
2727
use MongoDB\BSON\UTCDateTime;
2828
use ProxyManager\Proxy\GhostObjectInterface;

tests/Doctrine/ODM/MongoDB/Tests/UnitOfWorkTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
use Closure;
88
use DateTime;
99
use Doctrine\Common\Collections\ArrayCollection;
10-
use Doctrine\Common\NotifyPropertyChanged;
11-
use Doctrine\Common\PropertyChangedListener;
1210
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
1311
use Doctrine\ODM\MongoDB\Mapping\ClassMetadata;
1412
use Doctrine\ODM\MongoDB\MongoDBException;
1513
use Doctrine\ODM\MongoDB\Tests\Mocks\ExceptionThrowingListenerMock;
1614
use Doctrine\ODM\MongoDB\Tests\Mocks\PreUpdateListenerMock;
1715
use Doctrine\ODM\MongoDB\UnitOfWork;
16+
use Doctrine\Persistence\NotifyPropertyChanged;
17+
use Doctrine\Persistence\PropertyChangedListener;
1818
use Documents\Address;
1919
use Documents\File;
2020
use Documents\FileWithoutMetadata;

tests/Documents/ProfileNotify.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
namespace Documents;
66

77
use Doctrine\Common\Collections\ArrayCollection;
8-
use Doctrine\Common\NotifyPropertyChanged;
9-
use Doctrine\Common\PropertyChangedListener;
108
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
9+
use Doctrine\Persistence\NotifyPropertyChanged;
10+
use Doctrine\Persistence\PropertyChangedListener;
1111

1212
/** @ODM\Document @ODM\ChangeTrackingPolicy("NOTIFY") */
1313
class ProfileNotify implements NotifyPropertyChanged

0 commit comments

Comments
 (0)