diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index d0f85ff0..1dc0177e 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -3,28 +3,6 @@ name: Static Analysis on: ['push', 'pull_request'] jobs: - cs: - runs-on: ubuntu-latest - - name: Code Style - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 7.4 - tools: composer - coverage: none - - - name: Install Dependencies - run: composer update --no-interaction --prefer-dist --no-progress --ansi - - - name: Run PHP-CS-Fixer - run: vendor/bin/php-cs-fixer fix -v --allow-risky=yes --dry-run --ansi - phpstan: runs-on: ubuntu-latest strategy: @@ -40,7 +18,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 7.4 + php-version: 8.0 tools: composer coverage: none diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8943827b..8e2b70c3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: true matrix: - php: [7.4, 8.0] + php: [7.4, 8.0, 8.1] dependency-version: [prefer-lowest, prefer-stable] name: PHP ${{ matrix.php }} ${{ matrix.dependency-version }} @@ -28,6 +28,10 @@ jobs: tools: composer coverage: none + - name: Mimic PHP 8.0 + run: composer config platform.php 8.0.999 + if: matrix.php > 8 + - name: Setup Problem Matchers run: | echo "::add-matcher::${{ runner.tool_cache }}/php.json" diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php deleted file mode 100644 index 65943652..00000000 --- a/.php-cs-fixer.php +++ /dev/null @@ -1,35 +0,0 @@ -in(__DIR__ . DIRECTORY_SEPARATOR . 'tests') - ->notPath(__DIR__ . DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR . 'laravel') - ->in(__DIR__ . DIRECTORY_SEPARATOR . 'src') - ->append(['.php-cs-fixer.php']); - -$rules = [ - '@Symfony' => true, - 'phpdoc_no_empty_return' => false, - 'array_syntax' => ['syntax' => 'short'], - 'yoda_style' => false, - 'declare_strict_types' => true, - 'braces' => false, - 'phpdoc_indent' => false, - 'protected_to_private' => false, - 'binary_operator_spaces' => [ - 'operators' => [ - '=>' => 'align', - '=' => 'align', - ], - ], - 'concat_space' => ['spacing' => 'one'], - 'not_operator_with_space' => false, -]; - -$rules['increment_style'] = ['style' => 'post']; - -return (new PhpCsFixer\Config()) - ->setUsingCache(true) - ->setRules($rules) - ->setFinder($finder); diff --git a/.scrutinizer.yml b/.scrutinizer.yml deleted file mode 100644 index 5acd9167..00000000 --- a/.scrutinizer.yml +++ /dev/null @@ -1,20 +0,0 @@ -checks: - php: - code_rating: true - duplication: true - -filter: - excluded_paths: - - tests/* - -build: - environment: - php: - version: '7.2' - tests: - override: - - - command: 'vendor/bin/phpunit --coverage-clover=coverage.clover' - coverage: - file: 'coverage.clover' - format: 'clover' diff --git a/composer.json b/composer.json index d4a659ac..2eb3ae5a 100644 --- a/composer.json +++ b/composer.json @@ -16,18 +16,17 @@ "require": { "php": "^7.3 || ^8.0", "facade/ignition-contracts": "^1.0", - "filp/whoops": "^2.7.2", + "filp/whoops": "^2.14.3", "symfony/console": "^5.0" }, "require-dev": { "brianium/paratest": "^6.1", "fideloper/proxy": "^4.4.1", - "friendsofphp/php-cs-fixer": "^3.0", "fruitcake/laravel-cors": "^2.0.3", - "laravel/framework": "^8.0 || ^9.0", + "laravel/framework": "8.x-dev", "nunomaduro/larastan": "^0.6.2", "nunomaduro/mock-final-classes": "^1.0", - "orchestra/testbench": "^6.0 || ^7.0", + "orchestra/testbench": "^6.0", "phpstan/phpstan": "^0.12.64", "phpunit/phpunit": "^9.5.0" }, @@ -58,12 +57,9 @@ } }, "scripts": { - "lint": "php-cs-fixer fix -v --allow-risky=yes", "test:types": "phpstan analyse --ansi", "test:unit": "phpunit --colors=always", - "test:lint": "php-cs-fixer fix -v --dry-run --allow-risky=yes", "test": [ - "@test:lint", "@test:types", "@test:unit" ] diff --git a/tests/Unit/Adapters/PhpunitTest.php b/tests/Unit/Adapters/PhpunitTest.php index ebf572ca..51fa8104 100755 --- a/tests/Unit/Adapters/PhpunitTest.php +++ b/tests/Unit/Adapters/PhpunitTest.php @@ -30,6 +30,7 @@ public function itIsAPrinter(): void public function itDoNotHandlesTestThatAreNotTestCases(): void { $test = new class() implements Test { + #[\ReturnTypeWillChange] public function count() { return 0;