Closed (fixed)
Project:
Drupal core
Version:
9.0.x-dev
Component:
phpunit
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
10 May 2020 at 22:34 UTC
Updated:
26 May 2020 at 19:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
longwaveComment #4
longwaveRandom fail.
Comment #6
kristen polThanks for the patch.
1) I don't see anything wrong with the patch. I read the issue summary in #3060996: Fix The "Symfony\Component\BrowserKit\Response::getStatus()" method is deprecated since Symfony 4.3, use getStatusCode() instead. and reviewed the commit https://git.drupalcode.org/project/drupal/commit/74e4b5d which added:
I compared this code with the code being removed in the patch and it's identical.
2) Patch applied cleanly to 9.0 and 9.1.
3) The issue summary says:
The patch from #3060996: Fix The "Symfony\Component\BrowserKit\Response::getStatus()" method is deprecated since Symfony 4.3, use getStatusCode() instead. was committed 11 August 2019 at 17:25.
Versions of
behat/mink-browserkit-driverare:1.3.4 - 2020-03-11 09:49 UTC
1.3.3 - 2018-05-02 09:25 UTC
I'm unclear where this is fixed. I see the same
getStatus()andgetStatusCode()calls in both versions. I assume I don't understand something obvious here.Comment #7
narendra.rajwar27Comment #8
kristen pol@narendra.rajwar27 If you aren't able to get to finish updating an issue within a few hours, it's best to unassign it so others might work on it. Thanks.
Comment #9
sja112 commentedI have updated the patch to fix
This deprecation is not added in the release. I am working on Drupal 9.1.x latest codebase.
Please review.
Comment #10
longwave@Kristen Pol: as always, thanks for the review! Tests will fail if deprecation notices still remain, as happened here - there is one case that was calling getStatus() directly and this caused the test to fail:
If the dependency was calling the old method then more tests would have failed in the same way. If we look at the diff between 1.3.3 and 1.3.4 of behat/mink-browserkit-driver we can see that a fix was added to only call the old method if the new one doesn't exist:
https://github.com/minkphp/MinkBrowserKitDriver/compare/v1.3.3..v1.3.4#d...
@sja112: Thanks for fixing the test failure! Other than removing the deprecation skip, that is the only change that is required here, so this is now RTBC.
Comment #11
alexpottCommitted and pushed ef61d27660 to 9.1.x and 492710b7ab to 9.0.x. Thanks!
Backported to 9.0.x as this is a test-only fix.
Comment #14
kristen pol@longwave Thanks for the thoughtful explanation! And to @sja112 for the update! And to @alexpott for the commit! :)