Skip to content

Latest commit

 

History

History
40 lines (24 loc) · 2.71 KB

MAINTAINING.md

File metadata and controls

40 lines (24 loc) · 2.71 KB

Maintaining This Package

This file records package-specific maintainer facts that are safe to keep in the public repository.

Purpose

Read, write, check and delete values in nested PHP arrays with dot-notation paths and * wildcards. Collection-style helpers (map, filter, pluck, sort, ...) are out of scope.

Supported PHP lines

One branch per PHP minor, each requiring exactly that minor ("php": ">=8.N <8.N+1"):

8.0.x  8.1.x  8.2.x  8.3.x  8.4.x  8.5.x  8.6.x

develop follows the newest line. A fix lands on the oldest affected line first and is ported forward, retested on each line's own PHP.

Public API invariants

  • The public API is DotArray, the dot() helper, and the deprecated members listed in the docs API reference.
  • get(), has(), set(), delete() and pull() share one path parser and one set of wildcard rules. A change to path behavior must keep them in agreement and comes with tests for every operation.
  • Subclassing DotArray is supported. Subclasses may use the protected $_ITEMS array and override public methods. On an existing line, no public method gains a native return type, no parameter type is narrowed, and $_ITEMS stays untyped, because that would break subclasses written against earlier releases.
  • Deprecated members (isNumericKeys(), isMultidimensional(), isNulledValues(), the array_is_*() helpers, and the third argument of get(), has(), set() and delete()) keep working without runtime warnings for the whole life of every existing line. Removal needs an explicit maintainer decision naming the new PHP line where it lands.
  • Changes to results are behavior changes: they need a changelog entry, an UPGRADE.md entry, and must not land in a patch on an existing line unless they fix a bug.

Package-specific constraints

  • The only runtime dependency is pharaonic/php-readable, which brings ext-mbstring. It is kept deliberately: its Arr class is the documented replacement for the deprecated inspection members, which delegate to it, so users following the deprecation notices already have it installed.
  • Path parsing is on the hot path of every call. Paths without a backslash take a fast split; measure before and after changing the parser.

Branch notes

Tooling follows the line's PHP: Pest 1 on 8.0.x and 8.1.x, Pest 3 on 8.2.x, Pest 4 on 8.3.x to 8.5.x, Pest 5 on 8.6.x; Pint uses the psr12 preset on 8.0.x and per on the other lines. PHPStan starts at 2.1.18, the first release that infers the path parser's list type.

Documentation

https://pharaonic.dev/packages/php/dot-array

Keep this file factual and package-specific. General Pharaonic engineering policy belongs in the private engineering repository, not here.