Skip to content

Commit

Permalink
Merge pull request #463 from jakzal/drop-php-7.4
Browse files Browse the repository at this point in the history
Drop PHP 7.4 support
  • Loading branch information
jakzal authored Dec 12, 2022
2 parents a381f4f + 6faf93d commit 04e27d9
Show file tree
Hide file tree
Showing 12 changed files with 102 additions and 144 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
name: Build and test
strategy:
matrix:
php: [7.4, 8.0, 8.1, 8.2]
php: [8.0, 8.1, 8.2]
deps: [high]
include:
- php: 7.4
- php: 8.0
deps: low

steps:
Expand All @@ -42,13 +42,13 @@ jobs:
run: make update-min test-min

- uses: actions/upload-artifact@v1
if: matrix.php == '7.4' && matrix.deps == 'high'
if: matrix.php == '8.0' && matrix.deps == 'high'
with:
name: toolbox.phar
path: build/toolbox.phar

- uses: actions/upload-artifact@v1
if: matrix.php == '7.4' && matrix.deps == 'high'
if: matrix.php == '8.0' && matrix.deps == 'high'
with:
name: devkit.phar
path: build/devkit.phar
Expand All @@ -59,7 +59,7 @@ jobs:
needs: tests
strategy:
matrix:
php: [7.4, 8.0, 8.1, 8.2]
php: [8.0, 8.1, 8.2]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
php-version: "8.0"
ini-values: "phar.readonly=0"

- name: Build the website
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-phars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
php-version: "8.0"
ini-values: "phar.readonly=0"

- name: Configure git
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ package: tools/box
sed -e 's/Application('"'"'dev/Application('"'"'$(TOOLBOX_VERSION)/g' bin/toolbox.php > build/phar/bin/toolbox.php

cd build/phar && \
composer config platform.php 7.4.7 && \
composer config platform.php 8.0.0 && \
composer update --no-dev -o -a

tools/box compile
Expand All @@ -84,7 +84,7 @@ package-devkit: tools/box
sed -e 's/\(Application(.*\)'"'"'dev/\1'"'"'$(TOOLBOX_VERSION)/g' bin/devkit.php > build/devkit-phar/bin/devkit.php

cd build/devkit-phar && \
composer config platform.php 7.4.7 && \
composer config platform.php 8.0.0 && \
composer update --no-dev -o -a

tools/box compile -c box-devkit.json.dist
Expand Down
168 changes: 84 additions & 84 deletions README.md

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions bin/devkit.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,16 @@ protected function execute(InputInterface $input, OutputInterface $output)
$readmePath = $input->getOption('readme');
$tools = $this->loadTools($jsonPath);

$toolsList = '| Name | Description | PHP 7.4 | PHP 8.0 | PHP 8.1 | PHP 8.2' . PHP_EOL;
$toolsList .= '| :--- | :---------- | :------ | :------ | :------ | :------' . PHP_EOL;
$toolsList = '| Name | Description | PHP 8.0 | PHP 8.1 | PHP 8.2 |' . PHP_EOL;
$toolsList .= '| :--- | :---------- | :------ | :------ | :------ |' . PHP_EOL;
$toolsList .= $tools->sort(function (Tool $left, Tool $right) {
return strcasecmp($left->name(), $right->name());
})->reduce('', function ($acc, Tool $tool) {

return $acc . sprintf('| %s | [%s](%s) | %s | %s | %s | %s |',
return $acc . sprintf('| %s | [%s](%s) | %s | %s | %s |',
$tool->name(),
$tool->summary(),
$tool->website(),
in_array('exclude-php:7.4', $tool->tags(), true) ? '❌' : '✅' ,
in_array('exclude-php:8.0', $tool->tags(), true) ? '❌' : '✅',
in_array('exclude-php:8.1', $tool->tags(), true) ? '❌' : '✅',
in_array('exclude-php:8.2', $tool->tags(), true) ? '❌' : '✅'
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Helps to discover and install tools",
"type": "project",
"require": {
"php": "^7.4.7 || ~8.0.0 || ~8.1.0 || ~8.2.0",
"php": "~8.0.0 || ~8.1.0 || ~8.2.0",
"symfony/console": "^4.4 || ^5.4 || ^6.1",
"psr/container": "^1.0"
},
Expand Down
2 changes: 1 addition & 1 deletion resources/architecture.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}
},
"test": "deptrac list",
"tags": ["featured", "architecture", "exclude-php:7.4", "exclude-php:8.0"]
"tags": ["featured", "architecture", "exclude-php:8.0"]
},
{
"name": "pdepend",
Expand Down
2 changes: 1 addition & 1 deletion resources/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
}
},
"test": "composer-require-checker -V",
"tags": ["composer", "exclude-php:7.4"]
"tags": ["composer"]
},
{
"name": "composer-require-checker-3",
Expand Down
13 changes: 0 additions & 13 deletions resources/metrics.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
{
"tools": [
{
"name": "analyze",
"summary": "Visualizes metrics and source code",
"website": "https://github.com/Qafoo/QualityAnalyzer",
"command": {
"composer-install": {
"repository": "https://github.com/Qafoo/QualityAnalyzer.git",
"target-dir": "%target-dir%/QualityAnalyzer"
}
},
"test": "analyze list",
"tags": ["exclude-php:8.2", "exclude-php:8.1", "exclude-php:8.0", "metrics"]
},
{
"name": "phpinsights",
"summary": "Analyses code quality, style, architecture and complexity",
Expand Down
2 changes: 1 addition & 1 deletion resources/pre-installation.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
}
},
"test": "box list",
"tags": ["pre-installation", "exclude-php:7.4", "exclude-php:8.0"]
"tags": ["pre-installation", "exclude-php:8.0"]
},
{
"name": "box-3",
Expand Down
32 changes: 2 additions & 30 deletions resources/test.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
}
},
"test": "infection --version",
"tags": ["featured", "test", "exclude-php:7.4"]
"tags": ["featured", "test"]
},
{
"name": "paratest",
Expand Down Expand Up @@ -122,34 +122,6 @@
"test": "phpunit-8 --version",
"tags": ["test"]
},
{
"name": "phpunit-7",
"summary": "The PHP testing framework (7.x version)",
"website": "https://phpunit.de/",
"command": {
"phive-install": {
"alias": "phpunit@^7.0",
"bin": "%target-dir%/phpunit-7",
"sig": "4AA394086372C20A"
}
},
"test": "phpunit-7 --version",
"tags": ["exclude-php:8.2", "exclude-php:8.1", "exclude-php:8.0", "test"]
},
{
"name": "phpunit-5",
"summary": "The PHP testing framework (5.x version)",
"website": "https://phpunit.de/",
"command": {
"phive-install": {
"alias": "phpunit@^5.0",
"bin": "%target-dir%/phpunit-5",
"sig": "4AA394086372C20A"
}
},
"test": "phpunit-5 --version",
"tags": ["exclude-php:8.2", "exclude-php:8.1", "exclude-php:8.0", "test"]
},
{
"name": "simple-phpunit",
"summary": "Provides utilities to report legacy tests and usage of deprecated code",
Expand All @@ -161,7 +133,7 @@
"links": {"%target-dir%/simple-phpunit": "simple-phpunit"}
},
"sh": {
"command": "simple-phpunit install && SYMFONY_PHPUNIT_VERSION=8 simple-phpunit install"
"command": "simple-phpunit install && SYMFONY_PHPUNIT_VERSION=9 simple-phpunit install"
}
},
"test": "simple-phpunit --version",
Expand Down

0 comments on commit 04e27d9

Please sign in to comment.