diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 6d76b72..32d4001 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -10,17 +10,12 @@ jobs: test: strategy: matrix: - php-versions: [ '7.4', '8.0', '8.1' ] - include: - - php-versions: '7.4' - coverage: pcov - composer-prefer: '--prefer-lowest --prefer-stable' - phpunit-flags: '--coverage-clover coverage.xml' + php-versions: [ '8.2', '8.3', '8.4', '8.5' ] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up PHP uses: shivammathur/setup-php@v2 @@ -33,7 +28,7 @@ jobs: - name: Cache Composer packages id: composer-cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: vendor key: ${{ runner.os }}-composer-${{ matrix.composer-prefer }}$-${{ hashFiles('**/composer.lock') }} @@ -45,10 +40,3 @@ jobs: - name: Run phpspec run: vendor/bin/phpspec run --config phpspec.yml.ci - continue-on-error: true - - - name: Upload coverage - if: matrix.coverage - run: | - wget https://scrutinizer-ci.com/ocular.phar - php ocular.phar code-coverage:upload --format=php-clover coverage.clover --revision=${{ github.event.pull_request.head.sha || github.sha }} diff --git a/composer.json b/composer.json index 29bd28b..e43c277 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "require": { "php": "^5.6 || ^7.0 || ^8.0", "portphp/portphp": "^1.1", - "symfony/console": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0" + "symfony/console": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0" }, "autoload": { "psr-4": { @@ -33,8 +33,8 @@ } }, "require-dev": { - "phpspec/phpspec": "^7.2", - "friends-of-phpspec/phpspec-code-coverage" : "^6.1" + "phpspec/phpspec": "^7.2 || ^8.0", + "friends-of-phpspec/phpspec-code-coverage" : "^6.1 || ^7.0" }, "extra": { "branch-alias": { diff --git a/phpspec.yml.ci b/phpspec.yml.ci index 6f44e94..94caa4c 100644 --- a/phpspec.yml.ci +++ b/phpspec.yml.ci @@ -4,7 +4,7 @@ suites: psr4_prefix: Port\SymfonyConsole formatter.name: pretty extensions: - - PhpSpec\Extension\CodeCoverageExtension + FriendsOfPhpSpec\PhpSpec\CodeCoverage\CodeCoverageExtension: ~ code_coverage: format: clover output: coverage.clover diff --git a/spec/ProgressWriterSpec.php b/spec/ProgressWriterSpec.php index 6ec8d47..002178a 100644 --- a/spec/ProgressWriterSpec.php +++ b/spec/ProgressWriterSpec.php @@ -23,7 +23,7 @@ function it_is_initializable() function it_writes_items(CountableReader $reader, OutputInterface $output, OutputFormatterInterface $outputFormatter) { $outputFormatter->isDecorated()->willReturn(false); - $outputFormatter->setDecorated(false)->willReturn(); + $outputFormatter->setDecorated(false)->shouldBeCalled(); $outputFormatter->format(Argument::any())->willReturn(null); $reader->count()->willReturn(2);