VOOZH about

URL: https://deepwiki.com/invokable/laravel-boost-phpstorm-copilot/6.1-development-environment-setup

⇱ Development Environment Setup | invokable/laravel-boost-phpstorm-copilot | DeepWiki


Loading...
Last indexed: 28 February 2026 (57ef88)
Menu

Development Environment Setup

This page covers the local development environment for contributors to the revolution/laravel-boost-phpstorm-copilot package itself. It explains the orchestra/testbench workbench setup, the available composer scripts, and how the workbench application is structured.

For how end users install the package into their own Laravel projects, see Prerequisites and Installation. For how the test suite is structured and run, see Testing Framework and Strategy.


Overview

Because this is a Laravel package (not a standalone application), it uses Orchestra Testbench to provide a minimal Laravel application environment for local development and testing. The workbench application lives in the workbench/ directory and simulates a host Laravel project.

The key configuration files are:

FilePurpose
composer.jsonDefines dev dependencies and all composer scripts
testbench.yamlConfigures Orchestra Testbench: providers, migrations, routes, build steps
workbench/Minimal Laravel app used for local development and testing

Composer Scripts

All development workflows are driven through the scripts section of composer.json.

composer.json55-77

ScriptCommandPurpose
testpestRun the full Pest test suite
test:coveragepest --coverage --coverage-clover build/logs/clover.xmlRun tests with Xdebug coverage output
lintpintApply Laravel Pint code style fixes
test:lintpint --testCheck code style without modifying files
boostvendor/bin/testbench boost:install --no-interaction --ansiRun boost:install against the workbench app
cleartestbench package:purge-skeleton --ansiRemove generated workbench skeleton files
preparetestbench package:discover --ansiRe-run package discovery for the workbench app
buildtestbench workbench:build --ansiExecute the build steps defined in testbench.yaml
serve@build then testbench serve --ansiBuild and start a local HTTP dev server

The post-autoload-dump hook runs clear, prepare, and build automatically whenever composer install or composer update is executed.

composer.json65-69

Typical contributor workflow:

composer install # installs deps, triggers clear + prepare + build
composer test # run the Pest test suite
composer lint # fix code style
composer serve # start the local dev server

Sources: composer.json55-77


Testbench Configuration (testbench.yaml)

The testbench.yaml file controls how Orchestra Testbench assembles and boots the workbench Laravel application.

testbench.yaml1-34

Providers


WorkbenchServiceProvider is commented out, meaning only the package's own PhpStormCopilotServiceProvider (registered via composer.json's extra.laravel.providers) is active. This keeps the test environment minimal.

Migrations and Seeders


The DatabaseSeeder creates a single test user (test@example.com) via UserFactory. This provides a baseline database state for any feature that requires authenticated users.

Route and Asset Discovery


The testbench discovers and registers the workbench's web routes, API routes, Artisan commands, and model factories. Views and components are disabled, keeping startup fast.

Build Steps


Each composer build (and therefore each composer serve) runs these steps in order:

StepEffect
asset-publishPublishes any package assets
create-sqlite-dbCreates the SQLite database file
db-wipeDrops all tables
migrate-freshRuns all migrations from scratch

Storage Sync


Laravel's storage/ directory is synced to workbench/storage/, so the workbench app has its own isolated storage.

Sources: testbench.yaml1-34


Workbench Application Structure

The workbench/ directory contains the scaffolded application that Testbench boots. The structure mirrors a standard Laravel project.

Directory layout diagram:


Sources: workbench/app/Models/User.php1-50 workbench/app/Providers/WorkbenchServiceProvider.php1-26 workbench/database/seeders/DatabaseSeeder.php1-27 workbench/routes/web.php1-9 workbench/routes/console.php1-11


Key Workbench Files

WorkbenchServiceProvider

workbench/app/Providers/WorkbenchServiceProvider.php1-26

A stub service provider for the workbench application. Both register() and boot() are empty. It is commented out in testbench.yaml, so it does not participate in the boot sequence unless a contributor explicitly enables it.

User Model

workbench/app/Models/User.php1-50

A standard Laravel Authenticatable model with HasFactory and Notifiable. The $fillable fields are name, email, and password. The model is used by UserFactory and DatabaseSeeder to seed a test user during the build step.

DatabaseSeeder

workbench/database/seeders/DatabaseSeeder.php1-27

Calls UserFactory::new()->create(...) with fixed credentials (test@example.com). The WithoutModelEvents trait is applied so model observers do not fire during seeding.

Routes

workbench/routes/web.php defines a single GET / route returning a welcome view. workbench/routes/console.php is empty (the inspire command is commented out). These exist as required scaffolding; neither is exercised by the test suite.

workbench/routes/web.php1-9 workbench/routes/console.php1-11


Lifecycle Diagram

This diagram maps each composer script to the code entities it invokes.


Sources: composer.json55-77 testbench.yaml23-29


Autoload Namespaces

During development, three PSR-4 namespaces are active in addition to the production namespace:

composer.json25-36

NamespaceDirectoryPurpose
Revolution\Laravel\Boost\src/Production package code
Tests\tests/Pest test files
Workbench\App\workbench/app/Workbench application classes
Workbench\Database\Factories\workbench/database/factories/Workbench model factories
Workbench\Database\Seeders\workbench/database/seeders/Workbench database seeders

Sources: composer.json25-36


Dev Dependencies

composer.json17-24

PackageVersionRole
laravel/pint^1.25Code style enforcement
orchestra/testbench^10.6Workbench Laravel environment + testbench CLI
pestphp/pest^4.1Test framework
pestphp/pest-plugin-laravel^4.0Laravel-specific Pest helpers
mockery/mockery^1.6Mocking in tests
revolution/laravel-boost-copilot-cli^2.0Provides boost:install command used by composer boost

Sources: composer.json17-24