-
v1, Beta 8 Pre-Release
released this
2024-07-29 00:23:07 +00:00 | 10 commits to main since this releaseBREAKING CHANGE
TheOptionimplementation has been swapped fromPhpOptiontoBitBadger\InspiredByFSharp. There are a few ways to fix syntax errors that may be encountered:- The new library's
Optioninstances have atoPhpOption()method; add that to the end of the option-returning call, and everything should work fine. - The new library's
Optioninstances 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
DocumentListnow 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 aDocumentListinstance, with no requirement to create an intermediate array of documents.Downloads
- The new library's