Skip to content

Commit

Permalink
Merge pull request #22 from infection/codeception-5-support
Browse files Browse the repository at this point in the history
Drop Codeception 4 support, php < 8.0 and symfony < 5.0
  • Loading branch information
maks-rafalko committed Oct 15, 2023
2 parents 9cccc6c + baf1b4e commit 7ac1030
Show file tree
Hide file tree
Showing 18 changed files with 1,200 additions and 1,567 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/ci.yaml
Expand Up @@ -18,18 +18,15 @@ jobs:

strategy:
matrix:
php-version: ['7.4', '8.0', '8.1']
coverage-driver: [pcov]
symfony-require: ['^4', '^5', '^6']
exclude:
- symfony-require: "^6"
php-version: "7.4"
php-version: [ '8.0', '8.1', '8.2' ]
coverage-driver: [ pcov ]
symfony-require: [ '^5', '^6' ]

name: CI with PHP ${{ matrix.php-version }}, using ${{ matrix.coverage-driver }}, with Symfony ${{ matrix.symfony-require }}

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -52,7 +49,7 @@ jobs:
composer-${{ runner.os }}-${{ matrix.php-version }}-
composer-${{ runner.os }}-
composer-
- name: Configure Symfony Flex
run: composer config extra.symfony.require ${{ matrix.symfony-require }}

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/cs.yaml
Expand Up @@ -16,15 +16,15 @@ jobs:

strategy:
matrix:
operating-system: [ubuntu-latest]
php-version: ['7.4']
check: ['cs', 'static-analyze']
operating-system: [ ubuntu-latest ]
php-version: [ '8.0' ]
check: [ 'cs', 'static-analyze' ]

name: Coding Standards on PHP ${{ matrix.php-version }}

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-tests.yaml
Expand Up @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
php-version: [ '7.4', '8.0', '8.1' ]
php-version: [ '8.0', '8.1', '8.2' ]
coverage-driver: [ pcov ]

name: CI with PHP ${{ matrix.php-version }}, using ${{ matrix.coverage-driver }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/mt.yaml
Expand Up @@ -16,15 +16,15 @@ jobs:

strategy:
matrix:
operating-system: [ubuntu-latest]
php-version: ['7.4']
coverage-driver: [pcov]
operating-system: [ ubuntu-latest ]
php-version: [ '8.1' ]
coverage-driver: [ pcov ]

name: Mutation testing with PHP ${{ matrix.php-version }}, using ${{ matrix.coverage-driver }}

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
11 changes: 6 additions & 5 deletions .php-cs-fixer.php
Expand Up @@ -36,11 +36,11 @@
use PhpCsFixer\Config;
use PhpCsFixer\Finder;

$header = trim(sprintf(
$header = \trim(\sprintf(
'This code is licensed under the BSD 3-Clause License.%s',
substr(
file_get_contents('LICENSE'),
strlen('BSD 3-Clause License')
\substr(
\file_get_contents('LICENSE'),
\strlen('BSD 3-Clause License')
)
));

Expand Down Expand Up @@ -85,7 +85,8 @@
'yield',
],
],
'compact_nullable_typehint' => true,
'blank_line_between_import_groups' => false,
'compact_nullable_type_declaration' => true,
'concat_space' => ['spacing' => 'one'],
'fully_qualified_strict_types' => true,
'global_namespace_import' => [
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Expand Up @@ -8,7 +8,7 @@ JOBS=$(shell nproc)

# PHP CS Fixer
PHP_CS_FIXER=./.tools/php-cs-fixer
PHP_CS_FIXER_URL="https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v3.2.1/php-cs-fixer.phar"
PHP_CS_FIXER_URL="https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v3.35.1/php-cs-fixer.phar"

# PHPUnit
PHPUNIT=vendor/bin/phpunit
Expand All @@ -28,9 +28,9 @@ COMPOSER=$(PHP) $(shell which composer)

# Infection
INFECTION=./.tools/infection.phar
INFECTION_URL="https://github.com/infection/infection/releases/download/0.24.0/infection.phar"
MIN_MSI=87
MIN_COVERED_MSI=99
INFECTION_URL="https://github.com/infection/infection/releases/download/0.27.4/infection.phar"
MIN_MSI=70
MIN_COVERED_MSI=76
INFECTION_ARGS=--min-msi=$(MIN_MSI) --min-covered-msi=$(MIN_COVERED_MSI) --threads=$(JOBS) --log-verbosity=none --no-interaction --no-progress --show-mutations

all: test
Expand Down
20 changes: 10 additions & 10 deletions composer.json
Expand Up @@ -29,12 +29,12 @@
}
},
"require": {
"php": "^7.4 || ^8.0",
"php": "^8.0",
"infection/abstract-testframework-adapter": "^0.5.0",
"infection/include-interceptor": "^0.2.0",
"symfony/filesystem": "^4.4 || ^5.0 || ^6.0",
"symfony/process": "^4.4 || ^5.0 || ^6.0",
"symfony/yaml": "^4.4 || ^5.0 || ^6.0"
"symfony/filesystem": "^5.0 || ^6.0",
"symfony/process": "^5.0 || ^6.0",
"symfony/yaml": "^5.0 || ^6.0"
},
"extra": {
"infection": {
Expand All @@ -44,15 +44,15 @@
"require-dev": {
"php-coveralls/php-coveralls": "^2.5",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^0.12.70",
"phpstan/phpstan-phpunit": "^0.12.17",
"phpstan/phpstan-strict-rules": "^0.12.9",
"phpstan/phpstan-webmozart-assert": "^0.12.9",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-phpunit": "^1.3",
"phpstan/phpstan-strict-rules": "^1.5",
"phpstan/phpstan-webmozart-assert": "^1.2",
"phpunit/phpunit": "^9.5",
"thecodingmachine/safe": "^1.3",
"vimeo/psalm": "^4.12"
"vimeo/psalm": "^5.15"
},
"conflict": {
"codeception/codeception": "<4.1.9"
"codeception/codeception": "<5.0.0"
}
}

0 comments on commit 7ac1030

Please sign in to comment.