Criteria orderings direction is now represented by the
Doctrine\Common\Collection\Order enum.
As a consequence:
Criteria::ASC and Criteria::DESC are deprecated in favor of
Order::Ascending and Order::Descending, respectively.
Criteria::getOrderings() is deprecated in favor of Criteria::orderings(),
which returns array<string, Order>.
Criteria::orderBy() accepts array<string, string|Order>, but passing
anything other than array<string, Order> is deprecated.
Upgrade to 2.0
BC breaking changes
Native parameter types were added. Native return types will be added in 3.0.x
As a consequence, some signatures were changed and will have to be adjusted in sub-classes.
Note that in order to keep compatibility with both 1.x and 2.x versions,
extending code would have to omit the added parameter types.
This would only work in PHP 7.2+ which is the first version featuring
parameter widening.
It is also recommended to add return types according to the tables below
You can find a list of major changes to public API below.
Doctrine\Common\Collections\Collection
1.0.x
3.0.x
add($element)
add(mixed $element): void
clear()
clear(): void
contains($element)
contains(mixed $element): bool
isEmpty()
isEmpty(): bool
removeElement($element)
removeElement(mixed $element): bool
containsKey($key)
containsKey(string|int $key): bool
get()
get(string|int $key): mixed
... (truncated)
Commits
d8af7f2 Merge pull request #411 from VincentLanglet/repeatClosure
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps doctrine/collections from 1.8.0 to 2.2.2.
Release notes
Sourced from doctrine/collections's releases.
... (truncated)
Upgrade guide
Sourced from doctrine/collections's upgrade guide.
... (truncated)
Commits
d8af7f2
Merge pull request #411 from VincentLanglet/repeatClosure5dec3fd
Add tests9186239
Repeat closure type9b9c38a
Open branch 2.3.x (#409)ec877e9
Fix CS (#410)420480f
Merge pull request #405 from derrabus/bugfix/deprecation-messageaed9ea8
Improve deprecation message for Criteria::orderBy()c13b813
Update branch metadata (#402)07e16cd
Merge pull request #399 from doctrine/2.1.x68b8348
Merge pull request #398 from greg0ire/missing-upgrade-noteDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show