-
v2.1.0 Stable
released this
2025-04-25 01:21:18 +00:00 | 1 commits to main since this releaseThis release adds the
Jsonstatic class to return JSON strings or output JSON directly to the responseDownloads
- Source Code (ZIP)
- Source Code (TAR.GZ)
-
v2.1.0-pg13-tests.txt
12 KiB
-
v2.1.0-pg14-tests.txt
12 KiB
-
v2.1.0-pg15-tests.txt
12 KiB
-
v2.1.0-pg16-tests.txt
12 KiB
-
v2.1.0-tests.txt
34 KiB
-
v1.1.0 Stable
released this
2025-04-25 01:20:10 +00:00 | 0 commits to v1 since this releaseThis release adds the
Jsonstatic class to return JSON strings or output JSON directly to the responseDownloads
- Source Code (ZIP)
- Source Code (TAR.GZ)
-
v1.1.0-pg13-tests.txt
12 KiB
-
v1.1.0-pg14-tests.txt
12 KiB
-
v1.1.0-pg15-tests.txt
12 KiB
-
v1.1.0-pg16-tests.txt
12 KiB
-
v1.1.0-tests.txt
33 KiB
-
v2, RC 1 Pre-Release
released this
2024-10-02 01:41:57 +00:00 | 6 commits to main since this releaseThis version is a PHP 8.4+ change of this library. There are two major API changes:
- On
DocumentList,itemsandhasItemsare now properties rather than functions. - In the dependent
InspiredByFSharplibrary, several functions onOptionandResultare now properties. See its README for a table with their new APIs.
Version 1 of this library will continue to be supported, including to a full release status. Making this major revision change is the best way for composer to be able to tell which one should be installed; version 1 requires PHP 8.2 or 8.3, while this library requires 8.4 or greater.
Downloads
- On
-
v1, RC 1 Pre-Release
released this
2024-10-01 00:31:33 +00:00 | 7 commits to main since this releaseThis version fixes a bug where
ORDER BYclauses were not generated correctly if the field had a qualifier.This version also restricts PHP versions to 8.2.* or 8.3.*. A forthcoming v2 of this library will target PHP 8.4, using properties in some places where functions are currently used. v1 will be supported.
Downloads
-
v1, Beta 10 Pre-Release
released this
2024-09-27 02:30:09 +00:00 | 8 commits to main since this releaseLots of good stuff here!
- There are two new field comparisons;
inimplements anINcomparison against a field, andinArraydoes the same thing for fields that are themselves JSON arrays. - The
Findfunctions (exceptbyId) now support an array ofFields, as their last parameter, which will be used to order the results. There is also a newField::named()function which can be used to create field definitions for this purpose. These names follow the same rules as other field names (use "a.b.c" for nested fields), but they support other features as well.- To sort descending, include DESC in the name (ex.
Field::named('code DESC')). - To specify a null clause, include it as well (ex.
Field::named('example NULLS FIRST')). - To sort the field as a number, prefix the field name with
n:(ex.Field::named('n:ranking')). PostgreSQL will cast the field to a number, while SQLite will do its usual best-guess. - To sort case-insensitively, prefix the field name with
i:(ex.Field::named('i:comment')). SQLite's default is case-sensitive sorting, with uppercase values first. PostgreSQL's behavior is based on libraries in the underlying operating system; some are case-insensitive by default, but others (particularly Mac OS) are case-sensitive.
- To sort descending, include DESC in the name (ex.
- The names of the comparisons in
Fieldconstructor functions are now spelled out (ex.Field::equalinstead ofField::EQ). The two-character versions remain as aliases, so this will not break existing code. - The project now comes back clean for PHPStan level 6, and had some changes flagged on higher levels. One of these changes may fix an issue where IDEs were not picking up the generic type coming from
DocumentList->items().
Downloads
- There are two new field comparisons;
-
v1, Beta 9 Pre-Release
released this
2024-07-29 20:59:59 +00:00 | 9 commits to main since this releaseThis release mostly picks up the updated option/result library. However, the breaking change from beta8 that dropped
getOrThrow()from theOptions returned from this library is no longer an issue; this library update implements the method.Downloads
-
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
-
v1, Beta 7 Pre-Release
released this
2024-07-25 01:04:23 +00:00 | 14 commits to main since this releaseIt's
DocumentList's turn in the spotlight.map(callable(TDoc): U)creates a generator which transforms results rather than returning them directly asitems()does.iter(callable(TDoc))iterates the item list without transformations.items()will now throw aDocumentExceptionif it is called after the generator has been consumed.- Finally, there is a section in the documentation dedicated to
DocumentListand its usage.
Downloads