You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Breaking: behaviour that changed
A src/ file that fails to load stops startup (ADR-0112). Outside TINA4_DEBUG, a route or model file that fails to load (a parse error included) now throws Tina4\DiscoveryError. php index.php and tina4php serve exit 1 before listening and name the file and the cause; under php -S, PHP-FPM or Apache every request, /health included, answers 500. Before, the file was logged, skipped and the app served without it. Debug boots and re-scans keep skip-and-log. Upgrade: fix the file, or set TINA4_STRICT_DISCOVER=false to restore the old behaviour (#404).
Database URL query options reach the driver (ADR-0113). The query string of a database URL is now connection options, read once by Tina4\DatabaseUrl, handed to the driver and never dropped or folded into the database name. An option the engine or driver cannot honour is refused at connect instead of being ignored. ?sslmode=require on PostgreSQL now applies (it used to connect in plain text), ?application_name= reaches the server, MySQL ?charset= sets the connection charset, and MSSQL ?encrypt= / ?trustServerCertificate= map to ext-sqlsrv (pdo_dblib refuses encrypt=true, as FreeTDS cannot require TLS per connection). Firebird accepts charset and driver only; PostgreSQL refuses endpoint keys (host, port, dbname, user, password and similar) in the query. Upgrade: a URL that carries an option your driver cannot honour now fails at connect; remove it or use a driver that supports it (#403).
One connection per process. A forked process never uses a connection it inherited. Under TINA4_SERVE_FORK (the default where pcntl exists) and the TINA4_SERVE_WORKERS pool, a database opened before the fork was the same server session in every process, so one request's rollback could undo another request's write on PostgreSQL and MySQL. Each child now opens its own connection on first use; the parent's stays untouched. SQLite is unaffected (#399).
Docker base image is php:8.6.0-nts-alpine3.23. The image moves from php:8.4.27-cli-alpine3.23 to the PHP 8.6 non-thread-safe build, with mbstring compiled in (PHP 8.6 images no longer bundle it). The Dockerfile that tina4php init writes matches (php:8.6-nts-alpine3.23, mbstring built, TINA4_OVERRIDE_CLIENT=true so the container starts). Do not use php:8.6-cli-*, which is thread-safe from PHP 8.6 (#400).
A path parameter no longer replaces the handler's request / response argument. A Request / Response type hint (or, untyped, request / req and response / res) now binds the request and response first, so /items/{request} no longer handed the segment to $request or raised a TypeError for a typed handler. The segment stays in $request->params (#398).
tina4php generate takes nested names for route only.generate route reports/sales writes src/routes/reports/sales.php; every other generator refuses a nested name before writing anything, with a message and a non-zero exit. A failed write now rolls the whole generate back and says Nothing was written.; it no longer prints Created after a failed write (#402).
Security
The standalone WebSocket server reads each connection's upgrade request in its select loop, within WebSocket::HANDSHAKE_TIMEOUT (10 seconds) and WebSocket::MAX_REQUEST_HEAD (16 KiB), the same limits as tina4-python and tina4-ruby. A request that arrives in pieces is served, other clients are answered meanwhile, a connection that sends no complete request in time is closed, and an oversized head is answered 400 (GHSA-4gr9-chq4-jjmm, high; #407).
TINA4_WS_MAX_CONNECTIONS (default 10000; a value that is not a positive whole number uses the default) caps open WebSocket connections on both the built-in and the standalone server. Past the cap the upgrade is answered 503 before the handshake, and a closed connection frees its slot. In a TINA4_SERVE_WORKERS pool the cap applies per worker (#405).
When a handler has already sent its status line and part of its body, an error afterwards is logged and the response ends there: no error page is appended and http_response_code() is not called again (#408).
The value of a secret-valued database URL option (password, pass, pwd, passwd, sslpassword, or any name containing password, secret or token, in any letter case) is masked as key=*** wherever a URL is shown: DatabaseUrl::redact(), toSafeString(), print_r / var_dump / json_encode of a DatabaseUrl, scrubMessage(), the PostgreSQL connect error and the dev MCP env_list. Other options such as sslmode=require stay readable (#409).
Added
TINA4_SSO_VERIFY=jwks verifies the ID token against the provider's JWKS (RS256 and ES256 only; strict iss, aud, azp, exp, nbf and nonce), so providers with no introspection endpoint, such as Microsoft Entra ID, work (ADR-0114). TINA4_SSO_CLOCK_SKEW (default 60) and TINA4_SSO_JWKS_MAX_AGE (default 3600) tune it; a token with no kid is accepted only when exactly one key fits. In both modes UserInfo is merged only when its sub matches the ID token's. Needs ext-openssl (#401).
Database::addConnectHook() registers a hook that runs on every open connection and on each new one; the ext-pgsql and pdo_pgsql adapters replay it after a reconnect, before any statement runs. TINA4_DB_RECONNECT_RETRY=false surfaces a dropped connection instead of re-running the statement (#404).
Fixed
A PostgreSQL connection that drops after a raw-SQL BEGIN is no longer retried as a lone statement in autocommit, which committed half the transaction. The retry reads the server's transaction status and refuses it; pdo_pgsql also no longer swallows a drop in fetch()'s count probe, and reopens its handle after a COMMIT or ROLLBACK fails on a dead link. Both adapters log a warning when they reconnect (#404).
Migration::detectDialect() reads the database type every wrapper forwards, so a cached or wrapped adapter gets its engine's migration DDL (#403).
The standalone WebSocket server no longer discards bytes that arrive after the upgrade request head; they are kept as the connection's first frames. On Windows, a request that arrived a moment after the connection opened is served instead of being closed unanswered (#407).
.claude/commands/tina4-websocket.md gave the WebSocket connection default as 1000; it is 10000 (#405).
Changed
The dev MCP env_list masks secret-valued options in a database URL or keyword DSN instead of returning it as written (#409).
Tests pin that binary stream chunks reach the wire byte for byte and binary Api bodies are returned byte for byte, and that a WebSocket connection is released when the peer closes its side (#398, #406).