Repository navigation
v1.0.0
From this version, a minor or a patch version does not break what the
backward compatibility
page covers.
Features
- BC break:
php.request()answers a fatal error with a 500, and PHP writes
the errors, the warnings too, on stderr:display_errorsis off, as on a web
server in production. It answered a 200, with the error in the body. A
php.initurns it on again:ini(['display_errors' => 'On']). - BC break:
php.request()runs the index of a directory, itsindex.php, or
answers itsindex.html, and answers the URL of the directory without its
slash with a 301 to it: it ran the front controller. - BC break:
php.request()runs a.phpfile of the path of the URL, with what
follows it in$_SERVER['PATH_INFO'], and in$_SERVER['PHP_SELF']:
/other.php/blogran the front controller. - BC break:
http_response_code()is 200 inphp.request(), until PHP sets
another status, as with a web server: it wasfalse. - BC break:
php-sw.jsonly declaresforwardToPhp(): its other functions,
aserrorResponse(), were globals of thesw.jsof the project, that a
function of the same name replaced, or aconstof the same name made
importScripts()fail. withCookies()takes the headers asphp.request()does: an object, or
Headers, too.- The Dockerfile checks what it downloads, for its default versions and the
ones ofstacks.php: the SHA-256 of an archive, the commit of a tag of git.
Another version, given as a build argument, is built with a warning.
Fixes
php.request()runs a.phpfile followed by a slash, as/index.php/, with
/asPATH_INFO: it answered its source.php.request()rejects its promise when it has no request to run: without
documentRoot, or with a URL without its origin. It threw, out of the
promise. AbasePaththat ends with a slash is refused too: every URL was a
404.forwardToPhp()asks another tab of the page when one does not take the
request within 10 s, as one that is still starting PHP, and answers a 503
without any. The request waited forever.serveInServiceWorker()starts PHP again after a request that PHP does not
get to the end of, an abort or a stack that overflows.createPhp({ persist })says what it needs: IndexedDB, in a browser, and the
Web Locks, on HTTPS orlocalhost. It failed with
IDBFS is not defined, or at each run.- A header without a colon, that
header()takes, is left out of the response
ofphp.request(): its name lost its last letter. startServiceWorker()andserveInFrame()reject their promise when the
service worker fails to install before the registration forgets it: they
waited forever.getenv()and$_SERVERdo not haveUSE_ZEND_ALLOCanymore, that only the
engine reads.- The
FSofcreatePhpInWorker()has nothen()nor symbols: anawait, or
console.log(), called the worker with them. php(),memory()andtargets()of a stack refuse what the build would
fail on: a version of PHP that is not one, a memory that WebAssembly does not
take, no target. The Dockerfile refuses an emptyTARGETS: it built nothing.
Minor
php.request()knows the types of more files:avif,htm,mp3,mp4,
otf,pdf,ttf,webmandwebmanifest.castor wasm:test-browserruns the pages of the examples in Chrome, in CI
too: the service workers, IndexedDB and the Web Worker, that node does not
have.castor wasm:checkfails when a build calls a function that emscripten does
not have, but the known ones: a call aborts the module.- The backward compatibility page says what of
createPhp()it covers:
runFile(),runCode(),request()andFS, not the rest of the module of
emscripten.createPhp()takesstdin,stdoutandstderrfor itself. - The JavaScript API page gave
forwardToPhp()anunderoption, that it does
not have. castor release:createpublishes a version: the Unreleased section of the
changelog, its commit and its tag, then its GitHub release.