Skip to content

Commit

Permalink
PHP 8 + Laravel 8 minimum
Browse files Browse the repository at this point in the history
  • Loading branch information
shalvah committed Jun 23, 2022
1 parent 9e3d35d commit b9f9fa3
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 39 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Tests

on:
push:
branches: [master]
branches: [master, v4]
pull_request:

jobs:
Expand All @@ -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 }})

Expand Down
24 changes: 12 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
1 change: 0 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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#'
Expand Down
7 changes: 0 additions & 7 deletions src/Commands/GenerateDocumentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
7 changes: 0 additions & 7 deletions src/Commands/Upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
8 changes: 1 addition & 7 deletions src/Tools/ErrorHandlingUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/Tools/Globals.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit b9f9fa3

Please sign in to comment.