PHPackages                             letsgoi/custom-collection - 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. letsgoi/custom-collection

Abandoned → [letsgoi/custom-list](/?search=letsgoi%2Fcustom-list)Library

letsgoi/custom-collection
=========================

PHP Custom List package

2.3.0(2y ago)1426MITPHPPHP ^8.0

Since May 27Pushed 2y ago4 watchersCompare

[ Source](https://github.com/letsgoi/custom-list)[ Packagist](https://packagist.org/packages/letsgoi/custom-collection)[ Docs](https://github.com/letsgoi/custom-list)[ RSS](/packages/letsgoi-custom-collection/feed)WikiDiscussions master Synced today

READMEChangelog (7)Dependencies (2)Versions (12)Used By (0)

PHP Custom List
===============

[](#php-custom-list)

Class to wrap array of items to force same type. This is for avoid the php array type hinting problem.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.2

Usage
-----

[](#usage)

Extends the `CustomList` abstract class and set the type of the items with `getListType` method:

```
use Letsgoi\CustomList\CustomList;

class ItemList extends CustomList
{
    protected function getListType(): string
    {
        return Item::class;
    }
}

//

$items = [new Item(), new Item(), ...];
$list = new ItemList($items);
```

To iterate items:

```
foreach ($list as $item) {
    //
}
```

You can use the list as an array (set, get, ...)

Available methods
-----------------

[](#available-methods)

#### get($key = null)

[](#getkey--null)

Return item by key or all list without it:

```
$list->get(0); // 'item'

$list->get(); // ['item', 'item', ...]
```

#### add($item)

[](#additem)

Append item to list:

```
$list->add($item);
```

#### merge(... $customLists)

[](#merge-customlists)

Merges the elements of one or more custom lists together

```
$list->merge($list1, $list2 ...);
```

Testing
-------

[](#testing)

Run tests:

```
composer test
```

Contributing
------------

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License
-------

[](#license)

[MIT](./LICENSE)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~220 days

Recently: every ~203 days

Total

7

Last Release

850d ago

Major Versions

0.1.0 → 1.0.02020-10-19

1.1.0 → 2.0.02022-01-18

PHP version history (3 changes)0.1.0PHP &gt;=7.2

1.1.0PHP ^7.2|^8.0

2.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/21895df4b67dd1b486aa23eee404be73842e53660da0cb4d6e43037462fece48?d=identicon)[letsgoi](/maintainers/letsgoi)

---

Top Contributors

[![marcoocram](https://avatars.githubusercontent.com/u/6926933?v=4)](https://github.com/marcoocram "marcoocram (1 commits)")

---

Tags

listcustomgoiletsgoi

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/letsgoi-custom-collection/health.svg)

```
[![Health](https://phpackages.com/badges/letsgoi-custom-collection/health.svg)](https://phpackages.com/packages/letsgoi-custom-collection)
```

###  Alternatives

[phpcollection/phpcollection

General-Purpose Collection Library for PHP

1.0k64.0M34](/packages/phpcollection-phpcollection)[vinkla/extended-acf

Register advanced custom fields with object-oriented PHP

503264.8k11](/packages/vinkla-extended-acf)[phootwork/collection

The phootwork library fills gaps in the php language and provides better solutions than the existing ones php offers.

3924.8M15](/packages/phootwork-collection)[henzeb/enumhancer

Your framework-agnostic Swiss Army knife for PHP 8.1+ native enums

69287.4k2](/packages/henzeb-enumhancer)[admad/cakephp-sequence

Sequence plugin for CakePHP to maintain ordered list of records

46489.9k6](/packages/admad-cakephp-sequence)[digital-creative/custom-relationship-field

Emulate HasMany relationship without having a real relationship set between resources

33200.0k](/packages/digital-creative-custom-relationship-field)

PHPackages © 2026

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