diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 651be1b..26c80e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,15 +14,15 @@ concurrency: jobs: check_composer: name: Check composer.json - runs-on: ubuntu-latest + runs-on: ubuntu-slim steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.2' + php-version: '8.5' coverage: none - name: Validate composer.json @@ -34,11 +34,11 @@ jobs: strategy: fail-fast: false matrix: - php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] + php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] min_stability: [''] name_suffix: [''] include: - - php: '8.3' + - php: '8.5' min_stability: 'dev' name_suffix: ' (dev deps)' @@ -46,7 +46,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/CHANGES.md b/CHANGES.md index e56458a..b6fb637 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,18 @@ * Add support for PHP 5.6 +# 2.5.0 + +* Add support for PHPUnit 13 +* Add a CI job running on PHP 8.5 + +# 2.4.0 +* Add support for PHPUnit 12 + +# 2.3.0 + +* changes unmerged + # 2.2.0 * Add support for PHPUnit 11 diff --git a/composer.json b/composer.json index a12298d..a605d7d 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "require": { "php": "^5.6 || ^7 || ^8", "phpspec/prophecy": "^1.3", - "phpunit/phpunit": "^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0" + "phpunit/phpunit": "^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0" }, "autoload": { "psr-4": { @@ -31,5 +31,8 @@ "branch-alias": { "dev-master": "3.x-dev" } + }, + "config": { + "sort-packages": true } } diff --git a/src/ProphecyTrait5.php b/src/ProphecyTrait5.php index 7f42a1a..2352368 100644 --- a/src/ProphecyTrait5.php +++ b/src/ProphecyTrait5.php @@ -85,6 +85,7 @@ protected function verifyProphecyDoubles() private function countProphecyAssertions() { \assert($this instanceof TestCase); + \assert($this->prophet !== null); foreach ($this->prophet->getProphecies() as $objectProphecy) { foreach ($objectProphecy->getMethodProphecies() as $methodProphecies) { diff --git a/src/ProphecyTrait7.php b/src/ProphecyTrait7.php index e6beb23..175a73d 100644 --- a/src/ProphecyTrait7.php +++ b/src/ProphecyTrait7.php @@ -85,6 +85,7 @@ protected function verifyProphecyDoubles() private function countProphecyAssertions()/*: void*/ { \assert($this instanceof TestCase); + \assert($this->prophet !== null); foreach ($this->prophet->getProphecies() as $objectProphecy) { foreach ($objectProphecy->getMethodProphecies() as $methodProphecies) {