diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2f04815..83d3e16 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,7 +30,7 @@ jobs: - name: Install dependencies run: | - composer require "illuminate/support:${{ matrix.laravel }}" "illuminate/console:${{ matrix.laravel }}" "illuminate/contracts:${{ matrix.laravel }}" "illuminate/database:${{ matrix.laravel }}" --no-interaction --no-update + composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update composer update --prefer-dist --no-interaction - name: Check code style diff --git a/CLAUDE.md b/CLAUDE.md index bdc8121..4af36e1 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -53,6 +53,7 @@ Quantum (Facade) - **PythonBridge** only passes non-null env vars to preserve boto3 credential chain (IAM Roles). - **QPU safety:** Drivers with `synchronous_safe: false` throw on `->run()` to prevent HTTP timeouts. - **EntropyGenerator::integer()** uses rejection sampling on a 256-bit batch buffer — never modulo. +- **composer.json requires laravel/framework, not illuminate/* components:** the package uses `Illuminate\Foundation` (AboutCommand, PendingDispatch, the `config()`/`app()`/`event()`/`dispatch()` helpers), which only ships inside the framework. The CI matrix pins `laravel/framework` per Laravel version; `tests/Unit/ComposerManifestTest.php` guards the requirement. ## Config diff --git a/composer.json b/composer.json index a264b43..9bbdc7a 100644 --- a/composer.json +++ b/composer.json @@ -18,10 +18,7 @@ }, "require": { "php": "^8.3", - "illuminate/console": "^13.0", - "illuminate/contracts": "^13.0", - "illuminate/database": "^13.0", - "illuminate/support": "^13.0", + "laravel/framework": "^13.0", "symfony/process": "^7.0" }, "require-dev": { diff --git a/tests/Unit/ComposerManifestTest.php b/tests/Unit/ComposerManifestTest.php new file mode 100644 index 0000000..49a592e --- /dev/null +++ b/tests/Unit/ComposerManifestTest.php @@ -0,0 +1,48 @@ +isFile() || $file->getExtension() !== 'php') { + continue; + } + + $source = (string) file_get_contents($file->getPathname()); + + if (str_contains($source, 'Illuminate\\Foundation\\') + || preg_match('/\b(config|app|event|dispatch|report|base_path|config_path)\(/', $source) === 1) { + return true; + } + } + + return false; + } +} + +it('requires laravel/framework', function () { + expect(composerRequire())->toHaveKey('laravel/framework'); +}); + +it('needs the framework because src uses Illuminate\Foundation classes or helpers', function () { + // If this ever turns false the package could move back to illuminate/* components. + expect(srcUsesFoundation())->toBeTrue(); +});