Problem/Motivation

If people mess up prepping their code for update they might remove the AMP library from vendor.

Proposed resolution

Make the requirement fire on update too.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

CommentFileSizeAuthor
#2 2867636-2.patch3 KBalexpott
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
FileSize
3 KB

If you do a diff ignoring whitespace...

diff --git a/amp.install b/amp.install
index 1af44db..7745f9f 100644
--- a/amp.install
+++ b/amp.install
@@ -8,7 +8,6 @@ use Drupal\image\ImageStyleInterface;
  */
 function amp_requirements($phase) {
   $requirements = [];
-  if ($phase == 'install' || $phase == 'runtime') {
   if (!class_exists('\Lullabot\AMP\AMP')) {
     $requirements['amp_library'] = [
       'title' => t('AMP'),
@@ -39,7 +38,6 @@ function amp_requirements($phase) {
       ];
     }
   }
-  }
   return $requirements;
 }

This change is pretty simple.

  • mtift committed 016524c on 8.x-1.x authored by alexpott
    Issue #2867687 by alexpott: We should be checking if the lullabot/amp is...
mtift’s picture

Status: Needs review » Fixed

Committed to 8.x-1.x. Thanks, Alex.

Status: Fixed » Closed (fixed)

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