Tags: edward-murrell/doctrine2
Tags
This release fixes an issue related to a long standing issue with how PHP handles loading of external XML entities (https://bugs.php.net/bug.php?id=62577). Total issues resolved: **2** - [3788: DDC-3020: `simplexml_load_file()`: I/O warning: failed to load external in `XmlDriver`](doctrine#3788) thanks to @doctrinebot - [6633: `XmlDriver`: Avoid PHP bug #62577 by avoiding `simplexml_load_file()`](doctrine#6633) thanks to @apapsch
This release fixes a couple regression introduced by v2.5.7 and v2.5.8. Specifically, `AbstractHydrator#hydrateAll()` was raising `E_NOTICE` errors due to it not being registered with the `EventManager`, yet trying to remove itself from the registered listeners. [doctrine#6623](doctrine#6623) In addition to that, having embeddable `final` classes would cause errors being raised while trying to generate proxies. The ORM will no longer attempt to generate proxies for embeddables. [doctrine#6625](doctrine#6623) Total issues resolved: **3** - [6623: Ensure that `AbstractHydrator#hydrateAll()` detaches the hydrator from the event manager](doctrine#6623) thanks to @echo511 - [6625: Proxy generation for embedded/transient classes](doctrine#6625) thanks to @bendavies - [6626: doctrine#6625 Skip proxy generation for embeddable classes](doctrine#6626) thanks to @issei-m
This release solves a bug introduced while backporting [doctrine#6464](doctrine#6464) and [doctrine#6475](doctrine#6475). Specifically, a dangling undefined variable remained in the code, causing some `SqlWalker` functionality to misbehave. The undefined variable wasn't noticed due to it being placed in an `empty()` expression. Total issues resolved: **1** - [6621: Fixed usage of undefined variable in `empty()` expression in `SqlWalker`](doctrine#6621) thanks to @Powerhamster
This release fixes a number of bugs detected in the current stable release of the ORM. This patch introduces compatibility with Doctrine DBAL 2.6.x. [doctrine#6580](doctrine#6580) The most critical issue being fixed is a bug in `Doctrine\ORM\PersistentCollection`, causing duplicate data to be persisted when a collection is both marked as initialized and dirty, and more entries are added to it via the `Doctrine\Common\Collections\Collection#add()` API. [doctrine#6613](doctrine#6613) [doctrine#6614](doctrine#6614) [doctrine#6616](doctrine#6616) The return value of `Doctrine\ORM\PersistentCollection#removeElement()` was sometimes an `object` or `null, causing some applications to crash when PHP is run within the context of `declare(strict_types=1);` [doctrine#6550](doctrine#6550) Memory leak issues with the hydrator process were fixed: the hydrator object was never being garbage collected due to it being registered with a `Doctrine\Common\EventManager` instance to listen for the `Doctrine\ORM\Events::onClear` event. [doctrine#1515](doctrine#1515) The `Doctrine\ORM\Tools\Pagination\CountOutputWalker` was producing invalid SQL for queries containing a `GROUP BY` clause. [doctrine#6243](doctrine#6243) The SQL generated for a DQL query containing a JTI (Joined Table Inheritance) selection and a `WITH` clause applied to a `JOIN` condition was invalid on PostgreSQL. [doctrine#6475](doctrine#6475) The `Doctrine\ORM\Tools\Console\MetadataFilter` was not detecting all metadata matching the filter regular expression. [doctrine#5715](doctrine#5715) The `Doctrine\ORM\Tools\SchemaTool` was raising notices due to invalid lookup for a discriminator column length, which may not be defined in all mappings. [doctrine#5798](doctrine#5798) Total issues resolved: **18** - [1515: DDC-3146 Remove `onClear` event listener from abstract hydrator in cleanup function, otherwise causing hydrator GC to not kick in](doctrine#1515) thanks to @emiel-silverstreet - [1541: Type annotation correction in `ResultSetMappingBuilder#addJoinedEntityFromClassMetadata()` `$relation` (should be `string`)](doctrine#1541) thanks to @aleeeftw - [3925: DDC-3146: Hydrator memory leak when using iterator](doctrine#3925) thanks to @doctrinebot - [4772: DDC-3914: doctrine#1515 DDC-3146 Remove event listener from abstract hydrator in cleanup function](doctrine#4772) thanks to @doctrinebot - [5715: Fix `MetadataFilter` regression after doctrine#507 (doctrine#2815) not testing filters after first one](doctrine#5715) thanks to @guilliamxavier - [5745: `PersistentCollection#removeElement()` returns `object` or `null` instead of boolean](doctrine#5745) thanks to @holtkamp - [5798: Fix undefined index for discriminator column `length` attribute in `SchemaTool`](doctrine#5798) thanks to @sergeyfedotov - [6243: Fix `CountOutputWalker` for queries containing a `GROUP BY` clause, which was producing invalid SQL](doctrine#6243) thanks to @enumag - [6362: Undefined Property error in ObjectHydrator when using JOIN WITH](doctrine#6362) thanks to @SirWaddles - [6367: Correct hydration of resultsets coming from DQL queries where the root of the selection is aliased and also the root of an inheritance](doctrine#6367) thanks to @SirWaddles - [6381: Corrected `LoadClassMetadataEventArgs` `@method` annotations to reflect actual returned types](doctrine#6381) thanks to @ElisDN - [6464: Query builder yields invalid SQL with JOINED inheritance type on PostgreSQL](doctrine#6464) thanks to @stesie - [6475: Fix invalid sql generated for CTI JOINs when INNER JOIN'ing with a `WITH` clause](doctrine#6475) thanks to @stesie - [6550: Fix return value of `PersistentCollection#removeElement()` for extra-lazy collections: should be `bool`](doctrine#6550) thanks to @alcaeus - [6580: Allow DBAL 2.6 and common 2.8 to be installed](doctrine#6580) thanks to @Tobion - [6613: There is the fail "UNIQUE constraint failed" with a LAZY collection](doctrine#6613) thanks to @Sysaninster - [6614: `UNIQUE constraint failed` errors when manipulating a `LAZY` collection and calling `toArray()` on it](doctrine#6614) thanks to @Sysaninster - [6616: doctrine#6613 doctrine#6614 correct handling of new elements added to an initialized (yet dirty) collection](doctrine#6616) thanks to @Ocramius
This release relaxes [`doctrine/common`](https://github.com/doctrine/… …common) requirements in order to allow installation of versions that support PHP 7.1 features in proxy class generation. Please note that a similar requirement relaxation still needs to be applied to [`doctrine/dbal`](https://github.com/doctrine/dbal) in order to allow installation of the latest `doctrine/common` versions. [doctrine#6156](doctrine#6156) This version also backports some fixes around the eviction of the second level cache entries of inverse side associations in one-to-many - many-to-one mappings. [doctrine#6159](doctrine#6159) Further fixes were applied in order to have child classes in inheritance mapping share the same timestamp region when the second level cache is enabled. [doctrine#6028](doctrine#6028) Also, `Doctrine\ORM\EntityManager#merge()` now triggers `Doctrine\ORM\Events::prePersist` listeners with the merged entity state whenever an internal `Doctrine\ORM\UnitOfWork#persist()` call is implied. [doctrine#6177](doctrine#6177). Total issues resolved: **8** - [5570: Fix PrePersist EventListener when using merge instead of persist](doctrine#5570) - [6028: Make child entity share the timestamp region with parent class](doctrine#6028) - [6110: Clear $this->collection even when empty, to reset keys](doctrine#6110) - [6156: Allow doctrine/common 2.7](doctrine#6156) - [6159: doctrine#5821 Backport doctrine#1551 - Fixed support for inverse side second level cache](doctrine#6159) - [6174: Merging a new entity with PrePersist event make changes in callback not be considered](doctrine#6174) - [6177: Fix doctrine#6174 doctrine#5570: merging new entities should also trigger prepersist lifecycle callbacks with merged entity data](doctrine#6177) - [6178: Backport doctrine#6177 - fix doctrine#6174 doctrine#5570: merging new entities should also trigger prepersist lifecycle callbacks with the merged data](doctrine#6178)
This release includes a big amount of bugfixes. Specifically, following issues were fixed: * Embeddable classes are now allowed in inheritance trees [4097](doctrine#4097) * Removed some object hash collisions caused by entity merging [1465](doctrine#1465) * Allowed usage of mathematical operators in DQL `HAVING` clauses [5598](doctrine#5598) * Fixed cloning of proxies with private properties at multiple inheritance levels [5755](doctrine#5755) * Entity insertions are correctly cleared when a specific entity is to be cleared [5849](doctrine#5849) * Corrected hydration of fetch-joins that use composite keys [5762](doctrine#5762) * Metadata exporters now only export the owning side metadata in a one-to-one relation [5858](doctrine#5858) * Corrected hydration of JTI entities when `NULL` is retrieved for a `simple_array` or `json_array` field [5989](doctrine#5989) * Correctly expire L2 cache query caches, based on entity region cache timestamp [6001](doctrine#6001) Total issues resolved: **18** - [1465: spl_object_hash conflict on Merge](doctrine#1465) - [4097: DDC-3303: @Orm\Embedded does not work with extending classes](doctrine#4097) - [4277: DDC-3467: Embeddable in inheritance must currently be protected](doctrine#4277) - [5598: HAVING clause with variable and *, / math operators](doctrine#5598) - [5599: Fix doctrine#5598 issue with /, * in DQL not translating query components properly](doctrine#5599) - [5689: Avoid conflicts due to spl_object_hash](doctrine#5689) - [5755: Error on entity clone for MappedSuperclass fields](doctrine#5755) - [5762: fetch join using composite key on join entity fails to hydrate correctly](doctrine#5762) - [5768: Fixes doctrine#5755 - Parent class fields are not cloned](doctrine#5768) - [5776: add functional test and bug fix for issue doctrine#5762](doctrine#5776) - [5849: `UnitOfWork#clear()` doesn't clear `entityInsertions` when `entityName` is passed](doctrine#5849) - [5850: Clear `UnitOfWork#$entityInsertions` for specific entityName](doctrine#5850) - [5858: Exporters should only inspect `joinColumns` for owning side in bi-directional OneToOne](doctrine#5858) - [5867: Allow the usage of embedded objects on parent classes](doctrine#5867) - [5975: Fix hydration after fetch join on entity with composite primary key](doctrine#5975) - [5989: `SimpleObjectHydrator` produces wrong values with inheritance table and simple array type](doctrine#5989) - [6001: Make second level cache query cache rely on entity region timestamp](doctrine#6001) - [6004: Fix hydration in a joined inheritance with simple array or json array](doctrine#6004)
Total issues resolved: **1** - [1568: Identifier is cached with wrong type](doctrine#1568 PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iF4EABEKAAYFAlaMNzAACgkQn2X7whLsLfhp9gD/UkJY/nqq7FpkcUQkj8Is3/5R jb8ucXPE+3Aa3RssPBwA/A12RHeGzyCjPu4BCVv4eSVOLblwoTW4oj1iVeP2lRgM =8qj0 -----END PGP SIGNATURE-----
Total issues resolved: **4** - [1572: Target entity resolver for DQL](doctrine#1572) - [1573: Merge entity associated to versioned entity](doctrine#1573) - [4884: DDC-4019: Proxy generator is not including PHP7 return type hints](doctrine#4884) - [5547: Correcting minor test case incompatibility with XDebug 2.4.x](doctrine#5547)
<h2> Bug </h2> <ul> <li>[<a href='http://www.doctrine-project.org/jira/browse/DDC-3677'>DDC-3677</a>] - [doctrineGH-1375] DDC-3671 prevent duplicate unique index </li> <li>[<a href='http://www.doctrine-project.org/jira/browse/DDC-3899'>DDC-3899</a>] - [doctrineGH-1507] Fixed wrong property name </li> <li>[<a href='http://www.doctrine-project.org/jira/browse/DDC-3908'>DDC-3908</a>] - [doctrineGH-1510] Fix cache storage related test issues (due to doctrine/cache 1.5.0 changes) </li> <li>[<a href='http://www.doctrine-project.org/jira/browse/DDC-3911'>DDC-3911</a>] - [doctrineGH-1512] Backport of "LimitSubqueryOutputWalker: fix aliasing of property in OrderBy from MappedSuperclass" </li> <li>[<a href='http://www.doctrine-project.org/jira/browse/DDC-3973'>DDC-3973</a>] - [doctrineGH-1540] [DDC-3711] Correct Error on manyToMany with composite primary key + add Tests </li> </ul> <h2> Documentation </h2> <ul> <li>[<a href='http://www.doctrine-project.org/jira/browse/DDC-3938'>DDC-3938</a>] - [doctrineGH-1529] Update Upgrade.md after minor bc break in 2.5.1 </li> </ul>
PreviousNext