Releases
-
This release lets the function serve its own Static Files, and adds a check that the Function Runtime meets the application's Platform Requirements before you deploy.
[!IMPORTANT]
Files underpublic/are now served by the runtime before the Application is built, and a file wins over a route of the same path.
If a controller answers a path such as/robots.txtwhilepublic/robots.txtexists, delete the file to keep the route.Static Files
- Serves
GETandHEADrequests for regular files underpublic/without booting the Kernel, even when the Application fails to build. - Refuses dotfiles (except
/.well-known/),.phpfiles and symbolic links leading out ofpublic/. There is no index file and no directory listing. - Sends
ETag,304onIf-None-Match, andX-Content-Type-Options: nosniff. - Caches files whose name changes with their content for a year, as
immutable. These are the files mapped by an AssetMapper or Webpack Encoremanifest.json. Other files are revalidated on each use. - Sends precompressed
.br,.zstor.gzvariants when the client accepts them.
The newstatic_compressionoption ("gzip","zstd"or"br") compresses text files at runtime and keeps the results in memory for the Warm Process. - Refuses Static Files over 6 MiB, because responses of 10 MiB and more intermittently fail on Scaleway.
scaleway-packagewarns about such files.
Compatibility check
- New
vendor/bin/scaleway-doctor --runtime=php84|php85checks the Platform Requirements (php,ext-*) ofcomposer.lockagainst the chosen Function Runtime, using Composer's own constraint engine.
An unmet requirement makes Scaleway'scomposer installfail silently, and every Invocation then answers a 500. scaleway-package --runtime=...runs the same check before writing the zip.- The check relies on the Function Runtime Catalogue that ships with the package. It is generated from probe measurements of
php84(PHP 8.4.28) andphp85(PHP 8.5.13).
A weekly CI workflow measures the runtimes again and opens a pull request when they change.
Fixes
- Emulator:
php -Sno longer adds a charset to text responses.
Documentation
- The README is split into a
docs/folder organised by domain. - Records the Function Response sizes and encodings measured on Scaleway, and the decision to serve Static Files from the function (ADR 0009).
Dependencies
- Adds
composer/semverandsymfony/mimeas requirements.
The [!IMPORTANT] block at the top is the one change from the earlier releases' layout. Unlike v0.2.0, this version changes how the runtime behaves when upgrading: requests for files in public/ no longer reach the application.
- Serves
-
The runtime code is unchanged since v0.1.0, so upgrading is safe and needs no action.
This release adds documentation of platform behaviour, verified on a real Scaleway deployment.Verified on Scaleway
- Logs: stdout and stderr reach Cockpit within about 2 seconds, one entry per line, with lines cut at 64 KiB. The README now explains how to query them.
- Command Invocations: CRON triggers run console commands end to end. A wrong secret, or a correct secret sent over HTTP, is refused.
- Absolute URLs: generated URLs and redirects use the configured
hostand ignore forged forwarding headers. Withouthostthey point tohttps://localhost. - Failed Composer runs at deploy time: a failing script still serves the new code. A failing install breaks the function while it is still shown as
ready, with nothing in the logs. The README now says to call the function after each deployment and to setconfig.platform.php.
Example application
- Logs CRON and Command Invocations without ever logging the CRON secret.
- Stops
POST /argument names from forging log entries. - Adds E2E checks for absolute URLs and redirects against the configured host.
-
First release of the Symfony Runtime for Scaleway Serverless Functions.
Features
- Runs Symfony and PHP applications on the Scaleway PHP runtime (PHP 8.4+, Symfony 7.4 and 8.x).
- Supports several Front Controller types: HttpKernel, Response, PSR-15 request handler, Console Application or Command (
bin/console), and raw callable. - Keeps the process warm: the Application boots once per process, services are reset between Invocations, and a failed boot is retried.
- Converts Events to Requests and Responses to Function Responses, including cookies, binary bodies, streamed responses and
multipart/form-datauploads. - Runs console commands from CRON triggers, authenticated by
SCALEWAY_CRON_SECRETand refused on Events from HTTP calls. - Handles headers securely: it trusts only
X-Forwarded-Proto, takes the client IP fromX-Real-Ip, drops headers containing underscores, and takes the host from thehostoption (SCALEWAY_HOST). - Defaults to the
prodenvironment and keeps exception details out of deployed error pages. - Falls back to
/tmpfor the cache and log directories on the read-only filesystem.
Tooling
vendor/bin/scaleway-initwrites thehandler.phpstub.vendor/bin/scaleway-packagebuilds the deployment zip (sources,composer.jsonandcomposer.lock); Scaleway installs the dependencies.vendor/bin/scaleway-serveruns a local Emulator that builds platform-shaped Events and simulates CRON triggers onPOST /_scaleway/cron.
See the README for installation, deployment with Terraform, and the platform facts this runtime relies on.