Skip to content

Releases

light-linq v1.3.0

Choose a tag to compare

@mathsgod mathsgod released this 09 Nov 07:44
  • Add Enumerable order, orderDescending, asEnumerable, longCount,
    tryGetNonEnumeratedCount, cast, ofType, sequence and infiniteSequence.
  • Support indexed callbacks in select, where, selectMany, skipWhile and
    takeWhile, including Queryable closure translation through IndexExpression.
  • Add Enumerable selectMany and groupBy result 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() and Enumerable::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 skip and take counts. Ignore null
    values in Enumerable averages; nonempty all-null sequences return null, while
    empty Enumerable averages continue to throw UnderflowException.
  • 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

Choose a tag to compare

@mathsgod mathsgod released this 06 Nov 09:17

Changelog

v1.2.0 — 2026-11-06

  • Translate arithmetic + - * / % into nested BinaryExpression nodes.
  • Support CoalesceExpression (??) and ConditionalExpression (full ternary),
    including Expr::coalesce() and Expr::condition() helpers.
  • Support literal starts-with, ends-with and contains operations through
    StringMatchExpression.
  • Support strtolower, strtoupper, trim, strlen, abs and round through
    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

Choose a tag to compare

@mathsgod mathsgod released this 06 Nov 04:24

Adds provider-independent closure query translation and correlated subqueries.

  • Translate supported where() and select() closures into expression trees without executing them.
  • Add ContainsExpression, AnyExpression, NotExpression, and OuterFieldExpression, 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 implementing IQueryable directly 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\Expression to Light\Linq\Expressions; update imports and provider implementations.
  • Update custom IQueryable implementations to accept closures in where(), select(), and any().
  • 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

Choose a tag to compare

@mathsgod mathsgod released this 03 Nov 08:34
b687487

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%.