Skip to content

Commit

Permalink
Merge pull request #6 from facile-it/allow-php-8
Browse files Browse the repository at this point in the history
Add PHP 8 in CI
  • Loading branch information
Jean85 authored Mar 4, 2021
2 parents 435ef44 + 18b80f7 commit 57477c0
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@ jobs:
strategy:
matrix:
php:
- '8.0'
- '7.4'
- '7.3'
- '7.2'
symfony: ['']
experimental: [false]
include:
# - description: 'nightly'
# os: 'ubuntu-latest'
# php: '8.0'
- symfony: '^4.4'
os: 'ubuntu-latest'
php: '7.4'
Expand All @@ -33,14 +30,16 @@ jobs:
php: '7.4'
- description: 'Prefer lowest'
os: 'ubuntu-latest'
php: '7.2'
php: '7.3'
dependencies: '--prefer-lowest'
env:
SYMFONY_DEPRECATIONS_HELPER: 'disabled'

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 2 # needed by codecov sometimes
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## Unreleased
* Bump minimum PHP required version to 7.2 (#1)
* Bump minimum PHP required version to 7.3 (#1)
* Add PHP 8 support (#6)
* Add Symfony 5 support (#4)
* Add Psalm (level 1) static analysis (#5)
* Fix possible `null` when command name is not set, use FQCN of command as fallback (#5)
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
}
},
"require": {
"php": "^7.2",
"php": "^7.3 | ^8.0",
"ext-pcntl": "*",
"phpspec/prophecy-phpunit": "^2.0",
"symfony/console": "^3.4 | ^4.0 | ^5.0"
},
"require-dev": {
Expand All @@ -36,7 +37,7 @@
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^0.12.55",
"phpstan/phpstan-phpunit": "^0.12.16",
"phpunit/phpunit": "^7.5.20 | ^8.5.3",
"phpunit/phpunit": "^8.5.14 | ^9.5.2",
"symfony/phpunit-bridge": "^5.2",
"vimeo/psalm": "^4.6"
}
Expand Down
3 changes: 3 additions & 0 deletions tests/E2E/TerminateCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
namespace Facile\TerminableLoop\Tests\E2E;

use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Symfony\Component\Process\Process;

class TerminateCommandTest extends TestCase
{
use ProphecyTrait;

private const BASH_COMMAND = __DIR__ . '/../../bin/terminable-loop-command.sh';
private const CONSOLE_COMMAND = __DIR__ . '/../Stub/console';
private const STUB_COMMAND = 'stub:terminable:sleep';
Expand Down
3 changes: 3 additions & 0 deletions tests/Unit/AbstractTerminableCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@
use Facile\TerminableLoop\AbstractTerminableCommand;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use Symfony\Bridge\PhpUnit\ClockMock;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class AbstractTerminableCommandTest extends TestCase
{
use ProphecyTrait;

public static function setUpBeforeClass(): void
{
ClockMock::register(AbstractTerminableCommand::class);
Expand Down

0 comments on commit 57477c0

Please sign in to comment.