# doctrine/collections

Collections Abstraction Library

Repository: https://github.com/doctrine/collections
Canonical: https://ross.abutalabs.com/products/collections
Homepage: https://www.doctrine-project.org/projects/collections.html
Language: PHP
License: MIT
License Family: permissive
Last push: 2026-07-17T06:39:49+00:00

## Health v2 (maintenance only)
Score: 86/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 93, release rhythm 69, longevity 100
- inputs: {"age_days": 4981, "days_push": 47, "days_rel": 126, "gap_med": 39.5, "n_releases_24m": 7}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5975, forks 186 (observed 2026-08-28T04:09:33.911661+00:00)

## What it is
Doctrine Collections is a PHP library providing ArrayCollection and Collection interfaces that add functional operations like filter, map, and contains on top of PHP arrays. It is a foundational dependency of the Doctrine ecosystem with over 1,300 dependents.

## Use cases
- filter and transform arrays of data in PHP with a fluent collection API
- work with typed collections instead of raw PHP arrays
- share a common collection interface across Doctrine ORM entities
- iterate over ordered maps and lists with external iterators
- add functional programming helpers like map, filter, and partition to PHP projects

## When to choose
- you are building on Doctrine ORM or other Doctrine projects that require it
- you want a battle-tested, widely adopted collection abstraction for PHP
- you need a consistent Collection interface across libraries

## When to avoid
- you only need simple array operations available natively in PHP
- you want lazy evaluation or immutable collections with advanced functional features
- your project does not use PHP

## Facets
- artifact type: library
- maturity: stable
- function: developer-tools
- domain: programming-languages, developer-tools
- platform: php
- tags: collections, arrays, iterators, doctrine, data-structures

## Member repositories
- doctrine/collections (main) score 86

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:33.911661+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:50:08.221274+00:00, confidence not recorded.
  - readme: https://github.com/doctrine/collections (fetched 2026-08-28T04:09:33.911661+00:00, sha 782383b38ff8)
  - homepage: https://www.doctrine-project.org/projects/collections.html (fetched 2026-08-29T08:46:06.537985+00:00, sha 7f4d2b728a17)
  - site_page: https://www.doctrine-project.org/projects/doctrine-collections/en/3.1/index.html (fetched 2026-08-29T08:46:06.546738+00:00, sha 3a44b7df4932)
  - site_page: https://www.doctrine-project.org/projects/doctrine-collections/en/latest/index.html (fetched 2026-08-29T08:46:06.549045+00:00, sha 1436ae9744f2)
  - site_page: https://www.doctrine-project.org/projects/doctrine-collections/en/3.2/index.html (fetched 2026-08-29T08:46:06.550822+00:00, sha b91f93f9fd7e)
  - site_page: https://www.doctrine-project.org/projects/doctrine-collections/en/3.0/index.html (fetched 2026-08-29T08:46:06.552519+00:00, sha 8c6e554cc73f)
  - site_page: https://www.doctrine-project.org/projects/doctrine-collections/en/2.6/index.html (fetched 2026-08-29T08:46:06.554122+00:00, sha 2ca5ad3ed981)
  - site_page: https://www.doctrine-project.org/projects/doctrine-collections/en/2.5/index.html (fetched 2026-08-29T08:46:06.555766+00:00, sha f8633f44c3ca)
  - site_page: https://www.doctrine-project.org/projects/doctrine-collections/en/2.4/index.html (fetched 2026-08-29T08:46:06.557523+00:00, sha 8d4fa1cba13b)
  - site_page: https://www.doctrine-project.org/projects/doctrine-collections/en/2.3/index.html (fetched 2026-08-29T08:46:06.559229+00:00, sha 1a2ca559db09)
- Data as of 2026-08-30T08:39:29.467469+00:00.
