diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a95411..c49fc43 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.3', '7.4'] + php: ['7.3', '7.4', '8.0', '8.1'] name: PHP ${{ matrix.php }} steps: - name: Checkout @@ -26,7 +26,11 @@ jobs: - name: Install dependencies run: make vendor - name: Make + if: ${{ startsWith(matrix.php, '7.') }} run: make ci + - name: Make + if: ${{ startsWith(matrix.php, '8.') }} + run: make test - name: Upload coverage reports if: success() run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index de1f064..726b51a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,12 @@ # Phony for PHPUnit changelog +## Next release + +This release uses *Phony* `5.x`. There no BC breaking API changes. + ## 7.0.0 (2020-02-12) +- **[BC BREAK]** PHP 7.2 is no longer supported. - **[BC BREAK]** Dropped support for PHPUnit `8.x`. - **[NEW]** Added support for PHPUnit `9.x`. diff --git a/Makefile b/Makefile index 3f9b56c..4fbb4d6 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,9 @@ # Powered by https://makefiles.dev/ +PHP_COMPOSER_INSTALL_ARGS += --ignore-platform-reqs + +################################################################################ + -include .makefiles/Makefile -include .makefiles/pkg/php/v1/Makefile diff --git a/composer.json b/composer.json index 53352b2..b183781 100644 --- a/composer.json +++ b/composer.json @@ -12,8 +12,8 @@ } ], "require": { - "php": ">=7.3", - "eloquent/phony": "^4", + "php": "^7.3 || ^8", + "eloquent/phony": "^5", "phpunit/phpunit": "^9" }, "require-dev": { @@ -42,7 +42,7 @@ }, "extra": { "branch-alias": { - "dev-master": "6.1.x-dev" + "dev-master": "7.2.x-dev" } } } diff --git a/test/suite/PhonyTest.php b/test/suite/PhonyTest.php index 99dda77..95b4e95 100644 --- a/test/suite/PhonyTest.php +++ b/test/suite/PhonyTest.php @@ -274,7 +274,7 @@ public function testStubGlobal(): void $this->assertInstanceOf(StubVerifier::class, $actual); $this->assertSame('a, b', TestNamespace\sprintf('%s, %s', 'a', 'b')); - $this->assertNull(TestNamespace\sprintf('x', 'y')); + $this->assertEmpty(TestNamespace\sprintf('x', 'y')); $this->assertTrue((bool) $actual->calledWith('%s, %s', 'a', 'b')); } @@ -285,7 +285,7 @@ public function testStubGlobalFunction(): void $this->assertInstanceOf(StubVerifier::class, $actual); $this->assertSame('a, b', TestNamespace\vsprintf('%s, %s', ['a', 'b'])); - $this->assertNull(TestNamespace\vsprintf('x', 'y')); + $this->assertEmpty(TestNamespace\vsprintf('x', ['y'])); $this->assertTrue((bool) $actual->calledWith('%s, %s', ['a', 'b'])); } @@ -294,8 +294,8 @@ public function testRestoreGlobalFunctions(): void Phony::stubGlobal('sprintf', TestNamespace::class); Phony::stubGlobal('vsprintf', TestNamespace::class); - $this->assertNull(TestNamespace\sprintf('%s, %s', 'a', 'b')); - $this->assertNull(TestNamespace\vsprintf('%s, %s', ['a', 'b'])); + $this->assertEmpty(TestNamespace\sprintf('%s, %s', 'a', 'b')); + $this->assertEmpty(TestNamespace\vsprintf('%s, %s', ['a', 'b'])); Phony::restoreGlobalFunctions(); @@ -308,8 +308,8 @@ public function testRestoreGlobalFunctionsFunction(): void stubGlobal('sprintf', TestNamespace::class); stubGlobal('vsprintf', TestNamespace::class); - $this->assertNull(TestNamespace\sprintf('%s, %s', 'a', 'b')); - $this->assertNull(TestNamespace\vsprintf('%s, %s', ['a', 'b'])); + $this->assertEmpty(TestNamespace\sprintf('%s, %s', 'a', 'b')); + $this->assertEmpty(TestNamespace\vsprintf('%s, %s', ['a', 'b'])); restoreGlobalFunctions();