From dc674f809f3548226f867fb2eaf7c53149a0905a Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Thu, 9 May 2013 13:40:14 +0200 Subject: [PATCH] Mention BC BREAK in PersistentCollection#matching() more prominently. --- UPGRADE.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/UPGRADE.md b/UPGRADE.md index 0aacaa603..b864d8614 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,5 +1,19 @@ # Upgrade to 2.4 +## BC BREAK: Compatibility Bugfix in PersistentCollection#matching() + +In Doctrine 2.3 it was possible to use the new ``matching($criteria)`` +functionality by adding constraints for assocations based on ID: + + Criteria::expr()->eq('association', $assocation->getId()); + +This functionality does not work on InMemory collections however, because +in memory criteria compares object values based on reference. +As of 2.4 the above code will throw an exception. You need to change +offending code to pass the ``$assocation`` reference directly: + + Criteria::expr()->eq('association', $assocation); + ## Composer is now the default autoloader The test suite now runs with composer autoloading. Support for PEAR, and tarball autoloading is deprecated. @@ -28,20 +42,6 @@ Now parenthesis are considered, the previous DQL will generate: SELECT 100 / (2 * 2) FROM my_entity -## Compatibility Bugfix in PersistentCollection#matching() breaks BC - -In Doctrine 2.3 it was possible to use the new ``matching($criteria)`` -functionality by adding constraints for assocations based on ID: - - Criteria::expr()->eq('association', $assocation->getId()); - -This functionality does not work on InMemory collections however, because -in memory criteria compares object values based on reference. -As of 2.4 the above code will throw an exception. You need to change -offending code to pass the ``$assocation`` reference directly: - - Criteria::expr()->eq('association', $assocation); - # Upgrade to 2.3 ## EntityManager#find() not calls EntityRepository#find() anymore