From a79232cbc9a3edb4ccd2bccec8d21417c076dc1e Mon Sep 17 00:00:00 2001 From: corgab Date: Tue, 8 Sep 2026 18:16:09 +0000 Subject: [PATCH] refactor: drop the unused missingDependencies() factory and the unreachable testbench ^10 range PythonEnvironmentException::missingDependencies() was never called from src/; AetherInstallCommand reports missing Braket packages through console output instead, so the factory and its only test are removed. orchestra/testbench ^10.0 requires laravel/framework ^12 while this package requires illuminate/* ^13.0, so Composer could never select that branch. The constraint now states the one version that actually resolves. Closes #70 --- composer.json | 2 +- src/Exceptions/PythonEnvironmentException.php | 8 -------- tests/Unit/Exceptions/ExceptionHierarchyTest.php | 7 ------- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/composer.json b/composer.json index a264b43..0c9b990 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "symfony/process": "^7.0" }, "require-dev": { - "orchestra/testbench": "^10.0|^11.0", + "orchestra/testbench": "^11.0", "phpunit/phpunit": "^11.0|^12.0", "pestphp/pest": "^3.0|^4.0", "larastan/larastan": "^3.0", diff --git a/src/Exceptions/PythonEnvironmentException.php b/src/Exceptions/PythonEnvironmentException.php index 93e78d6..c830e15 100644 --- a/src/Exceptions/PythonEnvironmentException.php +++ b/src/Exceptions/PythonEnvironmentException.php @@ -16,12 +16,4 @@ public static function pythonNotFound(string $path): self { return new self("Python binary not found at [{$path}]. Check the 'python_path' configuration."); } - - /** - * Create an exception for missing Python package dependencies. - */ - public static function missingDependencies(string $details): self - { - return new self("Required Python dependencies are missing: {$details}"); - } } diff --git a/tests/Unit/Exceptions/ExceptionHierarchyTest.php b/tests/Unit/Exceptions/ExceptionHierarchyTest.php index 10064e7..bec0903 100644 --- a/tests/Unit/Exceptions/ExceptionHierarchyTest.php +++ b/tests/Unit/Exceptions/ExceptionHierarchyTest.php @@ -62,13 +62,6 @@ expect($exception->getMessage())->toContain('/usr/bin/python3'); }); -it('missing dependencies includes details', function (): void { - $exception = PythonEnvironmentException::missingDependencies('qiskit>=1.0'); - - expect($exception)->toBeInstanceOf(PythonEnvironmentException::class); - expect($exception->getMessage())->toContain('qiskit>=1.0'); -}); - // ------------------------------------------------------------------------- // DriverNotFoundException // -------------------------------------------------------------------------