Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
\Drupal\Tests\system\Functional\Update\UpdateScriptTest::testExtensionCompatibilityChange() visits update.php twice - by calling assertUpdateWithNoError() twice. The first time it sets a session variable update_ignore_warnings
so the next time we ignore the warning causing the code in \Drupal\Tests\RequirementsPageTrait::updateRequirementsProblem() to fail.
Proposed resolution
Only try to click on try again if this link exists.
Remaining tasks
User interface changes
None
API changes
None
Data model changes
None
Release notes snippet
N/a
Comment | File | Size | Author |
---|---|---|---|
#2 | 3122742-2.patch | 810 bytes | alexpott |
Comments
Comment #2
alexpottPotentially we should make this change on all branches...
Comment #3
dwwThis has nothing to do with Update Manager (update.module), these tests are for update.php (database update system). Moving to the right component.
Never looked at this test before, but the fix seems okay on a quick glance. I'm a little head-scratchy about a conditional in the test like this. Also not clear from an initial review what any of this has to do with PHP5. Can't really RTBC (yet), but I see no reason to NW, either. /shrug
Cheers,
-Derek
Comment #4
xjmAh yep, that would do it.
I'm going to commit this straight from NR since HEAD is broken. ...Once PHP 5.5 is done running...
Comment #10
xjmCommitted to... 9.1.x, 9.0.x, 8.9.x, 8.8.x, and 8.7.x. Thanks!
Comment #11
xjmOh, @dww, on 8.7 when we were phasing out PHP 5 support, there was a requirements warning screen that the user had to click past notifying them that PHP 7 would be required starting with the next minor. This warning doesn't exist on 8.8+ because we dropped PHP 5 support completely in 8.8.
The patched method is a helper method (not a test method) that clicks past the requirements warnings when it's presented, because we have no way to independently test the next screen of the
update.php
UI (since it's a separate front controller with$stuff
that happens based on a POST submission). The test will either see or not see the warning depending on the test environment. The warning is expected and correct on PHP 5 environments, but not on PHP 7 ones.