PHP-ruler – strict rule engine in pure PHP, zero deps, explain mode
Explain mode traces rule evaluation node-by-node when Symfony can't.
Lightweight abstract classes for building immutable PHP objects.
Attribute-driven null handling and SVO type narrowing outthinks PHP readonly.
PHP backend developers managing data integrity
Spatie Data Transfer Object · Laravel Data · Symfony Component
ImmutableBase takes a different approach: you extend one of three base classes (DTO, VO, or SVO — each with different strictness guarantees) and all validation happens at construction time. Your objects are either valid or they don't exist.
A few things that might be interesting to this crowd: - Behavioral attributes (`#[Strict]`, `#[Lax]`, `#[SkipOnNull]`, `#[KeepOnNull]`) let you control null/missing value handling per property rather than per class - SVO (Single Value Object) supports type narrowing with automatic validation chaining — think of it as a value object that enforces its own invariants through the type hierarchy - CLI tools: `ib-cacher` for pre-warming validation cache, `ib-writer` for auto-generating Markdown docs of your entire object hierarchy - No magic methods, no naming conventions — everything is explicit and IDE-visible
Requires PHP 8.4+. I'm the sole author and maintainer. Used in production at enterprise scale in Taiwan. Happy to discuss any design decisions — there are some deliberately controversial ones in there.
Feedback welcome.
Explain mode traces rule evaluation node-by-node when Symfony can't.
Django REST framework rebuilt for async Python with zero sync_to_async calls inside.
Robust SQLite wrapper, but SQLite itself and ORMs already handle this better.
Deterministic fallback order (ENV → .env → vault) plus an opt-in validation mode and a strict CI-friendly option is a practical combo I wish I'd had in several projects. The doctor CLI that lists found keys and minimal provider probes (e.g., GET /v1/models for OpenAI) is a nice touch — useful for catching bad tokens before a pipeline runs. It’s not reinventing secret managers, but the zero-deps, stdlib-only approach and CI strictness make it an immediately usable tool for small teams.
Git for AI agents: immutable traces with causal replay, not just unstructured logs.
ESLint for system design: catch architecture violations in CI before code review becomes bottleneck.