diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 8bc80c4c..ac1c7b5a 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -2,7 +2,7 @@ name: Tests on: push: - branches: [master] + branches: [master, v4] pull_request: jobs: @@ -13,12 +13,11 @@ jobs: php: - '8.1' - '8.0' - - '7.4' deps: - highest include: - - {php: '7.4', deps: lowest} - - {php: '7.4', deps: dingo} + - {php: '8.0', deps: lowest} + - {php: '8.0', deps: dingo} name: Tests (PHP ${{ matrix.php }} - ${{ matrix.deps }}) diff --git a/composer.json b/composer.json index df00edf6..ab8b75b2 100644 --- a/composer.json +++ b/composer.json @@ -16,39 +16,39 @@ } ], "require": { - "php": ">=7.4", + "php": ">=8.0", "ext-fileinfo": "*", "ext-json": "*", "ext-pdo": "*", "erusev/parsedown": "1.7.4", "fakerphp/faker": "^1.9.1", - "illuminate/console": "^6.0|^7.0|^8.0|^9.0", - "illuminate/routing": "^6.0|^7.0|^8.0|^9.0", - "illuminate/support": "^6.0|^7.0|^8.0|^9.0", + "illuminate/console": "^8.0|^9.0", + "illuminate/routing": "^8.0|^9.0", + "illuminate/support": "^8.0|^9.0", "league/flysystem": "^1.1.4|^2.1.1|^3.0", "mpociot/reflection-docblock": "^1.0.1", "nikic/php-parser": "^4.10", - "nunomaduro/collision": "^3.0|^4.0|^5.0|^6.0", - "ramsey/uuid": "^3.8|^4.0", + "nunomaduro/collision": "^5.10|^6.0", + "ramsey/uuid": "^4.2.2", "shalvah/clara": "^3.1.0", "shalvah/upgrader": "0.*", "spatie/data-transfer-object": "^2.6|^3.0", - "symfony/var-exporter": "^4.0|^5.0|^6.0", - "symfony/yaml": "^4.0|^5.0|^6.0" + "symfony/var-exporter": "^5.4|^6.0", + "symfony/yaml": "^5.4|^6.0" }, "require-dev": { "brianium/paratest": "^6.0", "dms/phpunit-arraysubset-asserts": "^0.2.0", "laravel/legacy-factories": "^1.3.0", - "laravel/lumen-framework": "^6.0|^7.0|^8.0|^9.0", + "laravel/lumen-framework": "^8.0|^9.0", "league/fractal": "^0.19.0", "nikic/fast-route": "^1.3", - "orchestra/testbench": "^4.0|^5.0|^6.0|^7.0", + "orchestra/testbench": "^6.0|^7.0", "pestphp/pest": "^1.21", "phpstan/phpstan": "^1.0", "phpunit/phpunit": "^9.0|^10.0", - "symfony/css-selector": "^5.3|^6.0", - "symfony/dom-crawler": "^5.3|^6.0" + "symfony/css-selector": "^5.4|^6.0", + "symfony/dom-crawler": "^5.4|^6.0" }, "autoload": { "psr-4": { diff --git a/phpstan.neon b/phpstan.neon index 89bb3650..589333a2 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -7,7 +7,6 @@ parameters: - '#Call to an undefined method Illuminate\\Routing\\Route::versions\(\).#' - '#Call to an undefined method Illuminate\\Contracts\\Validation\\Validator::getRules\(\).#' - '#Call to an undefined method ReflectionType::getName\(\).#' - - '#(.*)NunoMaduro\\Collision(.*)#' - '#.+Dingo.+#' - '#Call to an undefined method Illuminate\\Contracts\\Filesystem\\Filesystem::path\(\)#' - '#Access to an undefined property Illuminate\\Support\\HigherOrderCollectionProxy#' diff --git a/src/Commands/GenerateDocumentation.php b/src/Commands/GenerateDocumentation.php index 4e8eb735..d95f6395 100644 --- a/src/Commands/GenerateDocumentation.php +++ b/src/Commands/GenerateDocumentation.php @@ -37,13 +37,6 @@ class GenerateDocumentation extends Command protected string $configName; - public function newLine($count = 1) - { - // TODO Remove when Laravel 6 is no longer supported - $this->getOutput()->write(str_repeat("\n", $count)); - return $this; - } - public function handle(RouteMatcherInterface $routeMatcher, GroupedEndpointsFactory $groupedEndpointsFactory): void { $this->bootstrap(); diff --git a/src/Commands/Upgrade.php b/src/Commands/Upgrade.php index cfb035b9..133a0d27 100644 --- a/src/Commands/Upgrade.php +++ b/src/Commands/Upgrade.php @@ -11,13 +11,6 @@ class Upgrade extends Command protected $description = ''; - public function newLine($count = 1) - { - // TODO Remove when Laravel 6 is no longer supported - $this->getOutput()->write(str_repeat("\n", $count)); - return $this; - } - public function handle(): void { $oldConfig = config('scribe'); diff --git a/src/Tools/ErrorHandlingUtils.php b/src/Tools/ErrorHandlingUtils.php index 77703611..6b237e34 100644 --- a/src/Tools/ErrorHandlingUtils.php +++ b/src/Tools/ErrorHandlingUtils.php @@ -31,13 +31,7 @@ public static function dumpExceptionIfVerbose(\Throwable $e, $completelySilent = public static function dumpException(\Throwable $e): void { $output = new ConsoleOutput(OutputInterface::VERBOSITY_VERBOSE); - try { - $handler = new \NunoMaduro\Collision\Handler(new \NunoMaduro\Collision\Writer(null, $output)); - } catch (\Throwable $error) { - // Version 3 used a different API - // todo remove when Laravel 7 is minimum supported - $handler = new \NunoMaduro\Collision\Handler(new \NunoMaduro\Collision\Writer($output)); - } + $handler = new \NunoMaduro\Collision\Handler(new \NunoMaduro\Collision\Writer(null, $output)); $handler->setInspector(new \Whoops\Exception\Inspector($e)); $handler->setException($e); $handler->handle(); diff --git a/src/Tools/Globals.php b/src/Tools/Globals.php index ee181527..0bd27b8c 100644 --- a/src/Tools/Globals.php +++ b/src/Tools/Globals.php @@ -4,7 +4,7 @@ class Globals { - public const SCRIBE_VERSION = '3.32.0'; + public const SCRIBE_VERSION = '4.x-dev'; public static bool $shouldBeVerbose = false;