Releases: doctrine/orm
v2.5.8
This release solves a bug introduced while backporting
#6464 and #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
v2.5.7
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. #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. #6613 #6614
#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);` #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. #1515
The Doctrine\ORM\Tools\Pagination\CountOutputWalker
was producing
invalid SQL for queries containing a GROUP BY
clause. #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. #6475
The Doctrine\ORM\Tools\Console\MetadataFilter
was not detecting
all metadata matching the filter regular expression. #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. #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 thanks to @emiel-silverstreet - 1541: Type annotation correction in
ResultSetMappingBuilder#addJoinedEntityFromClassMetadata()
$relation
(should bestring
) thanks to @aleeeftw - 3925: DDC-3146: Hydrator memory leak when using iterator thanks to @doctrinebot
- 4772: DDC-3914: #1515 DDC-3146 Remove event listener from abstract hydrator in cleanup function thanks to @doctrinebot
- 5715: Fix
MetadataFilter
regression after #507 (#2815) not testing filters after first one thanks to @guilliamxavier - 5745:
PersistentCollection#removeElement()
returnsobject
ornull
instead of boolean thanks to @holtkamp - 5798: Fix undefined index for discriminator column
length
attribute inSchemaTool
thanks to @sergeyfedotov - 6243: Fix
CountOutputWalker
for queries containing aGROUP BY
clause, which was producing invalid SQL thanks to @enumag - 6362: Undefined Property error in ObjectHydrator when using JOIN WITH 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 thanks to @SirWaddles
- 6381: Corrected
LoadClassMetadataEventArgs
@method
annotations to reflect actual returned types thanks to @ElisDN - 6464: Query builder yields invalid SQL with JOINED inheritance type on PostgreSQL thanks to @stesie
- 6475: Fix invalid sql generated for CTI JOINs when INNER JOIN'ing with a
WITH
clause thanks to @stesie - 6550: Fix return value of
PersistentCollection#removeElement()
for extra-lazy collections: should bebool
thanks to @alcaeus - 6580: Allow DBAL 2.6 and common 2.8 to be installed thanks to @Tobion
- 6613: There is the fail "UNIQUE constraint failed" with a LAZY collection thanks to @Sysaninster
- 6614:
UNIQUE constraint failed
errors when manipulating aLAZY
collection and callingtoArray()
on it thanks to @Sysaninster - 6616: #6613 #6614 correct handling of new elements added to an initialized (yet dirty) collection thanks to @Ocramius
v2.5.6
This release relaxes 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
in order to allow installation of
the latest doctrine/common
versions. #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. #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. #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. #6177.
Total issues resolved: 8
- 5570: Fix PrePersist EventListener when using merge instead of persist
- 6028: Make child entity share the timestamp region with parent class
- 6110: Clear $this->collection even when empty, to reset keys
- 6156: Allow doctrine/common 2.7
- 6159: #5821 Backport #1551 - Fixed support for inverse side second level cache
- 6174: Merging a new entity with PrePersist event make changes in callback not be considered
- 6177: Fix #6174 #5570: merging new entities should also trigger prepersist lifecycle callbacks with merged entity data
- 6178: Backport #6177 - fix #6174 #5570: merging new entities should also trigger prepersist lifecycle callbacks with the merged data
v2.5.5
This release includes a big amount of bugfixes.
Specifically, following issues were fixed:
- Embeddable classes are now allowed in inheritance trees 4097
- Removed some object hash collisions caused by entity merging 1465
- Allowed usage of mathematical operators in DQL
HAVING
clauses 5598 - Fixed cloning of proxies with private properties at multiple inheritance levels 5755
- Entity insertions are correctly cleared when a specific entity is to be cleared 5849
- Corrected hydration of fetch-joins that use composite keys 5762
- Metadata exporters now only export the owning side metadata in a one-to-one relation 5858
- Corrected hydration of JTI entities when
NULL
is retrieved for asimple_array
orjson_array
field 5989 - Correctly expire L2 cache query caches, based on entity region cache timestamp 6001
Total issues resolved: 18
- 1465: spl_object_hash conflict on Merge
- 4097: DDC-3303: @ORM\Embedded does not work with extending classes
- 4277: DDC-3467: Embeddable in inheritance must currently be protected
- 5598: HAVING clause with variable and *, / math operators
- 5599: Fix #5598 issue with /, * in DQL not translating query components properly
- 5689: Avoid conflicts due to spl_object_hash
- 5755: Error on entity clone for MappedSuperclass fields
- 5762: fetch join using composite key on join entity fails to hydrate correctly
- 5768: Fixes #5755 - Parent class fields are not cloned
- 5776: add functional test and bug fix for issue #5762
- 5849:
UnitOfWork#clear()
doesn't clearentityInsertions
whenentityName
is passed - 5850: Clear
UnitOfWork#$entityInsertions
for specific entityName - 5858: Exporters should only inspect
joinColumns
for owning side in bi-directional OneToOne - 5867: Allow the usage of embedded objects on parent classes
- 5975: Fix hydration after fetch join on entity with composite primary key
- 5989:
SimpleObjectHydrator
produces wrong values with inheritance table and simple array type - 6001: Make second level cache query cache rely on entity region timestamp
- 6004: Fix hydration in a joined inheritance with simple array or json array
v2.5.4
v2.5.3
v2.5.2
Release Notes - Doctrine 2 - ORM - Version 2.5.2
Bug
- [DDC-3677] - [GH-1375] DDC-3671 prevent duplicate unique index
- [DDC-3899] - [GH-1507] Fixed wrong property name
- [DDC-3908] - [GH-1510] Fix cache storage related test issues (due to doctrine/cache 1.5.0 changes)
- [DDC-3911] - [GH-1512] Backport of "LimitSubqueryOutputWalker: fix aliasing of property in OrderBy from MappedSuperclass"
- [DDC-3973] - [GH-1540] [DDC-3711] Correct Error on manyToMany with composite primary key + add Tests
Documentation
Improvement
v2.5.1
Release Notes - Doctrine 2 - ORM - Version 2.5.1
Bug
- [DDC-3096] - JoinColumn definition does not regard column type with value translation
- [DDC-3330] - Bad Pagination - rows with sorted collection
- [DDC-3658] - [GH-1365] fix rare query test failures due to nondeterminism without order by clause
- [DDC-3667] - Fetch-joining a collection that has a field with a default value of `array` causes a fatal error
- [DDC-3670] - [GH-1374] Fix DDC767Test failing on php7 + pg94
- [DDC-3680] - [GH-1377] Failing test case for broken paginator case
- [DDC-3683] - [GH-1380] Fix issue with second-level-cache tests and versioned entities
- [DDC-3684] - [GH-1381] Fixes ClassMetadata wakeupReflection with embeddable and StaticReflectio...
- [DDC-3689] - [GH-1382] Patch second level cache association hydration
- [DDC-3690] - PersistentCollection uses private property
- [DDC-3699] - [GH-1387] Fix skipping properties if they are listed after a not loaded relation.
- [DDC-3756] - [GH-1416] [2.5][Bug] Fix ConvertDoctrine1Schema->getMetadata
- [DDC-3778] - [GH-1430] "INSTANCE OF" example doesn't match description.
- [DDC-3831] - [GH-1463] Fixed issue when paginator orders by a subselect expression
- [DDC-3919] - Schema creation problem on PostgreSQL
Documentation
v2.4.8
Release Notes - Doctrine 2 - ORM - Version 2.4.8
Bug
- [DDC-3310] - [GH-1138] Join column index names
- [DDC-3343] - `PersistentCollection::removeElement` schedules an entity for deletion when relationship is EXTRA_LAZY, with `orphanRemoval` false.
- [DDC-3464] - [GH-1231] Backport 'Merge pull request #1098 from encoder32/DDC-1590' to 2.4 branch
- [DDC-3482] - [GH-1242] Attempting to lock a proxy object fails as UOW doesn't init proxy first
- [DDC-3493] - New (PHP 5.5) "class" keyword - wrong parsing by EntityGenerator
- [DDC-3494] - [GH-1250] Test case for "class" keyword
- [DDC-3500] - [GH-1254] Fix applying ON/WITH conditions to first join in Class Table Inheritance
- [DDC-3502] - [GH-1256] DDC-3493 - fixed EntityGenerator parsing for php 5.5 "::class" syntax
- [DDC-3518] - [GH-1266] [2.4] Fix schema generation in the test suite
- [DDC-3537] - [GH-1282] Hotfix/#1169 extra lazy one to many should not delete referenced entities (backport to 2.4)
- [DDC-3551] - [GH-1294] Avoid Connection error when calling ClassMetadataFactor::getAllMetadata()
- [DDC-3560] - [GH-1300] [2.4] #1169 DDC-3343 one-to-omany persister deletes only on EXTRA_LAZY plus orphanRemoval
- [DDC-3608] - [GH-1327] Properly generate default value from yml & xml mapping
- [DDC-3619] - spl_object_hash collision
- [DDC-3624] - [GH-1338] [DDC-3619] Update identityMap when entity gets managed again
- [DDC-3643] - [GH-1352] fix EntityGenerator RegenerateEntityIfExists
Improvement
v2.5.0
Doctrine ORM 2.5.0 Release
We are happy to announce the immediate availability of Doctrine ORM 2.5.0
.
This release spans over almost 2 years of development, and is a major effort
by the team and the community to make the ORM more robust and performant.
457 issues were resolved in this release,
so we are very proud of the work being done by the community and the core team.
What is new in 2.5.x?
Doctrine ORM 2.5.0 comes with a set of major improvements:
- The Second-level Cache, a component that greatly improves ORM performance
- Embeddable classes, allowing for a more fine-grained design of your entities without having
to resort to one-to-one associations for Value Objects - Entity type specific event listeners, for improved event handling performance
- Improvements in the Criteria Collection filtering API, now also supporting
EXTRA_LAZY
filtering
What has to be done to upgrade to 2.5.x?
Some Backwards incompatible changes were also involved in this release: to read them, along with
a more extensive list of the 2.5.0 changes, please consult
the upgrade notes.
Stability
We currently do not have a release schedule for Doctrine ORM 2.6.0
.
As of today, Doctrine ORM 2.5.x
is our stable distribution, and will receive regular bugfix releases.
Doctrine ORM 2.4.8
will be the last bugfix release for the 2.4.x
series. Further releases will only
occur in the eventuality of a security issue being discovered.
We will also keep patching previous versions of the ORM in the eventuality of a security issue being
discovered.
Installation
You can install this version of the ORM by using Composer and the
following composer.json
contents:
{
"require": {
"doctrine/orm": "2.5.0"
}
}
Changes since 2.4.0
This is a list of issues resolved in 2.5.0
since 2.4.0
:
New Feature
- DDC-93 - It would be nice if we could have support for ValueObjects
- DDC-1149 - Optimize OneToMany and ManyToMany without join
- DDC-1216 - A way to mark an entity to always use result cache. Like @UseResultCache class annotation.
- DDC-1247 - Implement AnnotationDriver::addExcludePath
- DDC-1563 - Result cache for repository queries
- DDC-2021 - Array Data in Member OF
- DDC-2773 - #835 Value objects (Based on #634)
- DDC-2959 - #937 Extra-lazy for containsKey on collections
- DDC-3117 - #1027 Support for Partial Indexes for PostgreSql and Sqlite
- DDC-3161 - #1054 SQLFilters enahancements
- DDC-3186 - #1069 added method to be able to reuse the console application
- DDC-3231 - #1089 Entity repository generator default repository
- DDC-3300 - #1130 Added resolve entities support in discrim. map
- DDC-3385 - #1181 Support fetching entities by aliased name
- DDC-3462 - #1230 Allow dumping SQL query when passing DQL on cli
- DDC-3503 - #1257 Resolve target entity also in discriminator map (allows interfaces and custom names in discriminator map)
- DDC-3567 - #1303 make QueryBuilder::getAllAliases public
Improvement
- DDC-54 - Trigger postLoad events and callbacks after associations have been initialized
- DDC-1590 - Fix Inheritance in Code-Generation
- DDC-1787 - Fix for JoinedSubclassPersister, multiple inserts with versioning throws an optimistic locking exception
- DDC-1858 - LIKE and IS NULL operators not supported in HAVING clause
- DDC-2052 - Custom tree walkers are not allowed to add new components to the query
- DDC-2061 - Matching Criteria on a PersistentCollection only works on OneToMany associations
- DDC-2128 - #507 Now MetaDataFilter takess also regexp. For example whern you want to
- DDC-2183 - Second Level Cache improvements
- DDC-2210 - PHP warning in ProxyFactory when renaming proxy file
- DDC-2217 - Return a lazy collection from PersistentCollection::match($criteria)
- DDC-2319 - #590 DQL Query: process ArrayCollection values to ease development
- DDC-2534 - #711 Coveralls code coverage
- DDC-2538 - #713 Quick grammar fix
- DDC-2544 - #717 Allow query parameters starting with an underscore
- DDC-2546 - #719 Access properties via static:: instead of self::.
- DDC-2615 - LIKE operator not supported in HAVING clause
- DDC-2636 - Handle SQLite with dot notation in @table and @jointable
- DDC-2639 - #771 Added indexBy option to createQueryBuilder
- DDC-2770 - #833 Generate-Entities-Console-Command: Adding an 'avoid backup' flag
- DDC-2789 - #844 Teach orm:validate-schema to --skip-mapping and --skip-sync
- DDC-2794 - the Paginator does not support arbitrary join
- DDC-2814 - #858 lifts an unnecessary restriction on ResultSetMappingBuilder
- DDC-2824 - #863 The new configuration option: defaultQueryHints
- DDC-2861 - #881 Fix persistence exception on a table with a schema on a platform without schema support
- DDC-2865 - #882 Efficient counting on Criteria
- DDC-2868 - #885 Add support for ManyToMany Criteria
- DDC-2926 - #914 added license badge
- DDC-2970 - #946 Cleaned up unused imports
- DDC-2981 - Multi get for second level cache (Doctrine Cache related)
- DDC-2982 - #954 Multi Get support for Second Level Cache
- DDC-2984 - Support Custom DBAL types to be used as identifiers
- DDC-2991 - #957 makes doctrine less dependent upon the symfony yaml component
- DDC-2999 - #962 Stop executeDeletions when there is nothing to to delete anymore
- [DDC-3000](http://www.doctrine-project.org/jira...