Make this project compatible for drupal 9.

use drupal-check, rector , upgrade_status module to check the changes needed to be done
Add core_version_requirement: ^8 || ^9 to .info.yml

CommentFileSizeAuthor
#2 3138960-2.patch906 bytessarvjeetsingh

Comments

sarvjeetsingh created an issue. See original summary.

sarvjeetsingh’s picture

Assigned: sarvjeetsingh » Unassigned
Status: Active » Needs review
StatusFileSize
new906 bytes

- added core_version_requirement: ^8 || ^9
- fixed errors found by rector, upgrade_status and drupal-check.

mradcliffe’s picture

I'm going to review and manually test @sarvjeetsingh's patch in #2.

mradcliffe’s picture

Status: Needs review » Reviewed & tested by the community
+++ b/tweme.theme
@@ -1,5 +1,6 @@
+use Drupal\block\Entity\Block;

@@ -24,7 +25,7 @@ function tweme_preprocess_region__footer(&$variables) {
-  $block = \Drupal\block\Entity\Block::load($variables['elements']['#id']);
+  $block = Block::load($variables['elements']['#id']);

This change isn't strictly necessary to update to maintain Drupal 9 compatibility.

However since the patch is pretty small I think it is a nice quality change.

If you're working on a larger patch, it may be best not to include changes that are not strictly necessary for Drupal 9 compatibility, @sarvjeetsingh.

I installed Drupal 8.9.x and tweme 8.x-4.x. Then I updated to Drupal 9.0.x, saw the requirements error on the update page, applied the patch, ran database updates, and the site was still functional.

+1 RTBC.