php-standard-library/option
Option type for PHP with explicit Some/None presence semantics, replacing nullable values so absence is handled intentionally instead of silently. Part of the PHP Standard Library.
Some/None instead of relying on ambiguous null returns.Option implementation instead of building and maintaining an internal Option type, subject to maturity and maintenance-risk review.Option where “absent” must be distinguishable from “invalid” or “not authorized”—API contracts, config resolution, optional domain relationships, and third-party integrations.map, filter, flatMap) as a standard pattern for optional data, with static-analysis support.Option makes presence explicit (Some/None), supports composable transformations, and can be bridged to existing null code with adapters. We can phase adoption: pilot one domain, add wrappers at Eloquent/request boundaries, update static analysis, and compare against native nullable types before broader rollout.”How can I help you explore Laravel packages today?