Skip to content

v1.23.0

Choose a tag to compare

@github-actions github-actions released this 02 Nov 00:34
· 308 commits to main since this release
48402d8

The parts of Laravel 13 a growing application reaches for: JSON:API resources, checked byte for byte against a real Laravel 13, Concurrency on warm isolates, Process, vector columns on PostgreSQL and MariaDB, debounced jobs, and automatic eager loading. For a migration: shadow parity compares a moved route with Laravel under real traffic, and LegacyKey makes MAX(id) + 1 safe with parallel writers. Tested beside real Laravel 8 to 13.

Upgrading can change what an application sees:

  • A mariadb connection now has SqlDialect.mariadb, not mysql. Code that compares dialect == .mysql should use dialect.isMySqlFamily, and an exhaustive switch on SqlDialect or on Cast, which gained VectorCast, stops compiling until it names the new case.
  • A job whose model is gone now fails at once, as in Laravel, instead of using up its tries. deleteWhenMissingModels drops it instead.
  • TransactionCommitted and TransactionRolledBack are now sent. They existed before and never fired, so a listener registered long ago starts to run.

Added

  • Transaction events: DB.listenTransactions, with poolWait and depth, forwarded as TransactionBeginning, TransactionCommitted and TransactionRolledBack, of which the last two existed and were never sent. Pulse counts a transaction's wait for a connection.
  • DaravelUri: Laravel's fluent Uri, with PHP's reading and writing of the query.
  • package:daravel/process.dart: Process.run, pipe, pool and fake.
  • Queue.route: where a job type goes, in one place, and withoutDelay() on a dispatch.
  • deleteWhenMissingModels. A missing model now fails a job at once, as in Laravel, instead of using up its tries.
  • debounceFor, debounceMaxWait and debounceId: only the last dispatch of a burst runs.
  • Model.automaticallyEagerLoad and withRelationshipAutoloading(): the models of a result load their relations together, through load and loadMissing, and so do the models those bring in. An N+1 loop becomes one query per relation, and a later load still refreshes.
  • Concurrency: run, defer, runIfLarge, sync and fake, on a pool of warm worker isolates, also as package:daravel/concurrency.dart.
  • JsonApiResource and JsonApiCollection: Laravel 13's JSON:API v1.1 shape, with ?fields[type]= and ?include=. The kernel awaits a new PreparedResponsable.prepare before toResponse, so a route that returns a resource loads what the query asks for.
  • JsonSchema: a typed builder for JSON Schema documents, like Illuminate\JsonSchema.
  • Shadow parity: withUpstream(shadowSampleRate:) replays a sample of the GET and HEAD requests Daravel answers to the upstream, after the response, and reports differences in status, content type and JSON shape to the log and ShadowParityDrift.
  • pgvector: Blueprint.vector, tsvector and vectorIndex, Schema.ensureVectorExtensionExists, Cast.vector, whereVectorSimilarTo, whereVectorDistanceLessThan, orderByVectorDistance and selectVectorDistance. On PostgreSQL and MariaDB 11.7 or newer; MySQL gets the column. MariaDB reads a vector through selectVector.
  • Pulse: a Shadow parity drift card, from ShadowParityDrift.
  • LegacyKey: keys for tables without a sequence, where Laravel code writes MAX(id) + 1, safe with parallel writers on PostgreSQL, MySQL, MariaDB and SQLite.