Skip to content

Releases: doctrine/orm

2.17.4

28 Jan 15:02
2.17.4
ccfc97c
Compare
Choose a tag to compare

2.17.3

17 Jan 18:51
2.17.3
398ab05
Compare
Choose a tag to compare

2.17.2

20 Dec 22:13
2.17.2
393679a
Compare
Choose a tag to compare

2.17.1

17 Nov 06:27
2.17.1
1a4fe6e
Compare
Choose a tag to compare

Release Notes for 2.17.1

2.17.x bugfix release (patch)

2.17.1

  • Total issues resolved: 0
  • Total pull requests resolved: 2
  • Total contributors: 2

Bug

3.0.0-beta2

15 Nov 23:14
fcba06f
Compare
Choose a tag to compare
3.0.0-beta2 Pre-release
Pre-release

What's Changed

Full Changelog: 3.0.0-beta1...3.0.0-beta2

2.17.0

15 Nov 23:10
2.17.0
e8afa9f
Compare
Choose a tag to compare

Release Notes for 2.17.0

Feature release (minor)

2.17.0

  • Total issues resolved: 0
  • Total pull requests resolved: 22
  • Total contributors: 6

Documentation

Deprecation

Bug

Improvement

Static Analysis

Test Suite

New Feature

Deprecation,New Feature

2.16.3

15 Nov 23:05
2.16.3
609647a
Compare
Choose a tag to compare

3.0.0-beta1

11 Oct 12:09
7827453
Compare
Choose a tag to compare
3.0.0-beta1 Pre-release
Pre-release

BC BREAK: AUTO keyword for identity generation defaults to IDENTITY for PostgreSQL now

When using the AUTO strategy to let Doctrine determine the identity generation mecehanism for
an entity, PostgreSQL now uses IDENTITY instead of SEQUENCE. When upgrading from ORM 2.x
and preference is on keeping the SEQUENCE based identity generation, then configure the ORM
this way:

use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use Doctrine\ORM\Configuration;
use Doctrine\ORM\Mapping\ClassMetadata;

assert($configuration instanceof Configuration);
$configuration->setIdentityGenerationPreferences([
    PostgreSQLPlatform::CLASS => ClassMetadata::GENERATOR_TYPE_SEQUENCE,
]);

BC BREAK: Throw exceptions when using illegal attributes on Embeddable

There are only a few attributes allowed on an embeddable such as #[Column] or
#[Embedded]. Previously all others that target entity classes where ignored,
now they throw an exception.

BC BREAK: Partial objects are removed

  • The PARTIAL keyword in DQL no longer exists.
  • Doctrine\ORM\Query\AST\PartialObjectExpressionis removed.
  • Doctrine\ORM\Query\SqlWalker::HINT_PARTIAL and
    Doctrine\ORM\Query::HINT_FORCE_PARTIAL_LOAD are removed.
  • Doctrine\ORM\EntityManager*::getPartialReference() is removed.

BC BREAK: Doctrine\ORM\Persister\Entity\EntityPersister::executeInserts() return type changed to void

Implementors should adapt to the new signature, and should call
UnitOfWork::assignPostInsertId() for each entry in the previously returned
array.

BC BREAK: Doctrine\ORM\Proxy\ProxyFactory no longer extends abstract factory from doctrine/common

It is no longer possible to call methods, constants or properties inherited
from that class on a ProxyFactory instance.

Doctrine\ORM\Proxy\ProxyFactory::createProxyDefinition() and
Doctrine\ORM\Proxy\ProxyFactory::resetUninitializedProxy() are removed as well.

BC BREAK: lazy ghosts are enabled unconditionally

Doctrine\ORM\Configuration::setLazyGhostObjectEnabled() and
Doctrine\ORM\Configuration::isLazyGhostObjectEnabled() are now no-ops and
will be deprecated in 3.1.0

BC BREAK: collisions in identity map are unconditionally rejected

