Problem/Motivation
Moved out of #3405696: Update composer dependencies for Drupal 10.2.0 based on comments #30 by @longwave:
There are quite a lot of changes here. Unsure if we should just break these out to another issue, and avoid upgrading Mink in 10.2.0.
and #33 by @andypost
+1 to move mink to separate issue it could be upgraded in bugfix release
Steps to reproduce
$ composer outdated
Proposed resolution
$ composer update behat/mink*
composer-lock-diff --no-links
+------------------------------+---------+---------+
| Dev Changes | From | To |
+------------------------------+---------+---------+
| behat/mink | v1.10.0 | v1.11.0 |
| behat/mink-browserkit-driver | v2.1.0 | v2.2.0 |
| behat/mink-selenium2-driver | v1.6.0 | v1.7.0 |
+------------------------------+---------+---------+
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|
Issue fork drupal-3407834
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
quietone commentedDon't know why yet but I am not able to create the MR for this.
Comment #4
spokje@quietone: By no means meant to take over your (not) MR, but I saw the button "Create MR" and clicked it, seems to work now?
Comment #5
viren18febs commentedI have updated the .json file and added patch, please review.
Comment #6
quietone commented@Spokje. thank you! It turns out that I was not logged into GitLab. I haven't had that particular problem before and didn't even check it.
Comment #7
spokjeThanks @viren18febS, but this issue is not only about updating the version, but also fixing the test-failures that come with the updates.
Also we very much prefer Merge Requests nowadays.
Comment #8
quietone commentedJust noting the failure
Comment #9
spokjeComment #10
spokjeComment #11
spokje@longwave in #3405696-#31/32
Looks like this either fails because of we're trying to drag something that isn't in the viewport and/or there's something special in Olivero that makes this fail.
I've found that the first dragTo always fails, but after the the exact same one will succeed.
Messed around a bit with trying to scroll elements into view, but couldn't find the right element to focus on and couldn't get it to work.
Also that would add to the fragility of the test, which isn't great.
I ended up converted the test to use the stark theme, which works.
If there are any special reasons we _should_ test this with the olivero, I feel that should be an extra test and living in the olivero namespace.
Comment #12
longwaveThanks for looking at BlockDragTest. It was added quite recently in #3384853: Javascript breaking on block layout page after drag or select new region, perhaps we can revert the fix and check that the test fails as expected on Stark?
Comment #13
longwaveThere is also some "interesting" code in
DrupalSelenium2Driver::dragTo():The upstream issues are related to the Syn library so perhaps we should try removing this block again, hiding exceptions isn't always great and I assume makes tests that use
dragTo()harder to debug.Comment #14
spokjeFull support for removing the empty catch, however I also found that code and did remove it locally.
No exceptions did bubble up :/
Comment #15
spokjeWhen I run BlockDragTest
- on 11.x
c09c0e5, so one commit before the fix, with manually added BlockDragTest- on the latest commit of this MR, with reverted
block.jsI both get a:
Which is the the last bulletpoint of the Steps to reproduce of #3384853: Javascript breaking on block layout page after drag or select new region, so I think that proves the stark test fails in the same way on the unfixed issue as the original claro test was.
This leaves me fully unsure about what exactly the original BlockDragTest was testing...
Let alone if we need the new test? Unsure if the tabledrag test isn't already covering all we're doing here TBH.
Comment #16
spokjeLeft 2 remarks/questions in the MR (most of the code in there isn't mine).
Comment #17
spokjeComment #18
spokjeLeft 2 remarks/semi-answers on questions by @longwave in the MR.
Comment #19
spokjeThanks for the quick turn-around @longwave.
Opened #3407961: [PP-1] Deprecate "helpers" for WebAssert::responseHeaderEquals and UiHelperTrait::submitForm as a follow-up. Closed my threads.
Comment #20
andypostLooks like it needs @mondrake input as one who managed this methods before
Comment #21
mondrakeCouple of comments inline in the MR. Do not know anything about the drag part, I can't comment on that.
Comment #22
spokjeThanks @mondrake, added some comments/changes on your comments.
Comment #23
mondrakeReplied, I think if we need to do the BC dance, better deprecate immediately the override, and convert core usages to
::responseHeaderDoesNotExist()here in this issue.Comment #24
spokjeComment #25
mondrakeSee inline comment
Comment #26
longwaveI don't think this is going to land in 10.2.0, but @catch and I agreed that in this case at least we can deprecate in 10.3.0 for removal in 11.0.0.
Comment #27
spokjeSee inline comment comment.
Comment #28
spokjeCan we agree on scoping of this issue and in possible follow-ups?
Doing all the deprecations in here would make the MR rather big, with all minimal changes, but the bulk of it would make it harder to review.
If we want to do deprecations in follow-ups, do we want a follow-up for each of them?
I see three of them currently:
1. Drupal\Tests\WebAssert::responseHeaderEquals($name, $value) with NULL as the $value argument.
2. Setting a checkbox with a non-boolean value in \Drupal\Tests\UiHelperTrait::submitForm
3. Setting text, number and radio button with a non-string value in \Drupal\Tests\UiHelperTrait::submitForm
Comment #29
mondrakeSure.
IMHO, only #28.1 needs to be done here, otherwise you wouldn't be able to bump the dependency. This way I'd set this to critical so we still have a chance of getting it in 10.2.
The rest can go separately with their own pace, in 10.3 or the future.
Comment #30
spokjeComment #31
spokjeIMHO we don't need any deprecation to get this in.
The BC-layers present in
fb454385b061a65207b8ae3698ce59198fe3fcd3would keep us afloat, and we can add deprecations later, IMHO-2 we give each of the three a separate follow-up.But the main concern seems to be if the core committers want this in 10.2.0, so let's await their guidance?
Comment #32
mondrakeSorry, I missed #26. If it's all 10.3 stuff, then back to normal. I still think #28.1 needs to be done here, though, and the rest separately. We'd be adding an override that we do not really want, so better have it deprecated upfront.
Comment #33
spokjeI would argue that we're adding two overrides and discovered one that should have been fixed long ago.
With the "pressure" of the 10.2.0 release gone, and looking at the amount of changes, although most of them are small/trivial, we get this in without deprecations and immediately start working on the three deprecations to minimize the sheer amount of changed code lines to review.
But basically this is all just minor scoping details, so open to any way we can get the update _and_ all the deprecations in shortly.
Comment #34
andypostComment #35
andypostupgraded deprecation to 10.3
Comment #38
alexpottI agree with #28 we should to do the minimum here and maintain maximum compatibility for tests. I agree that postponing deprecations to a follow-up makes a lot of sense.
Given the how some of the typehinting has changed in behat/mink 1.11.0 it's not possible to wrap everything in a deprecation but we should do a best effort.
I've opened #3421105: Add deprecations for update to behat/* dependencies to do the deprecations and I will create a new MR based on the all the previous work on this issue and close the two previous MR that it is built from. This will allow core-dev-pinned to get to the same version as core-dev and allow the W3C issue(s) to proceed without having to do to this upgrade too.
EDIT: fixed link to follow-up.
Comment #42
alexpottCreditting the authors of the previous MRs.
Comment #43
justafishlgtm!
Comment #44
catchThis looks great, but phpstan isn't happy.
Comment #45
catchComment #47
catchMy fault - forgot to composer install before running phpstan...
Committed/pushed to 11.x, thanks!
Comment #49
mxr576I dared to open this issue last night because it seems to me the way type enforcement arrived to a minor release of the behat/* libraries weren't BC. I am surprised that nobody else reported this before and tried to convince maintainers to change their solution.
Why it is important? Because we would like to support 10.2.x and 10.3.x at the same time, but tests fails when the newer version of behat/mink is installed. It is good that this problem was mitigated in Drupal core, but contrib/custom space is still impacted. https://drupal.slack.com/archives/C223PR743/p1719331712444049
Comment #50
quietone commentedTagging based on a comment by xjm in committer slack to consider.