Skip to content
Merged
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
10 changes: 8 additions & 2 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ awareness about deprecated code.

Starting with the next major version, the only way to access data when using the criteria filtering
API is through direct (reflection-based) access at properties directly, also bypassing property hooks.
This is to ensure consistency with how the ORM/ODM work. See https://github.com/doctrine/collections/pull/472 for
This is to ensure consistency with how the ORM/ODM works. See https://github.com/doctrine/collections/pull/472 for
the full motivation.

To opt-in to the new behaviour, pass `true` for the `$accessRawFieldValues` parameter when creating a `Criteria`
object through either `Doctrine\Common\Collections\Criteria::create()` or when calling the `Doctrine\Common\Collections\Criteria` constructor.
object through either `Doctrine\Common\Collections\Criteria::create()` or when calling the `Doctrine\Common\Collections\Criteria` constructor.

Be aware that switching to reflection-based field access may prevent ORM or ODM proxy objects
becoming initialized, since their triggers (like calling public methods) are bypassed. This might lead
to `null` values being read from such objects, which may cause wrong filtering or sorting results.
To avoid this issue, use native lazy objects added in PHP 8.4.
See https://github.com/doctrine/collections/issues/487 for more details on when this may happen.

# Upgrade to 2.2

Expand Down