Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EntityRepository] Cleanup named native features #7095

Merged
merged 1 commit into from
Feb 25, 2018
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
51 changes: 34 additions & 17 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,42 @@ This constant has been removed

* `Doctrine\ORM\Mapping\Exporter\VariableExporter::INDENTATION`

## BC Break: Removed support for named queries
## BC Break: Removed support for named queries and named native queries

These classes have been removed:

* `Doctrine/ORM/Annotation/NamedQueries`
* `Doctrine/ORM/Annotation/NamedQuery`
* `Doctrine/ORM/Annotation/NamedNativeQueries`
* `Doctrine/ORM/Annotation/NamedNativeQuery`
* `Doctrine/ORM/Annotation/ColumnResult`
* `Doctrine/ORM/Annotation/FieldResult`
* `Doctrine/ORM/Annotation/EntityResult`
* `Doctrine/ORM/Annotation/SqlResultSetMapping`
* `Doctrine/ORM/Annotation/SqlResultSetMappings`

These methods have been removed:

* `Doctrine/ORM/Configuration::addNamedQuery()`
* `Doctrine/ORM/Configuration::getNamedQuery()`
* `Doctrine/ORM/Configuration::addNamedNativeQuery()`
* `Doctrine/ORM/Configuration::getNamedNativeQuery()`
* `Doctrine/ORM/Decorator/EntityManagerDecorator::createNamedQuery()`
* `Doctrine/ORM/Decorator/EntityManagerDecorator::createNamedNativeQuery()`
* `Doctrine/ORM/EntityManager::createNamedQuery()`
* `Doctrine/ORM/EntityManager::createNamedNativeQuery()`
* `Doctrine/ORM/EntityManagerInterface::createNamedQuery()`
* `Doctrine/ORM/EntityRepository::createNamedQuery()`
* `Doctrine/ORM/EntityManagerInterface::createNamedNativeQuery()`
* `Doctrine/ORM/EntityRepository::createNamedQuery()`
* `Doctrine/ORM/EntityRepository::createNamedNativeQuery()`
* `Doctrine/ORM/Mapping/ClassMetadata::getNamedQuery()`
* `Doctrine/ORM/Mapping/ClassMetadata::getNamedQueries()`
* `Doctrine/ORM/Mapping/ClassMetadata::addNamedQuery()`
* `Doctrine/ORM/Mapping/ClassMetadata::hasNamedQuery()`
* `Doctrine/ORM/Mapping/ClassMetadata::getNamedQueries()`
* `Doctrine/ORM/Mapping/ClassMetadata::addNamedQuery()`
* `Doctrine/ORM/Mapping/ClassMetadata::hasNamedQuery()`
* `Doctrine/ORM/Mapping/ClassMetadata::getNamedNativeQuery()`
* `Doctrine/ORM/Mapping/ClassMetadata::getNamedNativeQueries()`
* `Doctrine/ORM/Mapping/ClassMetadata::addNamedNativeQuery()`
* `Doctrine/ORM/Mapping/ClassMetadata::hasNamedNativeQuery()`

## BC Break: Removed support for entity namespace aliases

Expand All @@ -55,7 +72,7 @@ These methods have been removed:
* Doctrine\ORM\Mapping\ClassMetadata::fullyQualifiedClassName()

## BC Break: Removed code generators and related console commands

These console commands have been removed:

* `orm:convert-mapping`
Expand All @@ -82,7 +99,7 @@ These related classes have been removed:
* `Doctrine\ORM\Proxy\Proxy`
* `Doctrine\ORM\Proxy\Autoloader` - we suggest using the composer autoloader instead
* `Doctrine\ORM\Reflection\RuntimePublicReflectionProperty`

These methods have been removed:

* `Doctrine\ORM\Configuration#getProxyDir()`
Expand Down Expand Up @@ -155,9 +172,9 @@ If your code relies on single entity flushing optimisations via
`EntityManager#flush($entity)`, the signature has been changed to
`EntityManager#flush()`.

Said API was affected by multiple data integrity bugs due to the fact
that change tracking was being restricted upon a subset of the managed
entities. The ORM cannot support committing subsets of the managed
Said API was affected by multiple data integrity bugs due to the fact
that change tracking was being restricted upon a subset of the managed
entities. The ORM cannot support committing subsets of the managed
entities while also guaranteeing data integrity, therefore this
utility was removed.

Expand Down Expand Up @@ -231,8 +248,8 @@ Provides a more meaningful name to method.

## BC Break: Removed ``ClassMetadata::$namespace``

The namespace property in ClassMetadata was only used when using association
classes in the same namespace and it was used to speedup ClassMetadata
The namespace property in ClassMetadata was only used when using association
classes in the same namespace and it was used to speedup ClassMetadata
creation purposes. Namespace could be easily inferred by asking ``\ReflectionClass``
which was already stored internally.

