PHPackages                             serendipity\_hq/php\_array\_writer - 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. serendipity\_hq/php\_array\_writer

Abandoned → [serendipity\_hq/component-array-writer](/?search=serendipity_hq%2Fcomponent-array-writer)Library[Utility &amp; Helpers](/categories/utility)

serendipity\_hq/php\_array\_writer
==================================

A class to read and write PHP arrays.

6.0.2(1y ago)13.1kMITPHPPHP ^8.1CI failing

Since May 9Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/Aerendir/component-array-writer)[ Packagist](https://packagist.org/packages/serendipity_hq/php_array_writer)[ Docs](https://github.com/Aerendir/component-array-writer)[ RSS](/packages/serendipity-hq-php-array-writer/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (9)Versions (37)Used By (0)

 [ ![](https://camo.githubusercontent.com/5041251627a7ec1bf9335a20531d818d198f5315fc6e12d88c4694c9dcfd5bc7/687474703a2f2f7777772e736572656e64697069747968712e636f6d2f6173736574732f6f70656e2d736f757263652d70726f6a656374732f4c6f676f2d536572656e64697069747948512d49636f6e2d546578742d507572706c652e706e67) ](http://www.serendipityhq.com)

Serendipity HQ Array Writer
===========================

[](#serendipity-hq-array-writer)

A class to write and read arrays.

 [![](https://camo.githubusercontent.com/734c67ba6d60413b0d6cc5e2f067cdcc4ec7bb0b0da02016bbb3445e5f69b79a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736572656e6469706974795f68712f636f6d706f6e656e742d61727261792d7772697465722e7376673f7374796c653d666c61742d737175617265)](https://github.com/Aerendir/component-array-writer/releases) [![](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://opensource.org/licenses/MIT) [![](https://camo.githubusercontent.com/ae4b142b8108748bce097869538b1d06a27c5a7d96530da534dfcbda3b877637/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f736572656e6469706974795f68712f636f6d706f6e656e742d61727261792d7772697465723f636f6c6f723d253233383839324246267374796c653d666c61742d737175617265266c6f676f3d706870)](https://github.com/Aerendir/component-array-writer/releases)

 Supports: [![](https://camo.githubusercontent.com/9eef96f7128a21b529c3990c650f6f2041389c5da1eaee87497ee34d30813d24/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53796d666f6e792d253545362e342d3333333f7374796c653d666c61742d737175617265266c6f676f3d73796d666f6e79 "Supports Symfony ^6.4")](https://github.com/Aerendir/component-array-writer/actions?query=branch%master "Supports Symfony ^6.4") [![](https://camo.githubusercontent.com/1a9c384f3add7720776a98c04e69e303f8e0bfda2cb9192b0a98c540ce33abf1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53796d666f6e792d253545372e342d3333333f7374796c653d666c61742d737175617265266c6f676f3d73796d666f6e79 "Supports Symfony ^7.4")](https://github.com/Aerendir/component-array-writer/actions?query=branch%master "Supports Symfony ^7.4") [![](https://camo.githubusercontent.com/efd0242bc44dcddb75c8d8936ab0456de2510bcb726f910e3a0ba14722ee0761/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53796d666f6e792d253545382e302d3333333f7374796c653d666c61742d737175617265266c6f676f3d73796d666f6e79 "Supports Symfony ^8.0")](https://github.com/Aerendir/component-array-writer/actions?query=branch%master "Supports Symfony ^5.4")

 Tested with: [![](https://camo.githubusercontent.com/9eef96f7128a21b529c3990c650f6f2041389c5da1eaee87497ee34d30813d24/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53796d666f6e792d253545362e342d3333333f7374796c653d666c61742d737175617265266c6f676f3d73796d666f6e79 "Supports Symfony ^6.4")](https://github.com/Aerendir/component-array-writer/actions?query=branch%master "Supports Symfony ^6.4") [![](https://camo.githubusercontent.com/1a9c384f3add7720776a98c04e69e303f8e0bfda2cb9192b0a98c540ce33abf1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53796d666f6e792d253545372e342d3333333f7374796c653d666c61742d737175617265266c6f676f3d73796d666f6e79 "Supports Symfony ^7.4")](https://github.com/Aerendir/component-array-writer/actions?query=branch%master "Supports Symfony ^7.4") [![](https://camo.githubusercontent.com/efd0242bc44dcddb75c8d8936ab0456de2510bcb726f910e3a0ba14722ee0761/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53796d666f6e792d253545382e302d3333333f7374796c653d666c61742d737175617265266c6f676f3d73796d666f6e79 "Supports Symfony ^8.0")](https://github.com/Aerendir/component-array-writer/actions?query=branch%master "Supports Symfony ^5.4")

Current Status
--------------

[](#current-status)

[![Coverage](https://camo.githubusercontent.com/80cbf97d3e8ad521330dcb30155e3e83e8aebbddfca0512900626ccd651b0ce7/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d416572656e6469725f636f6d706f6e656e742d61727261792d777269746572266d65747269633d636f766572616765)](https://sonarcloud.io/dashboard?id=Aerendir_component-array-writer)[![Maintainability Rating](https://camo.githubusercontent.com/66915c44610b388433cd5ba54ce427d1d460252cb909c99d960ee0a705274ce8/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d416572656e6469725f636f6d706f6e656e742d61727261792d777269746572266d65747269633d7371616c655f726174696e67)](https://sonarcloud.io/dashboard?id=Aerendir_component-array-writer)[![Quality Gate Status](https://camo.githubusercontent.com/37ff0108b47bdb31ca6711619a041b9bf315152e5012b7a43565ad993c451584/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d416572656e6469725f636f6d706f6e656e742d61727261792d777269746572266d65747269633d616c6572745f737461747573)](https://sonarcloud.io/dashboard?id=Aerendir_component-array-writer)[![Reliability Rating](https://camo.githubusercontent.com/882696ae179d27db5572820b504ad602da8de4f0f7a6920260319b6e2ba600ea/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d416572656e6469725f636f6d706f6e656e742d61727261792d777269746572266d65747269633d72656c696162696c6974795f726174696e67)](https://sonarcloud.io/dashboard?id=Aerendir_component-array-writer)[![Security Rating](https://camo.githubusercontent.com/d79ce44f2683f4e6da8b9c262b0fd73fb827b0f409631d0292cd09e1b0f201c4/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d416572656e6469725f636f6d706f6e656e742d61727261792d777269746572266d65747269633d73656375726974795f726174696e67)](https://sonarcloud.io/dashboard?id=Aerendir_component-array-writer)[![Technical Debt](https://camo.githubusercontent.com/eaae6844c4a324b89a8cb3f6ba8016bf5a49257b0588d5770ce4ac6ddae5243d/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d416572656e6469725f636f6d706f6e656e742d61727261792d777269746572266d65747269633d7371616c655f696e646578)](https://sonarcloud.io/dashboard?id=Aerendir_component-array-writer)[![Vulnerabilities](https://camo.githubusercontent.com/e76b25f858124a294358484a76467909a4b2ccecb5fb0a2cccb7d18abf7eb162/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d416572656e6469725f636f6d706f6e656e742d61727261792d777269746572266d65747269633d76756c6e65726162696c6974696573)](https://sonarcloud.io/dashboard?id=Aerendir_component-array-writer)

[![Phan](https://github.com/Aerendir/component-array-writer/workflows/Phan/badge.svg)](https://github.com/Aerendir/component-array-writer/actions?query=branch%3Adev)[![PHPStan](https://github.com/Aerendir/component-array-writer/workflows/PHPStan/badge.svg)](https://github.com/Aerendir/component-array-writer/actions?query=branch%3Adev)[![PSalm](https://github.com/Aerendir/component-array-writer/workflows/PSalm/badge.svg)](https://github.com/Aerendir/component-array-writer/actions?query=branch%3Adev)[![PHPUnit](https://github.com/Aerendir/component-array-writer/workflows/PHPunit/badge.svg)](https://github.com/Aerendir/component-array-writer/actions?query=branch%3Adev)[![Composer](https://github.com/Aerendir/component-array-writer/workflows/Composer/badge.svg)](https://github.com/Aerendir/component-array-writer/actions?query=branch%3Adev)[![PHP CS Fixer](https://github.com/Aerendir/component-array-writer/workflows/PHP%20CS%20Fixer/badge.svg)](https://github.com/Aerendir/component-array-writer/actions?query=branch%3Adev)[![Rector](https://github.com/Aerendir/component-array-writer/workflows/Rector/badge.svg)](https://github.com/Aerendir/component-array-writer/actions?query=branch%3Adev)

---

###  **Do you like this library?**
 **[LEAVE A ★](#js-repo-pjax-container)**

[](#----do-you-like-this-library----leave-a-)

 or run
 `composer global require symfony/thanks && composer thanks`
 to say thank you to all libraries you use in your current project, this included!

---

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

[](#available-methods)

- `getValue()`
- `getValueAndForget()`
- `getValueByPartialKey()`
- `isNode()`
- `isReadable()`
- `isRoot()`
- `isWritable()`
- `keyExistsNested()`
- `add()`
- `cp()`
- `cpSafe()`
- `edit()`
- `merge()`
- `mv()`
- `mvSafe()`
- `mvUp()`
- `rm()`
- `wrap()`
- `pathize()`
- `unpathize()`
- `forceArray()`

For details about each method, please, read the comments in the code: they are really simple to be read, trust me!

Install Serendipity HQ Array Writer via Composer
------------------------------------------------

[](#install-serendipity-hq-array-writer-via-composer)

```
$ composer require serendipity_hq/component-array-writer

```

This library follows the  versioning conventions.

---

###  **Do you like this library?**
 **[LEAVE A ★](#js-repo-pjax-container)**

[](#----do-you-like-this-library----leave-a--1)

 or run
 `composer global require symfony/thanks && composer thanks`
 to say thank you to all libraries you use in your current project, this included!

---

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance69

Regular maintenance activity

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity84

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

Recently: every ~286 days

Total

27

Last Release

439d ago

Major Versions

1.2.0 → 2.0.02017-09-25

2.3.1 → 3.0.02020-01-18

3.0.0 → 4.0.02020-07-10

4.0.0 → 5.0.02020-09-09

5.2.3 → 6.0.02023-08-04

PHP version history (7 changes)1.0.0PHP ^5.4|^7.0

2.0.0PHP ^7.1

3.0.0PHP ^7.2

5.0.0PHP ^7.3

5.1.0PHP ^7.3|^8.0

5.2.2PHP ^7.4|^8.0

6.0.0PHP ^8.1

### Community

Maintainers

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

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (689 commits)")[![kodiakhq[bot]](https://avatars.githubusercontent.com/in/29196?v=4)](https://github.com/kodiakhq[bot] "kodiakhq[bot] (601 commits)")[![Aerendir](https://avatars.githubusercontent.com/u/1968622?v=4)](https://github.com/Aerendir "Aerendir (358 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (49 commits)")[![leonardofalanga](https://avatars.githubusercontent.com/u/20907369?v=4)](https://github.com/leonardofalanga "leonardofalanga (1 commits)")

---

Tags

arrayarray

###  Code Quality

Static AnalysisPHPStan, Rector

Type Coverage Yes

### Embed Badge

![Health badge](/badges/serendipity-hq-php-array-writer/health.svg)

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

###  Alternatives

[doctrine/collections

PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.

6.0k411.1M1.2k](/packages/doctrine-collections)[symfony/property-access

Provides functions to read and write from/to an object or array using a simple string notation

2.8k295.3M2.5k](/packages/symfony-property-access)[nette/utils

🛠 Nette Utils: lightweight utilities for string &amp; array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.

2.1k394.3M1.5k](/packages/nette-utils)[league/config

Define configuration arrays with strict schemas and access values with dot notation

564302.2M24](/packages/league-config)[cuyz/valinor

Dependency free PHP library that helps to map any input into a strongly-typed structure.

1.5k9.2M108](/packages/cuyz-valinor)[openlss/lib-array2xml

Array2XML conversion library credit to lalit.org

31052.5M47](/packages/openlss-lib-array2xml)

PHPackages © 2026

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