cubetools/cube-common-develop
Shared development utilities and common code used across CUBE Tools projects. Install via Composer in your dev dependencies to reuse helpers and standardize tooling while building and maintaining CUBE Tools packages.
Purpose Alignment: The package provides development utilities (code checks, testing helpers, and pre-commit hooks) tailored for Symfony/Laravel-like PHP projects, particularly those using CUBE Tools (likely a legacy or domain-specific framework). While Laravel and Symfony share some commonalities (e.g., dependency injection, testing layers), this package is Symfony-centric (e.g., WebTestBase for Symfony’s WebTestCase, SymfonyLoadableTest).
HttpTests, Dusk), but this package could complement legacy Symfony-inspired Laravel projects or those using Laravel + Symfony components.check-commit-cube.sh) for code quality (e.g., Twig template checks, route validation).SmoketestPageLoadingBase, BaseTest) for integration/smoke tests.bin/console integration).Laravel-Specific Gaps:
service.yaml is used).Kernel or WebTestCase (Laravel uses HttpKernel or Testing facade).bin/console), though Laravel’s artisan could wrap them.BaseTest and SmoketestPageLoadingBase classes would need abstraction layers to work with Laravel’s HttpTests or PestPHP.WebTestCase in a Laravel-compatible trait or use dependency injection to mock the container.service.yaml tag checks or bin/console commands would require custom Laravel implementations (e.g., Artisan commands or service providers).HttpKernel) may not align with Laravel’s Illuminate\Http.SmoketestPageLoadingBase to Laravel’s Http client or Dusk could introduce flaky tests if not carefully abstracted.Why Use This Package?
HttpKernel, WebTestCase)?laravel-shift/blueprint, or spatie/laravel-test-tools) achieve the same goals with lower risk?Migration Strategy
service.yaml) be translated to Laravel’s config/services.php?Maintenance Plan
Testing Impact
SmoketestPageLoadingBase add value or introduce duplication compared to Laravel’s HttpTests?WebTestCase to Laravel’s HttpTests).Kernel or service.yaml without abstraction.| Package Feature | Laravel Equivalent/Adapter | Integration Strategy |
|---|---|---|
check-commit-cube.sh |
Laravel + roave/security-advisories + Git hooks |
Replace with Laravel’s native tools or wrap in a composer script. |
SmoketestPageLoadingBase |
Laravel HttpTests or PestPHP |
Create a Laravel-compatible trait or service. |
| PHPStan/PHPUnit checks | Laravel’s built-in PHPUnit or PestPHP | Use as-is via composer require-dev. |
bin/console |
Laravel’s artisan |
Replace with custom Artisan commands. |
Phase 1: Low-Risk Adoption (1-2 weeks)
composer require --dev cubetools/cube-common-develop
check-commit-cube.sh for pre-commit checks (adapt paths for Laravel).composer.json scripts.BaseTest) until compatibility is confirmed.Phase 2: Testing Integration (2-4 weeks)
SmoketestPageLoadingBase to a Laravel HttpTestCase trait.ContainerInterface).Phase 3: Full Integration (Ongoing)
service.yaml checks with Laravel’s config/ validation.bin/console commands to Artisan.symfony/http-kernel, symfony/framework-bundle: Conflict with Laravel’s illuminate/http.if (class_exists(Symfony\Kernel))).- name: Run Cube Common Checks
run: vendor/bin/check-commit-cube.sh
laravel-shift/blueprint (for testing).spatie/laravel-test-tools (for HTTP assertions).How can I help you explore Laravel packages today?