daravel 1.27.8
daravel: ^1.27.8 copied to clipboard
A Laravel-inspired, AOT-native backend framework for Dart with routing, validation, an ORM, auth, queues and Laravel-compatible wire formats.
Changelog #
1.27.8 #
A patch; see the changelog.
- Security:
BodyLimitsMiddlewareonly lowers the body limit a request arrived with (HTTP_MAX_BODY); it raised a lower one to its own content-type limit. - A route's
.bodyLimit(n)decides for its route, also above the content-type limit and aboveHTTP_MAX_BODY: as global middleware,BodyLimitsMiddlewareno longer answers413before the route is known. distinct:strictanddistinct:ignore_caseare read (they were plaindistinct), compare as Laravel 12.x does, and no longer overflow the stack on deeply nested values (Rules.distinct(strict:, ignoreCase:),DistinctRule.distinctKeyDepth).- Each scheduled task execution runs in its own scope, like a request or a queued job (
Scheduler.container). DatabaseFailedJobProvider.findandforgetcompare a value with theidcolumn only when it is a row id, and withuuidalways.- With
HTTP_MAX_QUEUE_DELAYset, the lag timer runs only while requests are handled and for one second after the last one (ServerEngine.lagTimerActive,ServerEngine.lagIdleStop).
1.27.7 #
A patch; see the changelog.
- Security:
validated()keeps each level of the input as sent: a map key that looks like a number no longer decides the length of a list. - Security: an empty key is an empty segment of the paths the validator builds (
*.roleover{"": …}is checked, reported under.role), and a list index is read only in its canonical form (01and+1are keys). - Security:
distinctcompares every value its pattern matches, whatever holds them (a JSON object, a sparse form,a.b.*,*.id, deeper lists), and no longer counts an item that lacks the field. - Security: a personal access token whose
abilitiescolumn isNULL, empty or not a JSON list has no ability;JwtGuard.invalidateverifies the token's signature before revoking it, and a JWT with claims of the wrong type is a401. - A database connection that fails to open reaches every request waiting for it, not only the one that opened it.
- Security: without
APP_DEBUG,/up/readykeeps a failing check's error out of the body; log redaction looks into every map, iterable andHeaders, matching keys whatever their case and-/_. - Security: query strings and URL-encoded forms are bounded to
HTTP_MAX_INPUT_VARSpairs (1 000 by default).
1.27.6 #
A patch; see the changelog.
- Refused WebSocket upgrades are answered through the ordinary response lifecycle: the request body is handled and
terminateruns. - Form method overrides read a body only on paths with a matching PUT, PATCH or DELETE route, within the longest timeout of those routes.
SharedResult<T>shares the result of one computation across callers and zones (used bydaravel_payments).
1.27.5 #
A security patch; see the changelog.
- Security: WebSocket messages are limited as a whole, all their fragments together (
maxPayloadBytes,1009), and must arrive withinassembleTimeout(1008); PING and PONG frames are rate limited per connection (controlFrameBurst,controlFramesPerSecond;1008); what waits to be written, control frames included, counts towardmaxBufferedBytes(since 1.14.0 for fragmented messages, 1.6.0 for control frames). - Security:
Encrypterrefuses a payload whosemacortagis not a string with aDecryptExceptioninstead of a type error, so a cookie of that shape no longer makes everywebrequest fail (since 1.0.0). - Security: on a model with
guardedcolumns and nofillable, mass assignment no longer accepts a guarded column through a key spelled differently (spaces, letter case, a table prefix, a JSON path);ModelDefinition.isFillabledecides as Laravel'sGuardsAttributes::isFillable(since 1.0.0). - A WebSocket session ends when its client goes away, also when the handler never wrote, never closed or returned without listening; for the last, the server reads for it 5 s after it returned, and a later listen takes over (since 1.6.0).
1.27.4 #
A security patch; see the changelog.
- Security: markdown mail (
markdownToText, the components, attributes and inline styles ofMailTheme.render, the footer links ofMailTheme.layout) andMailAddress.parseare read in one pass; the regular expressions used before took time quadratic in a run of text without its closing part, so user text in a mail held the worker or request for seconds to minutes (since 1.9.0). - Security:
gt,gte,lt,lte,decimalandmultiple_ofcompare a numeric value's digits in linear time; turning them into one big integer took time quadratic in their number, 35 to 46 s for 1 000 000 digits (since 1.22.0).
1.27.3 #
A security patch; see the changelog.
- Security: a request's URI, scheme, host,
urlandisSecureno longer followX-Forwarded-Proto/X-Forwarded-Hostsent by any client (dart:io'srequestedUri); they come from the request line,Hostand the listener, and forwarded values only from a proxyTrustProxiesMiddlewaretrusts (since 1.0.0). Behind a proxy without that middleware, the application now seeshttpand the proxy'sHostuntil it trusts the proxy. - Security: a
Hostthat is not a host and an optional port is refused with 400; characters such as/,?,#or@in it used to change the path or host the application saw (since 1.0.0). - Security: slashes are trimmed from request paths in one pass; the regular expression used before took time quadratic in a run of slashes inside the path, in the 404 and 405 responses,
Request.url, the paginator's path andDaravelUri.path(since 1.0.0).Str.plural/singularno longer take quadratic time on a long run of letters. - Security: the
Authorization: Bearertoken is read in one pass; the regular expression used before took time quadratic in a run of white space inside the token, andTokenGuardandJwtGuardran it on every request (since 1.0.0). A host longer than 253 characters is refused with 400 (domain routes took time quadratic in its length). - Added:
Request.isFromTrustedProxy; one warning per isolate, without header values, for forwarding headers no trusted proxy applied.
1.27.2 #
A security patch; see the changelog.
- Security: broadcast channel patterns are matched in time linear in the channel name, and
POST /broadcasting/authrefuses (403) a name the Pusher protocol does not allow; before, a pattern with placeholders not separated by.let one request from a logged-in user hold a worker for hours (since 1.10.0). - Security: the validation rule
distinctruns in time linear in the list's length; 16 000 items took up to 55 s before (since 1.0.0). - Fixed:
sum()andavg()no longer throw on PostgreSQL and MySQL when the database returns a decimal (since 1.0.0);sum()without rows staysnull.
1.27.1 #
A security patch; see the changelog.
- Security: a multipart part's
Content-Dispositionparameters (since 1.0.0), the validation rulesdecimal,multiple_of,gt,gte,ltandlte(since 1.22.0) and WebSocket origin patterns with two or more*(since 1.10.0) are matched in time linear in the input; before, one request could hold a worker for minutes. - Fixed:
Application.shutdown()after password hashing no longer ends the process before it returns (since 1.27.0).
1.21.1 #
- Behaviour change: an exception becomes a response at the layer that threw it, so every outer middleware finishes; one that wraps
nextin a transaction no longer sees the exception. - Behaviour change:
insert()refuses a row with other columns than the first; it dropped them, or wroteNULL. - Behaviour change:
Cast.integerreads strings as PHP's(int):168.6is168, notnull, and text with no leading number is0. - Fixed:
WithoutOverlappinglocks inQUEUE_UNIQUE_LOCK_STORE, not alwaysprocess.
1.21.0 #
- Behaviour change:
Model.toJsonwrites relation keys in snake_case, as Laravel.Model.snakeAttributes = false, orsnakeAttributes: falseon aModelDefinition, keeps the declared names. - Behaviour change: route bindings run after authentication and rate limits, as
SubstituteBindings(RunsBeforeBindings). A guest gets 401, not a 404 that tells which records exist. A middleware placed beforeauthno longer sees bindings. - Behaviour change: PostgreSQL date columns without a cast reach JSON as PDO's text; they are still
DateTimein Dart (DatabaseDateTime). - Added: the
accepted,accepted_if,declinedanddeclined_ifrules, which answered 500. - Added:
Cast.decimalString,DB_SEARCH_PATH,Schema.hasView;schema.tableand partitioned tables on PostgreSQL. - Fixed: paginator labels and validation messages use the application's lines;
pagein paginator links followsCOMPAT_LARAVEL_VERSION.
1.20.0 #
- Fixed:
Application.serveWithwith one isolate and embedded workers left the coordinator's port open after the server stopped (Coordinator.isListening). - Added:
Response.json(phpCompatible: true)encodes in one pass (PhpJsonEncoder), the same bytes as before. - Added:
Response.streamJson,jsonArrayBytesandQueryBuilder.streamJson: a JSON array written as the rows arrive, a page at a time. - Changed:
daravelLogoDataUrianddaravelFaviconDataUricarry the new Daravel logo (an infinity loop).
1.19.1 #
- Fixed:
SqliteReplicator.syncleaves the roll-over to the next sync when a writer keeps the lock pastbusy_timeout, instead of failing.
1.19.0 #
- Fixed:
SqliteReplicator.syncretries its marker row instead of failing when a writer holds the lock pastbusy_timeout. - Fixed:
ProcessSupervisorreadiness ignores a TCP self-connection (Linux, ephemeral ports). - Added the
date_formatrule (DateFormatRule,Rules.dateFormat,phpDateMatchesFormat), as Laravel'svalidateDateFormat. - Added
partitionedtoResponse.withCookie;Response.json(phpCompatible: true)(Response.encodePhpJson) writes aPhpObjectas an object,{}when empty.
1.18.1 #
- Fixed: error bodies are pretty-printed like Laravel's
Handler::prepareJsonResponse(every HTTP error, 500, 413), with 401Unauthenticated.and 422 compact;laravelErrorResponse,HttpException.prettyJson,phpJsonFromDart(escapeSlashes:). - Fixed: the validator stops on an attribute after a failed implicit rule, and skips
unique/existsafter an earlier failure, as Laravel does (laravelImplicitRules).
1.18.0 #
- Added
Cast.dateTimeFormat('Y-m-d H:i:s')(Laravel'sdatetime:FORMATanddate:FORMATcasts;DateTimeFormatCast) andformatPhpDate(every PHPdate()token):Model.toJsonwrites the attribute in that format, in UTC, as Laravel 8 to 13 write a formatted timestamp;model:shownames itdatetime:FORMAT. An append that names an existing attribute keeps its position, as in Laravel. Both behaviours are the same in Laravel 8, 9 and 12 (ADR-025 §4), soCOMPAT_LARAVEL_VERSIONdoes not change them. - Added
APP_PROCESSES/serve --processes=N(ADR-027):ProcessSupervisorruns N server processes on consecutive ports for a reverse proxy, restarts one that exits, stops them together and prints the nginxupstreamblock;serveWith(processes:, childArguments:),selfArguments,watchSupervisorParent(a child exits when its parent dies, even killed outright). The server refuses to start with per-process stores unlessAPP_PROCESSES_ALLOW_UNSHARED_STATE=true. The bench harness takes--processes=N. - Added
package:daravel/foundation.dart,http.dart,database.dart,auth.dartandvalidation.dart: subsets of the barrel for files whose own names collide with it (JwtException,UniqueRule,ModelNotFoundException,CorsMiddleware). Crypt.encrypt/decryptcarry values as PHPserialize()text, as Laravel'sCrypt::encryptdoes (ADR-026), so a map or list encrypted by either framework is read by the other;phpSerialize,phpUnserialize,PhpObject. A payload made by Daravel 1.17 or earlier (JSON) still decrypts.- Added
Request.replaceCookies(what a cookie-decrypting middleware calls),Response.withHeaderList(every value of a multi-valued header such asSet-Cookie) andEncrypter.keys. - Fixed: the database cache store wrote
foreverentries with the constant expiration 9999999999, which overflows theintegercolumn of Laravel'scachetable on MySQL and MariaDB (clamped to 2038 without strict mode, rejected with it); it now writes ten years from now, as Laravel'sDatabaseStore::foreverdoes (DatabaseStore.foreverTtlSeconds). - Embedded queue and scheduler isolates (
serve --embed-queue --embed-scheduler) share the server's coordinator: theprocesscache store, rate limits and locks are the HTTP workers' (EmbeddedWorkers(coordinator:)); before, each embedded isolate had a coordinator of its own, so a token a job revoked stayed valid. - Added
CACHE_PROCESS_MAX_ENTRIES(CacheConfig.processMaxEntries,createStandardCoordinator(processCacheMaxEntries:)): the bound of theprocessstore, 10 000 before and by default, was fixed. - The conformance suite now cites laravel/framework 13.x (the fixture is regenerated from it; Laravel 10 to 12 write the same formats, ADR-025 §5);
tool/conformance/sync_laravel_messages.dart --branch=. - Added
COMPAT_LARAVEL_VERSION(8 to 13, default 12; ADR-025): 9 answers with Laravel 8/9 validation messages, 8 also withThe given data was invalid., an empty 404 message and thefor this route405; 10 to 13 match the default.AppConfig.laravelCompat,currentLaravelCompat(),ValidationMessages.legacyEnglish. - Added
Request.cookies,Request.cookie,Request.hasCookie,Response.withCookieandResponse.withoutCookie(Symfony'sSet-Cookieformat, Laravel's defaults). - Added
Response.json(data, phpCompatible: true),phpJsonFromDartandphpRawUrlEncode;phpJsonEncodenow runs in one pass. - Added
isolateSizingAdvice(logged byserveWithin production with one isolate on several cores),Container.runBoundandContainer.currentOrNull. - Changed: boot runs with the application's container as
Container.current, so facades work in providers, bindings and routing callbacks. - Added
Request.current(the request being handled, from anywhere in its zone; Laravel'srequest()), and exception renderers may be asynchronous (ExceptionRendererreturnsFutureOr<Response?>; synchronous renderers are unchanged).DB_STRICT,DB_SQL_MODESandDB_ISOLATION_LEVELreach the MySQL connection options. - Added SQLite replication (Blueprint #30):
SqliteReplicatorships a WAL-mode database to aDiskas a page-exact snapshot then its committed log frames, starting a new generation whenever it cannot prove it saw every frame;restoreReplica(newest, a generation, or a point in time, checked withintegrity_check);listReplicaGenerations; the WAL reader (WalHeader,readWalFrames,applyWalFrames). - Added
withUpstream(url:, preserveHost:, stripResponseHeaders:, timeout:)andUpstreamProxy: requests no route matches, whatever their method, are streamed to another server (the Laravel application being migrated,UPSTREAM_URL) withX-Forwarded-*headers, cookies, redirects and compressed bodies passed through, 502 when it is down and 504 when it is too slow;HttpKernel.unmatched;Request.bodyStream().
1.17.0 #
- Added
WorkerReportService(in the standard coordinator) andWorkerReports: each worker isolate publishes its latest report on a topic and any worker collects them all; a worker that exits is forgotten. - Fixed:
Application.shutdown()after a boot that failed or never ran no longer throwsLateInitializationError(logger).
1.16.0 #
- Added coordinator round-trip metrics:
RemoteCoordinatorChannel.onCallDuration/onCallTimeout, recorded byAppMetricsascoordinator_call_duration_seconds{service}(sub-millisecond buckets,AppMetrics.coordinatorBuckets) andcoordinator_call_timeouts_total{service};Coordinator.stats()addsin_flight_peakandmax_queue, exported ascoordinator_in_flight_peakandcoordinator_max_queue. - The English validation messages carry Laravel's MIT notice (
THIRD_PARTY_NOTICES.md).
1.15.0 #
- Fixed: a command in an application with
withPermissions()(any package subscribing to a broadcast channel at boot) never exited; cancelling a subscription afterBroadcaster.close()opened a new port that nothing closed.
1.14.0 #
- Added
HTTP_IDLE_TIMEOUT(ServeOptions.idleTimeout, 60 s): how long a keep-alive connection may sit without a request before the server closes it; the field existed but could not be set from the environment. - Added a WebSocket frame limit:
router.ws(..., maxPayloadBytes:)andResponse.webSocket(maxPayloadBytes:)(1 MiB,Response.defaultWebSocketMaxPayloadBytes); a larger frame fails the connection as it arrives.dart:iosets no limit of its own, so one client could make a worker buffer a frame of any size. The Pusher server caps frames atREVERB_APP_MAX_MESSAGE_SIZEplus 1 KiB. - Added
HTTP_MAX_BODY(ServeOptions.maxBodyBytes, 50 MiB,0for none): the body limit every request served by the engine starts with, so an application withoutBodyLimitsMiddlewarenever buffers an unbounded body. - Added
DB_CONNECT_TIMEOUTandDB_QUERY_TIMEOUT(seconds,0for none;connect_timeout/query_timeoutconnection options,PostgresDriver.timeoutOption): the PostgreSQL statement timeout was a fixed 30 s, so a longCREATE INDEXin a migration was cancelled. - Fixed: PostgreSQL closes its pool when the
SELECT 1probe fails after the connection opened (each retry leaked a backend), andlisten()closes the dedicated connection when the listener cancelled during the handshake (it lived until process exit). - Changed:
HmacJwtKey(soJwtCodec.hs256) refuses an empty secret withArgumentError; HMAC over an empty key signs and verifies like any other, so a secret that was never set accepted tokens anyone could mint. - Added
ConnectionException.isTimeout: true when the request was sent and the answer did not come in time (it may have been processed), false when the connection was refused or reset. - Fixed:
DB.transaction(attempts: n)no longer re-runs a committed body when an after-commit callback fails with a retryable error; the callbacks run outside the retry. - Fixed: a SQLite connection whose setup fails after the file is opened (not a database, stays busy) closes its handle instead of leaking it with the file locked.
- Fixed:
MemoryStoresweeps expired, unreleased locks once there aremaxEntriesof them (lockCount);ProcessRateLimitStoresweeps the state of keys it no longer limits oncemaxKeys(10 000) are tracked (trackedKeys). Both only grew before. - Fixed:
withoutOverlappinglocks name the task and its cron expression and are taken separately from the single-server minute lock (a task with both used to take only the minute's lock, which protected nothing against overlap); an unnamed closure withwithoutOverlappingis refused at run (every unnamed closure is namedClosure, so they shared one lock), as Laravel does.LocalDisk.putStreamwrites through a temporary file and a rename, so a stream that fails leaves no truncated file. - Fixed:
Scheduler.workstarts each minute'srunwithout awaiting the previous one, as Laravel'sschedule:workdoes; a task that hung, or ran for minutes, used to stop the scheduler and skip the minutes in between. Tasks within a minute still run in order. - Fixed: the queue worker survives what used to end it: a Daravel-shaped row whose payload does not decode is removed and recorded in
failed_jobs(CorruptPayloadException; it was re-reserved afterretry_afterand crashed the next worker too), a job whosefromJsonthrows fails like an unknown job, and a transient database or cache error inpopor the bookkeeping is logged and waited out. A job released after a timeout, whose handler Dart cannot cancel and is still running, makes the worker stop with exit code 1 (JobProcessor.timedOutAndReleased), asqueue:restartdoes, so attempt 2 does not run beside attempt 1 in the same process. - Fixed:
min,max,betweenandsizemeasure a string by its numeric value when the attribute also has anumericorintegerrule, as Laravel'sgetSizedoes (ValidationContext.numeric); every form and query input is a string, sonumeric|max:100passed"500"by its three characters. - Fixed: a disk path with a control character (a NUL, which Windows truncates a name at) is refused by
normalizeDiskPath; a failed SMTPAUTH LOGINno longer quotes the base64 password in itsSmtpException(which reachedfailed_jobsand the log); aMailAttachmentcontent type with a line break, or that is not a media type, is refused (it went straight into a part header); the STARTTLS handshake is bounded byMAIL_TIMEOUT; and a cron expression with both day fields set (0 0 1 * 1) matches either, as Vixie cron and Laravel do (it required both, so such schedules never ran). - Fixed: the last frames of cache channels are bounded (
ChannelMembershipService.maxCachedFrames, 10 000; expired ones swept first, then the least recently written); a frame stayed until its channel was read again, so one cache channel per user or document grew the coordinator without bound. - Fixed: the error of a malformed
DB_URLmasks the password (ConnectionConfig.redactUrl); it used to quote the whole URL,user:secret@included, intodoctor's output and the boot log. - Fixed: a worker isolate that exits takes its presence-channel members and broadcast ports with it (
WorkerAwareService,Coordinator.forgetWorker;joinandsubscribecarryworker); they used to stay for ever. - Fixed: the supervisor kills a worker that misses
readyTimeout(it used to keep booting and serve untracked next to its replacement),stop()returns at once when every worker is already gone, a respawn finishing during a drain is drained, and an inbox message with an unknown worker index is dropped rather than thrown on the main isolate. - Fixed: a coordinator answer that cannot be sent to a worker is a
CoordinatorExceptionfor that call instead of an uncaught error on the supervisor's main isolate;RemoteCoordinatorChannel.callafterclose()fails at once. - Fixed: a request whose
Host,X-Forwarded-HostorX-Forwarded-Protoheader does not parse as a URI is answered with400(Request.fromHttpRequestthrowsBadRequestHttpException); theFormatExceptionused to escape the server's listen callback and end the serving isolate.
1.13.0 #
- Added load shedding per worker:
HTTP_MAX_IN_FLIGHT(ServeOptions.maxInFlight) andHTTP_MAX_QUEUE_DELAY(ServeOptions.maxQueueDelay) refuse a request before routing with503,Retry-After: 1and{"message":"Service Unavailable"}; the health probes are never refused;ServerEngine.inFlight,queueDelay,shedRequestsandhttp_requests_shed_total. - Added
coordinator_messages_total,coordinator_rejected_totalandcoordinator_in_flighton/metrics, andmessages,uptime_sandmessages_per_secondinCoordinator.stats(). - Added
DatabaseConfig.sharesSqliteFile(isolates);servewith several isolates on a SQLite file logs one warning. - Changed:
http_requests_in_flightandhttp_requests_shed_totalcarry aworkerlabel (one series per worker isolate). - Fixed presence channels across broadcasting servers: no
member_addedfor a membersubscription_succeededalready listed, and no member event before it.
1.12.0 #
-
Added
Cache.tags([...])(TaggableCacheStore,TaggedCacheStore,TagSetCacheStore) on thememoryandprocessstores;fileanddatabaserefuse, as in Laravel. -
Added
Limit.slidingWindow()andLimit.gcra()(RateLimitAlgorithm,AlgorithmRateLimitStore,RateCounterStore), counted by stores that support them and as a fixed window elsewhere. -
Added eager loading specific columns:
with_('user:id,name'), nested and as a map key; the keys a relation matches on, those the next nested level reads and a rootselect's foreign keys are added (Relation.matchColumns,parentColumns). -
Added
QueryExceptionandUniqueConstraintViolationException(QueryErrors,QueryExceptionExecutor), whose message keeps the?placeholders, andcreateOrFirst. -
Fixed:
firstOrCreateandupdateOrCreatecalled at once for the same row no longer fail with the database's unique error. -
Added
ApplicationBuilder.withCacheStore,withQueueDriver,withBroadcastScalingandwithShutdown, theBroadcastRelaycontract andREVERB_SCALING_DRIVER, for driver packages such asdaravel_redis. -
Added
Blueprint.primary([...])(composite primary keys). -
Changed:
withAuth,withPoliciesandwithMiddlewareapply every call, in order, instead of keeping the last. -
Fixed:
withConfigregisters a section under its own type, soConfig.section<T>()finds it. -
Changed:
withHealthCheckskeeps the default checks setting unlessdefaults:is given.
1.11.0 #
- Added cache channels (
cache-,private-cache-,presence-cache-) and end-to-end encryptedprivate-encrypted-channels (REVERB_ENCRYPTION_MASTER_KEY_BASE64,Echo.encryptedPrivate). - Added
compress:toRouter.wsandResponse.webSocket; the Pusher endpoint runs without permessage-deflate. - Changed: a WebSocket connection no longer keeps its HTTP request alive (
Request.detachBody). - Added several broadcasting servers through the database (
REVERB_SCALING_ENABLED,CreateBroadcastingTables,DatabaseChannelState,DatabaseBroadcastRelay). - Added
WakeableQueueDriver: idle workers wake on a push (PostgreSQLNOTIFY, the memory queue) and onstop(). - Added
DatabaseManager.notifications/notifyandNotifyingDriver(PostgreSQLLISTEN/NOTIFY). - Changed:
CACHE_LIMITER=databasecounts an attempt with one upsert (WindowCounterStore).
1.10.1 #
- Fixed:
queue:restart/queue:pausereachqueue:workprocesses with the database queue (QUEUE_SIGNAL_STORE, thefilestore by default). - Fixed:
auth.jwtguards get a denylist shared by every isolate (CacheJwtDenylist), and revoked tokens stay refused through the leeway. - Fixed: with the database queue, unique-job locks default to the
databasecache store, soqueue:workprocesses release them.
1.10.0 #
- Added broadcasting with Laravel Echo: the Pusher protocol as Laravel Reverb (
withBroadcasting,ChannelRegistry,/broadcasting/auth, the HTTP API),ShouldBroadcast,Broadcast.event/send, andBROADCAST_CONNECTION(daravel,reverb,pusher,log,null). - Changed: the
broadcastnotification channel sends Laravel'sBroadcastNotificationCreatedonprivate-App.Models.User.{id}throughBROADCAST_CONNECTION. - Changed: bcrypt runs in libxcrypt on Linux (about 1.5 times as fast) and in a faster Dart implementation elsewhere;
package:bcryptis no longer a dependency. Passwords longer than 72 bytes are cut at 72 bytes, as PHP does.
1.9.0 #
- Added mail (
Mailable,Mail, SMTP,logandarraytransports,MailFake), with queued delivery and markdown mail in Laravel 12's default theme (MailContent(markdown:),mailButton,mailPanel,withMailTheme). - Added notifications:
Notification,Notifications, themail,databaseandbroadcastchannels,CreateNotificationsTable,ShouldQueuenotifications andNotificationFake. - Added
Broadcast/Broadcaster: publish to a channel and every worker isolate delivers to its listeners, through the coordinator;Broadcast.pipefor WebSockets. - Added
DB_URL(ConnectionConfig.withUrl), merged as Laravel 12'sConfigurationUrlParserdoes. - Fixed: PostgreSQL rejected
double.infinity,-infinityandNaNbindings.
1.8.1 #
- Version aligned with Daravel 1.8.1; no changes.
1.8.0 #
- Added
ConnectionConfig.fromUrl,ApplicationBuilder.withDatabaseConnection,DatabaseManager.forConnection,SqliteDriver.fromConfigandPostgresDriver.fromConfig. - Fixed: transactions are per connection. A query on another connection inside
DB.transactionran in the default connection's transaction (on the wrong database), and a transaction on another connection became a savepoint of it.
1.7.0 #
- Added
RouteEntry.isWebSocket(set byrouter.ws); WebSocket routes are left out of the OpenAPI document. - Fixed: the daily log handler could keep one file more than
days(today's file, opened asynchronously, was only counted when it already existed).
1.6.0 #
- Added
Response.sseandSseEvent(Laravel'sresponse()->eventStream()frames and</stream>end event), with an idle heartbeat that also detects closed clients, ending on shutdown. - Added
router.wsandResponse.webSocket: upgrade after the route's middleware, handler in the request scope,426for plain requests,1001on shutdown. - Added
DrainSignal, completed when the application starts draining. - Unsized
Response.streambodies are written unbuffered.
1.5.1 #
- Fixed: a JSON body number outside the double range (
1e309) is400 Malformed JSON body: Number out of rangeinstead of decoding to Infinity (a 500 when echoed, and on SQLite a stored value that broke every later read).
1.5.0 #
TouchableCacheStore.touch(key, ttl)(Laravel'sCache::touch) on the memory, file and database stores.ServerEngine.prepare: a per-request hook inside the request scope.MiddlewareRegistry.groupEntries,Translator.lines/jsonLines(read-only).- Fixed: a shared rate limit (
CacheRateLimitStore) could let one request too many through under concurrency.
1.4.1 #
- Fixed: response headers piled up across requests on a real server (
x-content-type-options: nosniff, nosniff, ...), becausedart:ioshares its default header lists with every response. The server starts withoutdart:io's defaults andResponse.writeToreplaces header values.
1.4.0 #
- Live API reference at
/docs/api(Scalar) and/docs/api.jsonin local environments (API_DOCS,API_DOCS_PATH);buildOpenApimoved here fromdartisan_cli. - Localization:
trans,transChoice,Lang,App.locale/App.setLocaleper scope,withTranslations,lang/<locale>.json,APP_FALLBACK_LOCALE,SetLocaleMiddleware; validation messages follow the current locale. cache.headersmiddleware (ETag,304) andCompressResponseMiddleware(gzip).- Feature flags (
Feature,FeatureManager,feature:middleware,CreateFeaturesTable) in Laravel Pennant's storage format. - Fixed:
HEADresponses are stripped after the global middleware.
1.3.0 #
- Model registry:
ApplicationBuilder.withModels,ModelRegistry,describeModel(read bydartisan model:showandmcp:serve). SCHEDULE_TIMEZONE(Laravel'sapp.schedule_timezone) as the default zone of scheduled tasks;ScheduledTask.wallTime.- Fixed:
ScheduledTask.timezone('UTC')and other alias zone names (GMT,US/Eastern) threw.
1.2.0 #
Application.withBindings,Container.callshorthand,inject<T>()/maybeInject<T>().- Fluent
String/String?helpers,10.minutes/7.days.fromNow, Carbon-style dates (diffForHumansinen/id) and calendar math (addMonthsoverflowing as Carbon,NoOverflowforms, week/month/year boundaries);Number(format,currency,fileSize,abbreviate,forHumans,ordinal). - Query shortcuts
wherePast,whereFuture,whereToday,whereBeforeToday,whereAfterToday(and theirNowOr/Orforms);whereYear/whereMonth/whereDayon model queries. DB.whenQueryingForLongerThan,DB.totalQueryDuration,DB.withQueryCount.Context: request data in log records, carried into dispatched jobs (hidden entries carried but not logged).package:daravel/html.dart: typed, escaped HTML builder; nodes are responses.ScheduledTask.timezone()accepts IANA zone names with Laravel's DST behaviour (addspackage:timezone).- Opening SQLite in a bundle built without it reports what is missing.
1.1.0 #
- Polymorphic relations (
MorphOne,MorphMany,MorphTo,MorphToMany,MorphedByMany),Relation.morphMap/enforceMorphMap,whereHasMorph, schemamorphs(); nestedwhereHas('a.b.c'); self relations aliased aslaravel_reserved_N;HasOneThrough;withSum/withAvg/withMin/withMax/withExists;QueryBuilder.selectSub. request.queryInt,queryDouble,queryBool,queryString(noawait);RuleBuilderchains (Rules.required().email().max(255)).CACHE_PROCESS_L1_TTL(near cache for theprocessstore) andCACHE_LIMITER(CacheRateLimitStore, rate limits in a cache store).- Fixed: nested transactions started together (
Future.wait) could roll back each other's work; a query after its transaction finished ran outside it (now aStateError). - Fixed: the database cache store lost concurrent
increments (now a compare-and-swap). - Fixed: on PostgreSQL,
withCountwith a constraint andwhereNotwith bindings failed (misnumbered placeholders). - Fixed: verifying a multi-lane argon2id hash could hang under load.
1.0.0 #
- First stable release: the Dart API follows SemVer from here on.
- File uploads:
multipart/form-databodies stream to temporary files asUploadedFile(request.file,hasFile,store,storeAs,UploadedFile.fake), with Laravel'sfile,image,mimes,mimetypesandextensionsrules and kilobyte sizes. Types are detected from the content; PHP files are refused. - Database drivers are pluggable (
withDatabaseDriver,DatabaseDriverFactory,RetryableErrors); MySQL and MariaDB ship indaravel_mysql.mediumText/longTextcolumns and named unique indexes match Laravel. Http: outgoing requests with Laravel'sHttp::API andHttp.fake().- Maintenance mode (
storage/framework/down,PreventRequestsDuringMaintenance). - Fixed: the migrator and the
unique/existsrules quoted identifiers with double quotes, which MySQL rejects. - Fixed: SQLite "database is locked" when several isolates open a new database file at once.
1.0.0-beta.3 #
- Declared route metadata:
.validates(FormRequest),.rules({...}),.returns(schema, name:, shape:)and.action(...); the kernel answers 403/422 before the handler andrequest.validated()returns the result.rulesToJsonSchemaconverts rules to JSON Schema. - Typed input:
input<T>()converts query and form strings (?page=5is5forinput<int>), plusinteger(),float(),boolean()andstring(). - Query strings and form bodies read bracketed keys like PHP (
ids[]=1&ids[]=2is a list;Request.queryInput,parseQueryString). Form bodies are now nested maps. - Fixed: on SQLite, queries from another request no longer run inside (and roll back with) an open transaction.
- Fixed: the access log measures time to response, without deferred work.
- PostgreSQL over a Unix socket (
DB_HOST=/cloudsql/...). - Monitoring hooks:
Job.tags,QueueDriver.oldestWait(custom drivers must implement it),QueueManager.pause/resume,DB.listenwithQueryExecuted. .env.encrypteddecrypted in memory at boot (EnvironmentEncrypter, Laravelenv:encryptformat); multi-line double-quoted.envvalues;EmbeddedWorkersandserveWith(embedQueue:, embedScheduler:).- Changed:
.envexpands only${NAME}(phpdotenv 5); a bare$NAMEstays literal. - Faster request path: no timer per request for long timeouts, cheaper request ids, no empty awaits.
1.0.0-beta.2 #
daravelLogoDataUrianddaravelFaviconDataUrifor welcome pages.ServeOptionsfalls back to the platformPORT(Cloud Run, Railway, Render, Fly.io) and binds0.0.0.0whenAPP_PORTis unset.DatabaseQueueskips jobs pushed by a Laravel app sharing thejobstable instead of failing them (or crashing on Laravel's stringbackoff).
1.0.0-beta.1 #
First public beta: the complete Tier 1 framework (container and zones, HTTP kernel and routing, validation with Laravel's rules and messages, query builder, ORM, migrations, auth with Sanctum-compatible tokens and JWT, multi-isolate serving, cache and rate limiting, events, queues and scheduling, API resources, storage, logging and metrics), Laravel-compatible wire and storage formats locked by a conformance suite, a security regression suite, and the Str / helpers / collection support layer.
The full history of the Daravel workspace is in the repository changelog.