Skip to content

Commit 57477c0

Browse files
authored
Merge pull request #6 from facile-it/allow-php-8
Add PHP 8 in CI
2 parents 435ef44 + 18b80f7 commit 57477c0

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

.github/workflows/tests.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,12 @@ jobs:
1616
strategy:
1717
matrix:
1818
php:
19+
- '8.0'
1920
- '7.4'
2021
- '7.3'
21-
- '7.2'
2222
symfony: ['']
2323
experimental: [false]
2424
include:
25-
# - description: 'nightly'
26-
# os: 'ubuntu-latest'
27-
# php: '8.0'
2825
- symfony: '^4.4'
2926
os: 'ubuntu-latest'
3027
php: '7.4'
@@ -33,14 +30,16 @@ jobs:
3330
php: '7.4'
3431
- description: 'Prefer lowest'
3532
os: 'ubuntu-latest'
36-
php: '7.2'
33+
php: '7.3'
3734
dependencies: '--prefer-lowest'
3835
env:
3936
SYMFONY_DEPRECATIONS_HELPER: 'disabled'
4037

4138
steps:
4239
- name: Checkout
4340
uses: actions/checkout@v2
41+
with:
42+
fetch-depth: 2 # needed by codecov sometimes
4443
- name: Setup PHP
4544
uses: shivammathur/setup-php@v2
4645
with:

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66
## Unreleased
7-
* Bump minimum PHP required version to 7.2 (#1)
7+
* Bump minimum PHP required version to 7.3 (#1)
8+
* Add PHP 8 support (#6)
89
* Add Symfony 5 support (#4)
910
* Add Psalm (level 1) static analysis (#5)
1011
* Fix possible `null` when command name is not set, use FQCN of command as fallback (#5)

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626
}
2727
},
2828
"require": {
29-
"php": "^7.2",
29+
"php": "^7.3 | ^8.0",
3030
"ext-pcntl": "*",
31+
"phpspec/prophecy-phpunit": "^2.0",
3132
"symfony/console": "^3.4 | ^4.0 | ^5.0"
3233
},
3334
"require-dev": {
@@ -36,7 +37,7 @@
3637
"phpstan/extension-installer": "^1.0",
3738
"phpstan/phpstan": "^0.12.55",
3839
"phpstan/phpstan-phpunit": "^0.12.16",
39-
"phpunit/phpunit": "^7.5.20 | ^8.5.3",
40+
"phpunit/phpunit": "^8.5.14 | ^9.5.2",
4041
"symfony/phpunit-bridge": "^5.2",
4142
"vimeo/psalm": "^4.6"
4243
}

tests/E2E/TerminateCommandTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@
55
namespace Facile\TerminableLoop\Tests\E2E;
66

77
use PHPUnit\Framework\TestCase;
8+
use Prophecy\PhpUnit\ProphecyTrait;
89
use Symfony\Component\Process\Process;
910

1011
class TerminateCommandTest extends TestCase
1112
{
13+
use ProphecyTrait;
14+
1215
private const BASH_COMMAND = __DIR__ . '/../../bin/terminable-loop-command.sh';
1316
private const CONSOLE_COMMAND = __DIR__ . '/../Stub/console';
1417
private const STUB_COMMAND = 'stub:terminable:sleep';

tests/Unit/AbstractTerminableCommandTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@
77
use Facile\TerminableLoop\AbstractTerminableCommand;
88
use PHPUnit\Framework\TestCase;
99
use Prophecy\Argument;
10+
use Prophecy\PhpUnit\ProphecyTrait;
1011
use Symfony\Bridge\PhpUnit\ClockMock;
1112
use Symfony\Component\Console\Input\InputInterface;
1213
use Symfony\Component\Console\Output\OutputInterface;
1314

1415
class AbstractTerminableCommandTest extends TestCase
1516
{
17+
use ProphecyTrait;
18+
1619
public static function setUpBeforeClass(): void
1720
{
1821
ClockMock::register(AbstractTerminableCommand::class);

0 commit comments

Comments
 (0)