diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index d648882b..7c5a4140 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -33,8 +33,8 @@ jobs: - "8.1" drupal-core: # Should update the following as the minimum supported version from Drupal.org - - "9.3.x" - "9.4.x" + - "9.5.x" steps: @@ -126,13 +126,13 @@ jobs: sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional - name: "Run PHPUnit tests" - if: ${{ matrix.drupal-core != '9.4.x' || matrix.php-version != '8.1' }} + if: ${{ matrix.drupal-core != '9.5.x' || matrix.php-version != '8.1' }} run: | cd drupal vendor/bin/phpunit -c core --verbose --color --group apigee_edge --testsuite unit,kernel,functional,functional-javascript modules/contrib/apigee_edge - name: "Run PHPUnit tests with Code Coverage" - if: ${{ matrix.drupal-core == '9.4.x' && matrix.php-version == '8.1' }} + if: ${{ matrix.drupal-core == '9.5.x' && matrix.php-version == '8.1' }} run: | cd drupal cp modules/contrib/apigee_edge/phpunit.core.xml.dist core/phpunit.xml @@ -146,7 +146,7 @@ jobs: path: drupal/sites/simpletest/browser_output/* - name: Upload coverage to Codecov - if: ${{ matrix.drupal-core == '9.4.x' && matrix.php-version == '8.1' }} + if: ${{ matrix.drupal-core == '9.5.x' && matrix.php-version == '8.1' }} uses: codecov/codecov-action@v3 with: files: /tmp/coverage.xml diff --git a/apigee_edge.libraries.yml b/apigee_edge.libraries.yml index 3b0cea2e..44d057da 100644 --- a/apigee_edge.libraries.yml +++ b/apigee_edge.libraries.yml @@ -51,7 +51,7 @@ apigee_edge.status_property: css/apigee_edge.status_property.css: {} apigee_edge.secret: - version: 1.0 + version: 1.1 css: theme: css/apigee_edge.secret.css: {} diff --git a/composer.json b/composer.json index 7bed312f..3ed94f3c 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "php": "^8.0", "ext-json": "*", "apigee/apigee-client-php": "^2.0.16", - "drupal/core": "^9.3", + "drupal/core": "^9.4", "drupal/entity": "^1.0", "drupal/key": "^1.8", "php-http/guzzle6-adapter": "^2.0" @@ -17,7 +17,7 @@ "behat/mink-extension": "^2.0", "bex/behat-screenshot": "^1.2", "cweagans/composer-patches": "^1.6", - "drupal/core-dev": "^9.3", + "drupal/core-dev": "^9.4", "drush/drush": "^9.0 || ^10.0", "mglaman/drupal-check": "1.3", "phpmd/phpmd": "^2.8.2", diff --git a/js/apigee_edge.secret.js b/js/apigee_edge.secret.js index 382abc91..cb192c06 100644 --- a/js/apigee_edge.secret.js +++ b/js/apigee_edge.secret.js @@ -39,7 +39,7 @@ $this.addClass(hClass); // Toggle secret. - $(this).find('.secret__toggle').on('click', function (event) { + $(this).find('.secret__toggle').once().on('click', function (event) { let index = $(this).closest(appElWrapper).find('.secret__toggle').index(this); let wrapperIndex = $wrapper.data('app-container-index'); event.preventDefault(); @@ -57,7 +57,7 @@ // Copy to clipboard. let $copy = $(this).find('.secret__copy'); - $copy.find('button').on('click', function (event) { + $copy.find('button').once().on('click', function (event) { let index = $(this).closest(appElWrapper).find('.secret__copy button').index(this); let wrapperIndex = $wrapper.closest('fieldset').parent().find('fieldset').index($(this).closest('fieldset')); callEndpoint($wrapper.data('app-keys-url'), function(data) { diff --git a/src/Exception/KeyProviderRequirementsException.php b/src/Exception/KeyProviderRequirementsException.php index 50ccb464..745c7b9f 100644 --- a/src/Exception/KeyProviderRequirementsException.php +++ b/src/Exception/KeyProviderRequirementsException.php @@ -20,6 +20,7 @@ namespace Drupal\apigee_edge\Exception; +use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\Core\StringTranslation\TranslatableMarkup; /** @@ -27,10 +28,12 @@ */ class KeyProviderRequirementsException extends RuntimeException { + use StringTranslationTrait; + /** * The TranslatableMarkup object containing a message to render on the UI. * - * @var \Drupal\Core\StringTranslation\TranslatableMarkup + * @var \Drupal\Core\StringTranslation\TranslatableMarkup|null */ protected $translatableMarkupMessage; @@ -39,7 +42,7 @@ class KeyProviderRequirementsException extends RuntimeException { * * @param string $message * The Exception message. - * @param \Drupal\Core\StringTranslation\TranslatableMarkup $translatable_markup_message + * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $translatable_markup_message * The translatable markup object of the exception to display on the pages * where the exception is caught. * @param int|null $code