Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Testing Laravel Package

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+.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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:

  • Core framework mismatch persists: Spiral’s spiral/core and spiral/testing are fundamentally incompatible with Laravel’s illuminate/container and laravel/framework (which pins PHPUnit 10.x).
  • No Laravel-specific adaptations: The release notes confirm zero changes to Spiral’s testing layer (e.g., Testing::boot(), Inject annotations, or Kernel-dependent bootstrapping).
  • Dependency conflict escalation: PHPUnit 13.x is incompatible with Laravel’s default testing stack (PHPUnit 10.x via laravel/framework), risking:
    • Broken test suites if forcibly integrated.
    • CI/CD failures due to unresolved version constraints.
  • Architectural divergence remains: Spiral’s Psr\Container-based service resolution and Laravel’s Illuminate\Container are irreconcilable without a full rewrite.

Key questions remain unanswered (unchanged from prior assessment):

  1. Was this package mistakenly referenced for Laravel? (No evidence of Laravel support exists in 3.0.0.)
  2. Does the team understand the framework mismatch? (No Laravel-specific documentation or examples.)
  3. Are Laravel-native alternatives (Pest, Testbench, Dusk) being overlooked? (Still the superior choice.)
  4. Would a custom wrapper be viable? (Impractical due to deep architectural differences, e.g., Spiral’s 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.


Integration Approach

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:

  • Service Container: Spiral’s Inject annotations and Psr\Container cannot be mapped to Laravel’s bind()/singleton() without a full abstraction layer (effectively a rewrite).
  • Bootstrapping: Spiral’s Kernel-dependent Testing::boot() has no Laravel equivalent (Laravel uses Artisan or ServiceProvider hooks).
  • Testing Layer: Spiral’s Assert and mocking utilities are independent of Laravel’s phpunit.xml and TestCase classes.
  • HTTP/Client: Spiral’s HttpClient and middleware stack is incompatible with Laravel’s Http facade and middleware pipeline.

Migration path: None. The only viable actions are:

  1. Abandon this package and adopt Laravel’s native tools (e.g., Pest, Testbench, or laravel/dusk).
  2. Evaluate a custom wrapper (e.g., a ServiceProvider shim), but this would require:
    • Rewriting Spiral’s Inject-based service resolution for Laravel’s container.
    • Mocking Spiral’s Kernel and HttpClient (high maintenance burden).
    • Resolving PHPUnit 13.x conflicts with Laravel’s PHPUnit 10.x.
  3. Migrate the entire application to Spiral if the team is committed to Spiral’s ecosystem.

Sequencing: Irrelevant—integration is fundamentally broken. Any hypothetical steps would involve:

  1. Isolating Spiral-specific code (e.g., spiral/core dependencies).
  2. Replacing Spiral’s Testing with Laravel’s phpunit.xml + TestCase classes.
  3. Rewriting Spiral-specific assertions/mocks (e.g., Spiral\Testing\Assert → Laravel’s Assert or Mockery).
  4. Mitigating PHPUnit version conflicts (e.g., via composer.overrides or a custom phpunit.xml).

Operational Impact

Maintenance: Unsustainable. Attempting to integrate this package into Laravel would require:

  • Custom shims for Spiral’s Kernel, Inject, and HttpClient (prone to breakage with Spiral updates).
  • Manual syncing of PHPUnit versions (13.x vs. Laravel’s 10.x), risking CI/CD failures.
  • High debugging overhead due to Spiral-specific error messages (e.g., 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:

  • Reverse-engineering Spiral’s internals (e.g., spiral/testing source code).
  • Resolving conflicts between Spiral’s 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:

  • Rewriting the package’s core for Laravel’s architecture.
  • Adapting Spiral’s Testing layer to Laravel’s phpunit.xml and TestCase structure.

Failure Modes (unchanged but exacerbated by PHPUnit 13.x):

  • Test bootstrapping failures: Testing::boot() would throw ClassNotFound for Spiral\Kernel.
  • Dependency conflicts: PHPUnit 13.x may break Laravel’s phpunit (e.g., laravel/framework pins 10.x).
  • Service resolution errors: Laravel’s container cannot instantiate Spiral’s Inject-annotated classes.
  • Environment mismatches: Missing Artisan or ServiceProvider hooks required by Laravel.
  • CI/CD pipeline breaks: Version conflicts between PHPUnit 13.x and Laravel’s dependencies.

Ramp-Up:

  • High for developers attempting adaptation (wasted effort on a non-viable path).
  • Zero for Laravel-native alternatives (e.g., Pest’s @test syntax or Testbench’s createApplication()).
  • Training overhead to explain why this package cannot be used in Laravel, despite superficial similarities (e.g., both use PHPUnit).

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:

  1. Laravel’s native testing tools (Pest, Testbench, Dusk).
  2. A full framework migration if Spiral is the intended target.
  3. No further evaluation of this package for Laravel integration.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment