PHPackages                             mslwk/php-typesafe-array - 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. mslwk/php-typesafe-array

ActiveLibrary

mslwk/php-typesafe-array
========================

Library for type-safe array handling in PHP

2.1.2(2y ago)322.3k↓25.5%2MITPHPPHP &gt;=8.0CI failing

Since Jun 10Pushed 2y ago2 watchersCompare

[ Source](https://github.com/maciejslawik/php-typesafe-array)[ Packagist](https://packagist.org/packages/mslwk/php-typesafe-array)[ RSS](/packages/mslwk-php-typesafe-array/feed)WikiDiscussions master Synced 1mo ago

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

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/5fdbe06cfcaefe94d50b69021ed2c5cceaa1a69321b90baa796a77ab6de6f925/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d616369656a736c6177696b2f7068702d74797065736166652d61727261792f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/maciejslawik/php-typesafe-array/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/d3c84b53ab660443554ff9a649a321b05097943f74e4d4cd6189de8e4a9abd4d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d616369656a736c6177696b2f7068702d74797065736166652d61727261792f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/maciejslawik/php-typesafe-array/?branch=master)[![Build Status](https://camo.githubusercontent.com/9aeff777851b6fb6545a01b09b8a6a55590d33d9e6e6a664ec0badcd61d096f4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d616369656a736c6177696b2f7068702d74797065736166652d61727261792f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/maciejslawik/php-typesafe-array/build-status/master)[![Latest Stable Version](https://camo.githubusercontent.com/73d3b4b8dfa0910eafc96585d1384d1c9a011574ec7b7307b940af8854385b70/68747470733a2f2f706f7365722e707567782e6f72672f6d736c776b2f7068702d74797065736166652d61727261792f762f737461626c65)](https://packagist.org/packages/mslwk/php-typesafe-array)[![License](https://camo.githubusercontent.com/b48f1455041c452af32876dccbb467262193e156699ef7886e2b10ad52690809/68747470733a2f2f706f7365722e707567782e6f72672f6d736c776b2f7068702d74797065736166652d61727261792f6c6963656e7365)](https://packagist.org/packages/mslwk/php-typesafe-array)[![Total Downloads](https://camo.githubusercontent.com/e46977512ef9d5513f8f3bf87c1017ab761af4fc6d47c8ee0cc866f8f9b84a98/68747470733a2f2f706f7365722e707567782e6f72672f6d736c776b2f7068702d74797065736166652d61727261792f646f776e6c6f616473)](https://packagist.org/packages/mslwk/php-typesafe-array)

PHP type-safe array
===================

[](#php-type-safe-array)

This library was designed to provide you with a way of creating type-safe array-like classes. The `MSlwk\TypeSafeArray\ObjectArray` allows you to:

- pass the desired type via constructor (all added objects will be validated against it)
- use the array object like an array (array accessors, foreach support)
- use defined methods to operate

There is also a factory class for ObjectArray class instances creation.

### Installation

[](#installation)

Use composer to install the library

```
composer require mslwk/php-typesafe-array

```

Changelog
---------

[](#changelog)

See changelog [here](CHANGELOG.md).

Authors
-------

[](#authors)

- [Maciej Sławik](https://github.com/maciejslawik)

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

###  Health Score

38

↓

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 53.8% 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 ~305 days

Recently: every ~267 days

Total

8

Last Release

752d ago

Major Versions

1.0.1 → 2.0.02021-05-13

PHP version history (3 changes)1.0.0PHP ^7.1

2.1PHP &gt;=7.1

2.1.2PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/4dd1db0bcc71b12f314bdce40703dc572ce6d093a2ff56845f19ddd816283436?d=identicon)[mslwk](/maintainers/mslwk)

---

Top Contributors

[![maciejslawik](https://avatars.githubusercontent.com/u/11910648?v=4)](https://github.com/maciejslawik "maciejslawik (7 commits)")[![bartoszkubicki](https://avatars.githubusercontent.com/u/20238194?v=4)](https://github.com/bartoszkubicki "bartoszkubicki (5 commits)")[![krzysztofkuzniar](https://avatars.githubusercontent.com/u/9982150?v=4)](https://github.com/krzysztofkuzniar "krzysztofkuzniar (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mslwk-php-typesafe-array/health.svg)

```
[![Health](https://phpackages.com/badges/mslwk-php-typesafe-array/health.svg)](https://phpackages.com/packages/mslwk-php-typesafe-array)
```

PHPackages © 2026

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