Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Twig 2 support #924

Merged
merged 1 commit into from
Sep 6, 2024
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
7 changes: 1 addition & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
jobs:
tests:
runs-on: ubuntu-latest
name: "PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, Twig ${{ matrix.twig }}, Persistence: ${{ matrix.persistence }}, Collections: ${{ matrix.collections }}"
name: "PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, Persistence: ${{ matrix.persistence }}, Collections: ${{ matrix.collections }}"
env:
APP_ENV: ${{ matrix.app_env }}
strategy:
Expand Down Expand Up @@ -74,11 +74,6 @@ jobs:
composer require "pagerfanta/pagerfanta:${{ matrix.pagerfanta }}" --dev --no-update --no-scripts
(cd src/Component && composer require "pagerfanta/core:${{ matrix.pagerfanta }}" --no-update --no-scripts)

-
name: Restrict twig/twig version
if: matrix.twig != ''
run: composer require "twig/twig:${{ matrix.twig }}" --no-update --no-scripts

-
name: Restrict doctrine/persistence version
if: matrix.persistence != ''
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,15 @@
"symfony/messenger": "^5.4 || ^6.4 || ^7.0",
"symfony/serializer": "^5.4 || ^6.4 || ^7.0",
"symfony/security-bundle": "^5.4 || ^6.4 || ^7.0",
"twig/twig": "^2.12 || ^3.0",
"twig/twig": "^3.0",
"vimeo/psalm": "^5.20",
"willdurand/hateoas-bundle": "^2.0"
},
"conflict": {
"friendsofsymfony/rest-bundle": "<3.0",
"jms/serializer-bundle": "<3.5",
"willdurand/hateoas-bundle": "<2.0 || ^2.6"
"willdurand/hateoas-bundle": "<2.0 || ^2.6",
"twig/twig": "<3.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we have bumped up the dependency, I'm not sure if it is necessary to add this package additionally to the conflicts (and the about note to the CONFLICTS file), do you see any benefit of that? 🤔

Copy link
Member Author

@loic425 loic425 Sep 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cause it's on require-dev, it needs a conflict. We often forgot about those conflicts when there are on "optional/dev" requirements.
However, I do not know if adding note in the conflict make sense, cause it's just a bumped dependency.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed CONFLICTS file part.

},
"suggest": {
"doctrine/orm": "^2.5",
Expand Down
5 changes: 4 additions & 1 deletion src/Component/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@
"sylius/grid": "^1.7 || dev-symfony-7",
"symfony/serializer": "^5.4 || ^6.4 || ^7.0",
"symfony/workflow": "^5.4 || ^6.4 || ^7.0",
"twig/twig": "^2.12 || ^3.0"
"twig/twig": "^3.0"
},
"conflict": {
"twig/twig": "<3.0"
},
"extra": {
"branch-alias": {
Expand Down
Loading