Doctrine\ORM\Configuration::setRejectIdCollisionInIdentityMap() and
Doctrine\ORM\Configuration::isRejectIdCollisionInIdentityMapEnabled() are now
no-ops and will be deprecated in 3.1.0.

BC BREAK: Lifecycle callback mapping on embedded classes is now explicitly forbidden

Lifecycle callback mapping on embedded classes produced no effect, and is now
explicitly forbidden to point out mistakes.

BC BREAK: The NOTIFY change tracking policy is removed

You should use DEFERRED_EXPLICIT instead.

BC BREAK: Mapping\Driver\XmlDriver::__construct() third argument is now a no-op

The third argument to
Doctrine\ORM\Mapping\Driver\XmlDriver::__construct() was introduced to
let users opt-in to XML validation, that is now always enabled, regardless of
the value of that argument.

As a consequence, the same goes for
Doctrine\ORM\Mapping\Driver\SimplifiedXmlDriver, and for
Doctrine\ORM\ORMSetup::createXMLMetadataConfiguration().

BC BREAK: Mapping\Driver\AttributeDriver::__construct() second argument is now a no-op

The second argument to
Doctrine\ORM\Mapping\Driver\AttributeDriver::__construct() was introduced to
let users opt-in to a new behavior, that is now always enforced, regardless of
the value of that argument.

BC BREAK: Query::setDQL() and Query::setFirstResult() no longer accept null

The $dqlQuery argument of Doctrine\ORM\Query::setDQL() must always be a
string.

The $firstResult argument of Doctrine\ORM\Query::setFirstResult() must
always be an integer.

BC BREAK: orm:schema-tool:update option --complete is now a no-op

orm:schema-tool:update now behaves as if --complete was provided,
regardless of whether it is provided or not.

BC BREAK: Removed Doctrine\ORM\Proxy\Proxy interface.

Use Doctrine\Persistence\Proxy instead to check whether proxies are initialized.

BC BREAK: Overriding fields or associations declared in other than mapped superclasses

As stated in the documentation, fields and associations may only be overridden when being inherited
from mapped superclasses. Overriding them for parent entity classes now throws a MappingException.

BC BREAK: Undeclared entity inheritance now throws a MappingException

As soon as an entity class inherits from another entity class, inheritance has to
be declared by adding the appropriate configuration for the root entity.

Removed getEntityManager() in Doctrine\ORM\Event\OnClearEventArgs and Doctrine\ORM\Event\*FlushEventArgs

Use getObjectManager() instead.

BC BREAK: Removed Doctrine\ORM\Mapping\ClassMetadataInfo class

Use Doctrine\ORM\Mapping\ClassMetadata instead.

BC BREAK: Removed Doctrine\ORM\Event\LifecycleEventArgs class.

Use one of the dedicated event classes instead:

  • Doctrine\ORM\Event\PrePersistEventArgs
  • Doctrine\ORM\Event\PreUpdateEventArgs
  • Doctrine\ORM\Event\PreRemoveEventArgs
  • Doctrine\ORM\Event\PostPersistEventArgs
  • Doctrine\ORM\Event\PostUpdateEventArgs
  • Doctrine\ORM\Event\PostRemoveEventArgs
  • Doctrine\ORM\Event\PostLoadEventArgs

BC BREAK: Removed AttributeDriver::$entityAnnotationClasses and AttributeDriver::getReader()

  • If you need to change the behavior of AttributeDriver::isTransient(),
    override that method instead.
  • The attribute reader is internal to the driver and should not be accessed from outside.

BC BREAK: Removed Doctrine\ORM\Query\AST\InExpression

The AST parser will create a InListExpression or a InSubselectExpression when
encountering an IN () DQL expression instead of a generic InExpression.

As a consequence, SqlWalker::walkInExpression() has been replaced by
SqlWalker::walkInListExpression() and SqlWalker::walkInSubselectExpression().

BC BREAK: Changed EntityManagerInterface#refresh($entity), EntityManagerDecorator#refresh($entity) and UnitOfWork#refresh($entity) signatures

