Skip to content

Commit

Permalink
Remove PHP 7.4 and PHP 8.0 support
Browse files Browse the repository at this point in the history
  • Loading branch information
loevgaard committed May 14, 2024
1 parent 87a93b4 commit d03601b
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 66 deletions.
30 changes: 0 additions & 30 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,42 +1,12 @@
root = true

[*]
# Change these settings to your own preference
indent_style = space
indent_size = 4

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true


[*.json]
indent_style = space
indent_size = 2

[*.md]
indent_style = space
indent_size = 4
trim_trailing_whitespace = false

[*.neon]
indent_style = tab
indent_size = 4

[*.php]
indent_style = space
indent_size = 4

[composer.json]
indent_style = space
indent_size = 4

[phpstan.neon]
indent_style = tab
indent_size = 4

[phpunit.xml{,.dist}]
indent_style = space
indent_size = 4
54 changes: 25 additions & 29 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
strategy:
matrix:
php-version:
- "7.4"
- "8.1"

dependencies:
- "highest"

steps:
- name: "Checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"

- name: "Setup PHP, with composer and extensions"
uses: "shivammathur/setup-php@v2"
Expand All @@ -32,7 +32,7 @@ jobs:
coverage: "none"

- name: "Install composer dependencies"
uses: "ramsey/composer-install@v2"
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependencies }}"

Expand All @@ -53,17 +53,17 @@ jobs:
strategy:
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"

dependencies:
- "lowest"
- "highest"

steps:
- name: "Checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"

- name: "Setup PHP, with composer and extensions"
uses: "shivammathur/setup-php@v2"
Expand All @@ -74,15 +74,15 @@ jobs:
tools: "composer-require-checker, composer-unused"

- name: "Install composer dependencies"
uses: "ramsey/composer-install@v2"
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependencies }}"

- name: "Run maglnet/composer-require-checker"
run: "composer-require-checker check"

- name: "Run composer-unused/composer-unused"
run: "composer-unused || true" # TODO Remove when https://github.com/shivammathur/setup-php/issues/703 is fixed
run: "composer-unused"

static-code-analysis:
name: "Static Code Analysis"
Expand All @@ -92,17 +92,17 @@ jobs:
strategy:
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"

dependencies:
- "lowest"
- "highest"

steps:
- name: "Checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"

- name: "Setup PHP, with composer and extensions"
uses: "shivammathur/setup-php@v2"
Expand All @@ -112,7 +112,7 @@ jobs:
coverage: "none"

- name: "Install composer dependencies"
uses: "ramsey/composer-install@v2"
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependencies }}"

Expand All @@ -127,18 +127,17 @@ jobs:
strategy:
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"

dependencies:
- "lowest"
- "highest"

steps:
- name: "Checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"

- name: "Setup PHP, with composer and extensions"
uses: "shivammathur/setup-php@v2"
Expand All @@ -148,12 +147,12 @@ jobs:
coverage: "none"

- name: "Install composer dependencies"
uses: "ramsey/composer-install@v2"
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependencies }}"

- name: "Run phpunit"
run: "vendor/bin/phpunit --no-coverage"
run: "vendor/bin/phpunit"

code-coverage:
name: "Code Coverage"
Expand All @@ -163,14 +162,14 @@ jobs:
strategy:
matrix:
php-version:
- "8.2"
- "8.3"

dependencies:
- "highest"

steps:
- name: "Checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"

- name: "Setup PHP, with composer and extensions"
uses: "shivammathur/setup-php@v2"
Expand All @@ -179,21 +178,18 @@ jobs:
extensions: "${{ env.PHP_EXTENSIONS }}"
php-version: "${{ matrix.php-version }}"

- name: "Set up problem matchers for phpunit/phpunit"
run: "echo \"::add-matcher::${{ runner.tool_cache }}/phpunit.json\""

- name: "Install composer dependencies"
uses: "ramsey/composer-install@v2"
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependencies }}"

- name: "Collect code coverage with pcov and phpunit/phpunit"
run: "vendor/bin/phpunit --coverage-clover=.build/logs/clover.xml"

- name: "Send code coverage report to Codecov.io"
env:
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
run: "bash <(curl -s https://codecov.io/bash)"
uses: "codecov/codecov-action@v4"
with:
token: "${{ secrets.CODECOV_TOKEN }}"

mutation-tests:
name: "Mutation tests"
Expand All @@ -203,14 +199,14 @@ jobs:
strategy:
matrix:
php-version:
- "8.2"
- "8.3"

dependencies:
- "highest"

steps:
- name: "Checkout"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"

- name: "Setup PHP, with composer and extensions"
uses: "shivammathur/setup-php@v2"
Expand All @@ -220,7 +216,7 @@ jobs:
php-version: "${{ matrix.php-version }}"

- name: "Install composer dependencies"
uses: "ramsey/composer-install@v2"
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependencies }}"

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Setono
Copyright (c) 2024 Setono

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
],
"require": {
"php": ">=7.4",
"php": ">=8.1",
"ext-hash": "*",
"psr/event-dispatcher": "^1.0",
"psr/log": "^1.1 || ^2.0 || ^3.0",
Expand All @@ -20,7 +20,7 @@
"infection/infection": "^0.26",
"phpunit/phpunit": "^9.6",
"psalm/plugin-phpunit": "^0.18",
"setono/code-quality-pack": "^2.4"
"setono/code-quality-pack": "^2.7"
},
"prefer-stable": true,
"autoload": {
Expand Down
7 changes: 3 additions & 4 deletions ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

declare(strict_types=1);

use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\EasyCodingStandard\ValueObject\Option;
use Symplify\EasyCodingStandard\Config\ECSConfig;

return static function (ContainerConfigurator $config): void {
return static function (ECSConfig $config): void {
$config->import('vendor/sylius-labs/coding-standard/ecs.php');
$config->parameters()->set(Option::PATHS, [
$config->paths([
'src', 'tests'
]);
};

0 comments on commit d03601b

Please sign in to comment.