PHPackages                             cakephp/utility - 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. [Framework](/categories/framework)
4. /
5. cakephp/utility

ActiveLibrary[Framework](/categories/framework)

cakephp/utility
===============

CakePHP Utility classes such as Inflector, String, Hash, and Security

5.3.6(2w ago)12128.4M↓38.6%1020MITPHPPHP &gt;=8.2

Since Nov 8Pushed 6d ago31 watchersCompare

[ Source](https://github.com/cakephp/utility)[ Packagist](https://packagist.org/packages/cakephp/utility)[ Docs](https://cakephp.org)[ RSS](/packages/cakephp-utility/feed)WikiDiscussions 5.x Synced 1w ago

READMEChangelogDependencies (4)Versions (345)Used By (20)

[![Total Downloads](https://camo.githubusercontent.com/4191a32af3c953f639a5742e02904034050315d22253b3adf8dba6ac61f60666/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63616b657068702f7574696c6974792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cakephp/utility)[![License](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](LICENSE.txt)

CakePHP Utility Classes
=======================

[](#cakephp-utility-classes)

This library provides a range of utility classes that are used throughout the CakePHP framework

What's in the toolbox?
----------------------

[](#whats-in-the-toolbox)

### Hash

[](#hash)

A `Hash` (as in PHP arrays) class, capable of extracting data using an intuitive DSL:

```
$things = [
    ['name' => 'Mark', 'age' => 15],
    ['name' => 'Susan', 'age' => 30],
    ['name' => 'Lucy', 'age' => 25]
];

$bigPeople = Hash::extract($things, '{n}[age>21].name');

// $bigPeople will contain ['Susan', 'Lucy']
```

Check the [official Hash class documentation](https://book.cakephp.org/5/en/core-libraries/hash.html)

### Inflector

[](#inflector)

The Inflector class takes a string and can manipulate it to handle word variations such as pluralizations or camelizing.

```
echo Inflector::pluralize('Apple'); // echoes Apples

echo Inflector::singularize('People'); // echoes Person
```

Check the [official Inflector class documentation](https://book.cakephp.org/5/en/core-libraries/inflector.html)

### Text

[](#text)

The Text class includes convenience methods for creating and manipulating strings.

```
Text::insert(
    'My name is :name and I am :age years old.',
    ['name' => 'Bob', 'age' => '65']
);
// Returns: "My name is Bob and I am 65 years old."

$text = 'This is the song that never ends.';
$result = Text::wrap($text, 22);

// Returns
This is the song
that never ends.
```

Check the [official Text class documentation](https://book.cakephp.org/5/en/core-libraries/text.html)

### Security

[](#security)

The security library handles basic security measures such as providing methods for hashing and encrypting data.

```
$key = 'wt1U5MACWJFTXGenFoZoiLwQGrLgdbHA';
$result = Security::encrypt($value, $key);

Security::decrypt($result, $key);
```

Check the [official Security class documentation](https://book.cakephp.org/5/en/core-libraries/security.html)

### Xml

[](#xml)

The Xml class allows you to easily transform arrays into SimpleXMLElement or DOMDocument objects and back into arrays again

```
$data = [
    'post' => [
        'id' => 1,
        'title' => 'Best post',
        'body' => ' ... '
    ]
];
$xml = Xml::build($data);
```

Check the [official Xml class documentation](https://book.cakephp.org/5/en/core-libraries/xml.html)

###  Health Score

79

—

ExcellentBetter than 100% of packages

Maintenance97

Actively maintained with recent releases

Popularity64

Solid adoption and visibility

Community45

Growing community involvement

Maturity95

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~20 days

Total

339

Last Release

10d ago

Major Versions

4.4.17 → 5.0.0-beta22023-04-01

4.5.3 → 5.0.0-RC22023-04-18

4.5.5 → 5.1.0-RC12024-04-27

4.x-dev → 5.1.0-RC22024-08-07

5.3.6 → 6.x-dev2026-05-22

PHP version history (7 changes)3.4.8PHP &gt;=5.6.0

4.0.0-beta1PHP &gt;=7.2.0

3.9.5PHP &gt;=5.6.0,&lt;8.0.0

4.4.0-RC2PHP &gt;=7.4.0

5.0.0-beta1PHP &gt;=8.1

5.3.0-RC1PHP &gt;=8.2

6.x-devPHP &gt;=8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23666?v=4)[CakePHP](/maintainers/cakephp)[@cakephp](https://github.com/cakephp)

---

Top Contributors

[![markstory](https://avatars.githubusercontent.com/u/24086?v=4)](https://github.com/markstory "markstory (295 commits)")[![ADmad](https://avatars.githubusercontent.com/u/142658?v=4)](https://github.com/ADmad "ADmad (272 commits)")[![lorenzo](https://avatars.githubusercontent.com/u/37621?v=4)](https://github.com/lorenzo "lorenzo (108 commits)")[![dereuromark](https://avatars.githubusercontent.com/u/39854?v=4)](https://github.com/dereuromark "dereuromark (105 commits)")[![othercorey](https://avatars.githubusercontent.com/u/24221186?v=4)](https://github.com/othercorey "othercorey (65 commits)")[![bcrowe](https://avatars.githubusercontent.com/u/752603?v=4)](https://github.com/bcrowe "bcrowe (25 commits)")[![antograssiot](https://avatars.githubusercontent.com/u/4977112?v=4)](https://github.com/antograssiot "antograssiot (19 commits)")[![ravage84](https://avatars.githubusercontent.com/u/625761?v=4)](https://github.com/ravage84 "ravage84 (14 commits)")[![Harfusha](https://avatars.githubusercontent.com/u/47174548?v=4)](https://github.com/Harfusha "Harfusha (13 commits)")[![LordSimal](https://avatars.githubusercontent.com/u/9105243?v=4)](https://github.com/LordSimal "LordSimal (12 commits)")[![AD7six](https://avatars.githubusercontent.com/u/33387?v=4)](https://github.com/AD7six "AD7six (9 commits)")[![chinpei215](https://avatars.githubusercontent.com/u/7399393?v=4)](https://github.com/chinpei215 "chinpei215 (8 commits)")[![Theaxiom](https://avatars.githubusercontent.com/u/57013?v=4)](https://github.com/Theaxiom "Theaxiom (7 commits)")[![jeremyharris](https://avatars.githubusercontent.com/u/184903?v=4)](https://github.com/jeremyharris "jeremyharris (6 commits)")[![jozefgrencik](https://avatars.githubusercontent.com/u/1457296?v=4)](https://github.com/jozefgrencik "jozefgrencik (6 commits)")[![architeacher](https://avatars.githubusercontent.com/u/1043964?v=4)](https://github.com/architeacher "architeacher (6 commits)")[![hvallieri](https://avatars.githubusercontent.com/u/34038224?v=4)](https://github.com/hvallieri "hvallieri (5 commits)")[![jrbasso](https://avatars.githubusercontent.com/u/26548?v=4)](https://github.com/jrbasso "jrbasso (5 commits)")[![garas](https://avatars.githubusercontent.com/u/2265694?v=4)](https://github.com/garas "garas (5 commits)")[![o0h](https://avatars.githubusercontent.com/u/907122?v=4)](https://github.com/o0h "o0h (4 commits)")

---

Tags

stringutilitysecuritycakephphashinflector

### Embed Badge

![Health badge](/badges/cakephp-utility/health.svg)

```
[![Health](https://phpackages.com/badges/cakephp-utility/health.svg)](https://phpackages.com/packages/cakephp-utility)
```

###  Alternatives

[cakephp/database

Flexible and powerful Database abstraction library with a familiar PDO-like API

9825.7M45](/packages/cakephp-database)[composer/installers

A multi-framework Composer library installer

1.4k141.0M6.5k](/packages/composer-installers)[cakephp/datasource

Provides connection managing and traits for Entities and Queries that can be reused for different datastores

4725.8M15](/packages/cakephp-datasource)[cakephp/cache

Easy to use Caching library with support for multiple caching backends

518.6M24](/packages/cakephp-cache)[cakephp/orm

CakePHP ORM - Provides a flexible and powerful ORM implementing a data-mapper pattern.

151249.0k80](/packages/cakephp-orm)[cakephp/log

CakePHP logging library with support for multiple different streams

267.8M14](/packages/cakephp-log)

PHPackages © 2026

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