The new signatures of these methods add an optional LockMode|int|null $lockMode
param with default null value (no lock).

BC Break: Removed AnnotationDriver

The annotation driver and anything related to annotation has been removed.
Please migrate to another mapping driver.

The Doctrine\ORM\Mapping\Annotation maker interface has been removed in favor of the new
Doctrine\ORM\Mapping\MappingAttribute interface.

BC BREAK: Removed EntityManager::create()

The constructor of EntityManager is now public and must be used instead of the create() method.
However, the constructor expects a Connection while create() accepted an array with connection parameters.
You can pass that array to DBAL's Doctrine\DBAL\DriverManager::getConnection() method to bootstrap the
connection.

BC BREAK: Removed QueryBuilder methods and constants.

The following QueryBuilder constants and methods have been removed:

  1. SELECT,
  2. DELETE,
  3. UPDATE,
  4. STATE_DIRTY,
  5. STATE_CLEAN,
  6. getState(),
  7. getType().

BC BREAK: Omitting only the alias argument for QueryBuilder::update and QueryBuilder::delete is not supported anymore

When building an UPDATE or DELETE query and when passing a class/type to the function, the alias argument must not be omitted.

Before

$qb = $em->createQueryBuilder()
    ->delete('User u')
    ->where('u.id = :user_id')
    ->setParameter('user_id', 1);

After

$qb = $em->createQueryBuilder()
    ->delete('User', 'u')
    ->where('u.id = :user_id')
    ->setParameter('user_id', 1);

BC BREAK: Split output walkers and tree walkers

SqlWalker and its child classes don't implement the TreeWalker interface
anymore.

The following methods have been removed from the TreeWalker interface and
from the TreeWalkerAdapter and TreeWalkerChain classes:

  • setQueryComponent()
  • walkSelectClause()
  • walkFromClause()
  • walkFunction()
  • walkOrderByClause()
  • walkOrderByItem()
  • walkHavingClause()
  • walkJoin()
  • walkSelectExpression()
  • walkQuantifiedExpression()
  • walkSubselect()
  • walkSubselectFromClause()
  • walkSimpleSelectClause()
  • walkSimpleSelectExpression()
  • walkAggregateExpression()
  • walkGroupByClause()
  • walkGroupByItem()
  • walkDeleteClause()
  • walkUpdateClause()
  • walkUpdateItem()
  • walkWhereClause()
  • walkConditionalExpression()
  • walkConditionalTerm()
  • walkConditionalFactor()
  • walkConditionalPrimary()
  • walkExistsExpression()
  • walkCollectionMemberExpression()
  • walkEmptyCollectionComparisonExpression()
  • walkNullComparisonExpression()
  • walkInExpression()
  • walkInstanceOfExpression()
  • walkLiteral()
  • walkBetweenExpression()
  • walkLikeExpression()
  • walkStateFieldPathExpression()
  • walkComparisonExpression()
  • walkInputParameter()
  • walkArithmeticExpression()
  • walkArithmeticTerm()
  • walkStringPrimary()
  • walkArithmeticFactor()
  • walkSimpleArithmeticExpression()
  • walkPathExpression()
  • walkResultVariable()
  • getExecutor()

The following changes have been made to the abstract TreeWalkerAdapter class:

  • The method setQueryComponent() is now protected.
  • The method _getQueryComponents() has been removed in favor of
    getQueryComponents().

BC BREAK: Removed identity columns emulation through sequences

If the platform you are using does not support identity columns, you should
switch to the SEQUENCE strategy.

BC BREAK: Made setters parameters mandatory

The following methods require an argument when being called. Pass null
instead of omitting the argument.

  • `Do...
Read more

2.16.2

28 Aug 07:29
2.16.2
17500f5
Compare
Choose a tag to compare

2.16.1

09 Aug 13:16
2.16.1
597a63a
Compare
Choose a tag to compare