This feature provides a set of settings and utilities for working with Laravel projects.
"features": {
"ghcr.io/tomgrv/devcontainer-features/larasets:11": {}
}npx tomgrv/devcontainer-features -- add larasets
# or, without node/npm:
curl -fsSL https://raw.githubusercontent.com/tomgrv/devcontainer-features/develop/setup.sh | sh -s -- add larasetsnpm install --save-dev @tomgrv/devcontainer-features-larasets- Configures Laravel environment variables.
- Ships a single environment-aware
🚀 StartVS Code task plus optimize, migrate refresh, install, and IDE helper tasks. - Starts the dev environment in order: optimize, serve, logs, schedule, then smee.
- Supports Laravel Sail for containerized development (wrappers auto-target the Sail container when it is running).
- Loads secrets into
art/run/srv/serve/smee/depviasecret: Doppler when available, else.env(seedinherits this throughart). - Installs necessary extensions and tools for Laravel development.
- Installs Pest's browser testing plugin (Playwright-backed, per Livewire's browser testing docs) and its browser binaries.
The following environment variables are set by default (containerEnv):
APP_DEBUG:trueAPP_ENV:localDB_CONNECTION:sqliteSAIL_XDEBUG_CONFIG:client_host=host.docker.internal idekey=vscodeXDEBUG_CONFIG:client_host=localhost idekey=vscode
doppler(string, default empty): Doppler config name exported asDOPPLER_CONFIGfor thedep/secrethelpers. Leave empty to let Doppler resolve the config on its own — no personal config is shipped by default.
The feature also includes the following VS Code customizations:
-
Extensions:
aaron-bond.better-commentsalexcvzz.vscode-sqlitebmewburn.vscode-intelephense-clientchristian-kohler.npm-intellisensedavidanson.vscode-markdownlintdoppler.doppler-vscodeentexa.tall-stackformulahendry.auto-close-tagformulahendry.auto-rename-taggruntfuggly.triggertaskonsavelaravel.vscode-laravelmarabesi.php-import-checkeronecentlin.laravel-bladepcbowers.alpine-intellisensexdebug.php-debug
-
Deployed
.vscode/stubs:tasks.json:🚀 Start(env-aware full dev environment, started sequentially: optimize, serve, logs, schedule, smee), Optimize, Refresh, Install, IDE Helper, and the save-triggeredart-cache-*tasks.launch.json:Listen for XDebuglaunch configuration (port 9003).mcp.json:laravel-boost+ headlessplaywrightMCP servers (also deployed as root.mcp.jsonfor Claude Code).settings.json: Doppler autocomplete/hover defaults andtriggerTaskOnSavecache refresh.
-
Save-triggered cache refresh (
triggerTaskOnSave.tasks, viagruntfuggly.triggertaskonsave):art-cache-config(art config:cache):**/config.php,config/*.php,.envart-cache-views(art view:cache):packages/**/*.blade.phpart-cache-routes(art route:cache):**/[Rr]outes/*.php
The following utilities are included by default:
serve- Start the app server, auto-selecting Laravel Sail or local PHP and binding0.0.0.0:$APP_PORTso forwarded ports work in Codespaces, dev containers, web, or local. Prompts for Sail only when the choice is ambiguous.sail- Run Laravel Sail commands.seed- Run database migrations and seed the database.art- Run Laravel Artisan commands, locally or within the Laravel Sail environment if it is running.- Use
art <...>as you would do with[php|sail] artisan <...>
- Use
srv- Start and manage PM2 processes, locally or within the Laravel Sail environment if it is running.- Use
srv <name>as you would do with<sail> npm run <name> - Use
srv <name> <command...>to manage an arbitrary command under that pm2 process name (e.g.srv queue art queue:work) - Add
-qto skip following logs after start/restart (used byserveto orchestrate several processes)
- Use
fwd- Manage port forwarding fromlocaltoremote.run- Run npm scripts, locally or within the Laravel Sail environment if it is running.- Use
run <...>as you would do with<sail> npm run <...>
- Use
smee- Forward smee.io webhook deliveries to the local app (APP_URL/SMEE_TARGET, channelSMEE_CHANNEL).dep- Run Deployer (dep) with the SSH key loaded and secrets injected viasecret.secret- Run any command with the SSH agent loaded and secrets injected: Doppler when available, else.env, else run as-is.
art, run, srv, serve, smee, and dep all run their underlying command through secret, so the environment is loaded before it starts, without changing how you call them (seed gets this for free by calling art).
The following utilities are added to root composer:
inst- Install dependencies ignoring platform requirements.link- Configure local repositories.lint- Run Pint linter on staged files (--dirty by default), including Blade template formatting (--blade: Alpine attributes, Livewirewire:bindings, Tailwind class sorting).lock- Validate and update composer.lock with minimal changes.req- Require a package with all dependencies ignoring platform requirements.reqdev- Require a development package with all dependencies.rmv- Remove a package with all dependencies ignoring platform requirements.test- Run Pest tests.test-changed- Run Pest only for the parts changed since the base branch (core /modules/*/packages/*/*), viaphp-list-changed.test-coverage- Run Pest tests with coverage.pestphp/pest-plugin-browser(installed as a dev dependency) enablesLivewire::visit(...)browser tests via Playwright — see Livewire browser testing. Playwright's Chromium binary is installed automatically (configure-sail, and in CI beforerun-php-tests). Screenshots undertests/Browser/Screenshotsare gitignored.upg- Update dependencies with all dependencies ignoring platform requirements.
Tests are placed by part so a PR only runs the suites it can impact:
core→tests/{Unit,Feature}; core tests never importModules\*or package classes.modules/<X>andpackages/<org>/<pkg>→<part>/tests/{Unit,Feature}; a module never imports another module. Parts may boot on the core app (Tests\TestCase,User,Team).- Every part with tests has a
phpunit.xmltestsuite pointing at itstestsdirectory.
The deployed validate-pr-php.yml runs tomgrv/actions/list-php-parts to build a matrix and runs one run-php-tests job per affected part (paths: <part>/tests) (a core/shared change — app/, config/, composer.*, phpunit.xml, … — runs everything). Locally, composer test-changed does the same, and php-test-layout reports tests that break the placement rules.
If you have a feature that you would like to add to this repository, please open an issue or submit a pull request.