Expand All @@ -243,11 +260,11 @@ Switched to a method alternative: ``ClassMetadata::isVersioned()``
## BC Break: Removed ``Doctrine\ORM\Mapping\ClassMetadataInfo``

There was no reason to keep a blank class. All references are now pointing
to ``Doctrine\ORM\Mapping\ClassMetadata``.
to ``Doctrine\ORM\Mapping\ClassMetadata``.

## BC Break: Annotations classes namespace change

All Annotations classes got moved from ``Doctrine\ORM\Mapping`` into a more
All Annotations classes got moved from ``Doctrine\ORM\Mapping`` into a more
pertinent namespace ``Doctrine\ORM\Annotation``. This change was done to add
room for Metadata namespace refactoring.

Expand Down Expand Up @@ -333,8 +350,8 @@ either:
- map those classes as `MappedSuperclass`

## Minor BC BREAK: ``EntityManagerInterface`` instead of ``EntityManager`` in type-hints
As of 2.5, classes requiring the ``EntityManager`` in any method signature will now require

As of 2.5, classes requiring the ``EntityManager`` in any method signature will now require
an ``EntityManagerInterface`` instead.
If you are extending any of the following classes, then you need to check following
signatures:
Expand Down Expand Up @@ -427,7 +444,7 @@ the `Doctrine\ORM\Repository\DefaultRepositoryFactory`.
When executing DQL queries with new object expressions, instead of returning DTOs numerically indexes, it will now respect user provided aliases. Consider the following query:

SELECT new UserDTO(u.id,u.name) as user,new AddressDTO(a.street,a.postalCode) as address, a.id as addressId FROM User u INNER JOIN u.addresses a WITH a.isPrimary = true

Previously, your result would be similar to this:

array(
Expand Down
22 changes: 0 additions & 22 deletions lib/Doctrine/ORM/Annotation/ColumnResult.php

This file was deleted.

7 changes: 0 additions & 7 deletions lib/Doctrine/ORM/Annotation/DoctrineAnnotations.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,13 @@
require_once __DIR__ . '/Cache.php';
require_once __DIR__ . '/ChangeTrackingPolicy.php';
require_once __DIR__ . '/Column.php';
require_once __DIR__ . '/ColumnResult.php';
require_once __DIR__ . '/CustomIdGenerator.php';
require_once __DIR__ . '/DiscriminatorColumn.php';
require_once __DIR__ . '/DiscriminatorMap.php';
require_once __DIR__ . '/Embeddable.php';
require_once __DIR__ . '/Embedded.php';
require_once __DIR__ . '/Entity.php';
require_once __DIR__ . '/EntityListeners.php';
require_once __DIR__ . '/EntityResult.php';
require_once __DIR__ . '/FieldResult.php';
require_once __DIR__ . '/GeneratedValue.php';
require_once __DIR__ . '/HasLifecycleCallbacks.php';
require_once __DIR__ . '/Id.php';
Expand All @@ -31,8 +28,6 @@
require_once __DIR__ . '/ManyToMany.php';
require_once __DIR__ . '/ManyToOne.php';
require_once __DIR__ . '/MappedSuperclass.php';
require_once __DIR__ . '/NamedNativeQueries.php';
require_once __DIR__ . '/NamedNativeQuery.php';
require_once __DIR__ . '/OneToMany.php';
require_once __DIR__ . '/OneToOne.php';
require_once __DIR__ . '/OrderBy.php';
Expand All @@ -45,8 +40,6 @@
require_once __DIR__ . '/PreRemove.php';
require_once __DIR__ . '/PreUpdate.php';
require_once __DIR__ . '/SequenceGenerator.php';
require_once __DIR__ . '/SqlResultSetMapping.php';
require_once __DIR__ . '/SqlResultSetMappings.php';
require_once __DIR__ . '/Table.php';
require_once __DIR__ . '/UniqueConstraint.php';
require_once __DIR__ . '/Version.php';
38 changes: 0 additions & 38 deletions lib/Doctrine/ORM/Annotation/EntityResult.php

This file was deleted.

28 changes: 0 additions & 28 deletions lib/Doctrine/ORM/Annotation/FieldResult.php

This file was deleted.

22 changes: 0 additions & 22 deletions lib/Doctrine/ORM/Annotation/NamedNativeQueries.php

This file was deleted.

43 changes: 0 additions & 43 deletions lib/Doctrine/ORM/Annotation/NamedNativeQuery.php

This file was deleted.

36 changes: 0 additions & 36 deletions lib/Doctrine/ORM/Annotation/SqlResultSetMapping.php

This file was deleted.

22 changes: 0 additions & 22 deletions lib/Doctrine/ORM/Annotation/SqlResultSetMappings.php

This file was deleted.

Loading