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
Other than testing code, Upgrade Status should not use deprecated code. However Upgrade Status should support the supported core branches. So only over 1y old deprecations are resolvable, at least based on when the replacement was made available.
Proposed resolution
Scan for deprecated code regularly, possibly enable deprecation checking in tests (although test coverage may not be very close to 100%).
Remaining tasks
Fix file_prepare_directory ([#3006851] after Drupal 8.8 release.
User interface changes
None.
API changes
TBD.
Data model changes
TBD.
Release notes snippet
N/A
Comment | File | Size | Author |
---|---|---|---|
#14 | 3056118-14.patch | 4.41 KB | Gábor Hojtsy |
#12 | 3056118-12.patch | 6.14 KB | joshi.rohit100 |
Comments
Comment #2
Gábor HojtsyComment #3
Gábor HojtsyComment #4
kfritscheDid the scan for upgrade_status.
Only open issue is from [#3006851], which can't be fixed before 8.9/9.
Postponing issue.
Comment #5
rpsuI think the first and second issue in (
file_prepare_directory()
) be fixed when Drupal 8.8 released, since at that time 8.6 is no more supported (which is where the function is still in use).Comment #6
Gábor HojtsyIndeed, that is the idea. The module currently categorizes it as "Fix later" :) Which is why this is postponed.
Comment #7
rpsusure, but with 8.8 release - we do not need to wait until 8.9 is released.
Comment #8
Gábor HojtsyYou are right. I counted wrong :)
Comment #9
rpsuComment #10
Gábor HojtsyWith the 8.8.0 core release planned next week, anyone wants to jump on this? :) The two file_prepare_directory() calls should be fixable. The other two are explicitly in tests, so their presence should be kept. Therefore we can close this issue entirely once Drupal 8.8.0 is out :)
Comment #11
Gábor Hojtsy8.8.0 is out, we can do this now.
Comment #12
joshi.rohit100Comment #13
Gábor HojtsyThese are intentionally places in the tests to test that we find the problems. They should not be fixed. The rest of the fixes however look great, thanks!
Comment #14
Gábor HojtsyRerolled for that. Also put the use statement in the proper place alphabetically.
Also retitling since we cannot actually make the module Drupal 9 compatible per say, at least not with passing tests, since our tests assume Drupal 8 deprecated APIs present. This will be removed from Drupal 9 if not already. We can only test the module works with Drupal 9 once there are genuine Drupal 9 deprecation and then swap the right tests code for Drupal 8 and 9 appropriately. So not in scope for this issue really.
Comment #16
Gábor HojtsyOpened #3100308: Make Upgrade Status tests Drupal 9 compatible.
Comment #18
Gábor HojtsyFigured out that file_directory_temp() was deprecated in Drupal 8.8.0 in fact, so we should not yet replace that. We require Drupal 8.7.0 currently. Rolled back that part of this patch and that means we need to have an issue for that too.