spiral/testing
Testing SDK for Spiral Framework packages. Provides a custom TestCase with a TestApp so you can test packages without a full application setup. Configure root directory and bootloaders, and keep test app config under tests/app. PHP 8.1+, Spiral 3.15+.
This package remains exclusively designed for the Spiral framework with no Laravel compatibility, and the 3.0.0 release introduces no architectural or functional changes relevant to Laravel. The sole update—a minor PHPUnit dependency bump to 13.0.5—further underscores the incompatibility:
spiral/core and spiral/testing are fundamentally incompatible with Laravel’s illuminate/container and laravel/framework (which pins PHPUnit 10.x).Testing::boot(), Inject annotations, or Kernel-dependent bootstrapping).laravel/framework), risking:
Psr\Container-based service resolution and Laravel’s Illuminate\Container are irreconcilable without a full rewrite.Key questions remain unanswered (unchanged from prior assessment):
HttpClient vs. Laravel’s Http facade.)The PHPUnit update is irrelevant to Laravel and introduces no new integration pathways. The package’s core—Spiral-specific bootstrapping, service binding, and testing assertions—remains unusable in Laravel.
No stack fit exists, and the 3.0.0 release introduces no changes to address Laravel compatibility. The package’s hardcoded dependencies (e.g., spiral/core, spiral/testing) and initialization logic (Testing::boot()) are fundamentally incompatible with Laravel’s ecosystem. Key barriers persist:
Inject annotations and Psr\Container cannot be mapped to Laravel’s bind()/singleton() without a full abstraction layer (effectively a rewrite).Kernel-dependent Testing::boot() has no Laravel equivalent (Laravel uses Artisan or ServiceProvider hooks).Assert and mocking utilities are independent of Laravel’s phpunit.xml and TestCase classes.HttpClient and middleware stack is incompatible with Laravel’s Http facade and middleware pipeline.Migration path: None. The only viable actions are:
laravel/dusk).ServiceProvider shim), but this would require:
Inject-based service resolution for Laravel’s container.Kernel and HttpClient (high maintenance burden).Sequencing: Irrelevant—integration is fundamentally broken. Any hypothetical steps would involve:
spiral/core dependencies).Testing with Laravel’s phpunit.xml + TestCase classes.Spiral\Testing\Assert → Laravel’s Assert or Mockery).composer.overrides or a custom phpunit.xml).Maintenance: Unsustainable. Attempting to integrate this package into Laravel would require:
Kernel, Inject, and HttpClient (prone to breakage with Spiral updates).ClassNotFound for Spiral\Kernel).Support: Nonexistent. The package’s documentation, issue tracker, and community focus solely on Spiral, offering zero Laravel-specific guidance. Debugging would require:
spiral/testing source code).spiral/core and Laravel’s illuminate/container.Scaling: Irrelevant. The package cannot function in Laravel, so scaling concerns (e.g., parallel tests, distributed testing) are moot. Any "scaling" would require:
Testing layer to Laravel’s phpunit.xml and TestCase structure.Failure Modes (unchanged but exacerbated by PHPUnit 13.x):
Testing::boot() would throw ClassNotFound for Spiral\Kernel.phpunit (e.g., laravel/framework pins 10.x).Inject-annotated classes.Artisan or ServiceProvider hooks required by Laravel.Ramp-Up:
@test syntax or Testbench’s createApplication()).Recommendation: Do not use this package in Laravel. The 3.0.0 release is a non-event for Laravel users, as it introduces no compatibility improvements. Proceed with:
How can I help you explore Laravel packages today?