-
v1, Beta 8 Pre-Release
released this
2024-07-29 00:23:07 +00:00 | 6 commits to main since this releaseBREAKING CHANGE
TheOption
implementation has been swapped fromPhpOption
toBitBadger\InspiredByFSharp
. There are a few ways to fix syntax errors that may be encountered:- The new library's
Option
instances have atoPhpOption()
method; add that to the end of the option-returning call, and everything should work fine. - The new library's
Option
instances useget()
to obtain the value; these calls will not need to change. - The new library uses
isSome()
in place ofisDefined()
, andisNone()
in place ofisEmpty()
. - The new library does not (yet) have
getOrThrow()
.
FEATURE
DocumentList
now has amapToArray()
method; this will map an associative array of key/value pairs from the items in the list. One potential use for this is obtaining a list of IDs and names to generate an HTML<select>
element.$lookup = $list->mapToArray(fn($it) => $it->id, fn($it) => $it->name);
will generate such an array from aDocumentList
instance, with no requirement to create an intermediate array of documents.Downloads
- The new library's