Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 6 additions & 21 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [ '8.2', '8.3' ]
symfony-version: [ '6.4.*', '7.1.*' ]
php-version: [ '8.3', '8.4' ]
symfony-version: [ '7.3.*' ]
symfony-deprecations-helper: [ 'max[direct]=0' ]
grumphp-testsuite: [ 'no-analyse' ]
grumphp-flag: [ '-no-analyse' ]
include:
- php-version: '8.2'
symfony-version: '7.1.*'
symfony-deprecations-helper: 'max[direct]=0&max[indirect]=99999'
grumphp-testsuite: 'main'

name: "PHP: ${{ matrix.php-version }}, Symfony: ${{ matrix.symfony-version }}, GrumPHP: ${{ matrix.grumphp-testsuite }}, Composer: ${{ matrix.composer-flag }}"

Expand All @@ -38,28 +31,20 @@ jobs:
with:
php-version: ${{ matrix.php-version }}

- name: Validate composer.json and composer.lock
- name: Validate composer.json
run: composer validate --strict

- name: Check PHP Version
run: php -v

- name: Symfony version # run every time except for dependencies with SF 7.1 (locked in composer)
if: ${{ matrix.grumphp-testsuite == 'no-analyse' }}
run: composer config extra.symfony.require ${{ matrix.symfony-version }}

- name: Composer update # run for everything except php 8.2 or SF 7.1 locked in composer.lock
if: ${{ matrix.grumphp-testsuite == 'no-analyse' }}
run: |
composer install # run because of symfony/flex
composer update --prefer-dist --no-interaction

- name: Composer install # only run for locked dependencies with php 8.2 or SF 7.1 (locked in composer)
if: ${{ matrix.grumphp-testsuite == 'main' }}
run: composer install --prefer-dist --no-interaction
- name: Composer update
run: composer update --prefer-dist --no-interaction

- name: Run static analysis (GrumPHP)
run: composer run-script grumphp${{ matrix.php-version }}${{ matrix.grumphp-flag }}
run: composer run-script grumphp${{ matrix.php-version }}

- name: Check vendor licenses
run: composer run-script lic-check
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
.env
docker-compose.override.yml
mutagen.yml.lock
composer.lock
tests/Functional/app/var/*
19 changes: 10 additions & 9 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@

declare(strict_types=1);

$config = (new PhpCsFixer\Config())
use PhpCsFixer\Config;
use PhpCsFixer\Finder;

return (new Config())
->setRiskyAllowed(true)
->setRules([
'array_syntax' => [
'array_syntax' => [
'syntax' => 'short',
],
'no_useless_else' => true,
'no_unused_imports' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'strict_comparison' => true,
'strict_param' => true,
'no_unused_imports' => true,
'strict_param' => true,
])
->setFinder(
PhpCsFixer\Finder::create()
Finder::create()
->exclude('vendor')
->exclude('tests')
->in(__DIR__)
->in(__DIR__),
);

return $config;
2 changes: 1 addition & 1 deletion bin/grumphp_hooks/environment_spinup
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ export PATH="/usr/local/bin:$PATH"
#
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

if [[ -z `docker-compose ps -q circuit-breaker-bundle-php81` ]] || [[ -z `docker ps -q --no-trunc | grep $(docker-compose ps -q circuit-breaker-bundle-php81)` ]]; then
if [[ -z `docker-compose ps -q circuit-breaker-bundle-php-min` ]] || [[ -z `docker ps -q --no-trunc | grep $(docker-compose ps -q circuit-breaker-bundle-php-min)` ]]; then
docker-compose up -d
fi
53 changes: 27 additions & 26 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,39 @@
}
],
"require": {
"php": ">=8.2",
"ackintosh/ganesha": "^2.0 || ^3.0",
"php": ">=8.3",
"ackintosh/ganesha": "^4.0",
"beberlei/assert": "^3.3",
"doctrine/annotations": "^1.12|^2.0",
"symfony/cache": "^6.4 || ^7.1",
"symfony/framework-bundle": "^6.4 || ^7.1",
"symfony/proxy-manager-bridge": "^6.4 || ^7.1"
"doctrine/annotations": "^2.0",
"symfony/cache": "^7.3",
"symfony/config": "^7.3",
"symfony/dependency-injection": "^7.3",
"symfony/filesystem": "^7.3",
"symfony/http-kernel": "^7.3",
"symfony/proxy-manager-bridge": "^6.4"
},
"require-dev": {
"amphp/amp": "3.0.2 as 2.6.4",
"amphp/byte-stream": "2.1.1 as 1.5",
"friendsofphp/php-cs-fixer": "^3.2",
"madewithlove/license-checker": "^0.10|^1.0",
"nikic/php-parser": "^5.6",
"php-parallel-lint/php-parallel-lint": "^1.3",
"phpcompatibility/php-compatibility": "^9.1",
"phpmd/phpmd": "^2.6",
"phpro/grumphp": "2.4.0",
"phpstan/phpstan": "^1.1",
"phpunit/phpunit": "^10.2",
"pixelfederation/coding-standards": "^2.1",
"phpro/grumphp": "^2.17",
"phpstan/phpstan": "^2.0",
"phpunit/phpunit": "^12.0",
"pixelfederation/coding-standards": "^5.0",
"psalm/phar": "^6.13",
"roave/security-advisories": "dev-master",
"squizlabs/php_codesniffer": "^3.4",
"squizlabs/php_codesniffer": "^4.0",
"symfony/flex": "^2.3",
"symfony/framework-bundle": "^7.3",
"symfony/monolog-bundle": "^3.7",
"symfony/phpunit-bridge": "^6.4 || ^7.1",
"vimeo/psalm": "^5.0"
"symfony/phpunit-bridge": "^7.3"
},
"autoload": {
"psr-4": {
"PixelFederation\\CircuitBreakerBundle\\": "src/"

}
},
"autoload-dev": {
Expand All @@ -60,22 +63,20 @@
"symfony/flex": true
}
},
"extra": {
"symfony": {
"require": "7.1.*",
"docker": false
}
},
"scripts": {
"grumphp8.2": "grumphp run --testsuite=php8.2",
"grumphp8.2-no-analyse": "grumphp run --testsuite=php8.2-no-analyse",
"grumphp8.3-no-analyse": "grumphp run --testsuite=php8.3-no-analyse",
"grumphp8.3": "grumphp run --testsuite=php8.3",
"grumphp8.4": "grumphp run --testsuite=php8.4",
"lic-check": "license-checker check",
"phpcs": "phpcs --standard=phpcs.ruleset.xml src",
"phpcbf": "phpcbf --standard=phpcs.ruleset.xml --extensions=php --tab-width=4 -sp src tests",
"php-cs-fixer": "php-cs-fixer --config=./.php_cs fix src",
"phpmd": "phpmd src text phpmd.ruleset.xml",
"phpstan": "phpstan analyse src --level=7",
"psalm": "psalm"
"psalm": "psalm",
"phpunit": "phpunit",
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
}
}
}
Loading