Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 1 addition & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
48 changes: 48 additions & 0 deletions tests/Unit/ComposerManifestTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php

declare(strict_types=1);

/**
* Guards composer.json against the undeclared dependency the package used to
* have: Illuminate\Foundation (AboutCommand, PendingDispatch, the queue
* Queueable trait and the config()/app()/event()/dispatch() helpers) ships
* only inside laravel/framework, never as a standalone illuminate/* package.
*/
if (! function_exists('composerRequire')) {
function composerRequire(): array
{
$manifest = json_decode((string) file_get_contents(__DIR__.'/../../composer.json'), true, flags: JSON_THROW_ON_ERROR);

return $manifest['require'];
}

}

if (! function_exists('srcUsesFoundation')) {
function srcUsesFoundation(): bool
{
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator(__DIR__.'/../../src')) as $file) {
if (! $file->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();
});