Skip to content
This repository was archived by the owner on Jul 8, 2023. It is now read-only.

Commit 00b3f78

Browse files
committed
Upgrade to Phony 5.x
1 parent 510b076 commit 00b3f78

File tree

5 files changed

+23
-10
lines changed

5 files changed

+23
-10
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
php: ['7.3', '7.4']
13+
php: ['7.3', '7.4', '8.0', '8.1']
1414
name: PHP ${{ matrix.php }}
1515
steps:
1616
- name: Checkout
@@ -26,7 +26,11 @@ jobs:
2626
- name: Install dependencies
2727
run: make vendor
2828
- name: Make
29+
if: ${{ startsWith(matrix.php, '7.') }}
2930
run: make ci
31+
- name: Make
32+
if: ${{ startsWith(matrix.php, '8.') }}
33+
run: make test
3034
- name: Upload coverage reports
3135
if: success()
3236
run: |

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
# Phony for PHPUnit changelog
22

3+
## Next release
4+
5+
This release uses *Phony* `5.x`. There no BC breaking API changes.
6+
37
## 7.0.0 (2020-02-12)
48

9+
- **[BC BREAK]** PHP 7.2 is no longer supported.
510
- **[BC BREAK]** Dropped support for PHPUnit `8.x`.
611
- **[NEW]** Added support for PHPUnit `9.x`.
712

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Powered by https://makefiles.dev/
22

3+
PHP_COMPOSER_INSTALL_ARGS += --ignore-platform-reqs
4+
5+
################################################################################
6+
37
-include .makefiles/Makefile
48
-include .makefiles/pkg/php/v1/Makefile
59

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
}
1313
],
1414
"require": {
15-
"php": ">=7.3",
16-
"eloquent/phony": "^4",
15+
"php": "^7.3 || ^8",
16+
"eloquent/phony": "^5",
1717
"phpunit/phpunit": "^9"
1818
},
1919
"require-dev": {
@@ -42,7 +42,7 @@
4242
},
4343
"extra": {
4444
"branch-alias": {
45-
"dev-master": "6.1.x-dev"
45+
"dev-master": "7.2.x-dev"
4646
}
4747
}
4848
}

test/suite/PhonyTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ public function testStubGlobal(): void
274274

275275
$this->assertInstanceOf(StubVerifier::class, $actual);
276276
$this->assertSame('a, b', TestNamespace\sprintf('%s, %s', 'a', 'b'));
277-
$this->assertNull(TestNamespace\sprintf('x', 'y'));
277+
$this->assertEmpty(TestNamespace\sprintf('x', 'y'));
278278
$this->assertTrue((bool) $actual->calledWith('%s, %s', 'a', 'b'));
279279
}
280280

@@ -285,7 +285,7 @@ public function testStubGlobalFunction(): void
285285

286286
$this->assertInstanceOf(StubVerifier::class, $actual);
287287
$this->assertSame('a, b', TestNamespace\vsprintf('%s, %s', ['a', 'b']));
288-
$this->assertNull(TestNamespace\vsprintf('x', 'y'));
288+
$this->assertEmpty(TestNamespace\vsprintf('x', ['y']));
289289
$this->assertTrue((bool) $actual->calledWith('%s, %s', ['a', 'b']));
290290
}
291291

@@ -294,8 +294,8 @@ public function testRestoreGlobalFunctions(): void
294294
Phony::stubGlobal('sprintf', TestNamespace::class);
295295
Phony::stubGlobal('vsprintf', TestNamespace::class);
296296

297-
$this->assertNull(TestNamespace\sprintf('%s, %s', 'a', 'b'));
298-
$this->assertNull(TestNamespace\vsprintf('%s, %s', ['a', 'b']));
297+
$this->assertEmpty(TestNamespace\sprintf('%s, %s', 'a', 'b'));
298+
$this->assertEmpty(TestNamespace\vsprintf('%s, %s', ['a', 'b']));
299299

300300
Phony::restoreGlobalFunctions();
301301

@@ -308,8 +308,8 @@ public function testRestoreGlobalFunctionsFunction(): void
308308
stubGlobal('sprintf', TestNamespace::class);
309309
stubGlobal('vsprintf', TestNamespace::class);
310310

311-
$this->assertNull(TestNamespace\sprintf('%s, %s', 'a', 'b'));
312-
$this->assertNull(TestNamespace\vsprintf('%s, %s', ['a', 'b']));
311+
$this->assertEmpty(TestNamespace\sprintf('%s, %s', 'a', 'b'));
312+
$this->assertEmpty(TestNamespace\vsprintf('%s, %s', ['a', 'b']));
313313

314314
restoreGlobalFunctions();
315315

0 commit comments

Comments
 (0)