PHPackages                             atrapalo/php-tools - 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. atrapalo/php-tools

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

atrapalo/php-tools
==================

Several PHP 7 tools to make life a little easier

3.2.0(8y ago)240.6k↓48.1%[1 PRs](https://github.com/atrapalo/php-tools/pulls)MITPHPPHP ^7.0

Since Mar 29Pushed 8y ago70 watchersCompare

[ Source](https://github.com/atrapalo/php-tools)[ Packagist](https://packagist.org/packages/atrapalo/php-tools)[ Docs](https://github.com/atrapalo/php-tools)[ RSS](/packages/atrapalo-php-tools/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (1)Versions (13)Used By (0)

PHP Tools
=========

[](#php-tools)

[![Latest Stable Version](https://camo.githubusercontent.com/b1542e8b4183316995282c4eba293e11b570b9dacfa1515cedaa039111e3e72e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6174726170616c6f2f7068702d746f6f6c732e737667)](https://packagist.org/packages/atrapalo/php-tools)[![Minimum PHP Version](https://camo.githubusercontent.com/92added58b85fa3506ce58dab2ad94930eaf82e54245453f122f95ef804637c5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e302d3838393262662e737667)](http://php.net/)[![Build Status](https://camo.githubusercontent.com/545246bcbc3421493e3daa524ef94ae6954cf9c4dfc9bf8e484636ed34353f70/68747470733a2f2f7472617669732d63692e6f72672f6174726170616c6f2f7068702d746f6f6c732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/atrapalo/php-tools)[![Code Coverage](https://camo.githubusercontent.com/72cf826c28cd724cc7d8b4a0ff16d012234d5061fcbb969ae6324eac76df75d1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6174726170616c6f2f7068702d746f6f6c732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/atrapalo/php-tools/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/2937a6f6018bf5b5498f99029cfa53ac39939514a605035014ad44bc6b287dd2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6174726170616c6f2f7068702d746f6f6c732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/atrapalo/php-tools/?branch=master)

Several PHP 7 tools to make life a little easier

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

[](#installation)

```
composer require atrapalo/php-tools

```

Enum
----

[](#enum)

PHP Enum implementation inspired from [`SplEnum`](http://php.net/manual/es/class.splenum.php) and based on project [`myclabs/php-enum`](https://github.com/myclabs/php-enum) because it is not integrated to PHP, you have to install it separately.

Using an enum instead of class constants provides the following advantages:

- You can type-hint: `function setAction(Action $action) {`
- You can enrich the enum with methods (e.g. `format`, `parse`, …)
- You can extend the enum to add new values (make your enum `final` to prevent it)
- You can get a list of all the possible values (see below)

This Enum class is not intended to replace class constants, but only to be used when it makes sense.

[See documentation](doc/ENUM.md)

Collection
----------

[](#collection)

PHP EntityCollection implementation inspired on [`ArrayCollection`](https://github.com/doctrine/collections/blob/master/lib/Doctrine/Common/Collections/ArrayCollection.php) from project [`doctrine/collections`](https://github.com/doctrine/collections).

[See documentation](doc/COLLECTION.md)

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity65

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

Recently: every ~83 days

Total

9

Last Release

2999d ago

Major Versions

1.1.0 → 2.0.02017-04-03

2.0.1 → 3.0.02017-04-24

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6730967?v=4)[Atrápalo](/maintainers/atrapalo)[@atrapalo](https://github.com/atrapalo)

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

---

Top Contributors

[![GuilleGF](https://avatars.githubusercontent.com/u/5171960?v=4)](https://github.com/GuilleGF "GuilleGF (33 commits)")

---

Tags

phpenumcollectiontoolscamelcase

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/atrapalo-php-tools/health.svg)

```
[![Health](https://phpackages.com/badges/atrapalo-php-tools/health.svg)](https://phpackages.com/packages/atrapalo-php-tools)
```

###  Alternatives

[lazerg/laravel-enum-pro

A powerful PHP enum extension with collection support, random selection, and magic static calls

4319.0k](/packages/lazerg-laravel-enum-pro)[iteks/laravel-enum

A comprehensive Laravel package providing enhanced enum functionalities, including attribute handling, select array conversions, and fluent facade interactions for robust enum management in Laravel applications.

2516.7k](/packages/iteks-laravel-enum)

PHPackages © 2026

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