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

[WIP] Add Symfony support version 7.0, drop unmaintainned versions #206

Closed
wants to merge 9 commits into from
25 changes: 13 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,16 @@ jobs:
fail-fast: false
matrix:
php-version:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
symfony-version:
- '4.4.*'
- '5.4.*'
- '6.0.*'
- '6.1.*'
- '6.4.*'
- '7.0.*'
exclude:
- php-version: '7.4'
symfony-version: '6.0.*'
- php-version: '7.4'
symfony-version: '6.1.*'
- php-version: '8.0'
symfony-version: '6.1.*'
- php-version: '8.1'
symfony-version: '7.0.*'
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -48,6 +43,12 @@ jobs:
- name: Lock Symfony version
run: VERSION=${{ matrix.symfony-version }} .github/workflows/lock-symfony-version.sh

- name: Remove Symfony proxy-manager-bridge
Copy link
Contributor

Choose a reason for hiding this comment

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

Removing this in the job for Symfony 7 hides the fact that this will still be broken for users of the package.

Removing packages in some CI jobs is an acceptable workaround for dev requirements, but not for normal requirements.

My suggestion here would be to drop support for Symfony 5.4 as well (keeping those users on the previous minor version of the extension) as Symfony 6.2+ does not need the proxy-manager-bridge to actually make services lazy.

run: |
composer config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
Copy link
Contributor

Choose a reason for hiding this comment

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

the allowed plugins should be configured in your composer.json directly to avoid bothering contributors each time.

composer remove "symfony/proxy-manager-bridge" --no-update
if: matrix.symfony-version == '7.0.*'

- name: Install dependencies
run: |
composer config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
Expand All @@ -70,7 +71,7 @@ jobs:
with:
coverage: none
ini-values: "memory_limit=-1, zend.assertions=1"
php-version: 7.4
php-version: 8.1
Copy link
Contributor

Choose a reason for hiding this comment

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

I would use at least PHP 8.2 so that it can install the latest deps

tools: composer:v2, flex

- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
If you're starting a new project, we recommend to use Symfony with Flex as it's the most straightforward way.
If you're adding this extension to an existing project, pick the method that fits it the best.

### Symfony 4/5 (with Flex)
### Symfony 5/6/7 (with Flex)

1. Require this extension using *Composer* and allow for using contrib recipes:

```bash
composer require --dev friends-of-behat/symfony-extension:^2.0
```

### Symfony 4/5 (new directory structure, without Flex)
### Symfony 5/6/7 (new directory structure, without Flex)

1. Require this extension using *Composer*:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<h1 align="center">SymfonyExtension</h1>

This Behat extension provides an integration with Symfony (`^4.4`, `^5.3` and `^6.0`) and Mink driver for Symfony application.
This Behat extension provides an integration with Symfony (`^5.4`, `^6.4` and `^7.0`) and Mink driver for Symfony application.

It allows for:

Expand Down
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
}
],
"require": {
"php": "^7.4 || ^8.0",
"behat/behat": "^3.6.1",
"symfony/dependency-injection": "^4.4 || ^5.3 || ^6.0",
"symfony/http-kernel": "^4.4 || ^5.3 || ^6.0",
"symfony/proxy-manager-bridge": "^4.4 || ^5.3 || ^6.0"
"php": "^8.1",
"behat/behat": "dev-master",
Copy link
Contributor

Choose a reason for hiding this comment

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

this should stay as ^3.6.1 IMO. Your CI job for Symfony 7 should be configuring minimum-stability: dev for now until the support is part of a Behat release.

"symfony/dependency-injection": "^5.4 || ^6.4 || ^7.0",
"symfony/http-kernel": "^5.4 || ^6.4 || ^7.0",
"symfony/proxy-manager-bridge": "^5.4 || ^6.4"
},
"require-dev": {
"behat/mink-browserkit-driver": "^2.0",
Expand All @@ -25,10 +25,10 @@
"friends-of-behat/page-object-extension": "^0.3.2",
"friends-of-behat/service-container-extension": "^1.1",
"sylius-labs/coding-standard": ">=4.1.1, <=4.2.1",
"symfony/browser-kit": "^4.4 || ^5.3 || ^6.0",
"symfony/framework-bundle": "^4.4 || ^5.3 || ^6.0",
"symfony/process": "^4.4 || ^5.3 || ^6.0",
"symfony/yaml": "^4.4 || ^5.3 || ^6.0",
"symfony/browser-kit": "^5.4 || ^6.4 || ^7.0",
"symfony/framework-bundle": "^5.4 || ^6.4 || ^7.0",
"symfony/process": "^5.4 || ^6.4 || ^7.0",
"symfony/yaml": "^5.4 || ^6.4 || ^7.0",
"vimeo/psalm": "4.30.0"
},
"suggest": {
Expand Down