• v1.0.0-beta8 039283224a

    v1, Beta 8 Pre-Release

    danieljsummers released this 2024-07-29 00:23:07 +00:00 | 1 commits to main since this release

    BREAKING CHANGE
    The Option implementation has been swapped from PhpOption to BitBadger\InspiredByFSharp. There are a few ways to fix syntax errors that may be encountered:

    • The new library's Option instances have a toPhpOption() method; add that to the end of the option-returning call, and everything should work fine.
    • The new library's Option instances use get() to obtain the value; these calls will not need to change.
    • The new library uses isSome() in place of isDefined(), and isNone() in place of isEmpty().
    • The new library does not (yet) have getOrThrow().

    FEATURE
    DocumentList now has a mapToArray() 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 a DocumentList instance, with no requirement to create an intermediate array of documents.

    Downloads