diff --git a/composer.json b/composer.json index a79cf4cb0cdefb7e5ba4f768e04c8420ea9f2d8a..99db02dca20ca322c439221245805d573409fc29 100644 --- a/composer.json +++ b/composer.json @@ -145,7 +145,7 @@ "drupal/mobile_detect_twig_extensions": "1.5", "drupal/module_filter": "3.2", "drupal/multiple_fields_remove_button": "^1.0@alpha", - "drupal/pantheon_advanced_page_cache": "1.2", + "drupal/pantheon_advanced_page_cache": "^2.1", "drupal/paragraphs": "1.12", "drupal/pathauto": "1.11", "drupal/queue_mail": "^1.4", diff --git a/composer.lock b/composer.lock index af6ea3061902fcb188d0d1a189fad51600ef4857..ef31a3398c2de30f81d7c914c880091221cdc36c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "00b3339b124e176f69a985ebf27eaa8c", + "content-hash": "fd9f387d71c1c22b9125c0418cb47fcd", "packages": [ { "name": "alchemy/zippy", @@ -6109,20 +6109,20 @@ }, { "name": "drupal/pantheon_advanced_page_cache", - "version": "1.2.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://git.drupalcode.org/project/pantheon_advanced_page_cache.git", - "reference": "8.x-1.2" + "reference": "2.1.1" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/pantheon_advanced_page_cache-8.x-1.2.zip", - "reference": "8.x-1.2", - "shasum": "265f738df7e0d094f43b4f7a5b31ac3c5d799316" + "url": "https://ftp.drupal.org/files/projects/pantheon_advanced_page_cache-2.1.1.zip", + "reference": "2.1.1", + "shasum": "adbac68a8c5290e6a32fe0b8cc9a6a7fb91a64d3" }, "require": { - "drupal/core": "^8 || ^9" + "drupal/core": "^9.4 || ^10" }, "require-dev": { "drupal/coder": "^8.2", @@ -6132,8 +6132,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.2", - "datestamp": "1611003910", + "version": "2.1.1", + "datestamp": "1669644382", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -13181,16 +13181,16 @@ }, { "name": "symfony/dependency-injection", - "version": "v4.4.44", + "version": "v4.4.49", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "25502a57182ba1e15da0afd64c975cae4d0a1471" + "reference": "9065fe97dbd38a897e95ea254eb5ddfe1310f734" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/25502a57182ba1e15da0afd64c975cae4d0a1471", - "reference": "25502a57182ba1e15da0afd64c975cae4d0a1471", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/9065fe97dbd38a897e95ea254eb5ddfe1310f734", + "reference": "9065fe97dbd38a897e95ea254eb5ddfe1310f734", "shasum": "" }, "require": { @@ -13247,7 +13247,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v4.4.44" + "source": "https://github.com/symfony/dependency-injection/tree/v4.4.49" }, "funding": [ { @@ -13263,7 +13263,7 @@ "type": "tidelift" } ], - "time": "2022-07-20T09:59:04+00:00" + "time": "2022-11-16T16:18:09+00:00" }, { "name": "symfony/deprecation-contracts", @@ -15041,16 +15041,16 @@ }, { "name": "symfony/psr-http-message-bridge", - "version": "v2.1.3", + "version": "v2.1.4", "source": { "type": "git", "url": "https://github.com/symfony/psr-http-message-bridge.git", - "reference": "d444f85dddf65c7e57c58d8e5b3a4dbb593b1840" + "reference": "a125b93ef378c492e274f217874906fb9babdebb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/d444f85dddf65c7e57c58d8e5b3a4dbb593b1840", - "reference": "d444f85dddf65c7e57c58d8e5b3a4dbb593b1840", + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/a125b93ef378c492e274f217874906fb9babdebb", + "reference": "a125b93ef378c492e274f217874906fb9babdebb", "shasum": "" }, "require": { @@ -15109,7 +15109,7 @@ ], "support": { "issues": "https://github.com/symfony/psr-http-message-bridge/issues", - "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.1.3" + "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.1.4" }, "funding": [ { @@ -15125,7 +15125,7 @@ "type": "tidelift" } ], - "time": "2022-09-05T10:34:54+00:00" + "time": "2022-11-28T22:46:34+00:00" }, { "name": "symfony/routing", diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index f5e38062421407fdffa9af75b8a1c35634088bc0..18223c28877d6e00bfb4c210a80f9f7d7558e18c 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -6328,21 +6328,21 @@ }, { "name": "drupal/pantheon_advanced_page_cache", - "version": "1.2.0", - "version_normalized": "1.2.0.0", + "version": "2.1.1", + "version_normalized": "2.1.1.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/pantheon_advanced_page_cache.git", - "reference": "8.x-1.2" + "reference": "2.1.1" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/pantheon_advanced_page_cache-8.x-1.2.zip", - "reference": "8.x-1.2", - "shasum": "265f738df7e0d094f43b4f7a5b31ac3c5d799316" + "url": "https://ftp.drupal.org/files/projects/pantheon_advanced_page_cache-2.1.1.zip", + "reference": "2.1.1", + "shasum": "adbac68a8c5290e6a32fe0b8cc9a6a7fb91a64d3" }, "require": { - "drupal/core": "^8 || ^9" + "drupal/core": "^9.4 || ^10" }, "require-dev": { "drupal/coder": "^8.2", @@ -6352,8 +6352,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.2", - "datestamp": "1611003910", + "version": "2.1.1", + "datestamp": "1669644382", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -6386,17 +6386,21 @@ "GPL-2.0-or-later" ], "authors": [ - { - "name": "Ari Gold", - "homepage": "https://www.drupal.org/user/329006" - }, { "name": "David Strauss", "homepage": "https://www.drupal.org/user/93254" }, { - "name": "Fabianx", - "homepage": "https://www.drupal.org/user/693738" + "name": "greg.1.anderson", + "homepage": "https://www.drupal.org/user/438598" + }, + { + "name": "kporras07", + "homepage": "https://www.drupal.org/user/1349780" + }, + { + "name": "pantheon-ci", + "homepage": "https://www.drupal.org/user/3735947" }, { "name": "stevector", @@ -13698,17 +13702,17 @@ }, { "name": "symfony/dependency-injection", - "version": "v4.4.44", - "version_normalized": "4.4.44.0", + "version": "v4.4.49", + "version_normalized": "4.4.49.0", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "25502a57182ba1e15da0afd64c975cae4d0a1471" + "reference": "9065fe97dbd38a897e95ea254eb5ddfe1310f734" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/25502a57182ba1e15da0afd64c975cae4d0a1471", - "reference": "25502a57182ba1e15da0afd64c975cae4d0a1471", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/9065fe97dbd38a897e95ea254eb5ddfe1310f734", + "reference": "9065fe97dbd38a897e95ea254eb5ddfe1310f734", "shasum": "" }, "require": { @@ -13739,7 +13743,7 @@ "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", "symfony/yaml": "" }, - "time": "2022-07-20T09:59:04+00:00", + "time": "2022-11-16T16:18:09+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -13767,7 +13771,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v4.4.44" + "source": "https://github.com/symfony/dependency-injection/tree/v4.4.49" }, "funding": [ { @@ -15627,17 +15631,17 @@ }, { "name": "symfony/psr-http-message-bridge", - "version": "v2.1.3", - "version_normalized": "2.1.3.0", + "version": "v2.1.4", + "version_normalized": "2.1.4.0", "source": { "type": "git", "url": "https://github.com/symfony/psr-http-message-bridge.git", - "reference": "d444f85dddf65c7e57c58d8e5b3a4dbb593b1840" + "reference": "a125b93ef378c492e274f217874906fb9babdebb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/d444f85dddf65c7e57c58d8e5b3a4dbb593b1840", - "reference": "d444f85dddf65c7e57c58d8e5b3a4dbb593b1840", + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/a125b93ef378c492e274f217874906fb9babdebb", + "reference": "a125b93ef378c492e274f217874906fb9babdebb", "shasum": "" }, "require": { @@ -15658,7 +15662,7 @@ "suggest": { "nyholm/psr7": "For a super lightweight PSR-7/17 implementation" }, - "time": "2022-09-05T10:34:54+00:00", + "time": "2022-11-28T22:46:34+00:00", "type": "symfony-bridge", "extra": { "branch-alias": { @@ -15698,7 +15702,7 @@ ], "support": { "issues": "https://github.com/symfony/psr-http-message-bridge/issues", - "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.1.3" + "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.1.4" }, "funding": [ { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 1299061afa43b57da0ff0cf677599a7e21c19ec6..8a1ca97a1d6f4fb60af12967616240b82cff6662 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'osu-asc-webservices/d8-upstream', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => 'ba6af3568d179c683bcb49150597c4f6eb32e14e', + 'reference' => '7b38d41b8b6ae95e9b0320d434f2220a4367f2d9', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -1055,9 +1055,9 @@ 'dev_requirement' => false, ), 'drupal/pantheon_advanced_page_cache' => array( - 'pretty_version' => '1.2.0', - 'version' => '1.2.0.0', - 'reference' => '8.x-1.2', + 'pretty_version' => '2.1.1', + 'version' => '2.1.1.0', + 'reference' => '2.1.1', 'type' => 'drupal-module', 'install_path' => __DIR__ . '/../../web/modules/pantheon_advanced_page_cache', 'aliases' => array(), @@ -1594,7 +1594,7 @@ 'osu-asc-webservices/d8-upstream' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => 'ba6af3568d179c683bcb49150597c4f6eb32e14e', + 'reference' => '7b38d41b8b6ae95e9b0320d434f2220a4367f2d9', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -2190,9 +2190,9 @@ 'dev_requirement' => false, ), 'symfony/dependency-injection' => array( - 'pretty_version' => 'v4.4.44', - 'version' => '4.4.44.0', - 'reference' => '25502a57182ba1e15da0afd64c975cae4d0a1471', + 'pretty_version' => 'v4.4.49', + 'version' => '4.4.49.0', + 'reference' => '9065fe97dbd38a897e95ea254eb5ddfe1310f734', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dependency-injection', 'aliases' => array(), @@ -2403,9 +2403,9 @@ 'dev_requirement' => false, ), 'symfony/psr-http-message-bridge' => array( - 'pretty_version' => 'v2.1.3', - 'version' => '2.1.3.0', - 'reference' => 'd444f85dddf65c7e57c58d8e5b3a4dbb593b1840', + 'pretty_version' => 'v2.1.4', + 'version' => '2.1.4.0', + 'reference' => 'a125b93ef378c492e274f217874906fb9babdebb', 'type' => 'symfony-bridge', 'install_path' => __DIR__ . '/../symfony/psr-http-message-bridge', 'aliases' => array(), diff --git a/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php b/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php index 3b8086d0931e6c38844e07a886d1c6fb73bf39ef..185a097ebe20bb2b66a4a1ceca23ac0be34efedc 100644 --- a/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php +++ b/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php @@ -42,7 +42,7 @@ public function process(ContainerBuilder $container) $tagsToKeep = $container->hasParameter('container.behavior_describing_tags') ? $container->getParameter('container.behavior_describing_tags') - : ['container.do_not_inline', 'container.service_locator', 'container.service_subscriber']; + : ['container.do_not_inline', 'container.service_locator', 'container.service_subscriber', 'container.service_subscriber.locator']; foreach ($definitions as [$id, $definition]) { $decoratedService = $definition->getDecoratedService(); diff --git a/vendor/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php b/vendor/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php index 5fdbe5686dbfa81017a0f4101e9592f568df5c81..72b093043bf15cff415a6e315b55f0539f01f011 100644 --- a/vendor/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php +++ b/vendor/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php @@ -39,6 +39,10 @@ protected function processValue($value, $isRoot = false) return self::register($this->container, $value->getValues()); } + if ($value instanceof Definition) { + $value->setBindings(parent::processValue($value->getBindings())); + } + if (!$value instanceof Definition || !$value->hasTag('container.service_locator')) { return parent::processValue($value, $isRoot); } diff --git a/vendor/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php b/vendor/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php index 61650df9f680570a249f08b924ec2b8991104871..b1b6f9ae260ff021af0cce236efb03c57e31b81c 100644 --- a/vendor/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php +++ b/vendor/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php @@ -142,7 +142,7 @@ public function createResponse(Response $symfonyResponse) $stream->write($buffer); return ''; - }); + }, 1); $symfonyResponse->sendContent(); ob_end_clean(); diff --git a/web/modules/pantheon_advanced_page_cache/.circleci/config.yml b/web/modules/pantheon_advanced_page_cache/.circleci/config.yml index f07920472edeca64a79537a68e7057221d01fcfa..0ccac7c7beae5ed15069e532ce278d76302d7336 100644 --- a/web/modules/pantheon_advanced_page_cache/.circleci/config.yml +++ b/web/modules/pantheon_advanced_page_cache/.circleci/config.yml @@ -1,11 +1,15 @@ -version: 2 +version: 2.1 # https://circleci.com/docs/configuration#machine jobs: build: + parameters: + base-env: + type: string docker: - - image: quay.io/pantheon-public/build-tools-ci:6.x + - image: quay.io/pantheon-public/build-tools-ci:8.x-php7.4 environment: - TERMINUS_SITE: d9-papc2 + TERMINUS_SITE: d9-papc3 + TERMINUS_BASE_ENV: << parameters.base-env >> steps: - run: name: login-pantheon @@ -15,7 +19,7 @@ jobs: - run: name: make-multidev command: | - terminus env:create $TERMINUS_SITE.dev ${CIRCLE_BUILD_NUM} || echo "mystery errors were being thrown by env:create so I am adding this OR (https://circleci.com/gh/pantheon-systems/pantheon_advanced_page_cache/610)" + terminus env:create $TERMINUS_SITE.$TERMINUS_BASE_ENV ${CIRCLE_BUILD_NUM} || echo "mystery errors were being thrown by env:create so I am adding this OR (https://circleci.com/gh/pantheon-systems/pantheon_advanced_page_cache/610)" touch multidev-made.txt background: true - checkout @@ -58,11 +62,18 @@ jobs: done exit 0 + - run: + name: Push changes to new multidev + command: git push --set-upstream origin $CIRCLE_BUILD_NUM -f + working_directory: drupal-site + - run: name: site install command: | + terminus build:workflow:wait ${TERMINUS_SITE}.${CIRCLE_BUILD_NUM} terminus connection:set ${TERMINUS_SITE}.${CIRCLE_BUILD_NUM} sftp - terminus drush ${TERMINUS_SITE}.${CIRCLE_BUILD_NUM} -- site-install -y --quiet + terminus env:wake ${TERMINUS_SITE}.${CIRCLE_BUILD_NUM} + terminus drush ${TERMINUS_SITE}.${CIRCLE_BUILD_NUM} -- site-install -y terminus drush ${TERMINUS_SITE}.${CIRCLE_BUILD_NUM} -- cset system.performance cache.page.max_age 600 -y - run: @@ -82,3 +93,11 @@ jobs: name: Cleanup command: | terminus drush ${TERMINUS_SITE}.${CIRCLE_BUILD_NUM} -- role-remove-perm anonymous "create page content,create article content" + +workflows: + build: + jobs: + - build: + matrix: + parameters: + base-env: [dev, drupal10] diff --git a/web/modules/pantheon_advanced_page_cache/.circleci/scripts/setup-drupal-repo.sh b/web/modules/pantheon_advanced_page_cache/.circleci/scripts/setup-drupal-repo.sh index 90c19b121f1115cbbf45a1ee231da0571a61991c..1731de77be743ce5ddfaa4280666b8df62058996 100755 --- a/web/modules/pantheon_advanced_page_cache/.circleci/scripts/setup-drupal-repo.sh +++ b/web/modules/pantheon_advanced_page_cache/.circleci/scripts/setup-drupal-repo.sh @@ -2,14 +2,31 @@ set -e export TERMINUS_ENV=$CIRCLE_BUILD_NUM +if [ "$TERMINUS_BASE_ENV" = "dev" ]; then + export TERMINUS_BASE_ENV=master +fi + # Bring the code down to Circle so that modules can be added via composer. -git clone $(terminus connection:info ${TERMINUS_SITE}.dev --field=git_url) --branch $TERMINUS_ENV drupal-site +git clone $(terminus connection:info ${TERMINUS_SITE}.dev --field=git_url) --branch $TERMINUS_BASE_ENV drupal-site cd drupal-site +git checkout -b $TERMINUS_ENV + +# requiring other modules below was throwing an error if this dependency was not updated first. +# I think because the composer.lock file for the site has dev-master as the version for this +# dependency. But the CI process calling this file runs against a different branch name thanks to the +# git clone command above. +composer update "pantheon-upstreams/upstream-configuration" composer -- config repositories.papc vcs git@github.com:pantheon-systems/pantheon_advanced_page_cache.git + +# dev-2.x does not match anything, should be 2.x-dev as per https://getcomposer.org/doc/articles/aliases.md#branch-alias. +export BRANCH_PART="dev-${CIRCLE_BRANCH}" +if [ $CIRCLE_BRANCH = "2.x" ]; then + export BRANCH_PART="2.x-dev" +fi # Composer require the given commit of this module -composer -- require drupal/views_custom_cache_tag "drupal/pantheon_advanced_page_cache:dev-${CIRCLE_BRANCH}#${CIRCLE_SHA1}" +composer -- require "drupal/views_custom_cache_tag:1.x-dev" "drupal/pantheon_advanced_page_cache:${BRANCH_PART}#${CIRCLE_SHA1}" # Don't commit a submodule rm -rf web/modules/contrib/pantheon_advanced_page_cache/.git/ @@ -17,4 +34,3 @@ # Make a git commit git add . git commit -m 'Result of build step' -git push --set-upstream origin $TERMINUS_ENV diff --git a/web/modules/pantheon_advanced_page_cache/.github/workflows/mirror-do.yml b/web/modules/pantheon_advanced_page_cache/.github/workflows/mirror-do.yml new file mode 100644 index 0000000000000000000000000000000000000000..4306f64d8b64ff5609f7064bd50aea9c15c8016d --- /dev/null +++ b/web/modules/pantheon_advanced_page_cache/.github/workflows/mirror-do.yml @@ -0,0 +1,29 @@ +name: Mirror to Drupal.org +on: + push: + +jobs: + mirror: + runs-on: ubuntu-latest + name: Checkout & push to remote + if: ${{ github.repository == 'pantheon-systems/pantheon_advanced_page_cache' }} + env: + BRANCH: ${{ github.ref_name }} + WORKSPACE: ${{ github.workspace }} + DRUPAL_ORG_REMOTE: ${{ secrets.DRUPAL_ORG_REMOTE }} + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SSH_KEY }} + known_hosts: ${{ secrets.KNOWN_HOSTS }} + if_key_exists: ignore + - name: Pushes to drupal.org repository + run: | + cd $WORKSPACE + git remote add drupalorg $DRUPAL_ORG_REMOTE + git push drupalorg $BRANCH diff --git a/web/modules/pantheon_advanced_page_cache/README.md b/web/modules/pantheon_advanced_page_cache/README.md index 1ce74e3a31b6e27428da433fa2af39bf719bd5a2..253cf86fb6e415818e19ff2c59e75ebd0360b783 100644 --- a/web/modules/pantheon_advanced_page_cache/README.md +++ b/web/modules/pantheon_advanced_page_cache/README.md @@ -1,6 +1,8 @@ # Pantheon Advanced Page Cache [](https://circleci.com/gh/pantheon-systems/pantheon_advanced_page_cache) +[](https://pantheon.io/docs/oss-support-levels#actively-maintained-support) + Pantheon Advanced Page Cache module is a bridge between [Drupal cache metadata](https://www.drupal.org/docs/8/api/cache-api/cache-api) and the [Pantheon Global CDN](https://pantheon.io/docs/global-cdn/). diff --git a/web/modules/pantheon_advanced_page_cache/composer.lock b/web/modules/pantheon_advanced_page_cache/composer.lock index a4ecf0293c49ddc1bc412014e0374e1d0ad29e3e..f704a1c31d80797dfb04a7b692136487c1285b04 100644 --- a/web/modules/pantheon_advanced_page_cache/composer.lock +++ b/web/modules/pantheon_advanced_page_cache/composer.lock @@ -866,24 +866,24 @@ }, { "name": "guzzlehttp/guzzle", - "version": "6.5.3", + "version": "6.5.8", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "aab4ebd862aa7d04f01a4b51849d657db56d882e" + "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/aab4ebd862aa7d04f01a4b51849d657db56d882e", - "reference": "aab4ebd862aa7d04f01a4b51849d657db56d882e", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a52f0440530b54fa079ce76e8c5d196a42cad981", + "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981", "shasum": "" }, "require": { "ext-json": "*", "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.6.1", + "guzzlehttp/psr7": "^1.9", "php": ">=5.5", - "symfony/polyfill-intl-idn": "^1.11" + "symfony/polyfill-intl-idn": "^1.17" }, "require-dev": { "ext-curl": "*", @@ -900,22 +900,52 @@ } }, "autoload": { - "psr-4": { - "GuzzleHttp\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" } ], "description": "Guzzle is a PHP HTTP client library", @@ -929,71 +959,122 @@ "rest", "web service" ], - "time": "2020-04-18T10:38:46+00:00" + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/6.5.8" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2022-06-20T22:16:07+00:00" }, { "name": "guzzlehttp/promises", - "version": "v1.3.1", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + "reference": "b94b2807d85443f9719887892882d0329d1e2598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", + "reference": "b94b2807d85443f9719887892882d0329d1e2598", "shasum": "" }, "require": { - "php": ">=5.5.0" + "php": ">=5.5" }, "require-dev": { - "phpunit/phpunit": "^4.0" + "symfony/phpunit-bridge": "^4.4 || ^5.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } }, "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" } ], "description": "Guzzle promises library", "keywords": [ "promise" ], - "time": "2016-12-20T10:07:11+00:00" + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/1.5.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2022-08-28T14:55:35+00:00" }, { "name": "guzzlehttp/psr7", - "version": "1.6.1", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "239400de7a173fe9901b9ac7c06497751f00727a" + "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", - "reference": "239400de7a173fe9901b9ac7c06497751f00727a", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", + "reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318", "shasum": "" }, "require": { @@ -1006,37 +1087,58 @@ }, "require-dev": { "ext-zlib": "*", - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" }, "suggest": { - "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6-dev" + "dev-master": "1.9-dev" } }, "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, { "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", "homepage": "https://github.com/Tobion" } ], @@ -1051,7 +1153,25 @@ "uri", "url" ], - "time": "2019-07-01T23:21:34+00:00" + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/1.9.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2022-06-20T21:43:03+00:00" }, { "name": "instaclick/php-webdriver", @@ -2009,6 +2129,9 @@ "request", "response" ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, "time": "2016-08-06T14:39:51+00:00" }, { @@ -2049,6 +2172,10 @@ } ], "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, "time": "2019-03-08T08:55:37+00:00" }, { @@ -3291,21 +3418,21 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.15.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf" + "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf", - "reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/59a8d271f00dd0e4c2e518104cc7963f655a1aa8", + "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8", "shasum": "" }, "require": { - "php": ">=5.3.3", - "symfony/polyfill-mbstring": "^1.3", + "php": ">=7.1", + "symfony/polyfill-intl-normalizer": "^1.10", "symfony/polyfill-php72": "^1.10" }, "suggest": { @@ -3314,16 +3441,20 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Idn\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3334,6 +3465,10 @@ "name": "Laurent Bassin", "email": "laurent@bassin.info" }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" @@ -3349,24 +3484,128 @@ "portable", "shim" ], - "time": "2020-03-09T19:04:49+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.26.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-24T11:49:31+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.26.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "219aa369ceff116e673852dce47c3a41794c14bd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", + "reference": "219aa369ceff116e673852dce47c3a41794c14bd", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.15.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac" + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac", - "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" }, "suggest": { "ext-mbstring": "For best performance" @@ -3374,16 +3613,20 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3408,38 +3651,59 @@ "portable", "shim" ], - "time": "2020-03-09T19:04:49+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.15.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "37b0976c78b94856543260ce09b460a7bc852747" + "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/37b0976c78b94856543260ce09b460a7bc852747", - "reference": "37b0976c78b94856543260ce09b460a7bc852747", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2", + "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3463,7 +3727,24 @@ "portable", "shim" ], - "time": "2020-02-27T09:26:54+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-php72/tree/v1.26.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/process", @@ -3744,5 +4025,6 @@ "prefer-stable": false, "prefer-lowest": false, "platform": [], - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "2.3.0" } diff --git a/web/modules/pantheon_advanced_page_cache/config/install/pantheon_advanced_page_cache.settings.yml b/web/modules/pantheon_advanced_page_cache/config/install/pantheon_advanced_page_cache.settings.yml index 68e445b930b12c56166b299b974fa192c73dc06d..554ad19ece409f41f0b0d86f9574a107a10c6221 100644 --- a/web/modules/pantheon_advanced_page_cache/config/install/pantheon_advanced_page_cache.settings.yml +++ b/web/modules/pantheon_advanced_page_cache/config/install/pantheon_advanced_page_cache.settings.yml @@ -1 +1 @@ -override_list_tags: false \ No newline at end of file +override_list_tags: false diff --git a/web/modules/pantheon_advanced_page_cache/config/schema/pantheon_advanced_page_cache.schema.yml b/web/modules/pantheon_advanced_page_cache/config/schema/pantheon_advanced_page_cache.schema.yml new file mode 100644 index 0000000000000000000000000000000000000000..be3fb1d4d9efcb93dbdc78f449302174975ef1f2 --- /dev/null +++ b/web/modules/pantheon_advanced_page_cache/config/schema/pantheon_advanced_page_cache.schema.yml @@ -0,0 +1,9 @@ +# Schema for the configuration files of the Pantheon Advanced Page Cache module. + +pantheon_advanced_page_cache.settings: + type: config_object + label: 'Pantheon Advanced Page Cache settings' + mapping: + override_list_tags: + type: boolean + label: 'If entity_list tags should be overridden' diff --git a/web/modules/pantheon_advanced_page_cache/pantheon_advanced_page_cache.info.yml b/web/modules/pantheon_advanced_page_cache/pantheon_advanced_page_cache.info.yml index d276de1fd4fe86046011182e13bc7cd8b3924330..46e5910aa15d3c9084aa4c06992d65dc47a9e9d6 100644 --- a/web/modules/pantheon_advanced_page_cache/pantheon_advanced_page_cache.info.yml +++ b/web/modules/pantheon_advanced_page_cache/pantheon_advanced_page_cache.info.yml @@ -2,9 +2,9 @@ name: Pantheon Advanced Page Cache description: 'Advanced page cache capabilities for Pantheon.' package: Performance and scalability type: module -core_version_requirement: ^8 || ^9 +core_version_requirement: ^9.4 || ^10 -# Information added by Drupal.org packaging script on 2021-01-18 -version: '8.x-1.2' +# Information added by Drupal.org packaging script on 2022-11-28 +version: '2.1.1' project: 'pantheon_advanced_page_cache' -datestamp: 1611003913 +datestamp: 1669644385 diff --git a/web/modules/pantheon_advanced_page_cache/pantheon_advanced_page_cache.install b/web/modules/pantheon_advanced_page_cache/pantheon_advanced_page_cache.install index eb7f642d692930808fab30e1b2fb219bb51c1e81..86d734b45a6d8de5841ac4b4910efb5086a98eb4 100644 --- a/web/modules/pantheon_advanced_page_cache/pantheon_advanced_page_cache.install +++ b/web/modules/pantheon_advanced_page_cache/pantheon_advanced_page_cache.install @@ -6,8 +6,14 @@ */ /** - * Set override_list_tags to TRUE for backwards compatibility. We recommend manually changing to FALSE for more consistent clearing. See README + * Set override_list_tags to TRUE for backwards compatibility. + * + * We recommend manually changing to FALSE for more consistent clearing. See + * README. */ function pantheon_advanced_page_cache_update_8001() { - \Drupal::configFactory()->getEditable('pantheon_advanced_page_cache.settings')->set('override_list_tags', TRUE)->save(); + \Drupal::configFactory() + ->getEditable('pantheon_advanced_page_cache.settings') + ->set('override_list_tags', TRUE) + ->save(); } diff --git a/web/modules/pantheon_advanced_page_cache/pantheon_advanced_page_cache.services.yml b/web/modules/pantheon_advanced_page_cache/pantheon_advanced_page_cache.services.yml index 266c2398dd7956335888e638626d018b6a4eb357..6777fd0edbb20087d82cdcc4c41ad821da5fdfed 100644 --- a/web/modules/pantheon_advanced_page_cache/pantheon_advanced_page_cache.services.yml +++ b/web/modules/pantheon_advanced_page_cache/pantheon_advanced_page_cache.services.yml @@ -4,6 +4,7 @@ services: arguments: ['pantheon_advanced_page_cache'] pantheon_advanced_page_cache.cache_tags.invalidator: class: Drupal\pantheon_advanced_page_cache\CacheTagsInvalidator + arguments: ['@request_stack'] tags: - { name: cache_tags_invalidator } pantheon_advanced_page_cache.cacheable_response_subscriber: diff --git a/web/modules/pantheon_advanced_page_cache/src/CacheTagsInvalidator.php b/web/modules/pantheon_advanced_page_cache/src/CacheTagsInvalidator.php index 139e67a242c345290168eef762649702ae150d77..77066263fa24c4aba1000ee31a6c1b990c6590cc 100644 --- a/web/modules/pantheon_advanced_page_cache/src/CacheTagsInvalidator.php +++ b/web/modules/pantheon_advanced_page_cache/src/CacheTagsInvalidator.php @@ -3,16 +3,39 @@ namespace Drupal\pantheon_advanced_page_cache; use Drupal\Core\Cache\CacheTagsInvalidatorInterface; +use Symfony\Component\HttpFoundation\RequestStack; /** * Cache tags invalidator implementation that invalidates the Pantheon edge. */ class CacheTagsInvalidator implements CacheTagsInvalidatorInterface { + /** + * The request stack. + * + * @var \Symfony\Component\HttpFoundation\RequestStack + */ + protected $requestStack; + + /** + * Construct. + */ + public function __construct(RequestStack $request_stack) { + $this->requestStack = $request_stack; + } + /** * {@inheritdoc} */ public function invalidateTags(array $tags) { + $do_not_run_urls = [ + // There is a weird interaction with metatag that clear local_tasks key + // and therefore lots of cached pages. + '/core/install.php', + ]; + if (in_array($this->requestStack->getCurrentRequest()->getBaseUrl(), $do_not_run_urls)) { + return; + } if (function_exists('pantheon_clear_edge_keys')) { pantheon_clear_edge_keys($tags); } diff --git a/web/modules/pantheon_advanced_page_cache/src/EventSubscriber/CacheableResponseSubscriber.php b/web/modules/pantheon_advanced_page_cache/src/EventSubscriber/CacheableResponseSubscriber.php index b9a72a9bc6031cc43e3569880bd24803f5d3f581..e966b088d706c555105d0c64348c6b8717731c3d 100644 --- a/web/modules/pantheon_advanced_page_cache/src/EventSubscriber/CacheableResponseSubscriber.php +++ b/web/modules/pantheon_advanced_page_cache/src/EventSubscriber/CacheableResponseSubscriber.php @@ -3,7 +3,7 @@ namespace Drupal\pantheon_advanced_page_cache\EventSubscriber; use Drupal\Core\Cache\CacheableResponseInterface; -use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpKernel\Event\ResponseEvent; use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Psr\Log\LoggerInterface; @@ -37,11 +37,7 @@ class CacheableResponseSubscriber implements EventSubscriberInterface { * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * Configuration for this module. */ - public function __construct(LoggerInterface $logger, ConfigFactoryInterface $config_factory = NULL) { - if (!$config_factory instanceof ConfigFactoryInterface) { - @trigger_error('Not passing the config factory service as the second parameter to ' . __METHOD__ . ' is deprecated in pantheon_advanced_page_cache:8.x-1.2 and will throw a type error in pantheon_advanced_page_cache:8.x-2.0. Pass an instance of \\Drupal\\Core\\Config\\ConfigFactoryInterface. See https://www.drupal.org/node/2944229', E_USER_DEPRECATED); - $config_factory = \Drupal::service('config.factory'); - } + public function __construct(LoggerInterface $logger, ConfigFactoryInterface $config_factory) { $this->logger = $logger; $this->configFactory = $config_factory; } @@ -65,12 +61,19 @@ public function getOverrideListTagsSetting() { /** * Adds Surrogate-Key header to cacheable master responses. * - * @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event + * @param \Symfony\Component\HttpKernel\Event\ResponseEvent $event * The event to process. */ - public function onRespond(FilterResponseEvent $event) { - if (!$event->isMasterRequest()) { - return; + public function onRespond(ResponseEvent $event) { + if (method_exists($event, 'isMainRequest')) { + if (!$event->isMainRequest()) { + return; + } + } + else { + if (!$event->isMasterRequest()) { + return; + } } $response = $event->getResponse(); diff --git a/web/modules/pantheon_advanced_page_cache/tests/modules/pantheon_advanced_page_cache_test/pantheon_advanced_page_cache_test.info.yml b/web/modules/pantheon_advanced_page_cache/tests/modules/pantheon_advanced_page_cache_test/pantheon_advanced_page_cache_test.info.yml index cfff2567679d75ee7b494c5e129edfb0a5e76a8c..6be6e4d9739fd616830e21f5dd0a3cc5ec17d016 100644 --- a/web/modules/pantheon_advanced_page_cache/tests/modules/pantheon_advanced_page_cache_test/pantheon_advanced_page_cache_test.info.yml +++ b/web/modules/pantheon_advanced_page_cache/tests/modules/pantheon_advanced_page_cache_test/pantheon_advanced_page_cache_test.info.yml @@ -2,9 +2,9 @@ name: Pantheon Advanced Page Cache Test description: 'Used during automated test of Pantheon Advanced Page Cache' package: Testing type: module -core_version_requirement: ^8 || ^9 +core_version_requirement: ^9.4 || ^10 -# Information added by Drupal.org packaging script on 2021-01-18 -version: '8.x-1.2' +# Information added by Drupal.org packaging script on 2022-11-28 +version: '2.1.1' project: 'pantheon_advanced_page_cache' -datestamp: 1611003913 +datestamp: 1669644385 diff --git a/web/modules/pantheon_advanced_page_cache/tests/modules/pantheon_advanced_page_cache_test/src/EventSubscriber/CacheableResponseSubscriber.php b/web/modules/pantheon_advanced_page_cache/tests/modules/pantheon_advanced_page_cache_test/src/EventSubscriber/CacheableResponseSubscriber.php index 656f0f22feb7320421eea000493ce16739ac9cca..48d2fc6cefac389da1e54fc1fa86f3fea91349af 100644 --- a/web/modules/pantheon_advanced_page_cache/tests/modules/pantheon_advanced_page_cache_test/src/EventSubscriber/CacheableResponseSubscriber.php +++ b/web/modules/pantheon_advanced_page_cache/tests/modules/pantheon_advanced_page_cache_test/src/EventSubscriber/CacheableResponseSubscriber.php @@ -3,7 +3,7 @@ namespace Drupal\pantheon_advanced_page_cache_test\EventSubscriber; use Drupal\Core\Cache\CacheableResponseInterface; -use Symfony\Component\HttpKernel\Event\FilterResponseEvent; +use Symfony\Component\HttpKernel\Event\ResponseEvent; use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\EventDispatcher\EventSubscriberInterface; @@ -15,12 +15,19 @@ class CacheableResponseSubscriber implements EventSubscriberInterface { /** * Adds Surrogate-Key header to cacheable master responses. * - * @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event + * @param \Symfony\Component\HttpKernel\Event\ResponseEvent $event * The event to process. */ - public function onRespond(FilterResponseEvent $event) { - if (!$event->isMasterRequest()) { - return; + public function onRespond(ResponseEvent $event) { + if (method_exists($event, 'isMainRequest')) { + if (!$event->isMainRequest()) { + return; + } + } + else { + if (!$event->isMasterRequest()) { + return; + } } $response = $event->getResponse();