Skip to content

Commit

Permalink
Update php version used in ci (#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet authored Jul 27, 2024
1 parent 6cb1a15 commit 0a30572
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 66 deletions.
37 changes: 6 additions & 31 deletions .github/workflows/composer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.3
coverage: none
tools: composer:v2
ini-file: development
Expand All @@ -32,8 +32,8 @@ jobs:
- name: Composer normalize
run: composer normalize --dry-run

require-checker:
name: Require-checker
dependency-analyser:
name: Dependency analyser
runs-on: ubuntu-latest

steps:
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.3
coverage: none
tools: composer:v2
ini-file: development
Expand All @@ -54,30 +54,5 @@ jobs:
dependency-versions: highest
composer-options: --prefer-dist --prefer-stable

- name: Composer require checker
run: vendor/bin/composer-require-checker

unused:
name: Unused
runs-on: ubuntu-latest

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

- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
coverage: none
tools: composer:v2
ini-file: development

- name: Install Composer dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: highest
composer-options: --prefer-dist --prefer-stable

- name: Composer unused
run: vendor/bin/composer-unused
- name: Composer dependency analyser
run: vendor/bin/composer-dependency-analyser
4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.3
coverage: none
tools: composer:v2
ini-file: development
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.3
coverage: none
tools: composer:v2
ini-file: development
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mutation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.3
coverage: pcov
tools: composer:v2
ini-file: development
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
php-version: 8.3
ini-values: phar.readonly=0
tools: box
coverage: none
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.3
coverage: none
tools: composer:v2
ini-file: development
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.3
coverage: none
tools: composer:v2
ini-file: development
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-os.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
php-version: 8.3
tools: composer:v2
ini-file: development

Expand All @@ -42,7 +42,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
php-version: 8.3
tools: composer:v2
ini-file: development

Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
include:
- php-version: 8.0
dependencies: lowest
- php-version: 8.2
- php-version: 8.3
dependencies: highest
symfony-require: 7.0.*
symfony-require: 7.1.*

steps:
- name: Checkout
Expand All @@ -49,7 +49,6 @@ jobs:
composer config minimum-stability dev
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins symfony/flex
composer remove maglnet/composer-require-checker --dev --no-update
- name: Install Composer dependencies ${{ matrix.dependencies }}
uses: ramsey/composer-install@v2
Expand Down
8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ rector:
vendor/bin/rector
.PHONY: rector

checker:
vendor/bin/composer-require-checker
.PHONY: composer

unused:
vendor/bin/composer-unused
composer:
vendor/bin/composer-dependency-analyser
.PHONY: composer
26 changes: 26 additions & 0 deletions composer-dependency-analyser.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

declare(strict_types=1);

use ShipMonk\ComposerDependencyAnalyser\Config\Configuration;
use ShipMonk\ComposerDependencyAnalyser\Config\ErrorType;

$config = new Configuration();

return $config
->addPathToScan(__DIR__.'/bin/twig-cs-fixer', isDev: false)
->ignoreErrorsOnPackageAndPath(
'symfony/twig-bridge',
__DIR__.'/src/Environment/StubbedEnvironment.php',
[ErrorType::DEV_DEPENDENCY_IN_PROD]
)
->ignoreErrorsOnPackageAndPath(
'symfony/ux-twig-component',
__DIR__.'/src/Environment/StubbedEnvironment.php',
[ErrorType::DEV_DEPENDENCY_IN_PROD]
)
->ignoreErrorsOnPackageAndPath(
'twig/cache-extra',
__DIR__.'/src/Environment/StubbedEnvironment.php',
[ErrorType::DEV_DEPENDENCY_IN_PROD]
);
14 changes: 0 additions & 14 deletions composer-require-checker.json

This file was deleted.

4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@
"webmozart/assert": "^1.10"
},
"require-dev": {
"composer/semver": "3.4.2",
"dereuromark/composer-prefer-lowest": "^0.1.10",
"ergebnis/composer-normalize": "^2.29",
"friendsofphp/php-cs-fixer": "^3.13.0",
"icanhazstring/composer-unused": "^0.8.5",
"infection/infection": "^0.26.16 || ^0.27.0",
"maglnet/composer-require-checker": "^3.8 || ^4.3",
"phpstan/phpstan": "^1.9.1",
"phpstan/phpstan-phpunit": "^1.2.2",
"phpstan/phpstan-strict-rules": "^1.4.4",
Expand All @@ -37,6 +36,7 @@
"psalm/plugin-phpunit": "^0.18.4",
"psalm/plugin-symfony": "^5.0.0",
"rector/rector": "^1.0.0",
"shipmonk/composer-dependency-analyser": "^1.6",
"symfony/process": "^5.4 || ^6.0 || ^7.0",
"symfony/twig-bridge": "^5.4 || ^6.0 || ^7.0",
"symfony/ux-twig-component": "^2.2.0",
Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ includes:
- vendor/phpstan/phpstan/conf/bleedingEdge.neon

parameters:
phpVersion: 80200
phpVersion: 80300
tmpDir: /tmp/phpstan
level: max
paths:
Expand Down
2 changes: 1 addition & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
errorLevel="1"
phpVersion="8.2"
phpVersion="8.3"
strictBinaryOperands="true"
rememberPropertyAssignmentsAfterCall="false"
checkForThrowsDocblock="true"
Expand Down

0 comments on commit 0a30572

Please sign in to comment.