massive/build-bundle
Symfony bundle providing a massive:build command to run tagged build targets. Define virtual targets in config, declare dependencies between targets, and implement builders to execute custom environment/setup steps—ideal for chaining app-specific commands in development.
BuilderInterface and tag-based registration align with Laravel’s service container patterns.Artisan commands are first-class citizens, but this bundle does not integrate natively with Laravel’s command bus or task scheduling (e.g., schedule:run). A TPM would need to bridge this via custom commands or service providers.massiveart/build-bundle) and registered in Laravel’s config/app.php under extra.bundles.massive_build.builder) works out-of-the-box.massive:build command can be aliased or extended in Laravel’s App\Console\Kernel to fit naming conventions (e.g., app:build).Artisan commands for builds (e.g., migrate, db:seed), the bundle can wrap these as BuilderInterface implementations to avoid duplication.AssetBuilder that calls npm run dev).| Risk Area | Mitigation Strategy |
|---|---|
| Build Target Isolation | Test builders in isolation using Laravel’s Artisan::call() or Symfony’s Application mocking. |
| Dependency Cycles | Enforce a DAG (Directed Acyclic Graph) for targets via CI validation (e.g., fail builds with circular deps). |
| Performance | Profile sequential builds vs. parallel alternatives (e.g., Laravel’s parallel:commands). |
| Laravel-Specific Quirks | Abstract Symfony-specific code (e.g., ContainerInterface) behind interfaces to ease Laravel adaptation. |
| State Management | Avoid shared state between builds (e.g., use --nodeps for idempotent targets). |
| Error Handling | Extend BuildCommand to propagate Laravel’s exception handlers (e.g., Handler::render()). |
Artisan commands (e.g., migrate, queue:work) or only environment setup (DB, fixtures, assets)?php artisan massive:build ci) or kept separate?ci and dev targets with overlapping but distinct dependencies.--reset-db) required? If so, extending BuildCommand is necessary.Makefile/bash scripts be gradually replaced or wrapped as build targets?LoggingChannel or a custom BuilderLogger?Illuminate\Container\Container is a drop-in replacement for Symfony’s ContainerInterface, so DI integration is seamless.BuildCommand can be registered in Laravel’s App\Console\Kernel and aliased (e.g., app:build).config/massive_build.php can replace Symfony’s YAML config.migrate/seed via custom builders (e.g., DatabaseBuilder).npm run dev or vite build as a build target.schedule:run.parallel:commands). This bundle is sequential.| Phase | Action | Tools/Leverage |
|---|---|---|
| Assessment | Audit existing CLI scripts (Makefile, bash chains) for build steps. |
grep -r "php artisan|npm run|composer" |
| Pilot | Replace one workflow (e.g., DB setup) with a build target. | Start with DatabaseBuilder, FixtureBuilder. |
| Core Integration | Register bundle in config/app.php and create a custom AppBuildCommand. |
Extend BuildCommand for Laravel-specific flags. |
| CI/CD Sync | Mirror CI pipelines (e.g., php artisan massive:build ci). |
Use --nobuild to validate target graphs. |
| Deprecation | Phase out old scripts; document new massive:build commands. |
Laravel’s deprecated() helper for commands. |
database, assets, fixtures).// config/massive_build.php
'targets' => [
'dev' => ['dependencies' => ['database', 'assets', 'fixtures']],
'ci' => ['dependencies' => ['database', 'tests']],
],
DatabaseBuilder, AssetBuilder).class AssetBuilder implements BuilderInterface {
public function build() {
Artisan::call('vite:build');
}
}
$this->app->tag([DatabaseBuilder::class, AssetBuilder::class], 'massive_build.builder');
BuildCommand for Laravel-specific features (e.g., --force flag).--nobuild to inspect target graphs before execution.php artisan massive:build dev --nodeps to isolate targets.How can I help you explore Laravel packages today?