-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
Fixes #614 for PHP 8.1, Symfony 6, Drush 11, etc. #615
Conversation
Overlaps with #610 |
@Berdir yeah, i know it overlaps with a couple of other efforts. i'm hoping we can get at least one of them merged, though. my behat testing is currently blocking me from being able to execute CI on my PHP 8.1 project update. |
the failure I'm hitting seems to be related to symfony/panther#291, digging more. |
@jhedstrom digging into the issues in the build failure, it looks like https://github.com/FriendsOfBehat/MinkExtension did some refactoring in version 2 which is causing the set client error in the build:
I've started poking at this a little bit, it looks like they are checking for Goutte1 in their code (see https://github.com/FriendsOfBehat/MinkExtension/blob/master/src/Behat/MinkExtension/ServiceContainer/Driver/GoutteFactory.php#L115) which could be the root cause. I'm going to go open an issue over there to see if we can make forward progress. |
actually, it looks like there is a PR that fixes this FriendsOfBehat/MinkExtension#16 and it works, but not for the Drupal 7 stuff. I think we may need to split the drupalextension and have one version that is for newer versions of symfony. any thoughts? |
@mikemadison13 yeah, I think we could start a 5.x and drop support for Drupal 7 in that branch? |
2276754
to
ef875ea
Compare
it's unclear to me if there's anything in #610 that we need to roll into this. i don't think so based on what i see there, but that PR does change the behat.yml.dist file from goutte to browserkit_http. i'm not sure if that's still needed? @claudiu-cristea might have some input? |
i think we can also close #602 as well given this? |
composer.json
Outdated
@@ -59,6 +61,11 @@ | |||
} | |||
}, | |||
"extra": { | |||
"patches": { | |||
"friends-of-behat/mink-extension": { | |||
"setClient error": "https://github.com/FriendsOfBehat/MinkExtension/files/9480850/16.txt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add the PR number #16
here for easy reference to the issue in case we forget where this came from :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created mikemadison13#1 (against fork)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my project the patch doesn't apply, friends-of-behat/mink-extension is locked to 2.3.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i wonder if we need to set a minimum version to 2.7.1 of the mink-extension? I'm not sure how we make this PR work without that patch (because it fatal errs out). So we either need to pin way earlier (2.3.1 and remove the patch) or pin later (2.7.1) with. my preference would be the newer version. thoughts @jhedstrom ?
composer.json
Outdated
"friends-of-behat/mink-extension": { | ||
"setClient error": "https://github.com/FriendsOfBehat/MinkExtension/files/9480850/16.txt" | ||
} | ||
}, | ||
"branch-alias": { | ||
"dev-master": "4.3.x-dev" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you'll want to merge master
in since this line has changed for 5.0.x
now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created mikemadison13#1 (against fork)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i've rebased off of the upstream/master and have this change now.
@mikemadison13 I don't have time for #610 and, honestly, I have no idea how to fix it. Feel free to include here anything that could be useful |
@mikemadison13 This PR is fixing the dependency issues I have when updating to PHP 8.1. Thank you. Could you, please fix the 2 minor remarks and let's get this in? |
composer.json
Outdated
@@ -59,6 +61,11 @@ | |||
} | |||
}, | |||
"extra": { | |||
"patches": { | |||
"friends-of-behat/mink-extension": { | |||
"setClient error from PR16": "https://github.com/FriendsOfBehat/MinkExtension/files/9480850/16.txt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even with the version constraint, a patch is IMHO too unstable, sooner or later that won't apply anymore or will be merged. We could maybe combine it with a specific requirement on that specific version, but waiting for that to be merged and committed is probably the safer option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Berdir there have been a number of requests to merge the PR and it hasn't happened, so I don't fundamentally disagree with the concern, but I'm not sure if the maintainer can merge things at the moment given their location. we did try and make this "more stable" by pointing at a patch file vs. the actual PR. i guess we could explicitly pin to 2.7.1 to prevent accidental breakage / updates?
Can we please get this merged. The CI passes, the patch is actually a "static" file - all looks like it is working. If that patch won't apply in the future - we can always update this package and roll a new version. This is currently blocks using Behat with Drupal 10 big time. |
@jhedstrom @Berdir @mikemadison13 wouldn't be better if we try to move away from the Goutte driver? See here how Moodle community did it stronk7/moodle@master...bump_goutte_driver_20 |
Sure, that's what I always expected will need to happen eventually, see first comment in #606 :) Back then it was blocked on FriendsOfBehat/MinkExtension#14, but now that should be possible? |
@Berdir could you, please, take a look at #620. It's not ready yet but I have a green there EDIT:
|
@AlexSkrypnyk could you take a look and try #620? That drops Goutte Driver. @mikemadison13 should we close this in favor of #620? |
my strong preference would be to get this in ASAP so we can unblock d10. and then we can explore the feature dev for Goutte. but obviously i defer to @jhedstrom |
@mikemadison13 we're already there. See the tests on GitHub actions here https://github.com/claudiu-cristea/drupalextension/actions/runs/3266111531. I'm now investigating the failure with Drupal 10, which is happening in drupal/drupal-driver EDIT: I had to implement GitHub actions as Travis CI hit some quota |
i believe we would still need to merge in all of the symfony 6 stuff from this (or another PR) to get us to d10, right? |
I've cherry picked some commits from here in #620. Actually, it supports Sf 6, Drush 11. I'm still working on D10 stuff. Very close... |
The upstream blocker was merged. If I may suggest - can we update this PR, merge it, release it and then look at 620? |
@AlexSkrypnyk they are doing the same, with the exception that FriendsOfBehat/MinkExtension#16 wraps the BrowserKit Driver from Goutte Driver while #620 uses directly the BrowserKit Driver and drops the dependency on Goutte Driver |
@jhedstrom |
@AlexSkrypnyk I don't see why this needs to be merged as #620 is solving exactly the same issue but as a definitive fix. Did you give #620 a try? If we merge this just to drop it in #620 somebody has to rework/reroll #620. Useless work. Why not, better, focusing on that to se if fulfills the scope? |
@claudiu-cristea There is only 1 files change in this PR ( |
goutte v2 is just a wrapper around browserkit, I agree that it makes more sense to pursue that directly. |
@AlexSkrypnyk 90% of changes are only file removals, renaming, docs changes and Behat tags removals because it drops the Drupal 7/8 support |
just to chime in to support the point @AlexSkrypnyk is making, it would be fantastic to get D10 unblocked asap. if that's with this pr great. if that's with 620 great, i don't have a lot of skin in the game. i just want to get behat unblocked. it feels safer to use the current approach first and then explore a new approach separately, but 🤷 |
@Berdir @claudiu-cristea #620 has a lot of changes: there are new local env configs, new CI configs, Drupal 8 deprecations, test artefacts and other changes that will take time to discuss. I guess it is up to project maintainer to decide if changes in that PR can be accepted as-is or more discussions are required. We have this PR that is working and does not change any dependencies (so that downstream projects do not have to update theirs). It is ready to be merged right now. It has minimal changes and, therefore, less risk to introduce new issues. I do not see a problem with merging this PR as-is and releasing a new version (could even be a patch version) to unblock downstream and then concentrate on #620 and spend as much time as required there. |
This could potentially go against the latest 4.x.x branch, and keep #620 against |
@jhedstrom i think we discussed cutting the 5.x branch for Drupal 10 given that we had to remove some of the earlier supported versions of things, right? just making sure i don't misremember. this branch will not work well with older things. |
Yeah, 5.x will drop D7 support and add D10 support, so scratch my thought above. Since 5.x is not released, and #620 is the eventual direction we'd want to go anyway, I'm inclined to go that route... |
cool, if that's the route to go then as i said above i don't really care. i just would like the most expedient route to d10. so if we aren't merging this and cutting it (despite it being ready to go right now) when can we have the other? happy to help test once we have the dependencies merged. |
I guess this can be closed. The fix from #620 has been already merged in |
Thanks for all the work here! I'm closing this out since #620 was merged. |
@jhedstrom The reason for submitting this pull request was to prevent this specific situation from occurring. Could you please advise what is the planned course of actions here? Is 5.x going to have a release soon? Can this PR be ported to |
@AlexSkrypnyk thanks for the reminder. Since no major issues have been reported with the alpha release I've tagged RC1 for 5.0.0. |
Updates the following: