Skip to content

Commit 5c1ce36

Browse files
PedroTrollertacman
andauthored
feat: allow Symfony 6.1 (#173)
* feat: allow Symfony 6.1 (#171) * fix: composer install on ciecle-ci (#172) * test: enable tests for unstable Symfony versions (#174) * test: add security:check (#175) Co-authored-by: Tac Tacelosky <[email protected]>
1 parent f16aa44 commit 5c1ce36

File tree

3 files changed

+30
-9
lines changed

3 files changed

+30
-9
lines changed

.circleci/config.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,18 @@ jobs:
1717
type: string
1818
composer-options:
1919
type: string
20+
minimum-stability:
21+
type: enum
22+
default: "stable"
23+
enum: ["stable", "dev"]
2024
steps:
2125
- checkout
2226
- run: |
27+
echo 'deb [trusted=yes] https://repo.symfony.com/apt/ /' | tee /etc/apt/sources.list.d/symfony-cli.list
2328
apt-get update
24-
apt-get -y install git zip jq
29+
apt-get -y install git zip jq symfony-cli
2530
- run: |
2631
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
27-
php -r "if (hash_file('sha384', 'composer-setup.php') === '906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
2832
php composer-setup.php
2933
php -r "unlink('composer-setup.php');"
3034
mv composer.phar /usr/local/bin/composer
@@ -34,7 +38,12 @@ jobs:
3438
mv composer.new.json composer.json
3539
rm conflict.json
3640
cat composer.json
41+
- run: |
42+
jq -s '.[0] + {"minimum-stability": "<< parameters.minimum-stability >>"}' composer.json > composer.new.json
43+
mv composer.new.json composer.json
44+
cat composer.json
3745
- run: composer update << parameters.composer-options >> --ignore-platform-req=ext-intl
46+
- run: symfony security:check
3847
- run: vendor/bin/phpstan analyse --no-progress --memory-limit=-1
3948
- run: vendor/bin/phpspec run -v --config=phpspec.no-coverage.yml
4049
- run: bin/lint-twig src/
@@ -76,3 +85,14 @@ workflows:
7685
composer-options:
7786
- "--prefer-stable --prefer-lowest"
7887
- "--prefer-stable"
88+
- test:
89+
name: php8.1-dev
90+
php: "8.1"
91+
minimum-stability: "dev"
92+
matrix:
93+
parameters:
94+
symfony:
95+
- "6.1"
96+
composer-options:
97+
- "--prefer-stable --prefer-lowest"
98+
- "--prefer-stable"

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@
2424
"symfony/http-foundation": "^5.4 || ^6.0",
2525
"symfony/http-kernel": "^5.4 || ^6.0",
2626
"symfony/validator": "^5.4 || ^6.0",
27-
"twig/twig": "~2.14.7 || ~3.0"
27+
"twig/twig": "^2.14.11 || ^3.3.8"
2828
},
2929
"require-dev": {
3030
"beberlei/assert": "^3.3",
31-
"fakerphp/faker": "^1.18",
31+
"fakerphp/faker": "^1.19",
3232
"friends-of-phpspec/phpspec-code-coverage": "^6.1",
33-
"friendsofphp/php-cs-fixer": "^3.4",
34-
"pedrotroller/php-cs-custom-fixer": "^2.27",
33+
"friendsofphp/php-cs-fixer": "^3.8",
34+
"pedrotroller/php-cs-custom-fixer": "^2.28",
3535
"phpspec/phpspec": "^7.2",
3636
"phpspec/prophecy": "^1.15",
37-
"phpstan/phpstan": "^1.4.6",
38-
"symfony/twig-bridge": "^4.4 || ^5.4 || ^6.0",
39-
"symfony/var-dumper": "^4.4 || ^5.4 || ^6.0"
37+
"phpstan/phpstan": "^1.7",
38+
"symfony/twig-bridge": "^5.4 || ^6.0",
39+
"symfony/var-dumper": "^5.4 || ^6.0"
4040
},
4141
"minimum-stability": "stable",
4242
"autoload": {

src/Knp/DictionaryBundle/Validator/Constraints/DictionaryValidator/SymfonyCompatibilityTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
default:
1515
throw new Exception('knplabs/dictionary-bundle is not compatible with the current version of symfony/validator: '.$version);
1616

17+
case '6.1':
1718
case '6.0':
1819
trait SymfonyCompatibilityTrait
1920
{

0 commit comments

Comments
 (0)