Repository navigation
Conversation
…tbench A package with a testbench.yaml is served from its workbench: the document root is Testbench's Laravel skeleton in vendor/, and the console is vendor/bin/testbench. Testbench takes its environment from testbench.yaml (SQLite unless the package says otherwise), so the definition declares no env file and no service wiring. Setup discovers packages, which writes the cached testbench.yaml the skeleton's index.php reads; building the workbench is an opt-in step and a command. The mark is a placeholder bench vise: Testbench has no official logo.
The skeleton under vendor finds the package's vendor through TESTBENCH_WORKING_PATH or a vendor symlink, and testbench removes that symlink when each command ends, so every page answered 500. The definition now passes the variable through nginx.fastcgi_params, which lerd-env/lerd#2194 adds.
|
Tried it on monocle with lerd from a fresh clone, link and setup go through and artisan runs, but with the default setup steps every page answered 500 with Failed opening required vendor/orchestra/testbench-core/laravel/vendor/autoload.php. The skeleton only finds the package vendor through a vendor symlink or TESTBENCH_WORKING_PATH, which testbench serve sets. Running workbench:build leaves the symlink in place, which is why it served for you, but Build the workbench is off by default and the composer clear script purges the symlink again on every install, require or dump-autoload, so the site goes back to 500 after the next composer run. A definition had no way to pass a fastcgi param without copying the whole php location in a snippet, which would lose profiling, LERD_SITE and the forwarded headers, so lerd-env/lerd#2194 adds nginx.fastcgi_params and I pushed d3f9a65 here using it. With both, the workbench serves after the default setup, after workbench:build and after a composer dump-autoload, with no symlink. An older lerd ignores the key and keeps today's behaviour, so this is best merged once 2194 is in a release. |
Adds a framework definition for Laravel packages developed with Orchestra Testbench, so
lerd linkon a package repository serves its workbench without a hand-written.lerd.yaml.What it does
testbench.yamlfile in the project root. Composer detection is left out on purpose:orchestra/testbenchalso sits in therequire-devof many Laravel applications, and those must stay Laravel sites. A package has neither anartisanfile norlaravel/frameworkin its manifest, so it never matches Laravel.vendor/orchestra/testbench-core/laravel/public, the Laravel skeleton Testbench boots the workbench from.vendor/bin/testbench, solerd artisanruns Testbench's own commands.testbench.yaml(SQLite unless the package configures something else), so the definition declares no env file and no services;lerd envreports that it is not supported, as for any definition without an env section.testbench package:discover, on by default) writes the cachedtestbench.yamlthe skeleton'spublic/index.phpreads; without it the site does not boot. "Build the workbench" (testbench workbench:build) is opt-in, and also available as a command.storage/logs/*.log.11, Testbench for Laravel 13).Icon
The mark (a bench vise, in slate) is a placeholder: Testbench has no official logo. Happy to swap it for an official one if Orchestra publishes one, or for whatever you prefer.
Tested
python3 .github/scripts/schema_guard.pyagainstmain: passes.lerd framework add --from-fileand nopublic_dirin.lerd.yaml:lerd linkdetectstestbenchand sets the document root above, the workbench and its routes serve,lerd artisan --versionruns through Testbench,lerd setup --list-stepsoffers both setup steps, andlerd run workbench:buildbuilds the workbench.