PHPackages                             infinityloop-dev/utils - 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. infinityloop-dev/utils

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

infinityloop-dev/utils
======================

Common utils for infinityloop packages.

v2.3.1(2y ago)251.9k↓34%2[1 PRs](https://github.com/graphpql/utils/pulls)11MITPHPPHP &gt;=8.1

Since Mar 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/graphpql/utils)[ Packagist](https://packagist.org/packages/infinityloop-dev/utils)[ Docs](https://www.infinityloop.dev/)[ RSS](/packages/infinityloop-dev-utils/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (18)Used By (11)

Utils [![PHP](https://github.com/graphpql/utils/actions/workflows/php.yml/badge.svg)](https://github.com/graphpql/utils/actions/workflows/php.yml)
==================================================================================================================================================

[](#utils-)

🔨 Common utility classes for infinityloop packages.

Introduction
------------

[](#introduction)

This component provides some utility classes which are used across organisation packages.

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

[](#installation)

Install package using composer

```
composer require infinityloop-dev/utils

```

Dependencies
------------

[](#dependencies)

- PHP &gt;= 8.1

Classes
-------

[](#classes)

### Json

[](#json)

Json wrapper which allows you to work with Json as if it was array. Decoding and encoding is fully lazy.

```
$json = Json::fromString($jsonString);      // (no decoding is done at this step)

$json['foo'] = 'bar';                       // adding/updating values (decoding is done on this step)
unset($json['foo2']);                       // removing value
$json->foo3 = 'bar3;                        // oop interface is also available

$jsonString = $json->toString();            // (encoding of updated array into string again)
$jsonString = $json->toString();            // (no encoding is done, because previously encoded string is up to date)
```

### CaseConverter

[](#caseconverter)

Simple class which transforms case of strings.

```
$string = 'foo-bar_bazFoo123baz';

CaseConverter::toCamelCase($string);        // fooBarBazFoo123Baz
CaseConverter::toPascalCase($string);       // FooBarBazFoo123Baz
CaseConverter::toSnakeCase($string);        // foo_bar_baz_foo_123_baz
CaseConverter::toKebabCase($string);        // foo-bar-baz-foo-123-baz
CaseConverter::splitWords($string);         // [ foo, bar, baz, foo, 123, baz ]
```

### ClassSet

[](#classset)

Typesafe array of objects of a same type.

```
class Foo { public string $name; public function __construct(string $name) { $this->name = $name; } }
class FooSet extends ObjectSet { protected const INNER_CLASS = Foo::class; }

$set = new FooSet([new Foo(), new Bar(), new Baz()]); // error

// automaticaly generated index keys
$set = new FooSet([new Foo('foo1'), new Foo('foo2'), new Foo('foo3')]);
echo $set[0]->name; // foo1
echo $set[1]->name; // foo2
echo $set[2]->name; // foo3

class NamedFooSet extends ObjectSet
{
    protected const INNER_CLASS = Foo::class;

    protected function getKey($fooObject)
    {
        return $fooObject->name;
    }
}

// named keys
$set = new NamedFooSet([new Foo('foo1'), new Foo('foo2'), new Foo('foo3')]);
echo $set['foo1']->name; // foo1
echo $set['foo2']->name; // foo2
echo $set['foo3']->name; // foo3
```

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity74

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

Recently: every ~298 days

Total

16

Last Release

793d ago

Major Versions

v1.5 → v2.02020-11-07

PHP version history (3 changes)v1.0PHP &gt;=7.4

v2.1PHP &gt;=8.0

v2.3PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/00654c913028f8d25a226eb2ddf368e1b999bf72fa4f77dbd1449c1df218756c?d=identicon)[peldax](/maintainers/peldax)

---

Top Contributors

[![peldax](https://avatars.githubusercontent.com/u/10790033?v=4)](https://github.com/peldax "peldax (90 commits)")

---

Tags

jsonphputility

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/infinityloop-dev-utils/health.svg)

```
[![Health](https://phpackages.com/badges/infinityloop-dev-utils/health.svg)](https://phpackages.com/packages/infinityloop-dev-utils)
```

PHPackages © 2026

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