VOOZH about

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

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


Loading...
Last indexed: 7 March 2026 (397730)
Menu

Development Environment Setup

This document covers setting up a local development environment for working on the laravel-boost-copilot-cli package itself. It explains the required dependencies, Composer scripts, Orchestra Testbench workbench configuration, and the package development workflow.

For information about installing and using the package in your Laravel application, see Installation. For testing the package, see Testing with Orchestra Testbench.

Purpose and Scope

This page is for developers who want to:

  • Contribute to the laravel-boost-copilot-cli package
  • Modify or extend the package locally
  • Test package functionality in isolation
  • Understand the package's development toolchain

It does not cover end-user installation or configuration, which are documented in the Getting Started chapter.

Prerequisites

The package requires specific PHP and Laravel versions as defined in composer.json11-14:

RequirementVersion Constraint
PHP^8.2
illuminate/support^12.30 || ^13.0
laravel/boost^2.0

Development dependencies include testing and quality assurance tools defined in composer.json16-21:

ToolPurposeVersion
orchestra/testbenchPackage development environment^10.6
pestphp/pestTesting framework^4.1
pestphp/pest-plugin-laravelLaravel-specific test features^4.0
laravel/pintCode formatting^1.25
mockery/mockeryMocking framework^1.6

Sources: composer.json11-21

Development Workflow Overview


Title: Initial Setup and Development Workflow

The development environment is automatically configured through Composer's post-autoload-dump hooks defined in composer.json63-66 These hooks execute three scripts sequentially:

  1. clear - Purges skeleton files
  2. prepare - Discovers packages
  3. build - Builds the workbench environment

Sources: composer.json63-76 testbench.yaml23-27

Composer Scripts Reference

The package defines several Composer scripts for common development tasks in composer.json53-76:

Testing Scripts


Title: Testing Script Execution Flow

ScriptCommandPurpose
testpest --compactRun test suite with compact output
test:coveragepest --compact --coverage --coverage-clover build/logs/clover.xmlRun tests with code coverage report

Sources: composer.json54-55

Code Quality Scripts

ScriptCommandPurpose
lintpintFormat code according to Laravel standards
test:lintpint --testCheck code formatting without modifying files

Sources: composer.json56-61

Workbench Management Scripts


Title: Workbench Management Script Dependencies

ScriptCommandPurpose
cleartestbench package:purge-skeleton --ansiRemove skeleton files from workbench
preparetestbench package:discover --ansiDiscover and register packages
buildtestbench workbench:build --ansiExecute build steps from testbench.yaml
servetestbench serve --ansiStart development server (with timeout disabled)
boosttestbench boost:install --no-interaction --ansiRun boost:install in Testbench environment

The serve script includes Composer\Config::disableProcessTimeout to prevent Composer from timing out the long-running server process composer.json71-75

Sources: composer.json62-75

Package Autoloading Configuration

The package defines PSR-4 autoload mappings for both production and development code:


Title: Package Autoload Namespace Mapping

DirectoryNamespaceEnvironmentPurpose
src/Revolution\Laravel\BoostProductionPackage source code
tests/TestsDevelopmentTest suite
workbench/app/Workbench\AppDevelopmentTest application code
workbench/database/factories/Workbench\Database\FactoriesDevelopmentModel factories
workbench/database/seeders/Workbench\Database\SeedersDevelopmentDatabase seeders

Sources: composer.json23-34

Orchestra Testbench Workbench Configuration

The testbench.yaml file configures the workbench environment used for package development and testing.

Workbench Build Process


Title: Workbench Build Sequence

The build process is defined in testbench.yaml23-27 and executes four steps:

StepCommandPurpose
1asset-publishPublish Laravel framework assets
2create-sqlite-dbCreate SQLite database file
3db-wipeClear existing database data
4migrate-freshRun all migrations

Sources: testbench.yaml23-27

Workbench Feature Configuration

The workbench is configured with specific features enabled or disabled in testbench.yaml12-22:

FeatureStatusPurpose
web routes✓ EnabledDiscover web routes
api routes✓ EnabledDiscover API routes
commands✓ EnabledDiscover Artisan commands
factories✓ EnabledDiscover model factories
components✗ DisabledBlade components not needed
views✗ DisabledView discovery not needed
install✓ EnabledRun package installation
health✗ DisabledHealth checks disabled

The workbench start page is configured to '/' and migrations are loaded from workbench/database/migrations testbench.yaml6-13

Sources: testbench.yaml12-22

Database and Migration Configuration


Title: Database and Migration Setup

ConfigurationValuePurpose
Migrations Pathworkbench/database/migrationsDirectory containing test migrations
Database SeederWorkbench\Database\Seeders\DatabaseSeederSeeder class for test data
Database TypeSQLiteLightweight database for testing

Sources: testbench.yaml6-10

Asset and Storage Synchronization

The workbench configuration includes asset publishing and storage synchronization:

ConfigurationSettingPurpose
Assetslaravel-assetsLaravel framework assets to publish
Storage Syncstorageworkbench/storage (reverse)Bidirectional storage directory sync

The reverse: true setting in testbench.yaml33 enables bidirectional synchronization between the package's storage directory and workbench/storage.

Sources: testbench.yaml28-33

Development Directory Structure


Title: Package Directory Structure for Development

DirectoryNamespacePurpose
src/Revolution\Laravel\BoostPackage source code
src/CopilotCli.php-Main agent implementation
src/CopilotCliServiceProvider.php-Service provider registration
tests/Feature/Tests\FeatureFeature test suite
workbench/-Testbench application root
workbench/app/Workbench\AppTest application classes
workbench/database/-Test database structure
vendor/-Composer dependencies

Sources: composer.json23-34 testbench.yaml1-33

Service Provider Registration

The package automatically registers its service provider through Laravel's package auto-discovery mechanism defined in composer.json45-50:


Title: Service Provider Auto-Discovery

The CopilotCliServiceProvider class is automatically discovered and registered by Laravel applications that include this package. This configuration is in the extra.laravel.providers section of composer.json.

Sources: composer.json45-50

Quick Start Commands

To begin developing on the package:


After running composer install, the environment is ready for development. The workbench provides a full Laravel application context for testing package functionality.

Sources: composer.json53-76 testbench.yaml1-33