kdyby/strict-objects
kdyby/strict-objects provides a PHP trait that makes objects strict: reading or writing undeclared properties throws an exception instead of silently creating dynamic ones. It catches typos and enforces explicit property declarations in Nette projects.
$order->totalAmmount and got null") into loud exceptions. That directly improves reliability of domain models, DTOs, and service classes where dynamic property access is a common source of production incidents.NOASSERTION), this is a classic "build, don't buy" decision. The trait is a handful of lines of __get/__set/__call guards — the PM decision is whether to standardize this pattern internally rather than adopt an unmaintained dependency.Consider if:
null.Look elsewhere (or build) if:
NOASSERTION is a blocker for most legal/compliance reviews).For executives: This is a tiny, low-cost code-quality utility that turns silent typo bugs into clear errors in PHP classes. The value is real but narrow, and the package itself is effectively unmaintained with an unclear license. Recommendation: do not adopt as an external dependency; instead replicate the ~30-line pattern internally under our own license. Cost is hours, risk is near zero, and it fits a broader "reduce silent failures in legacy services" effort.
For engineering: kdyby/strict-objects is a StrictObject trait that guards __get, __set, and __call so undefined property/method access throws instead of failing silently. It overlaps heavily with what strict PHPStan/Psalm levels already catch at CI time, and PHP 8.2's dynamic-property deprecation covers part of the gap. Given its dormancy and license ambiguity, the ask is to vendor or rewrite the trait in our shared utility package, roll it out to high-risk domain models first, and measure incidents attributable to typo'd member access before expanding scope.
How can I help you explore Laravel packages today?