PHPackages                             antstudiocz/doctrine-collections-readonly - 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. [Database &amp; ORM](/categories/database)
4. /
5. antstudiocz/doctrine-collections-readonly

ActiveLibrary[Database &amp; ORM](/categories/database)

antstudiocz/doctrine-collections-readonly
=========================================

Read-only collection wrapper for easier work with Doctrine entity collections

v2.0.0(3y ago)03.9k↓42.9%11BSD-3-ClausePHPPHP ^8.0

Since Mar 28Pushed 3y agoCompare

[ Source](https://github.com/antstudiocz/doctrine-collections-readonly)[ Packagist](https://packagist.org/packages/antstudiocz/doctrine-collections-readonly)[ Docs](http://kdyby.org)[ RSS](/packages/antstudiocz-doctrine-collections-readonly/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (5)Used By (1)

Kdyby/DoctrineCollectionsReadonly
=================================

[](#kdybydoctrinecollectionsreadonly)

This package provides an implementation of a readonly collection wrapper, so you can return collections from your entities, without having to copy the contents of the collection, or exposing the object's state outside of it's control.

[![Build Status](https://camo.githubusercontent.com/4a02df8b9915c579bedf0ccb5d406808401dcfd0e6c44d44ccc885703f908fc4/68747470733a2f2f7472617669732d63692e6f72672f4b647962792f446f637472696e65436f6c6c656374696f6e73526561646f6e6c792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Kdyby/DoctrineCollectionsReadonly)[![Downloads this Month](https://camo.githubusercontent.com/e657e4d463ee941824a2608ae4a1584ea5659e2ebc0f8c3a03344f967b2ad54d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6b647962792f646f637472696e652d636f6c6c656374696f6e732d726561646f6e6c792e737667)](https://packagist.org/packages/kdyby/doctrine-collections-readonly)[![Latest stable](https://camo.githubusercontent.com/d22f5c614a63b83dfdd48b42b5048dceeed36b83a4b60a53da92ac3d9bd64e9b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b647962792f646f637472696e652d636f6c6c656374696f6e732d726561646f6e6c792e737667)](https://packagist.org/packages/kdyby/doctrine-collections-readonly)[![Coverage Status](https://camo.githubusercontent.com/cc20f4ca957d6c1b26932f535a043adc421922171e4a9d734eaa119fdc8fd716/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f4b647962792f446f637472696e65436f6c6c656374696f6e73526561646f6e6c792f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/Kdyby/DoctrineCollectionsReadonly?branch=master)

Installation
------------

[](#installation)

The best way to install Kdyby/DoctrineCollectionsReadonly is using [Composer](http://getcomposer.org/):

```
$ composer require kdyby/doctrine-collections-readonly
```

Usage
-----

[](#usage)

Simply wrap your collection and return it.

```
public function getComments() : Collection
{
	return new ReadOnlyCollectionWrapper($this->comments);
}
```

Now you can use the `Collection` api as you're used to, you just cannot modifying it :)

---

Homepage  and repository .

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 89.2% of commits — single point of failure

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 ~758 days

Total

4

Last Release

1422d ago

Major Versions

v0.2 → v1.0.02017-05-18

v1.0.0 → v2.0.02022-06-21

PHP version history (3 changes)v0.1PHP &gt;=5.4

v1.0.0PHP ^5.6 || ^7.0

v2.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/65e2991b19827edb045b78ca66536995db88a943d22f0d173472043de6ccca9c?d=identicon)[vaci](/maintainers/vaci)

---

Top Contributors

[![fprochazka](https://avatars.githubusercontent.com/u/158625?v=4)](https://github.com/fprochazka "fprochazka (33 commits)")[![thorewi](https://avatars.githubusercontent.com/u/605858?v=4)](https://github.com/thorewi "thorewi (3 commits)")[![Majkl578](https://avatars.githubusercontent.com/u/144181?v=4)](https://github.com/Majkl578 "Majkl578 (1 commits)")

---

Tags

ormdoctrinecollectionentityRead onlykdybyreadonly

### Embed Badge

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

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

###  Alternatives

[vlucas/spot2

Simple DataMapper built on top of Doctrine DBAL

605392.8k7](/packages/vlucas-spot2)[ergebnis/factory-bot

Provides a fixture factory for doctrine/orm entities.

81702.8k](/packages/ergebnis-factory-bot)[kdyby/doctrine

Doctrine integration into Nette Framework

1091.0M86](/packages/kdyby-doctrine)[zenstruck/collection

Helpers for iterating/paginating/filtering collections (with Doctrine ORM/DBAL implementations and batch processing utilities).

16617.0k1](/packages/zenstruck-collection)[indaxia/doctrine-orm-transformations

Provides JSON-ready Doctrine ORM Entity-Array transfomtaions

1296.4k](/packages/indaxia-doctrine-orm-transformations)[andsalves/doctrine-elastic

Elasticsearch Doctrine Adaptation

156.6k](/packages/andsalves-doctrine-elastic)

PHPackages © 2026

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