Skip to content

Release 2.6.0: PHPStan and mutation testing in CI, bounded contextual serializers, linear collection validation - #13

Merged
yuriizee merged 1 commit into
mainfrom
release-2.6.0
Oct 16, 2026
Merged

yuriizee merged 1 commit into
mainfrom
release-2.6.0

Conversation

@yuriizee

Copy link
Copy Markdown
Contributor

Tooling

  • PHPStan level 5 in CI (phpstan.neon.dist); the Laravel traits are analysed through the classes that use them (S4-F10).
  • Infection in CI, minCoveredMsi 84; covered MSI 83% → 86% with tests that pin the ciphertext formats, the blind index, __set_state defaults, file-cache, XML and unknown-key edge cases (S4-F13).

Fixed

  • toArray($context): contexts not declared in #[Hidden(except:)] share one serializer, at most 64 cached per class. 20 000 contexts: +132 MB / 308 ms → +0 MB / 13 ms (S2-02).
  • fromValidated() on large #[InferRules] collections: wildcard rules are expanded per item when the result is identical — 8 000 items 1.3 s → 0.2 s. Rules with * in parameters and distinct keep the wildcard; an equivalence test compares errors with Laravel's wildcard validation (S3-F6).
  • Money::toDecimal() exact beyond 2^53, 156 → 114 ns (S3-F8).

Added (opt-in)

  • CommaSeparatedCast(maxItems:) — 9.5 MB of commas: 537 MB → 9.5 MB peak (S3-F15).
  • SensitiveVarDumperCaster::register() redacts #[Sensitive] fields in dump() / dd() (S1-08).

Docs

  • Cache deploy order (warm → reload PHP, opcache.validate_timestamps=0) and cache-directory permissions (S2-01, S4-F11).

Verification

  • Docker: 872 tests, 100% line coverage (2146/2146); PHPStan clean; Infection exit 0.
  • Benchmarks: hydration/serialization ±3% (noise); toArray($context) +3–6 ns, toArray() unchanged.

… serializers, linear collection validation

- PHPStan level 5 in CI, covering the Laravel traits through their users
- Infection in CI with a covered-MSI gate of 84% (MSI 83% -> 86%); tests
  that pin the ciphertext formats, the blind index, cache defaults and
  file-cache, XML and unknown-key edge cases
- Contexts not declared in #[Hidden(except:)] share one serializer;
  at most 64 contexts are cached per class
- Expand index-independent wildcard rules per item so collection
  validation runs in linear time
- Exact Money::toDecimal() beyond 2^53
- CommaSeparatedCast(maxItems:) and SensitiveVarDumperCaster, both opt-in
- Document the cache deploy order and cache-directory permissions
@yuriizee
yuriizee merged commit 823f8b4 into main Oct 16, 2026
6 checks passed
@yuriizee
yuriizee deleted the release-2.6.0 branch October 16, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant