Repository navigation
Releases
Releases · mathsgod/light-linq
light-linq v1.3.0
- Add Enumerable
order,orderDescending,asEnumerable,longCount,
tryGetNonEnumeratedCount,cast,ofType,sequenceandinfiniteSequence. - Support indexed callbacks in
select,where,selectMany,skipWhileand
takeWhile, including Queryable closure translation throughIndexExpression. - Add Enumerable
selectManyandgroupByresult selectors. - Expand Queryable with append/prepend, reverse, default-if-empty, while/tail
operations, key-based set operations, min/max-by, right joins, identity ordering,
element access, count-by, aggregation and grouped aggregation. - Add
Queryable::asQueryable()andEnumerable::asQueryable()for deferred
in-memory queries, preserving an existing IQueryable and its provider. - Translate closures for Queryable ordering, grouping, aggregate selectors,
terminal predicates and join keys. Aggregation supports accumulator closures,
explicit seeds and an optional final result selector. - Match .NET paging behavior for nonpositive
skipandtakecounts. Ignore null
values in Enumerable averages; nonempty all-null sequences return null, while
empty Enumerable averages continue to throwUnderflowException. - Document PHP numeric/type semantics, closure restrictions and provider support.
SQL/custom providers must implement the new operations and expression nodes or
reject them explicitly; no automatic client-side fallback is introduced. - Expand validation to 383 tests and 1,411 assertions, with CI on PHP 8.3–8.5.
Compatibility notes: custom implementations of IEnumerable and IQueryable
must implement the added methods. Enumerable average() now has a nullable return
type. cast() checks types without coercion and rejects null; sequence generators
use PHP int|float limits. aggregateBy() currently supports fixed seeds only.
light-linq v1.2.0
Changelog
v1.2.0 — 2026-11-06
- Translate arithmetic
+ - * / %into nestedBinaryExpressionnodes. - Support
CoalesceExpression(??) andConditionalExpression(full ternary),
includingExpr::coalesce()andExpr::condition()helpers. - Support literal starts-with, ends-with and contains operations through
StringMatchExpression. - Support
strtolower,strtoupper,trim,strlen,absandroundthrough
ScalarFunctionExpression, with validated positional signatures. - Execute the new nodes in
InMemoryQueryProvider, including short-circuiting,
null propagation and correlated outer-field binding. - Document the closure grammar, provider responsibilities and SQL/PHP semantic
boundaries. Custom providers must implement new node kinds or reject them.
v1.1.0
Adds provider-independent closure query translation and correlated subqueries.
- Translate supported
where()andselect()closures into expression trees without executing them. - Add
ContainsExpression,AnyExpression,NotExpression, andOuterFieldExpression, with in-memory provider support. - Support nested
any()predicates, outer-field references, captured scalar values, and explicit translation errors for unsupported PHP syntax. - Allow closures in
IQueryable::any()and accept entity sets implementingIQueryabledirectly as subquery sources. - Add upgrade guidance and PHP parser runtime dependency.
Upgrade notes
This minor release includes API changes during the project's initial adoption period:
- Rename
Light\Linq\ExpressiontoLight\Linq\Expressions; update imports and provider implementations. - Update custom
IQueryableimplementations to accept closures inwhere(),select(), andany(). - SQL providers must translate the new query operation nodes themselves. Use a compatible light-entity version for SQL execution.
Validation: 260 tests passed, 791 assertions, no skipped tests. Composer validation passed.
v1.0.0
Initial stable release of mathsgod/light-linq for PHP 8.3+.
- Lazy Enumerable queries with filtering, projection, stable sorting and custom ordering comparers, pagination, grouping, joins, set operations and aggregates.
- Inner, left, right and grouped joins; indexed enumeration; comparer-aware contains and distinctBy.
- Collection materialization through toList, toDictionary, toHashSet and the read-only Lookup.
- Provider-based Queryable expression trees and an in-memory query provider, including groupJoin, zip and chunk.
- Depends on
mathsgod/light-collections ^1.0. SQL execution belongs to the separate light-entity package; provider support determines which operations can run in SQL.
Validation: 235 tests and 742 assertions pass on PHP 8.3, 8.4 and 8.5. Source line coverage measured at 100%.