diff --git a/composer.json b/composer.json index e51ba496..2298effc 100755 --- a/composer.json +++ b/composer.json @@ -21,20 +21,20 @@ "require": { "php": "^8.2", "ext-json": "*", - "dragonmantank/cron-expression": "^3.4.0", + "dragonmantank/cron-expression": "^3.4", "guzzlehttp/guzzle": "^7.9.2", - "illuminate/cache": "^11.30.0", - "illuminate/collections": "^11.30.0", - "illuminate/config": "^11.30.0", - "illuminate/console": "^11.30.0", - "illuminate/container": "^11.30.0", - "illuminate/contracts": "^11.30.0", - "illuminate/events": "^11.30.0", - "illuminate/filesystem": "^11.30.0", - "illuminate/process": "^11.30.0", - "illuminate/support": "^11.30.0", - "illuminate/testing": "^11.30.0", - "laravel-zero/foundation": "^11.5.0", + "illuminate/cache": "^12.4", + "illuminate/collections": "^12.4", + "illuminate/config": "^12.4", + "illuminate/console": "^12.4", + "illuminate/container": "^12.4", + "illuminate/contracts": "^12.4", + "illuminate/events": "^12.4", + "illuminate/filesystem": "^12.4", + "illuminate/process": "^12.4", + "illuminate/support": "^12.4", + "illuminate/testing": "^12.4", + "laravel-zero/foundation": "dev-feature/laravel-12", "laravel/prompts": "^0.3.1", "league/flysystem": "^3.29.1", "nunomaduro/collision": "^8.5.0", @@ -44,28 +44,28 @@ "nunomaduro/termwind": "^2.2.0", "psr/log": "^3.0.2", "ramsey/uuid": "^4.7.6", - "symfony/console": "^7.1.6", - "symfony/error-handler": "^7.1.6", - "symfony/event-dispatcher": "^7.1.6", - "symfony/finder": "^7.1.6", - "symfony/process": "^7.1.6", - "symfony/var-dumper": "^7.1.6", + "symfony/console": "^7.2", + "symfony/error-handler": "^7.2", + "symfony/event-dispatcher": "^7.2", + "symfony/finder": "^7.2", + "symfony/process": "^7.2", + "symfony/var-dumper": "^7.2", "vlucas/phpdotenv": "^5.6.1" }, "require-dev": { - "illuminate/bus": "^11.30.0", - "illuminate/database": "^11.30.0", - "illuminate/http": "^11.30.0", - "illuminate/log": "^11.30.0", - "illuminate/queue": "^11.30.0", - "illuminate/redis": "^11.30.0", - "illuminate/view": "^11.30.0", - "laravel-zero/phar-updater": "^1.4", - "laravel/pint": "^1.18.1", - "nunomaduro/laravel-console-dusk": "^1.13.1", - "nunomaduro/laravel-console-menu": "^3.5", - "pestphp/pest": "^3.5.1", - "phpstan/phpstan": "^1.12.7" + "illuminate/bus": "^12.4", + "illuminate/database": "^12.4", + "illuminate/http": "^12.4", + "illuminate/log": "^12.4", + "illuminate/queue": "^12.4", + "illuminate/redis": "^12.4", + "illuminate/view": "^12.4", + "laravel-zero/phar-updater": "^1.4.1", + "laravel/pint": "^1.21", + "nunomaduro/laravel-console-dusk": "^1.14", + "nunomaduro/laravel-console-menu": "^3.6", + "pestphp/pest": "^3.8", + "phpstan/phpstan": "^2.1" }, "autoload": { "psr-4": { diff --git a/src/Application.php b/src/Application.php index dc78a768..5e789219 100644 --- a/src/Application.php +++ b/src/Application.php @@ -127,6 +127,7 @@ public function registerConfiguredProviders(): void $providers->splice( 1, 0, + // @phpstan-ignore argument.type [ $this->make(PackageManifest::class) ->providers(), diff --git a/src/Commands/BuildCommand.php b/src/Commands/BuildCommand.php index 6ddffd11..f31ae1b1 100644 --- a/src/Commands/BuildCommand.php +++ b/src/Commands/BuildCommand.php @@ -82,7 +82,7 @@ public function getSubscribedSignals(): array } /** {@inheritdoc} */ - public function handleSignal(int $signal, int|false $previousExitCode = 0): int|false + public function handleSignal(int $signal, int|false $previousExitCode = 0): int { if (defined('SIGINT') && $signal === \SIGINT) { if (self::$config !== null) { diff --git a/src/Commands/InstallCommand.php b/src/Commands/InstallCommand.php index 16b33128..c1ce718c 100644 --- a/src/Commands/InstallCommand.php +++ b/src/Commands/InstallCommand.php @@ -60,6 +60,7 @@ public function handle() $option = $this->choice($title, $choices); } + // @phpstan-ignore notIdentical.alwaysTrue if ($option !== null && ! empty($this->componentInstallers[$option])) { /** @var AbstractInstaller $command */ $command = $this->app[$this->componentInstallers[$option]]; diff --git a/src/Providers/Filesystem/FilesystemServiceProvider.php b/src/Providers/Filesystem/FilesystemServiceProvider.php index ddb8ba72..5e489f13 100644 --- a/src/Providers/Filesystem/FilesystemServiceProvider.php +++ b/src/Providers/Filesystem/FilesystemServiceProvider.php @@ -54,4 +54,10 @@ protected function getDefaultConfig(): array ], ]; } + + /** Laravel Zero doesn't support serving files. */ + protected function shouldServeFiles(array $config) + { + return false; + } } diff --git a/tests/Application/bootstrap/app.php b/tests/Application/bootstrap/app.php index 1aa25091..c0f685b6 100755 --- a/tests/Application/bootstrap/app.php +++ b/tests/Application/bootstrap/app.php @@ -1,17 +1,5 @@ singleton( - Illuminate\Contracts\Console\Kernel::class, - LaravelZero\Framework\Kernel::class -); - -$app->singleton( - Illuminate\Contracts\Debug\ExceptionHandler::class, - Illuminate\Foundation\Exceptions\Handler::class -); - -return $app; +return Application::configure(basePath: dirname(__DIR__))->create(); diff --git a/tests/TestCase.php b/tests/TestCase.php index 852263cb..8b6d3e9b 100755 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -4,8 +4,8 @@ namespace Tests; +use Illuminate\Contracts\Console\Kernel; use Illuminate\Contracts\Foundation\Application as ApplicationContract; -use LaravelZero\Framework\Application; use LaravelZero\Framework\Testing\TestCase as BaseTestCase; abstract class TestCase extends BaseTestCase @@ -13,13 +13,11 @@ abstract class TestCase extends BaseTestCase /** * The application instance. * - * @var \Illuminate\Contracts\Foundation\Application + * @var ApplicationContract */ protected $app; - /** - * {@inheritdoc} - */ + /** {@inheritdoc} */ protected function setUp(): void { if (! defined('ARTISAN_BINARY')) { @@ -27,20 +25,13 @@ protected function setUp(): void } parent::setUp(); - - $this->app = $this->createApplication(); } - /** - * Creates a new instance of the application. - */ public function createApplication(): ApplicationContract { $app = require __DIR__.'/Application/bootstrap/app.php'; - Application::setInstance($app); - - $app->make(\Illuminate\Contracts\Console\Kernel::class)->bootstrap(); + $app->make(Kernel::class)->bootstrap(); return $app; }