rekalogika/direct-property-access
Direct Property Access lets you read and write private and protected object properties in PHP without getters or setters, using reflection under the hood. Useful for tests, fixtures, and legacy code, with a clean, type-safe API and optional property-path support.
rekalogika/direct-property-access) sits in the hydration-and-mapping layer: reading and writing object properties without hand-written getters/setters. This is a build-vs-buy input for any decision about how requests, messages, and persisted entities become in-memory objects — do we generate accessor boilerplate, lean on Laravel's fill()/mass assignment, adopt a mapper (e.g. rekalogika/mapper, laravel-data), or use a thin property-access primitive like this one.allow sf8) and refreshes CI actions. That is a direct input to the "can we move to Symfony 8-line components / the next Laravel major?" question — this package is no longer a blocker on that path, and it signals the maintainer intends to track Symfony's cadence rather than pin to older lines.Adopt when:
__get/__set or array-casting tricks.Look elsewhere when:
symfony/serializer, laravel-data, or a full mapper; this is not that.fill()/$casts/$guarded already covers the use case; adding a second access mechanism invites inconsistency about which layer owns assignment.Before adopting, verify in a short spike: supported PHP versions, the exact composer constraints after the Symfony 8 widening (does it still support the Symfony line you are actually on?), and whether the package's access semantics match your readonly/typed-property and promoted-constructor usage.
To executives: This is a small, narrowly scoped open-source dependency that lets our code populate objects directly instead of writing repetitive accessor code — less code, fewer defects in the mapping layer, no licence cost. The 1.4.0 release contains no new features and no breaking changes; its practical value to us is that it no longer holds back a future Symfony 8 / Laravel major upgrade. Recommendation: approve as a low-risk, low-cost dependency, absorbed in a routine maintenance window, with a named internal owner and a trivial exit path (we could replace it in-house in well under a day) so it never becomes a strategic dependency.
To engineering: 1.4.0 is a compatibility and hygiene release — Symfony 8 permitted in constraints, CI actions refreshed. No API changes, no deprecations, no behaviour changes, so no migration work. Please (1) run the bump through the normal dependency pipeline and confirm our locked Symfony component versions still resolve, (2) add a test that exercises property population on a representative DTO so a future silent behavioural change would be caught, and (3) keep the usage confined to the mapping/hydration boundary — do not let it become a general-purpose back door into private state on domain entities.
To product/architecture: Treat this as an approved utility for the mapping layer only, not a serialization strategy. If we later choose a full mapper or serializer, this package should be re-evaluated rather than carried forward by default. Next review trigger: the next minor release containing actual features or deprecations, or any drop in supported PHP/Symfony versions.
How can I help you explore Laravel packages today?