From a04f60a4f5f9280f97458b429f8544db3c6e1e54 Mon Sep 17 00:00:00 2001 From: Tomas Date: Wed, 1 Jun 2022 14:18:06 +0300 Subject: [PATCH] Add Symfony 6.1 to CI and upgrade some dependencies --- .github/workflows/ci.yml | 22 ++++++++++++++-------- CHANGELOG.md | 4 +++- Validator/Constraint/Address.php | 2 +- composer.json | 18 +++++++++--------- phpstan-baseline.neon | 26 ++++++++++++++++++++++++++ phpstan.neon.dist | 10 +++------- 6 files changed, 56 insertions(+), 26 deletions(-) create mode 100644 phpstan-baseline.neon diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0724904a..5e923898 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,18 +1,22 @@ name: CI on: [push, pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: phpstan: name: "PHPStan" runs-on: ubuntu-latest env: - php-version: 8.0 + php-version: 8.1 steps: - name: "Setup PHP" uses: shivammathur/setup-php@v2 with: php-version: ${{ env.php-version }} - tools: composer:v2, flex, cs2pr + tools: composer:v2, flex - name: "Checkout code" uses: actions/checkout@v2 @@ -22,13 +26,13 @@ jobs: composer install --prefer-dist --no-progress --no-interaction --optimize-autoloader - name: "Run PHPStan" - run: vendor/bin/phpstan analyse --no-progress --error-format=checkstyle | cs2pr + run: vendor/bin/phpstan analyse --no-progress php-cs-fixer: name: PHP-CS-Fixer runs-on: ubuntu-latest env: - php-version: 8.0 + php-version: 8.1 steps: - name: "Setup PHP" uses: shivammathur/setup-php@v2 @@ -54,13 +58,11 @@ jobs: fail-fast: true matrix: strategy: ['default'] - php: ['7.3', '7.4', '8.0', '8.1'] + php: ['7.4', '8.0', '8.1'] include: - - php: '7.3' - sf_version: '4.4.*' - strategy: 'lowest' - php: '7.4' sf_version: '5.4.*' + strategy: 'lowest' - php: '8.0' sf_version: '5.4.*' - php: '8.1' @@ -69,6 +71,8 @@ jobs: sf_version: '6.0.*' - php: '8.1' sf_version: '6.0.*' + - php: '8.1' + sf_version: '6.1.*' steps: - name: "Setup PHP" uses: shivammathur/setup-php@v2 @@ -118,6 +122,8 @@ jobs: sf_version: '6.0.*' - php: '8.1' sf_version: '6.0.*' + - php: '8.1' + sf_version: '6.1.*' steps: - name: "Setup PHP" uses: shivammathur/setup-php@v2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 2295d4c3..83f786b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,12 @@ The changelog describes what have been "Added", "Changed", "Removed" or "Fixed" between versions. -## Version 5.16.3 +## Version 5.17.0 ### Changed +- Updated PHP requirement to ^7.4 +- Updated minimum required version for some dependencies - Deprecate `Address::$errorNames` in favour of `Address::ERROR_NAMES`. ## Version 5.16.2 diff --git a/Validator/Constraint/Address.php b/Validator/Constraint/Address.php index 27a425b3..ce2381a5 100644 --- a/Validator/Constraint/Address.php +++ b/Validator/Constraint/Address.php @@ -35,7 +35,7 @@ class Address extends Constraint /** * @var string[] * - * @deprecated since BazingaGeocoderBundle 5.16, use const ERROR_NAMES instead + * @deprecated since BazingaGeocoderBundle 5.17, use const ERROR_NAMES instead */ protected static $errorNames = self::ERROR_NAMES; diff --git a/composer.json b/composer.json index 1b46a6fe..ff8c74ee 100644 --- a/composer.json +++ b/composer.json @@ -11,9 +11,9 @@ } ], "require": { - "php": "^7.3 || ^8.0", - "geocoder-php/plugin": "^1.3", - "php-http/discovery": "^1.13", + "php": "^7.4 || ^8.0", + "geocoder-php/plugin": "^1.4", + "php-http/discovery": "^1.14", "symfony/console": "^4.4 || ^5.0 || ^6.0", "symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0", "symfony/options-resolver": "^4.4 || ^5.0 || ^6.0", @@ -21,8 +21,8 @@ }, "require-dev": { "doctrine/orm": "~2.8", - "fakerphp/faker": "^1.14", - "friendsofphp/php-cs-fixer": "^3.4", + "fakerphp/faker": "^1.19", + "friendsofphp/php-cs-fixer": "^3.8", "geocoder-php/algolia-places-provider": "^0.3", "geocoder-php/arcgis-online-provider": "^4.3", "geocoder-php/bing-maps-provider": "^4.2", @@ -52,12 +52,12 @@ "geocoder-php/tomtom-provider": "^4.2", "geocoder-php/yandex-provider": "^4.4", "geoip/geoip": "~1.17", - "nyholm/nsa": "^1.2", - "nyholm/psr7": "^1.3", + "nyholm/nsa": "^1.3", + "nyholm/psr7": "^1.5", "nyholm/symfony-bundle-test": "dev-master", "php-http/curl-client": "^2.2", - "php-http/message": "^1.5", - "phpstan/phpstan": "^1.2", + "php-http/message": "^1.13", + "phpstan/phpstan": "^1.7", "symfony/config": "^4.4 || ^5.0 || ^6.0", "symfony/phpunit-bridge": "^5.2 || ^6.0", "symfony/validator": "^4.4 || ^5.0 || ^6.0", diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon new file mode 100644 index 00000000..cd9c7090 --- /dev/null +++ b/phpstan-baseline.neon @@ -0,0 +1,26 @@ +parameters: + ignoreErrors: + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeParentInterface\\:\\:end\\(\\)\\.$#" + count: 2 + path: DependencyInjection/Configuration.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeParentInterface\\:\\:variableNode\\(\\)\\.$#" + count: 1 + path: DependencyInjection/Configuration.php + + - + message: "#^Class Geocoder\\\\Provider\\\\Geoip\\\\Geoip not found\\.$#" + count: 1 + path: ProviderFactory/GeoipFactory.php + + - + message: "#^Instantiated class Geocoder\\\\Provider\\\\Geoip\\\\Geoip not found\\.$#" + count: 1 + path: ProviderFactory/GeoipFactory.php + + - + message: "#^Method Bazinga\\\\GeocoderBundle\\\\ProviderFactory\\\\GeoipFactory\\:\\:getProvider\\(\\) should return Geocoder\\\\Provider\\\\Provider but returns Geocoder\\\\Provider\\\\Geoip\\\\Geoip\\.$#" + count: 1 + path: ProviderFactory/GeoipFactory.php diff --git a/phpstan.neon.dist b/phpstan.neon.dist index c58ec88f..be7701f2 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,3 +1,6 @@ +includes: + - phpstan-baseline.neon + parameters: paths: - %currentWorkingDirectory% @@ -5,10 +8,3 @@ parameters: - ./vendor/ - ./Tests/ level: 7 - ignoreErrors: - - - path: %currentWorkingDirectory%/DependencyInjection/Configuration.php - message: '#Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeParentInterface::(end|variableNode)#' - - - path: %currentWorkingDirectory%/ProviderFactory/GeoipFactory.php - message: '#Geocoder\\Provider\\Geoip\\Geoip#'