Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions UPGRADE.md → UPGRADE-2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ The following classes were moved into different namespace:
## Namespace renamed to `Doctrine\Persistence`

The namespace has been renamed from `Doctrine\Common\Persistence` to `Doctrine\Persistence`.

## Removed `PersistentObject`

Please implement this functionality directly in your application if you want
ActiveRecord style functionality.
229 changes: 0 additions & 229 deletions lib/Doctrine/Persistence/PersistentObject.php

This file was deleted.

3 changes: 0 additions & 3 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
parameters:
autoload_files:
- %currentWorkingDirectory%/tests/Doctrine/Tests/Persistence/ObjectManagerDecoratorTest.php
- %currentWorkingDirectory%/tests/Doctrine/Tests/Persistence/PersistentObjectTest.php
- %currentWorkingDirectory%/tests/Doctrine/Tests/Persistence/Mapping/ClassMetadataFactoryTest.php
- %currentWorkingDirectory%/tests/Doctrine/Tests/Persistence/Mapping/_files/annotation/TestClass.php
excludes_analyse:
- %currentWorkingDirectory%/tests/Doctrine/Tests/Persistence/Mapping/_files/TestEntity.php
ignoreErrors:
- '#Call to an undefined method Doctrine\\Tests\\Persistence\\TestObject#'
12 changes: 9 additions & 3 deletions tests/Doctrine/Tests/Persistence/ManagerRegistryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,17 @@ public function setUp()
['default' => 'default_manager'],
'default',
'default',
ObjectManagerAware::class,
Proxy::class,
$this->getManagerFactory()
);
}

public function testGetManagerForClass()
{
self::assertNull($this->mr->getManagerForClass(TestObject::class));
self::assertInstanceOf(
ObjectManager::class,
$this->mr->getManagerForClass(TestObject::class)
);
}

public function testGetManagerForProxyInterface()
Expand All @@ -61,7 +64,10 @@ public function testGetManagerForInvalidClass()

public function testGetManagerForAliasedClass()
{
self::assertNull($this->mr->getManagerForClass('prefix:TestObject'));
self::assertInstanceOf(
ObjectManager::class,
$this->mr->getManagerForClass('prefix:TestObject')
);
}

public function testGetManagerForInvalidAliasedClass()
Expand Down
4 changes: 1 addition & 3 deletions tests/Doctrine/Tests/Persistence/OtherTestObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

namespace Doctrine\Tests\Persistence;

use Doctrine\Persistence\PersistentObject;

class OtherTestObject extends PersistentObject
class OtherTestObject
{
/** @var int */
protected $id = 1;
Expand Down
Loading