PHPackages                             someniatko/doctrine-collections - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. someniatko/doctrine-collections

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

someniatko/doctrine-collections
===============================

PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.

1.6.8(4y ago)01.1kMITPHPPHP ^7.1.3 || ^8.0

Since Jan 12Pushed 4y agoCompare

[ Source](https://github.com/someniatko/collections)[ Packagist](https://packagist.org/packages/someniatko/doctrine-collections)[ Docs](https://www.doctrine-project.org/projects/collections.html)[ Fund](https://www.doctrine-project.org/sponsorship.html)[ Patreon](https://www.patreon.com/phpdoctrine)[ RSS](/packages/someniatko-doctrine-collections/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)Dependencies (4)Versions (19)Used By (0)

Doctrine Collections
====================

[](#doctrine-collections)

[![Build Status](https://camo.githubusercontent.com/82fab1bbe64bff89548b84354d463e55415c1ebc908b17d4044841a957d7564b/68747470733a2f2f7472617669732d63692e6f72672f646f637472696e652f636f6c6c656374696f6e732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/doctrine/collections)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/99d8493cb1cd66283ab1ddacee1fa3e75f5a21e010b277781b7c4446397ca5ff/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f646f637472696e652f636f6c6c656374696f6e732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/doctrine/collections/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/1190055bc54b2f82eeb4d63408f211aec8d2fe43850e92ea38e5c7f9d38c8085/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f646f637472696e652f636f6c6c656374696f6e732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/doctrine/collections/?branch=master)

Collections Abstraction library

Changelog
---------

[](#changelog)

### v1.6.1

[](#v161)

This release, combined with the release of [`doctrine/annotations` `v1.6.1`](https://github.com/doctrine/annotations/releases/tag/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](https://github.com/doctrine/collections/pull/186) thanks to @muglug

### v1.6.0

[](#v160)

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](https://github.com/vimeo/psalm), which should allow users to declare `/** @var Collection */`in their code, and leverage the type propagation deriving from that.

Total issues resolved: **16**

- [127: Use PSR-4](https://github.com/doctrine/collections/pull/127) thanks to @Nyholm
- [129: Remove space in method declaration](https://github.com/doctrine/collections/pull/129) thanks to @bounoable
- [130: Update build to add PHPCS and PHPStan](https://github.com/doctrine/collections/pull/130) thanks to @lcobucci
- [131: ClosureExpressionVisitor &gt; Don't duplicate the accessor when the field already starts with it](https://github.com/doctrine/collections/pull/131) thanks to @ruudk
- [139: Apply Doctrine CS 2.1](https://github.com/doctrine/collections/pull/139) thanks to @Majkl578
- [142: CS 4.0, version composer.lock, merge stages](https://github.com/doctrine/collections/pull/142) thanks to @Majkl578
- [144: Update to PHPUnit 7](https://github.com/doctrine/collections/pull/144) thanks to @carusogabriel
- [146: Update changelog for v1.4.0 and v1.5.0](https://github.com/doctrine/collections/pull/146) thanks to @GromNaN
- [154: Update index.rst](https://github.com/doctrine/collections/pull/154) thanks to @chraiet
- [158: Extract Selectable method into own documentation section](https://github.com/doctrine/collections/pull/158) thanks to @SenseException
- [160: Update homepage](https://github.com/doctrine/collections/pull/160) thanks to @Majkl578
- [165: Allow `ArrayCollection#filter()` to filter by key, value or both](https://github.com/doctrine/collections/issues/165) thanks to @0x13a
- [167: Allow `ArrayCollection#filter()` to filter by key and also value](https://github.com/doctrine/collections/pull/167) thanks to @0x13a
- [175: CI: Test against PHP 7.4snapshot instead of nightly (8.0)](https://github.com/doctrine/collections/pull/175) thanks to @Majkl578
- [177: Generify collections using Psalm](https://github.com/doctrine/collections/pull/177) thanks to @nschoellhorn
- [178: Updated doctrine/coding-standard to 6.0](https://github.com/doctrine/collections/pull/178) thanks to @patrickjahns

### v1.5.0

[](#v150)

- [Require PHP 7.1+](https://github.com/doctrine/collections/pull/105)
- [Drop HHVM support](https://github.com/doctrine/collections/pull/118)

### v1.4.0

[](#v140)

- [Require PHP 5.6+](https://github.com/doctrine/collections/pull/105)
- [Add `ArrayCollection::createFrom()`](https://github.com/doctrine/collections/pull/91)
- [Support non-camel-case naming](https://github.com/doctrine/collections/pull/57)
- [Comparison `START_WITH`, `END_WITH`](https://github.com/doctrine/collections/pull/78)
- [Comparison `MEMBER_OF`](https://github.com/doctrine/collections/pull/66)
- [Add Contributing guide](https://github.com/doctrine/collections/pull/103)

### v1.3.0

[](#v130)

- [Explicit casting of first and max results in criteria API](https://github.com/doctrine/collections/pull/26)
- [Keep keys when using `ArrayCollection#matching()` with sorting](https://github.com/doctrine/collections/pull/49)
- [Made `AbstractLazyCollection#$initialized` protected for extensibility](https://github.com/doctrine/collections/pull/52)

### v1.2.0

[](#v120)

- Add a new `AbstractLazyCollection`

### v1.1.0

[](#v110)

- 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'));

    ```

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor4

4 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~257 days

Recently: every ~252 days

Total

14

Last Release

1521d ago

PHP version history (5 changes)v1.0PHP &gt;=5.3.2

v1.4.0PHP ^5.6 || ^7.0

v1.5.0PHP ^7.1

v1.6.0PHP ^7.1.3

1.6.7PHP ^7.1.3 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/e97636de22b210bf5dc7820b999b4c66ab8b71009655d75206256595be4d55cc?d=identicon)[someniatko](/maintainers/someniatko)

---

Top Contributors

[![Ocramius](https://avatars.githubusercontent.com/u/154256?v=4)](https://github.com/Ocramius "Ocramius (55 commits)")[![beberlei](https://avatars.githubusercontent.com/u/26936?v=4)](https://github.com/beberlei "beberlei (45 commits)")[![lcobucci](https://avatars.githubusercontent.com/u/201963?v=4)](https://github.com/lcobucci "lcobucci (26 commits)")[![jwage](https://avatars.githubusercontent.com/u/97422?v=4)](https://github.com/jwage "jwage (25 commits)")[![mikeSimonson](https://avatars.githubusercontent.com/u/907613?v=4)](https://github.com/mikeSimonson "mikeSimonson (22 commits)")[![Majkl578](https://avatars.githubusercontent.com/u/144181?v=4)](https://github.com/Majkl578 "Majkl578 (15 commits)")[![nschoellhorn](https://avatars.githubusercontent.com/u/3925180?v=4)](https://github.com/nschoellhorn "nschoellhorn (14 commits)")[![guilhermeblanco](https://avatars.githubusercontent.com/u/208883?v=4)](https://github.com/guilhermeblanco "guilhermeblanco (11 commits)")[![vilartoni](https://avatars.githubusercontent.com/u/6759538?v=4)](https://github.com/vilartoni "vilartoni (9 commits)")[![SenseException](https://avatars.githubusercontent.com/u/859964?v=4)](https://github.com/SenseException "SenseException (8 commits)")[![yannickl88](https://avatars.githubusercontent.com/u/5468127?v=4)](https://github.com/yannickl88 "yannickl88 (5 commits)")[![bakura10](https://avatars.githubusercontent.com/u/1198915?v=4)](https://github.com/bakura10 "bakura10 (5 commits)")[![diego9182](https://avatars.githubusercontent.com/u/176076009?v=4)](https://github.com/diego9182 "diego9182 (5 commits)")[![pine3ree](https://avatars.githubusercontent.com/u/3229979?v=4)](https://github.com/pine3ree "pine3ree (5 commits)")[![alcaeus](https://avatars.githubusercontent.com/u/383198?v=4)](https://github.com/alcaeus "alcaeus (4 commits)")[![asm89](https://avatars.githubusercontent.com/u/657357?v=4)](https://github.com/asm89 "asm89 (4 commits)")[![weirdan](https://avatars.githubusercontent.com/u/57403?v=4)](https://github.com/weirdan "weirdan (4 commits)")[![gmponos](https://avatars.githubusercontent.com/u/5675248?v=4)](https://github.com/gmponos "gmponos (3 commits)")[![ferjul17](https://avatars.githubusercontent.com/u/1574473?v=4)](https://github.com/ferjul17 "ferjul17 (3 commits)")[![rdohms](https://avatars.githubusercontent.com/u/94331?v=4)](https://github.com/rdohms "rdohms (2 commits)")

---

Tags

phparraycollectionsiterators

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/someniatko-doctrine-collections/health.svg)

```
[![Health](https://phpackages.com/badges/someniatko-doctrine-collections/health.svg)](https://phpackages.com/packages/someniatko-doctrine-collections)
```

###  Alternatives

[doctrine/collections

PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.

6.0k411.1M1.2k](/packages/doctrine-collections)[cartalyst/collections

Collection Abstaction library for PHP.

76908.6k4](/packages/cartalyst-collections)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
