Doctrine Collections
Collections Abstraction library
Changelog
v1.6.1
This release, combined with the release of doctrine/annotations
v1.6.1
,
fixes an issue where parsing annotations was not possible
for classes within doctrine/collections
.
Specifically, v1.6.0
introduced Psalm-specific annotations
such as (for example) @template
and @template-implements
,
which were both incorrectly recognized as @template
.
@template
has therefore been removed, and instead we use
the prefixed @psalm-template
, which is no longer parsed
by doctrine/collections
v1.6.1
Total issues resolved: 1
- 186: Use
@psalm-template
annotation to avoid clashes thanks to @muglug
v1.6.0
This release bumps the minimum required PHP version to 7.1.3.
Following improvements were introduced:
ArrayCollection#filter()
now allows filtering by key, value or both.- When using the
ClosureExpressionVisitor
over objects with a defined accessor and property, the accessor is prioritised. - Updated testing tools and coding standards, autoloading, which also led to marginal performance improvements
- Introduced generic type docblock declarations from psalm,
which should allow users to declare
/** @var Collection<KeyType, ValueType> */
in their code, and leverage the type propagation deriving from that.
Total issues resolved: 16
- 127: Use PSR-4 thanks to @Nyholm
- 129: Remove space in method declaration thanks to @bounoable
- 130: Update build to add PHPCS and PHPStan thanks to @lcobucci
- 131: ClosureExpressionVisitor > Don't duplicate the accessor when the field already starts with it thanks to @ruudk
- 139: Apply Doctrine CS 2.1 thanks to @Majkl578
- 142: CS 4.0, version composer.lock, merge stages thanks to @Majkl578
- 144: Update to PHPUnit 7 thanks to @carusogabriel
- 146: Update changelog for v1.4.0 and v1.5.0 thanks to @GromNaN
- 154: Update index.rst thanks to @chraiet
- 158: Extract Selectable method into own documentation section thanks to @SenseException
- 160: Update homepage thanks to @Majkl578
- 165: Allow
ArrayCollection#filter()
to filter by key, value or both thanks to @0x13a - 167: Allow
ArrayCollection#filter()
to filter by key and also value thanks to @0x13a - 175: CI: Test against PHP 7.4snapshot instead of nightly (8.0) thanks to @Majkl578
- 177: Generify collections using Psalm thanks to @nschoellhorn
- 178: Updated doctrine/coding-standard to 6.0 thanks to @patrickjahns
v1.5.0
v1.4.0
- Require PHP 5.6+
- Add
ArrayCollection::createFrom()
- Support non-camel-case naming
- Comparison
START_WITH
,END_WITH
- Comparison
MEMBER_OF
- Add Contributing guide
v1.3.0
- Explicit casting of first and max results in criteria API
- Keep keys when using
ArrayCollection#matching()
with sorting - Made
AbstractLazyCollection#$initialized
protected for extensibility
v1.2.0
- Add a new
AbstractLazyCollection
v1.1.0
-
Deprecated
Comparison::IS
, because it's only there for SQL semantics. These are fixed in the ORM instead. -
Add
Comparison::CONTAINS
to perform partial string matches:$criteria->andWhere($criteria->expr()->contains('property', 'Foo'));