-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #66 Symfony 7 support (sstok)
This PR was merged into the 2.0-dev branch. labels: bc-break Discussion ---------- | Q | A | ------------- | --- | Branch? | main (2.0) | Bug fix? | no | New feature? | yes | BC breaks? | yes | Deprecations? | no | Fixed tickets | | License | MIT This adds support for Symfony 7, and drops support for Symfony 4 which has been End of life for a long time now. Additionally, the deprecated validators Blacklist and P0wnedPassword have been removed as it doesn't make sense to add support here. According to the semantic version this will be version 2.0. Version 1.7 is very stable so I don't expect to many bug fixes there. Commits ------- e3259f3 Allow Symfony 7
- Loading branch information
Showing
12 changed files
with
306 additions
and
254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
name: Full CI process | ||
name: 'CI' | ||
|
||
on: | ||
push: | ||
branches: | ||
|
@@ -8,92 +9,154 @@ on: | |
- main | ||
|
||
jobs: | ||
test: | ||
name: PHP ${{ matrix.PHP_VERSION }} | ||
runs-on: ubuntu-18.04 | ||
cs-fixer: | ||
name: 'PHP CS Fixer' | ||
|
||
runs-on: 'ubuntu-latest' | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- PHP_VERSION: '7.3' | ||
SYMFONY_REQUIRE: '^4.4' | ||
- PHP_VERSION: '7.3' | ||
SYMFONY_REQUIRE: '^5.0' | ||
- PHP_VERSION: '7.4' | ||
SYMFONY_REQUIRE: '^5.2' | ||
- PHP_VERSION: '8.0' | ||
- PHP_VERSION: '8.0' | ||
SYMFONY_REQUIRE: '^6.0' | ||
php-version: | ||
- '8.2' | ||
|
||
steps: | ||
# —— Setup Github actions 🐙 ————————————————————————————————————————————— | ||
# https://github.com/actions/checkout (official) | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
name: 'Check out' | ||
uses: 'actions/checkout@v2' | ||
|
||
# https://github.com/shivammathur/setup-php (community) | ||
- | ||
name: Setup PHP, extensions and composer with shivammathur/setup-php | ||
uses: shivammathur/setup-php@v2 | ||
name: 'Set up PHP' | ||
uses: 'shivammathur/setup-php@v2' | ||
with: | ||
php-version: ${{ matrix.PHP_VERSION }} | ||
extensions: mbstring, ctype, iconv, bcmath, filter, json | ||
coverage: none | ||
env: | ||
update: true | ||
php-version: '${{ matrix.php-version }}' | ||
coverage: 'none' | ||
|
||
# —— Composer 🧙️ ————————————————————————————————————————————————————————— | ||
- | ||
name: Install Composer dependencies | ||
env: | ||
SYMFONY_REQUIRE: ${{ matrix.SYMFONY_REQUIRE }} | ||
SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE: 1 | ||
run: | | ||
git config --global author.name Sebastiaan Stok | ||
git config --global author.email [email protected] | ||
git config --global user.name Sebastiaan Stok | ||
git config --global user.email [email protected] | ||
name: 'Get Composer cache directory' | ||
id: 'composer-cache' | ||
run: 'echo "::set-output name=cache-dir::$(composer config cache-files-dir)"' | ||
|
||
- | ||
name: 'Cache dependencies' | ||
uses: 'actions/cache@v2' | ||
with: | ||
path: '${{ steps.composer-cache.outputs.cache-dir }}' | ||
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}" | ||
restore-keys: 'php-${{ matrix.php-version }}-composer-locked-' | ||
|
||
rm -f composer.lock | ||
composer config --no-plugins allow-plugins.symfony/flex true | ||
composer global require symfony/flex | ||
composer install --no-progress --no-interaction --no-suggest --optimize-autoloader --ansi | ||
- | ||
name: 'Install dependencies' | ||
run: 'composer update --no-progress --prefer-stable' | ||
|
||
## —— Tests ✅ ——————————————————————————————————————————————————————————— | ||
- | ||
name: Run Tests | ||
run: | | ||
make test | ||
lint: | ||
name: PHP-QA | ||
runs-on: ubuntu-latest | ||
name: 'Check the code style' | ||
run: 'make cs-full' | ||
|
||
phpstan: | ||
name: 'PhpStan' | ||
|
||
runs-on: 'ubuntu-latest' | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-version: | ||
- '8.2' | ||
|
||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
name: 'Check out' | ||
uses: 'actions/checkout@v2' | ||
|
||
- | ||
name: 'Set up PHP' | ||
uses: 'shivammathur/setup-php@v2' | ||
with: | ||
php-version: '${{ matrix.php-version }}' | ||
coverage: 'none' | ||
|
||
- | ||
name: 'Get Composer cache directory' | ||
id: 'composer-cache' | ||
run: 'echo "::set-output name=cache-dir::$(composer config cache-files-dir)"' | ||
|
||
# https://github.com/shivammathur/setup-php (community) | ||
- | ||
name: Setup PHP, extensions and composer with shivammathur/setup-php | ||
uses: shivammathur/setup-php@v2 | ||
name: 'Cache dependencies' | ||
uses: 'actions/cache@v2' | ||
with: | ||
php-version: '7.4' | ||
extensions: mbstring, ctype, iconv, bcmath, filter, json | ||
coverage: none | ||
path: '${{ steps.composer-cache.outputs.cache-dir }}' | ||
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}" | ||
restore-keys: 'php-${{ matrix.php-version }}-composer-locked-' | ||
|
||
- | ||
name: 'Install dependencies' | ||
run: 'composer update --no-progress --prefer-stable' | ||
|
||
# —— Composer 🧙️ ————————————————————————————————————————————————————————— | ||
- | ||
name: Install Composer dependencies | ||
name: 'Run PhpStan' | ||
run: 'vendor/bin/phpstan analyze --no-progress' | ||
|
||
tests: | ||
name: 'PHPUnit' | ||
|
||
runs-on: 'ubuntu-latest' | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- | ||
php-version: '8.2' | ||
composer-options: '--prefer-stable' | ||
symfony-version: '6.3' | ||
- | ||
php-version: '8.2' | ||
composer-options: '--prefer-stable' | ||
symfony-version: '^6.4' | ||
|
||
- | ||
php-version: '8.2' | ||
composer-options: '--prefer-stable' | ||
symfony-version: '^7.0' | ||
|
||
steps: | ||
- | ||
name: 'Check out' | ||
uses: 'actions/checkout@v2' | ||
|
||
- | ||
name: 'Set up PHP' | ||
uses: 'shivammathur/setup-php@v2' | ||
with: | ||
php-version: '${{ matrix.php-version }}' | ||
coverage: 'none' | ||
|
||
- | ||
name: 'Get Composer cache directory' | ||
id: 'composer-cache' | ||
run: 'echo "::set-output name=cache-dir::$(composer config cache-files-dir)"' | ||
|
||
- | ||
name: 'Cache dependencies' | ||
uses: 'actions/cache@v2' | ||
with: | ||
path: '${{ steps.composer-cache.outputs.cache-dir }}' | ||
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}" | ||
restore-keys: 'php-${{ matrix.php-version }}-composer-locked-' | ||
|
||
- | ||
name: 'Install dependencies' | ||
env: | ||
COMPOSER_OPTIONS: '${{ matrix.composer-options }}' | ||
SYMFONY_REQUIRE: '${{ matrix.symfony-version }}' | ||
run: | | ||
rm -f composer.lock | ||
composer config --no-plugins allow-plugins.symfony/flex true | ||
composer global require symfony/flex | ||
composer install --no-progress --no-interaction --no-suggest --optimize-autoloader --ansi | ||
composer global config --no-plugins allow-plugins.symfony/flex true | ||
composer global require --no-progress --no-scripts --no-plugins symfony/flex | ||
composer update --no-progress $COMPOSER_OPTIONS | ||
- | ||
name: 'Install PHPUnit' | ||
run: 'vendor/bin/simple-phpunit install' | ||
|
||
- | ||
name: Run PHP-QA | ||
name: 'Run tests' | ||
run: | | ||
make cs-full | ||
vendor/bin/simple-phpunit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
includes: | ||
- /tools/.composer/vendor-bin/phpstan/vendor/phpstan/phpstan-phpunit/extension.neon | ||
- vendor/phpstan/phpstan-symfony/extension.neon | ||
- vendor/phpstan/phpstan-phpunit/extension.neon | ||
- vendor/phpstan/phpstan-phpunit/rules.neon | ||
|
||
parameters: | ||
level: 5 | ||
level: 8 | ||
paths: | ||
- ./src | ||
- ./tests | ||
|
||
ignoreErrors: | ||
#- '#__construct\(\) does not call parent constructor from .+#' | ||
#- '#Access to an undefined property Symfony\\Component\\Validator\\Constraint\:\:#' | ||
- "#Casting to string something that's already string#" | ||
|
||
# Tests | ||
- '#Call to an undefined method Prophecy\\Prophecy\\ObjectProphecy::[a-zA-Z0-9_]+\(\)#' | ||
#ignoreErrors: |
Oops, something went wrong.