Skip to content

Commit

Permalink
Drop PHP 8.0 support
Browse files Browse the repository at this point in the history
  • Loading branch information
jakzal committed Nov 28, 2023
1 parent 0a8064c commit 85b6122
Show file tree
Hide file tree
Showing 15 changed files with 104 additions and 115 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
name: Build and test
strategy:
matrix:
php: [8.0, 8.1, 8.2]
php: [8.1, 8.2]
deps: [high]
include:
- php: 8.0
- php: 8.1
deps: low

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

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

- uses: actions/upload-artifact@v1
if: matrix.php == '8.0' && matrix.deps == 'high'
if: matrix.php == '8.1' && matrix.deps == 'high'
with:
name: devkit.phar
path: build/devkit.phar
Expand All @@ -61,7 +61,7 @@ jobs:
needs: tests
strategy:
matrix:
php: [8.0, 8.1, 8.2]
php: [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: "8.0"
php-version: "8.1"
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: "8.0"
php-version: "8.1"
ini-values: "phar.readonly=0"

- name: Configure git
Expand Down
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ inherit: true
build:
environment:
php:
version: 8.0
version: 8.2
tests:
override:
- make phpunit
Expand Down
14 changes: 2 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
default: build

PHP_VERSION:=$(shell php -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')
IS_PHP81:=$(shell php -r 'echo (int)version_compare(PHP_VERSION, "8.1", ">=");')
TOOLBOX_VERSION?=dev

build: install test
Expand Down Expand Up @@ -68,7 +67,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 8.0.2 && \
composer config platform.php 8.1.0 && \
composer update --no-dev -o -a

tools/box compile
Expand All @@ -84,7 +83,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 8.0.2 && \
composer config platform.php 8.1.0 && \
composer update --no-dev -o -a

tools/box compile -c box-devkit.json.dist
Expand Down Expand Up @@ -138,17 +137,8 @@ tools/php-cs-fixer:
curl -Ls https://cs.symfony.com/download/php-cs-fixer-v3.phar -o tools/php-cs-fixer && chmod +x tools/php-cs-fixer

tools/deptrac:
ifeq ($(IS_PHP81),1)
curl -Ls https://github.com/qossmic/deptrac/releases/download/1.0.2/deptrac.phar -o tools/deptrac && chmod +x tools/deptrac
curl -Ls https://github.com/qossmic/deptrac/releases/download/1.0.2/deptrac.phar.asc -o tools/deptrac.asc
else
curl -Ls https://github.com/qossmic/deptrac/releases/download/0.24.0/deptrac.phar -o tools/deptrac && chmod +x tools/deptrac
curl -Ls https://github.com/qossmic/deptrac/releases/download/0.24.0/deptrac.phar.asc -o tools/deptrac.asc
endif

tools/box:
ifeq ($(IS_PHP81),1)
curl -Ls https://github.com/humbug/box/releases/download/4.2.0/box.phar -o tools/box && chmod +x tools/box
else
curl -Ls https://github.com/humbug/box/releases/download/3.15.0/box.phar -o tools/box && chmod +x tools/box
endif
162 changes: 81 additions & 81 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 8.0 | PHP 8.1 | PHP 8.2 |' . PHP_EOL;
$toolsList .= '| :--- | :---------- | :------ | :------ | :------ |' . PHP_EOL;
$toolsList = '| Name | Description | 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 |',
return $acc . sprintf('| %s | [%s](%s) | %s | %s |',
$tool->name(),
$tool->summary(),
$tool->website(),
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) ? '❌' : '✅'
) . PHP_EOL;
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": "~8.0.2 || ~8.1.0 || ~8.2.0",
"php": "~8.1.0 || ~8.2.0",
"symfony/console": "^5.4.31 || ^6.3",
"psr/container": "^2.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:8.0"]
"tags": ["featured", "architecture"]
},
{
"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:8.0"]
"tags": ["composer"]
},
{
"name": "composer-require-checker-3",
Expand Down
2 changes: 1 addition & 1 deletion resources/documentation.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
},
"test": "phpDocumentor list",
"tags": ["featured", "documentation", "exclude-php:8.0"]
"tags": ["featured", "documentation"]
},
{
"name": "phpcb",
Expand Down
2 changes: 1 addition & 1 deletion resources/linting.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
}
},
"test": "yaml-lint --version",
"tags": ["exclude-php:8.0", "linting"]
"tags": ["linting"]
},
{
"name": "twig-linter",
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:8.0"]
"tags": ["pre-installation"]
},
{
"name": "box-3",
Expand Down
6 changes: 3 additions & 3 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:8.0"]
"tags": ["featured", "test"]
},
{
"name": "paratest",
Expand Down Expand Up @@ -83,7 +83,7 @@
}
},
"test": "phpcov -v",
"tags": ["exclude-php:8.0", "test"]
"tags": ["test"]
},
{
"name": "php-fuzzer",
Expand Down Expand Up @@ -123,7 +123,7 @@
}
},
"test": "phpunit --version",
"tags": ["exclude-php:8.0", "featured", "test"]
"tags": ["featured", "test"]
},
{
"name": "phpunit-9",
Expand Down
2 changes: 1 addition & 1 deletion resources/tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
}
},
"test": "phpbench -V",
"tags": ["exclude-php:8.0"]
"tags": []
},
{
"name": "phpa",
Expand Down

0 comments on commit 85b6122

Please sign in to comment.