Use a typed, filterable collection instead of a plain PHP array when building a library that returns sets of objects.
Filter, map, or slice a Doctrine ORM result set using the built-in collection methods.
Write code against the Doctrine Collection interface so it can be mocked cleanly in unit tests.
| doctrine/collections | spatie/laravel-backup | itsgoingd/clockwork | |
|---|---|---|---|
| Stars | 5,980 | 5,980 | 5,940 |
| Language | PHP | PHP | PHP |
| Setup difficulty | easy | easy | moderate |
| Complexity | 2/5 | 2/5 | 3/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Doctrine Collections is a PHP library that provides a standard set of tools for working with collections of objects. In programming, a collection is a container that holds multiple items and provides methods to add, remove, search, filter, and iterate over them. This library defines a consistent interface for those operations, so code that uses it can work with different types of collections interchangeably. The README for this project is very short. It gives the library name, links to a build status badge and code coverage report, and describes the project as a "Collections Abstraction library." It does not include installation instructions, usage examples, or a list of features. Further documentation is available through the Doctrine project's official website or by reading the source code directly. Doctrine is a widely used PHP ecosystem project, best recognized for its database abstraction layer and ORM. The Collections library is one of its foundational packages, often pulled in as a dependency by frameworks such as Symfony and by the Doctrine ORM itself. Most developers encounter this library as an indirect dependency rather than something they install deliberately on its own. The main value of the library is that it provides a shared, consistent vocabulary for collection operations across the PHP ecosystem. Code written against the Doctrine Collections interface can be tested, mocked, or swapped without rewriting logic that depends on specific PHP array functions. The project uses GitHub Actions for continuous integration and Codecov for tracking test coverage. It targets PHP developers building applications or libraries that need typed, queryable collections with a clean interface.
Doctrine Collections is a PHP library that provides a shared, consistent interface for working with typed collections of objects, widely used as a dependency in Symfony and Doctrine ORM.
Mainly PHP. The stack also includes PHP.
MIT license -- use freely in any project, including commercial use, as long as the license notice is kept.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.