petrknap/optional
Optional brings Java 8-style Optional to PHP, making null handling explicit and safe with isPresent(), get(), orElse(), and ifPresent(). Create strictly typed optionals for bools, strings, arrays, objects, and custom types using built-in traits with full static analysis support.
statics replaced by selfs and Optional by @petrknap in https://github.com/petrknap/php-optional/pull/34Optional::toNullable method by @petrknap in https://github.com/petrknap/php-optional/pull/38Optional::equals() Behavior Alignment by @petrknap in https://github.com/petrknap/php-optional/pull/49TypedOptional helper by @petrknap in https://github.com/petrknap/php-optional/pull/51 https://github.com/petrknap/php-optional/pull/56OptionalTest.java by @petrknap in https://github.com/petrknap/php-optional/pull/50flatMap method by @petrknap in https://github.com/petrknap/php-optional/pull/52map function by @petrknap in https://github.com/petrknap/php-optional/pull/53filter function by @petrknap in https://github.com/petrknap/php-optional/pull/54ifPresent function by @petrknap in https://github.com/petrknap/php-optional/pull/55Full Changelog: https://github.com/petrknap/php-optional/compare/v3.5.2...v4.0.0-rc1
Optional::orElseGet now correctly supports null by @petrknap in https://github.com/petrknap/php-optional/pull/39Full Changelog: https://github.com/petrknap/php-optional/compare/v3.5.1...v3.5.2
Optional::orElse by @petrknap in https://github.com/petrknap/php-optional/pull/35Optional::ofSingle now correctly throws on null by @petrknap in https://github.com/petrknap/php-optional/pull/36Full Changelog: https://github.com/petrknap/php-optional/compare/v3.5.0...v3.5.1
ofSingle factory method by @petrknap in https://github.com/petrknap/php-optional/pull/32Full Changelog: https://github.com/petrknap/php-optional/compare/v3.4.1...v3.5.0
orElse and orElseGet by @petrknap in https://github.com/petrknap/php-optional/pull/33Full Changelog: https://github.com/petrknap/php-optional/compare/v3.4.0...v3.4.1
else argument to ifPresent by @petrknap in https://github.com/petrknap/php-optional/pull/31Full Changelog: https://github.com/petrknap/php-optional/compare/v3.3.2...v3.4.0
equals behavior by @petrknap in https://github.com/petrknap/php-optional/pull/30Full Changelog: https://github.com/petrknap/php-optional/compare/v3.3.1...v3.3.2
flatMap behavior by @petrknap in https://github.com/petrknap/php-optional/pull/29Full Changelog: https://github.com/petrknap/php-optional/compare/v3.3.0...v3.3.1
toNullable method by @petrknap in https://github.com/petrknap/php-optional/pull/28Full Changelog: https://github.com/petrknap/php-optional/compare/v3.2.0...v3.3.0
orElseThrow method by @petrknap in https://github.com/petrknap/php-optional/pull/26Full Changelog: https://github.com/petrknap/php-optional/compare/v3.1.0...v3.2.0
Full Changelog: https://github.com/petrknap/php-optional/compare/v3.0.0...v3.1.0
Logger replaced by suppressible notices by @petrknap in https://github.com/petrknap/php-optional/pull/24Full Changelog: https://github.com/petrknap/php-optional/compare/v2.1.2...v3.0.0
Logger by @petrknap in https://github.com/petrknap/php-optional/pull/23Full Changelog: https://github.com/petrknap/php-optional/compare/v2.1.1...v2.1.2
Full Changelog: https://github.com/petrknap/php-optional/compare/v2.1.0...v2.1.1
ofFalsable by @petrknap in https://github.com/petrknap/php-optional/pull/19Full Changelog: https://github.com/petrknap/php-optional/compare/v2.0.1...v2.1.0
Full Changelog: https://github.com/petrknap/php-optional/compare/v2.0.0...v2.0.1
orElseThrow now does not require supplier by @petrknap in https://github.com/petrknap/php-optional/pull/16Full Changelog: https://github.com/petrknap/php-optional/compare/v1.9.1...v2.0.0
psr\log 1 and 3 into requirements by @petrknap in https://github.com/petrknap/php-optional/pull/15Full Changelog: https://github.com/petrknap/php-optional/compare/v1.9.0...v1.9.1
Full Changelog: https://github.com/petrknap/php-optional/compare/v1.8.0...v1.9.0
filter method by @petrknap in https://github.com/petrknap/php-optional/pull/12Full Changelog: https://github.com/petrknap/php-optional/compare/v1.7.0...v1.8.0
map and flatMap methods by @petrknap in https://github.com/petrknap/php-optional/pull/9Full Changelog: https://github.com/petrknap/php-optional/compare/v1.6.0...v1.7.0
TypedOptional by @petrknap in https://github.com/petrknap/php-optional/pull/11Full Changelog: https://github.com/petrknap/php-optional/compare/v1.5.1...v1.6.0
Full Changelog: https://github.com/petrknap/php-optional/compare/v1.5.0...v1.5.1
Full Changelog: https://github.com/petrknap/php-optional/compare/v1.4.2...v1.5.0
equals method to have behavior of Java version and opened Optional by @petrknap in https://github.com/petrknap/php-optional/pull/7Full Changelog: https://github.com/petrknap/php-optional/compare/v1.4.1...v1.4.2
Full Changelog: https://github.com/petrknap/php-optional/compare/v1.4.0...v1.4.1
orElseGet and orElseThrow methods by @petrknap in https://github.com/petrknap/php-optional/pull/5Full Changelog: https://github.com/petrknap/php-optional/compare/v1.3.0...v1.4.0
of and ofNullable methods by @petrknap in https://github.com/petrknap/php-optional/pull/4Full Changelog: https://github.com/petrknap/php-optional/compare/v1.2.0...v1.3.0
equals method by @petrknap in https://github.com/petrknap/php-optional/pull/3Full Changelog: https://github.com/petrknap/php-optional/compare/v1.1.0...v1.2.0
orElse and ifPresent methods by @petrknap in https://github.com/petrknap/php-optional/pull/2Full Changelog: https://github.com/petrknap/php-optional/compare/v1.0.0...v1.1.0
Optional by @petrknap in https://github.com/petrknap/php-optional/pull/1Full Changelog: https://github.com/petrknap/php-optional/commits/v1.0.0
How can I help you explore Laravel packages today?