Changelog
Release notes for every version, newest first, with links to the documentation for each release.
All notable changes to the GoLaravel framework will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
v1.17.2#
Fixed#
- TOTP clock-drift tolerance was off by default:
NewTOTPManager(TOTPOptions{...})withSkewWindowleft out (asWorkflowControllerand gofilament do) took the zero value as “no tolerance”, so only the current 30-second code worked and a phone clock a few seconds off, or a code typed just as it changed, was refused.SkewWindow: 0now keeps the default of one step either side; use the newauth.NoSkewto accept only the current step.
v1.17.1#
Fixed#
session.StartSession(mgr)built the default manager: it resolvedDefaultManager()before looking at the manager passed in, so apps with their own manager still built the unused default and logged its “no SecretKey” warning. The default is now resolved on the first request, and only when no manager is given.- Session CSRF check timing (
session.VerifyCSRFToken): the token was compared with!=; it now uses a constant-time comparison (likemiddleware.CSRF) and refuses an empty session token.
v1.17.0#
Added#
- Session login (
pkg/auth):auth.Login,auth.Logout,auth.LogoutOtherDevices,auth.SessionGuard/SessionGuardFuncandauth.UserProviderFunc, so server-rendered sites can log in with the session cookie instead of a JWT. Login regenerates the session id and deletes the old one, and renews the CSRF token. Logout destroys the session and issues a new CSRF token. - Sessions linked to users (
pkg/session): the SQL driver has a nullable, indexeduser_idcolumn (Migrateadds it to existing tables).Manager.DestroyUserSessions(userID, except...)ends a user’s sessions on the memory, file, SQL and Redis drivers. The cookie driver returnsErrUserSessionsUnsupported. NewManager.Regenerate,Manager.Invalidate,session.ManagerFrom(c)and theUserSessionDriverinterface. auth.SQLResetTokenStore: password reset tokens in apassword_reset_tokenstable (SQLite, includingmodernc.org/sqlite, MySQL and Postgres), withMigrateandPruneExpired.
Changed#
- No warnings at import: the default session manager and disk manager are built on first use instead of at package load. The default session manager takes its key from
APP_KEY. The “no SecretKey” warning is logged only when a manager is built without a key, and the storage “no signing secret” warning only when a URL is first signed with the random key.
v1.16.0#
Security#
- Support ticket IDs (
pkg/support):GenerateTicketIDproduced only 32 bits of randomness (TKT-plus 8 hex characters), which can be brute-forced. For visitors who aren’t signed in, the ticket ID is their only access to the ticket, so IDs now carry 128 bits (TKT-plus 32 hex characters).
v1.15.0#
Security#
- 2FA bypass (
pkg/auth): thetwo_factor_tokenreturned after a correct password (before the second factor) was signed with the same secret as access tokens, soBearerGuard/CookieGuardaccepted it as a full login. Two-factor authentication could be skipped entirely. Challenge tokens now use a derived key and their own audience, and the guards refuse them. - Auth workflows (
WorkflowController):- Throttling: logins and 2FA codes are throttled through the
ratelimitstore (LoginAttempts/LoginWindow,TwoFactorAttempts/TwoFactorWindow). A 6-digit code can no longer be brute-forced. - Account enumeration: unknown emails take as long to reject as wrong passwords.
- Codes: TOTP codes are single-use (
TOTPManager.VerifyCodeStep). Recovery codes are refused whenUpdateRecoveryCodesis not configured (they would never be used up), and no token is issued without a verified factor. - Password resets: only existing accounts get reset mail, the reply is the same either way, mails are throttled per address, and the reset link is URL-encoded.
- Disabling 2FA requires the current password or a 2FA code.
- Errors: callback errors are no longer sent to the client. Passwords over 72 bytes (the bcrypt limit) get a validation error instead of a 500.
- Throttling: logins and 2FA codes are throttled through the
- OAuth: the
stateand PKCE cookies areSecureon HTTPS.
Fixed#
- Panics in scheduled tasks (including
RunInBackground), async event listeners and queue jobs crashed the process. They are now recovered: tasks report an error, and jobs are retried or sent to the dead-letter queue. schedule:Execkeeps only the last 64 KiB of command output.OnOneServerlogs a warning when the default cache is the in-memory store, since it then only prevents duplicates within one process.
Breaking#
POST /auth/two-factor/disableneedspasswordorcodein the body.- Recovery codes are refused unless
WorkflowCallbacks.UpdateRecoveryCodesis set. - Forgot-password sends no mail when
FindByEmailfinds no user (the response is unchanged). - Existing 2FA challenge tokens stop working (they expire within 5 minutes anyway).
v1.14.0#
Security#
- Broadcast channels (
pkg/broadcast):- Anyone could listen on any channel. The SSE handler took
?channel=, and the WebSocket handler subscribed to whatever channel the client named.broadcast.Channel("orders.{id}", fn)now registers authorization callbacks, like Laravel’s channel routes.private-andpresence-channels without a rule are refused, and other channels stay public.Options.Authorizecan decide every subscription instead. - Cross-site WebSocket hijacking. WebSockets accepted every
Origin, so any site could open one with the user’s cookies. Now only the same origin, clients that send noOrigin, andOptions.AllowedOriginsare accepted. - Smaller fixes: the SSE
connectedevent escapes the channel name (it was written raw, allowing JSON and SSE frame injection), event names are stripped of newlines, channel names with control characters are refused, and a WebSocket may hold at mostMaxSubscriptions(100) channels. - New:
SSEHandlerWith/WebSocketHandlerWith(Options).
- Anyone could listen on any channel. The SSE handler took
- Signed storage URLs (
pkg/storage):NewLocalDriversigned temporary download and upload URLs with a hard-coded fallback key whenAPP_KEY/STORAGE_SECRETwas unset, so anyone could forge them. It now uses a random per-process key (with a warning), and refuses the old public key. - Tenancy (
pkg/privacy):TenantMiddlewaretrusted whatever tenant the client named (X-Tenant-ID, query, route parameter or subdomain). NewTenantMiddlewareOptions.Authorizechecks membership and answers 403 when it fails. Without it, a one-time warning is logged. - SMTP (
pkg/mail):Encryption: "starttls"silently fell back to plain text when the server didn’t offer STARTTLS (an attacker can strip the offer); it is now required. Connections and the SMTP conversation have timeouts (SMTPConfig.Timeout, default 30s). - HTTP client (
pkg/http): response bodies are capped at 64 MiB (MaxResponseSize,ErrResponseTooLarge) instead of being read fully into memory. - Metrics (
pkg/telemetry):- Path labels are capped (
MaxPaths, default 500; the rest count asother), so random URLs can’t grow the metrics without bound. NormalizePathsnow works: ID-like segments become:id.traceparentIDs must be lowercase hex and non-zero.
- Path labels are capped (
- Flutter (
pkg/flutter):VersionandBuildIDare escaped in the injected HTML.
Breaking#
- Cross-origin WebSockets: browser WebSockets from another origin, such as a Flutter web build on a different host, need
broadcast.WebSocketHandlerWith(broadcast.Options{AllowedOrigins: [...]}). - Private channels: subscriptions to
private-/presence-channels need a matchingbroadcast.Channelrule. - Signed storage URLs: they stop working across restarts until
APP_KEYorSTORAGE_SECRETis set. - SMTP:
Encryption: "starttls"fails against servers that don’t offer STARTTLS.
v1.13.0#
Fixed#
- Form method spoofing didn’t work.
view.Method("PUT")emitted a_methodfield, but nothing read it, so HTML forms could never reach PUT, PATCH or DELETE routes. The engine now routes a POST with_method(or anX-HTTP-Method-Overrideheader) of PUT, PATCH or DELETE as that method, before routing. GET is never overridden. Turn it off withEngine.MethodOverride(false). .envparsing (pkg/config):export KEY=valuelines are read.- Unquoted values drop a trailing
# comment. - Double-quoted values support
\n,\"and\\, and their closing quote skips escaped quotes. Single-quoted values are taken literally. - Read errors are reported instead of being ignored.
Added#
- Tests for
pkg/configandpkg/view, which had none.
v1.12.0#
Added#
- Request body read timeout:
Engine.BodyReadTimeout(default 2 minutes) andmiddleware.BodyReadTimeout(d)per route. Upgrade requests and requests without a body are not affected, and the deadline is cleared once the body has been read, so slow handlers and SSE streams keep working. - Cache stampede protection:
Rememberruns the function once for concurrent misses (per process, and across instances on the SQL / Redis stores through a backend lock;RememberLockTimeout). - Atomic
Pullon the SQL and Redis stores (Puller; RedisGETDEL). - Validation:
validation.Password()(min / max / letters / mixed case / numbers / symbols / not-in list, one message per unmet requirement;MultiRule),exclude,exclude_if,exclude_unless,exclude_with,exclude_without,required_array_keys, anddimensions(PNG, JPEG, GIF).
Changed#
artisan make:oauthnow generates a working controller: aFindOrCreatehook, with a warning against linking accounts by email alone, issues the app’s JWT instead of returning the provider profile and its access token. A test checks the generated code compiles.
Fixed#
- Routes with more than 127 handlers overflowed the
int8chain index.
v1.11.0#
Added#
- JWT with public/private keys (
pkg/auth):NewJWTManagerWithKey(privateKey, kid, ttl)signs RS256 (RSA ≥ 2048), ES256 (P-256) or EdDSA (Ed25519) tokens, so other services verify them with only the public key.- Verifying elsewhere:
NewJWTVerifier(publicKey, kid)andNewJWTVerifierFromJWKS(json)create verify-only managers, andJWKS()publishes the public keys. - Rotation:
AcceptKey(publicKey, kid)keeps accepting old keys; tokens carrykidand are checked only against that key. - Key files:
ParsePrivateKeyPEMandParsePublicKeyPEMread PEM keys. - Algorithm checks: the algorithm always comes from the manager, never from the token. Key-based managers refuse HS256 (no confusion with a public key used as an HMAC secret), and secret managers refuse key-signed tokens.
- Interoperability: the ES256 format is checked against the example in RFC 7515, appendix A.3.
- Verifying elsewhere:
Fixed#
ratelimit.ThrottleMaxroutes shared one counter. The counter was keyed only by client IP, so traffic on a route with a loose limit used up a strict one elsewhere (for example a feed route locking users out of login). The limit is now part of the key.
Deprecated#
middleware.RateLimiternow delegates toratelimit.ThrottleMax(n, time.Minute)instead of keeping its own in-memory token buckets. It therefore uses the configuredratelimitstore (shared between instances with the Redis store) and sends the standardX-RateLimit-*headers. Useratelimit.ThrottleMaxorratelimit.Throttledirectly.
v1.10.0#
Added#
- CI (
.github/workflows/ci.yml): every pull request and push to master runsgo vetandgo test -race ./..., plus an integration job against real MySQL 8.4, Postgres 17 and Redis 7. - Integration tests (
integration/, a separate module) run on whichever backends are configured (GOLARAVEL_TEST_MYSQL_DSN,GOLARAVEL_TEST_POSTGRES_DSN,GOLARAVEL_TEST_REDIS_ADDR); SQLite always runs. They cover:- the SQL and Redis session drivers;
- the SQL and Redis cache stores, including concurrent increments, tags and locks shared between two instances;
- validation
unique/exists; - the Redis client;
- the queue and rate limiter Redis code.
Changed#
- One Redis client.
pkg/queueandpkg/ratelimitnow use the sharedpkg/redisclient instead of their own copies. The queue’s copy put a connection back into the pool after a network error, so later commands could read a half-finished reply. Blocking pops use the newClient.DoTimeout.redis.Opencreates a client without contacting the server. ratelimit.RedisStore.ClearusesSCANinstead ofKEYS, so it doesn’t block a large Redis. NewRedisStore.Close.
Fixed#
- Redis rate limiter could be exceeded.
Hitcounted and then added in separate commands, so concurrent requests (for example a burst of login attempts across instances) could all pass the limit. The trim, count and add now run in one Lua script; 50 concurrent hits with a limit of 10 admit exactly 10. - Delayed jobs on custom queues never ran. The Redis queue only moved due jobs for
default,highandlow; now it moves them for every queueLaterwas called with. Only the worker whoseZREMremoved a job pushes it, so two workers can’t run the same delayed job twice. - Container singletons (
pkg/container): double-checked locking readinstancewithout synchronization (a data race the new-raceCI run found), and a singleton whose value was nil was rebuilt on every resolve. An atomic ready flag fixes both. - SQL cache
Incrementon Postgres (found by the new integration run): two concurrent first increments of a new key could both read 0, losing an update, becauseSELECT ... FOR UPDATElocks nothing when the row is missing. The row is now inserted before it is locked, and increments retry on deadlocks and serialization failures. - SQL cache locks on MySQL: re-acquiring a lock without expiry by its own owner returned false, because MySQL counts an UPDATE that changes nothing as 0 affected rows. The owner is now checked directly.
v1.9.0#
Added#
- Validation rule engine (
pkg/validation):validation.Make(data, validation.Rules{...})with Laravel-style rule strings.- Rules: presence (
required*,sometimes,nullable,prohibited*,accepted, …), types and formats (string,integer,numeric,decimal,boolean,array,json,email,url,uuid,ip,alpha*,regex, dates,timezone), sizes that follow the field type, comparisons (confirmed,same,gt/ltagainst numbers or fields,in,distinct,before/after), files (file,imagewithout SVG,mimes/mimetypeschecked against the sniffed content,extensions) and databaseunique/exists. - Fields: nested and wildcard fields (
items.*.sku),bail, customRulevalues /RuleFunc. - Messages: custom messages (
field.rule), attribute names, and translation keys (validation.<rule>). - Output:
Validated()returns only the fields listed in the rules. - Database rules:
SQLChecker(db, dialect)andSetDefaultDBanswerunique/exists, with table and column names checked. - Form requests: they can implement
Rules(),Messages()andAttributes(), andValidateAndRespondmerges their errors withValidate(v).Validator.Check(field, value, rules)uses rule strings insideValidate. - Handlers:
ValidateRequest(c, rules),RequestData(c)(JSON, urlencoded and multipart input) andValidated(c). - Scaffold: the
lang/<locale>/validation.jsonthat artisan generates has per-typemin/maxmessages.
- Rules: presence (
Changed#
ValidateAndRespondaccepts an empty JSON body (rules decide what is required) and reads form input as well as JSON. The existing fluent methods are unchanged.
v1.8.0#
Added#
- Persistent sessions (
pkg/session):NewSQLDriver(db, dialect)(SQLite, MySQL, Postgres;Migratecreates the table; idle sessions expire on read and are removed byGC) andNewRedisDriver(client)(TTL = session lifetime). Sessions survive restarts and are shared between instances.- Both drivers take the lifetime from the
Manager. Manager.StartGC(ctx, interval)runs the driver’s GC. Nothing called it before, so memory and file sessions were never cleaned up.
- Shared cache stores (
pkg/cache):NewSQLStore(db, dialect)(withMigrateandPrune) andNewRedisStore(client)implement the fullStoreAPI through a smallBackendinterface (NewBackendStore).- Values are stored as JSON.
Add,Incrementand locks are atomic in the backend. - Tag versions live in the backend, so a tag flush reaches every instance. Redis
Flushonly deletes keys under the store prefix.
- Password reset tokens (
pkg/auth):ResetTokenStore, withNewMemoryResetTokenStore(the default) andCacheResetTokenStore(cache.Store).- Configure the store with
NewPasswordResetBrokerWithStoreandWorkflowConfig.ResetTokens. - Only token hashes are stored, and emails are trimmed and lower-cased.
pkg/redis: a small pooled RESP client (New,Do,String,Int,Scan) with per-command deadlines. Broken connections are dropped rather than reused.pkg/redis/redistestis an in-process fake for tests.database.Dialect(SQLite,MySQL,Postgres,ParseDialect): placeholder rebinding, upsert / insert-ignore statements and column types for SQL-backed stores.
Notes#
- The SQL stores are tested on SQLite only. The MySQL and Postgres statements follow each engine’s syntax but have not been run against a server.
pkg/queueandpkg/ratelimitstill use their own copies of a Redis client. They can move topkg/redislater.
v1.7.0#
Security#
- Mail header injection (
pkg/mail): the subject, From/To/Cc/Bcc/Reply-To, custom headers and attachment filenames were written into the message headers as-is. A line break in user input (for example a contact-form name or subject) could add headers such asBccand turn the app into a spam relay.BuildMIMEnow returnsErrInvalidHeaderfor line breaks, unparsable addresses and invalid header names. - Metrics and health report (
pkg/telemetry):MountOptions.Authorizeguards/metrics,/healthand the report attached to a failing/readyz./livezand the/readyzstatus stay public for probes.
Added#
- Mail encoding: non-ASCII display names and subjects are RFC 2047 encoded, attachment names are RFC 2231 encoded, and custom headers are written in sorted order.
SecureHeaders(SecureHeadersOptions{...}):ContentSecurityPolicy(orCSPReportOnly),PermissionsPolicy,FrameOptionsandHSTSMaxAge;middleware.StrictCSPis a starting policy.SecureHeaders()with no options behaves as before.- JWT:
JWTManager.Issuer/Audiencestampiss/audon issued tokens and require them on verified ones.- Tokens carry
nbfand a randomjti, and a futurenbfis rejected. Leewaytolerates clock skew, andRotateFrom(oldSecrets...)keeps accepting tokens signed with previous secrets.- Tokens without these claims still verify.
Changed#
- Attachment filenames without special characters are written unquoted (
filename=invoice.pdf), asmime.FormatMediaTypeproduces. This is valid MIME.
v1.6.0#
Security#
- Sessions (
pkg/session):DefaultConfigshipped a hard-codedSecretKey, so anyone could forge cookie-driver sessions (for example, signing in as any user). With no key, or with that old key, a random key is generated per process and a warning is logged. SetConfig.SecretKeyin production. - Sessions: passing any
ConfigturnedHttpOnlyand cookie encryption off, because unset bools arefalse. Both are now always on. - Session file driver: the session id from the cookie was joined into a file path with only
filepath.Clean, so../escaped the session directory. Ids must now be plain tokens. - CORS (
middleware.CORS): anyOriginwas reflected wheneverAllowedOriginswas not exactly["*"], with credentials whenAllowCredentialswas set. Only listed origins (or onesAllowOriginFuncaccepts) are reflected now."*"never sends credentials, andVary: Originis always set. - Recovery: the panic value (which can hold SQL, file paths or secrets) was sent to the client. It is now only logged.
- Request bodies: nothing capped them, so one large body could exhaust memory.
Enginelimits bodies to 32 MiB by default (Engine.MaxBodyBytes(n);n <= 0removes the limit).Runcaps request headers at 1 MiB. - Queue dashboard:
MountDashboardexposed job payloads and retry, delete and flush actions to anyone. The newMountDashboardWith(r, DashboardOptions{Prefix, Authorize})checksAuthorizeon every route, and the routes that change state refuse cross-site browser requests. - JWT (
pkg/auth): an empty secret signed tokens with an empty HMAC key.GenerateToken/VerifyTokennow returnErrEmptySecret. Tokens whose header is notHS256are rejected. The example app no longer falls back to a hard-coded JWT secret. - CSRF: tokens are compared in constant time, and the cookie is
Securebehind an HTTPS proxy. middleware.RateLimiter: buckets were keyed by the raw connection address, so every client behind a proxy shared one, and old buckets were never removed. It now usesClientIP()and forgets idle clients.SecureHeaders: sendsX-XSS-Protection: 0(current OWASP advice) and HSTS on HTTPS requests.
Added#
JWTManager.RevokedUsing(fn)/ErrTokenRevokedto reject tokens after logout or a password change.CORSOptions.AllowOriginFunc;session.Config.AllowScriptAccess/DisableEncryption;queue.DashboardOptions; facadeQueue.MountDashboardWith.
Breaking#
session.Config{HttpOnly: false}/Encrypt: falseno longer turn those off; useAllowScriptAccess/DisableEncryption.- Apps that relied on the built-in session
SecretKeyget a random key per process, so sessions end on restart until a key is configured. middleware.CORSwith a list of origins no longer allows unlisted origins.queue.MountDashboard(noAuthorize) answers 403 on every route; switch toMountDashboardWith. If the routes already sit behind your own auth middleware, passAuthorize: func(*context.Context) bool { return true }.- Request bodies over 32 MiB fail to read unless
Engine.MaxBodyBytesis raised. NewJWTManager("")can no longer issue or verify tokens.
v1.5.0#
Security#
Context.ClientIP()(pkg/context): it trusted the firstX-Forwarded-Forvalue from any peer, so clients could spoof their IP (rate limits, logs). Forwarding headers are now only believed when the direct peer is a trusted proxy, andX-Forwarded-Foris read from the right, skipping trusted hops. The default trusted networks are loopback and private ranges (a reverse proxy on the same host or private network). Configure others withcontext.SetTrustedProxies(cidrs...); call it with no arguments to ignore forwarding headers. IPv6RemoteAddrvalues are now returned without brackets.
Breaking#
- Apps behind a proxy or CDN that connects from public addresses (for example Cloudflare) now see the proxy’s IP until its ranges are passed to
context.SetTrustedProxies.
v1.4.1#
Fixed#
- Router (
pkg/router): a static route registered after a sibling parameter route (for example/items/reorderafter/items/:id/...) was never matched; the parameter route answered instead. Static children now always take precedence regardless of registration order. - Database sessions (
pkg/database): raw statements through Ent (client.ExecContext/client.QueryContext) bypassed the request session and therefore its transaction and row level security settings.SessionDrivernow routes them into the session.
v1.4.0#
Added#
- Request-Scoped Database Sessions (
pkg/database):Session: a transaction that starts lazily on the first statement and runs an optionalSessionInithook, e.g. to set a role or tenant variable for PostgreSQL row level security. Requests that never touch the database never open one.SessionDriver/NewSessionDriver: an Ent SQL driver that routes statements into theSessioncarried by the statement’s context; nestedclient.Tx(ctx)calls are backed by savepoints.SessionMiddleware: gives each request a session, committing when the handler chain succeeds and rolling back on error or panic.WithSession,SessionFromContextandWithoutSessioncontext helpers.
v1.1.2#
Fixed#
- Cross-Platform Telemetry (
pkg/telemetry):- Replaced Unix-only
syscall.StatfsinDiskCheckwith OS-specific implementations (disk_unix.goanddisk_windows.govia Win32GetDiskFreeSpaceExW). - Enables clean cross-compilation for Windows (
GOOS=windows GOARCH=amd64).
- Replaced Unix-only
v1.1.1#
Added#
- HTTP Interoperability:
WrapHandler(http.Handler)converts standardhttp.Handlerinto GoLaravelcontext.HandlerFunc.WrapHandlerFunc(http.HandlerFunc)converts standardhttp.HandlerFuncinto GoLaravelcontext.HandlerFunc.
v1.1.0#
Added#
- Full Localization & Translation Subsystem (
pkg/translation):- Laravel-style JSON dictionaries for grouped files (
lang/{locale}/{group}.json) and flat root files (lang/{locale}.json). - Parameter interpolation with automatic casing matching (
:name,:Name,:NAME). - Pluralization / choice engine (
SelectPlural/TransChoice) supporting singular/plural (apple|apples), exact numbers ({0}), and numeric ranges ([1,5]). - Embedded
fs.FS(//go:embed) and filesystem directory (LoadDir) loaders. - Automated HTTP
translation.Middlewarewith prioritized locale resolution: URL query (?lang=), route parameters (:lang), session keys, cookies, and weightedAccept-LanguageHTTP headers. - Request context helpers (
c.Trans(),c.TransChoice(),c.GetLocale(),c.SetLocale()). - First-class Right-to-Left (RTL) language detection (
ar,fa,ur,he, etc.), regional normalization (ar-SA,fa-IR), custom RTL registry (RegisterRTL), and direction helpers (c.IsRTL(),c.Direction()). - Artisan CLI generator command:
artisan make:lang <locale>. - Top-level framework facade exports in
golaravel.go(Trans,TransChoice,SetLocale,GetLocale,IsRTL,Direction,Localization).
- Laravel-style JSON dictionaries for grouped files (
v1.0.3#
Fixed#
- Radix Router Catch-All Wildcard Integration (
pkg/router/tree.go):- Fixed catch-all wildcard (
/*filepath) registration when coexisting with existing static sub-branches under the same prefix (e.g.,/admin/assets/*,/admin/api/*, and/admin/*filepath). - Added support for root/prefix exact match fallback to catch-all route handlers with empty string parameter (e.g.
/admin/gracefully serving SPA index HTML). - Prevented invalid slice index and false conflict panics during radix child node insertion.
- Fixed catch-all wildcard (
v1.0.2#
Fixed#
- Zero-Allocation Radix Router Multi-Child Branching (
pkg/router/tree.go):- Fixed route lookup on parameterized paths with multiple distinct static suffixes (e.g.
/:id/editand/:id/delete). - Search matching child prefix when transitioning past parameter delimiters instead of unconditionally falling back to first child.
- Fixed route lookup on parameterized paths with multiple distinct static suffixes (e.g.
v1.0.1#
Fixed#
- Zero-Allocation Radix Router (
pkg/router):- Prioritize static route matching over wildcard parameter children on shared path prefixes (e.g.
/users/create,/users/bulk,/users/exportalongside/users/:id). - Support seamless coexistence of static sibling routes and wildcard parameter nodes within radix tree nodes without route conflicts or panics.
- Prioritize static route matching over wildcard parameter children on shared path prefixes (e.g.
v1.0.0#
Initial Production Release 🎉#
GoLaravel is an ultra-high-performance full-stack web framework that brings Laravel’s unmatched developer ergonomics, expressive syntax, and robust architecture to the Go ecosystem — powered by compiled type-safety, zero-reflection execution, and multiplatform delivery.
⚡ Core Architecture & HTTP Foundation#
- Zero-Allocation Radix Router (
pkg/router):- Ultra-fast routing benchmarked at 150k+ req/sec with zero allocations per request.
- Expressive route registration (
router.Get,router.Post,router.Group, prefixes, nested groups). - Explicit and dynamic route parameters (
:id,{slug}). - Built-in HEAD request fallback to matching GET routes.
- Compile-time type-safe Route Model Binding (
router.BindModel[T],router.BindPredicate[T]) with automatic 404 aborts.
- Context & Pool Management (
pkg/context):- Recycled HTTP contexts via
sync.Pooleliminating GC pauses under extreme concurrency. - Rich helper methods:
.JSON(),.String(),.Status(),.Header(),.Cookie(),.Redirect(),.Query(),.Param(),.PostForm(),.File(),.SaveUploadedFile().
- Recycled HTTP contexts via
- Top-Level Framework Ergonomics (
golaravel.go):- Unified facade exporting aliases and constructors (
golaravel.New(),golaravel.Default(),golaravel.Http,golaravel.Test(),golaravel.NewFaker()).
- Unified facade exporting aliases and constructors (
🗄️ Database & Ent ORM Integration#
- Declarative Schema-as-Code (
app/schema/):- Schema definition using Facebook’s Ent ORM code generation.
- Seamless graph edge traversals, eager loading, and type-safe query builders.
- Atlas Versioned Migrations & Seeding Engine (
pkg/database):- Zero-downtime, declarative migration diffing via Ariga Atlas (
atlas.hcl). - Hierarchical database seeders with deterministic execution chains (
pkg/database/seeder.go).
- Zero-downtime, declarative migration diffing via Ariga Atlas (
- Ent Model Factories & Zero-Dependency Faker (
pkg/database/factory):- Generic model factories (
Factory[T]) with immutable chaining,.Count(),.State(),.Sequence(), and hooks (AfterMaking,AfterCreating). - Ent database creators (
.Create,.CreateOne) and in-memory stubs (.Make,.MakeOne). - Built-in Faker engine covering Person, Internet, Phone, Text, Business, Location, Numbers, and deterministic seed generation (
faker.Seed(12345)).
- Generic model factories (
- Privacy Scopes & Soft Deletes (
pkg/privacy):- Ent soft delete mixin with automatic query filtering,
withTrashed(),onlyTrashed(), andforceDelete(). - Multi-tenant privacy interceptors with tenant isolation across databases.
- Ent soft delete mixin with automatic query filtering,
🛡️ Authentication, Authorization & Security#
- Multi-Guard Authentication Engine (
pkg/auth):- Session and JWT token-based authentication guards.
- Argon2id password hashing with constant-time cryptographic verification (
pkg/hash). - Scaffolding for TOTP Two-Factor Authentication (2FA) with RFC 6238 time-step windows and QR code generator.
- Socialite / OAuth2 Multi-Provider Authentication (
pkg/auth/oauth):- Turnkey drivers for GitHub, Google, GitLab, Bitbucket, Discord, and Slack.
- OpenID Connect (OIDC) support, PKCE verification, and cryptographically secure state cookies.
- Fine-Grained Policy Authorization (
pkg/auth):- Resource gate policies (
Gate.Define,Gate.Allows,Gate.Denies). - Policy scaffolding via
artisan make:policy.
- Resource gate policies (
🍪 Sessions, Rate Limiting & Middleware#
- Encrypted Stateful Sessions & Flash Messages (
pkg/session):- Cookie and distributed Redis session stores.
- AES-256-GCM encryption with HMAC tamper-proofing.
- Flash message subsystem (
session.Flash(),session.GetFlash()) with automatic next-request expiration. - Strict CSRF protection middleware with double-submit cookie validation and timing-attack-safe comparison.
- Sliding-Window Rate Limiting & Tiered Throttling (
pkg/ratelimit):- High-precision sliding-window log algorithm over Redis and in-memory storage.
- Named limiters with dynamic client keying (
ByIP,ByUser,ByHeader,BySubdomain). - Standard RFC 6585 and draft IETF headers (
X-RateLimit-Limit,X-RateLimit-Remaining,Retry-After). - Tiered burst multipliers and tiered quota policies.
⏱️ Queues, Background Workers & Task Scheduling#
- Redis Queue Driver & Priority Workers (
pkg/queue):- Robust worker pool supporting multiple named priority queues (
high,default,low). - Exponential backoff retry policies with configurable retry counts.
- Full-featured Dead-Letter Queue (DLQ) with CLI inspection, retry, and flush tooling.
- Horizon-inspired real-time HTML Worker Dashboard with live throughput graphs, active workers, queue latencies, and DLQ management.
- Robust worker pool supporting multiple named priority queues (
- Advanced In-Process Cron Scheduler & Distributed Task Runner (
pkg/schedule):- Standard 5-field cron parsing (
* * * * *,@hourly,@daily,@weekly). - Human-friendly fluent intervals (
EveryMinute(),EveryFiveMinutes(),HourlyAt(15),DailyAt("02:30"),Weekdays()). - Distributed mutual exclusion locks (
OneServer()) preventing concurrent execution on clustered instances. - Overlap prevention (
WithoutOverlapping(timeout)), background async dispatch (RunInBackground()), and lifecycle hooks (Before(),After(),OnSuccess(),OnFailure()).
- Standard 5-field cron parsing (
📧 Mail, Notifications & Realtime Broadcasting#
- Advanced Mailables & Templ View Studio (
pkg/mail):- Fluent
Mailableinterface supporting HTML/plain-text bodies, attachments, embedded inline assets (CID), CC, BCC, and Reply-To. - SMTP transport driver and memory driver for testing.
- Interactive Mail Preview Studio web interface with responsive viewport switching (Desktop, Tablet, Mobile) and source inspector.
- Fluent
- Multi-Channel Notifications Engine (
pkg/notification):- Single notification dispatchable across multiple channels simultaneously: Mail, Database, Realtime Broadcast, Slack, and SMS (Twilio).
- On-demand custom notification routing (
notification.Route()).
- Realtime WebSockets & SSE Broadcasting (
pkg/broadcast):- Public, private, and presence channels with client authorization guards.
- WebSocket hub and Server-Sent Events (SSE) streaming engine.
- Automatic broadcast event dispatching on Ent model lifecycle mutations.
☁️ Cloud Filesystem & Tagged Cache#
- Multi-Disk Cloud Filesystem (
pkg/storage):- Pluggable driver architecture supporting Local filesystem, Amazon S3, and MinIO.
- AWS Signature Version 4 (SigV4) presigned PUT and GET URL generation for direct client uploads.
- Direct file streaming, atomic writes, and metadata queries.
- Tagged Cache Engine & Atomic Distributed Locks (
pkg/cache):- Tagged cache invalidation (
cache.Tags("users", "billing").Flush()). - Atomic distributed locks with automatic expiration and ownership token verification.
- Tagged cache invalidation (
🧪 Full-Stack HTTP Testing & Client Toolkit#
- HTTP Testing Harness & Assertion Toolkit (
pkg/testing/golaravel.Test):- Zero-overhead in-memory HTTP requests directly against framework handlers.
- Fluent assertions:
.AssertStatus(),.AssertOk(),.AssertNotFound(),.AssertHeader(),.AssertJSON(),.AssertJSONExact(),.AssertJSONStructure(),.AssertViewIs(),.AssertViewHas().
- Fluent HTTP Client & Mocking Engine (
pkg/http/golaravel.Http):- Fluent request builder (
WithToken(),WithHeaders(),WithTimeout(),Retry()). - Deterministic HTTP mocking engine (
Http.Fake()) with sequence responses and url-pattern matchers.
- Fluent request builder (
📊 Observability & Health Checks#
- Prometheus Metrics & OpenTelemetry Tracing (
pkg/telemetry):- Zero-allocation Prometheus metrics exporter (
/metrics) tracking HTTP durations, throughput, active goroutines, and memory allocs. - W3C Trace Context propagation (
traceparent,tracestate) and OpenTelemetry span collectors. - Subsystem Health Check Engine (
/health) with disk space, memory, database, and Redis checks.
- Zero-allocation Prometheus metrics exporter (
📱 Multiplatform Presentation Stacks#
- Templ SSR Components (
pkg/view):- Compile-time type-checked HTML templating with zero-reflection execution.
- Inertia.js Protocol Adapter (
pkg/inertia):- First-class Inertia.js protocol adapter supporting React and Vue.js frontends without building an API layer.
- Flutter Multiplatform Engine (
pkg/flutter):- Native embedding and serving of Flutter Web clients with client-side SPA routing fallbacks.
- Showcase application: Real-World SaaS Invoicing application built with Flutter Web and Ent ORM.
🛠️ Artisan CLI Tooling#
- Project Wizard:
artisan new <name> - Full-Stack Scaffolder:
artisan make:crud <Name> [--api | --web] - Subsystem Generators:
artisan make:schema <Name>artisan make:controller <Name>artisan make:view <name>artisan make:factory <Name>artisan make:seeder <Name>artisan make:migration <Name>artisan make:job <Name>artisan make:notification <Name>artisan make:mail <Name> [--view]artisan make:authartisan make:oauth <Provider>artisan make:policy <Name>artisan make:scope <Name>artisan make:middleware <Name>artisan make:limiter <Name>
- Runtime Commands:
artisan serveartisan generateartisan flutter:buildartisan migrate/migrate:diff/migrate:status/migrate:rollbackartisan db:seedartisan queue:work/queue:failed/queue:retry/queue:flushartisan schedule:list/schedule:run/schedule:workartisan healthartisan version/--version/-v