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.