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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gábor Hojtsy created an issue. See original summary.

Gábor Hojtsy’s picture

Title: Keep Upgrade Status itself Drupal 9 compatible » Keep Upgrade Status itself Drupal 9 compatible other than testing code
Gábor Hojtsy’s picture

Issue summary: View changes
kfritsche’s picture

Issue summary: View changes
Status: Active » Postponed

Did the scan for upgrade_status.

upgrade status of upgrade status

Only open issue is from [#3006851], which can't be fixed before 8.9/9.

Postponing issue.

rpsu’s picture

Issue summary: View changes

I 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).

Gábor Hojtsy’s picture

Indeed, that is the idea. The module currently categorizes it as "Fix later" :) Which is why this is postponed.

rpsu’s picture

sure, but with 8.8 release - we do not need to wait until 8.9 is released.

Gábor Hojtsy’s picture

You are right. I counted wrong :)

rpsu’s picture

Issue tags: +post-release-core-8.8
Gábor Hojtsy’s picture

Status: Postponed » Active

With 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 :)

Gábor Hojtsy’s picture

Issue tags: -post-release-core-8.8

8.8.0 is out, we can do this now.

joshi.rohit100’s picture

Status: Active » Needs review
FileSize
6.14 KB
Gábor Hojtsy’s picture

Status: Needs review » Needs work
+++ b/tests/modules/upgrade_status_test_contrib_error/src/Controller/UpgradeStatusTestContribErrorController.php
@@ -3,6 +3,7 @@
+use Drupal\Component\Render\FormattableMarkup;

@@ -12,7 +13,7 @@ class UpgradeStatusTestContribErrorController extends ControllerBase {
-      '#markup' => format_string('I am @deprecated', ['@deprecated' => 'deprecated']),
+      '#markup' => new FormattableMarkup('I am @deprecated', ['@deprecated' => 'deprecated']),

+++ b/tests/modules/upgrade_status_test_error/src/Controller/UpgradeStatusTestErrorController.php
@@ -7,7 +7,7 @@ use Drupal\Core\Controller\ControllerBase;
   public function content() {
-    menu_cache_clear_all();
+    $this->cache('menu')->invalidateAll();

These 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!

Gábor Hojtsy’s picture

Title: Keep Upgrade Status itself Drupal 9 compatible other than testing code » Remove deprecated code from Upgrade Status
Category: Plan » Task
Status: Needs work » Needs review
FileSize
4.41 KB

Rerolled 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.

  • Gábor Hojtsy committed 914deed on 8.x-1.x
    Issue #3056118 by Gábor Hojtsy, joshi.rohit100, rpsu, kfritsche: Remove...
Gábor Hojtsy’s picture

  • Gábor Hojtsy committed eb06ff1 on 8.x-1.x
    Issue #3056118 by Gábor Hojtsy: revert the portion of this issue that...
Gábor Hojtsy’s picture

Status: Needs review » Fixed

Figured 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.