acquia / blt

Acquia's toolset for automating Drupal 8 and 9 development, testing, and deployment.
https://docs.acquia.com/blt/
GNU General Public License v2.0
442 stars 394 forks source link

Composer Update Failure: Cannot apply patch Clear Twig caches on deploys (https://www.drupal.org/files/issues/2752961-90.patch) #3110

Closed ghost closed 5 years ago

ghost commented 6 years ago

My system information:

Currently: When I run this command:

composer update -vv

I get the following output:

composer update -vv
    1/6:    http://repo.packagist.org/p/provider-latest$ff4c2be19ed2fc1c531ef529cd3e98769baa6f2089b6a46ae307da39de288c89.json
    2/6:    http://repo.packagist.org/p/provider-2018-01$18a7f3dc94a3193eb96cd55917627592d8db2b3f0f25018d00813055665163ce.json
    3/6:    http://repo.packagist.org/p/provider-2015$7c26b34eea413103f824e4ff5c9c091b86e6bbc89c51d44eafb53bad6cf02197.json
    4/6:    http://repo.packagist.org/p/provider-2016$02a932f49ffd506e3989aeca4885afe521359355768beef3b7b86e397b421291.json
    5/6:    http://repo.packagist.org/p/provider-2018-07$841645883c8142ec8b18a5d06cff62e89c580df405f30bff8534c2d065e6069c.json
    6/6:    http://repo.packagist.org/p/provider-2018-04$067bad2dbea1c3a23811c333adaa0f0f0e4e933a23f4c6675d4fb2dbf851acc0.json
    Finished: success: 6, skipped: 0, failure: 0, total: 6
  [merge-plugin] Loading blt/composer.overrides.json...
  [merge-plugin] Loading vendor/acquia/blt/composer.required.json...
  [merge-plugin] Prepending composer repository
  [merge-plugin] Merging drupal/core
  [merge-plugin] Merging drupal/features
  [merge-plugin] Merging drupal/config_split
  [merge-plugin] Merging drupal/devel
  [merge-plugin] Loading vendor/acquia/blt/composer.suggested.json...
  [merge-plugin] Prepending composer repository
  [merge-plugin] Merging acquia/lightning
  [merge-plugin] Merging drupal/acquia_connector
  [merge-plugin] Merging drupal/cog
  [merge-plugin] Merging drupal/qa_accounts
  [merge-plugin] Merging drupal/memcache
  [merge-plugin] Merging drupal/seckit
  [merge-plugin] Merging drupal/security_review
  [merge-plugin] Merging drupal/shield
  [merge-plugin] Loading -dev sections of blt/composer.overrides.json...
  [merge-plugin] Loading -dev sections of vendor/acquia/blt/composer.required.json...
  [merge-plugin] Merging behat/behat
  [merge-plugin] Merging behat/mink
  [merge-plugin] Merging behat/mink-selenium2-driver
  [merge-plugin] Merging bex/behat-screenshot
  [merge-plugin] Merging drupal/drupal-extension
  [merge-plugin] Merging drupal-composer/drupal-scaffold
  [merge-plugin] Merging jarnaiz/behat-junit-formatter
  [merge-plugin] Merging se/selenium-server-standalone
  [merge-plugin] Merging jakoch/phantomjs-installer
  [merge-plugin] Merging dmore/chrome-mink-driver
  [merge-plugin] Merging dmore/behat-chrome-extension
  [merge-plugin] Merging mikey179/vfsstream
  [merge-plugin] Loading -dev sections of vendor/acquia/blt/composer.suggested.json...
Gathering patches for root package.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Dependency resolution completed in 4.165 seconds
Analyzed 21511 packages to resolve dependencies
Analyzed 1744441 rules to resolve dependencies
Dependency resolution completed in 0.002 seconds
Package operations: 14 installs, 17 updates, 0 removals
Installs: drupal/core:8.6.1, drupal/lightning_core:3.1.0, drupal/moderation_sidebar:1.1.0, drupal/lightning_workflow:3.0.0, drupal/lightning_media:3.0.0, drupal/panels:4.3.0, drupal/panelizer_quickedit:4.1.0, drupal/lightning_layout:1.4.0, drupal/simple_oauth_extras:3.10.0, drupal/openapi_ui:1.0.0-rc1, swagger-api/swagger-ui:v3.19.0, drupal/openapi_ui_swagger:1.0.0-rc2, drupal/openapi_ui_redoc:1.0.0-rc1, drupal/lightning_api:2.7.0
Updates: drupal/entity:1.0.0-beta4, drupal/search_api:1.10.0, drupal/token:1.4.0, drupal/pathauto:1.3.0, drupal/crop:2.0.0-rc1, drupal/video_embed_field:2.0.0, drupal/entity_block:1.0.0-beta1, drupal/panels_ipe:4.3.0, drupal/panelizer:4.1.0, drupal/simple_oauth:3.10.0, drupal/openapi:1.0.0-beta2, drupal/jsonapi:1.23.0, acquia/lightning:3.2.0, symfony/config:v3.4.15, drupal/console-en:1.8.0, drupal/console-core:1.8.0, drupal/console:1.8.0
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
Found 7 patches for drupal/core.
Found 1 patches for drupal/acquia_connector.
Found 1 patches for drupal/entity_embed.
Found 2 patches for drupal/entity_browser.
Found 1 patches for drupal/media_entity_instagram.
Found 2 patches for drupal/panels.
Found 1 patches for drupal/panelizer.
  - Installing drupal/core (8.6.1): Loading from cache
 Extracting archive    REASON: Required by the root package: Install command rule (install drupal/core 8.0.0|install drupal/core 8.0.0-beta10|install drupal/core 8.0.0-beta11|install drupal/core 8.0.0-beta12|install drupal/core 8.0.0-beta13|install drupal/core 8.0.0-beta14|install drupal/core 8.0.0-beta15|install drupal/core 8.0.0-beta16|install drupal/core 8.0.0-beta6|install drupal/core 8.0.0-beta7|install drupal/core 8.0.0-beta8|install drupal/core 8.0.0-beta9|install drupal/core 8.0.0-rc1|install drupal/core 8.0.0-rc2|install drupal/core 8.0.0-rc3|install drupal/core 8.0.0-rc4|install drupal/core 8.0.1|install drupal/core 8.0.2|install drupal/core 8.0.3|install drupal/core 8.0.4|install drupal/core 8.0.5|install drupal/core 8.0.6|install drupal/core 8.0.x-dev|install drupal/core 8.1.0|install drupal/core 8.1.0-beta1|install drupal/core 8.1.0-beta2|install drupal/core 8.1.0-rc1|install drupal/core 8.1.1|install drupal/core 8.1.10|install drupal/core 8.1.2|install drupal/core 8.1.3|install drupal/core 8.1.4|install drupal/core 8.1.5|install drupal/core 8.1.6|install drupal/core 8.1.7|install drupal/core 8.1.8|install drupal/core 8.1.9|install drupal/core 8.1.x-dev|install drupal/core 8.2.0|install drupal/core 8.2.0-beta1|install drupal/core 8.2.0-beta2|install drupal/core 8.2.0-beta3|install drupal/core 8.2.0-rc1|install drupal/core 8.2.0-rc2|install drupal/core 8.2.1|install drupal/core 8.2.2|install drupal/core 8.2.3|install drupal/core 8.2.4|install drupal/core 8.2.5|install drupal/core 8.2.6|install drupal/core 8.2.7|install drupal/core 8.2.8|install drupal/core 8.2.x-dev|install drupal/core 8.3.0|install drupal/core 8.3.0-alpha1|install drupal/core 8.3.0-beta1|install drupal/core 8.3.0-rc1|install drupal/core 8.3.0-rc2|install drupal/core 8.3.1|install drupal/core 8.3.2|install drupal/core 8.3.3|install drupal/core 8.3.4|install drupal/core 8.3.5|install drupal/core 8.3.6|install drupal/core 8.3.7|install drupal/core 8.3.8|install drupal/core 8.3.9|install drupal/core 8.3.x-dev|install drupal/core 8.4.0|install drupal/core 8.4.0-alpha1|install drupal/core 8.4.0-beta1|install drupal/core 8.4.0-rc1|install drupal/core 8.4.0-rc2|install drupal/core 8.4.1|install drupal/core 8.4.2|install drupal/core 8.4.3|install drupal/core 8.4.4|install drupal/core 8.4.5|install drupal/core 8.4.6|install drupal/core 8.4.7|install drupal/core 8.4.8|install drupal/core 8.4.x-dev|install drupal/core 8.5.0|install drupal/core 8.5.0-alpha1|install drupal/core 8.5.0-beta1|install drupal/core 8.5.0-rc1|install drupal/core 8.5.1|install drupal/core 8.5.2|install drupal/core 8.5.3|install drupal/core 8.5.4|install drupal/core 8.5.5|install drupal/core 8.5.6|install drupal/core 8.5.7|install drupal/core 8.5.x-dev|install drupal/core 8.6.0|install drupal/core 8.6.0-alpha1|install drupal/core 8.6.0-beta1|install drupal/core 8.6.0-beta2|install drupal/core 8.6.0-rc1|install drupal/core 8.6.1|install drupal/core 8.6.x-dev|install drupal/core 8.7.x-dev)

  - Applying patches for drupal/core
    https://www.drupal.org/files/issues/2018-04-16/drupal_workflow-initial-state-fix-2901459-16.patch (Workflow fix to get first state from config in case empty initial state)
patch '-p1' --no-backup-if-mismatch -d 'docroot/core' < '/var/folders/j5/t41v9n6d1nvdsh36f9j6t9800000gn/T/5ba102dd73ea0.patch'
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/core/modules/workflows/src/Plugin/WorkflowTypeBase.php b/core/modules/workflows/src/Plugin/WorkflowTypeBase.php
|index 6045484244..0957caf89c 100644
|--- a/core/modules/workflows/src/Plugin/WorkflowTypeBase.php
|+++ b/core/modules/workflows/src/Plugin/WorkflowTypeBase.php
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored

patch '-p0' --no-backup-if-mismatch -d 'docroot/core' < '/var/folders/j5/t41v9n6d1nvdsh36f9j6t9800000gn/T/5ba102dd73ea0.patch'
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/core/modules/workflows/src/Plugin/WorkflowTypeBase.php b/core/modules/workflows/src/Plugin/WorkflowTypeBase.php
|index 6045484244..0957caf89c 100644
|--- a/core/modules/workflows/src/Plugin/WorkflowTypeBase.php
|+++ b/core/modules/workflows/src/Plugin/WorkflowTypeBase.php
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored

patch '-p2' --no-backup-if-mismatch -d 'docroot/core' < '/var/folders/j5/t41v9n6d1nvdsh36f9j6t9800000gn/T/5ba102dd73ea0.patch'
patching file modules/workflows/src/Plugin/WorkflowTypeBase.php
Hunk #1 succeeded at 151 with fuzz 2.

    https://www.drupal.org/files/issues/2752961-90.patch (Clear Twig caches on deploys)
patch '-p1' --no-backup-if-mismatch -d 'docroot/core' < '/var/folders/j5/t41v9n6d1nvdsh36f9j6t9800000gn/T/5ba102ddb15d5.patch'
can't find file to patch at input line 5

Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/core/includes/common.inc b/core/includes/common.inc
|index 323a666b89..98da691d73 100644
|--- a/core/includes/common.inc
|+++ b/core/includes/common.inc
--------------------------
File to patch:

Skip this patch? [y]

Skipping patch.

1 out of 1 hunk ignored

can't find file to patch at input line 18
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/core/lib/Drupal/Core/Template/TwigEnvironment.php b/core/lib/Drupal/Core/Template/TwigEnvironment.php
|index 21755a5057..a3a8304116 100644
|--- a/core/lib/Drupal/Core/Template/TwigEnvironment.php
|+++ b/core/lib/Drupal/Core/Template/TwigEnvironment.php
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.

6 out of 6 hunks ignored

can't find file to patch at input line 95
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------

|diff --git a/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php b/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php
|index 5d6f61f205..47caa985a1 100644
|--- a/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php
|+++ b/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.

2 out of 2 hunks ignored

patch '-p0' --no-backup-if-mismatch -d 'docroot/core' < '/var/folders/j5/t41v9n6d1nvdsh36f9j6t9800000gn/T/5ba102ddb15d5.patch'
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/core/includes/common.inc b/core/includes/common.inc
|index 323a666b89..98da691d73 100644
|--- a/core/includes/common.inc
|+++ b/core/includes/common.inc
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.

1 out of 1 hunk ignored
can't find file to patch at input line 18
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/core/lib/Drupal/Core/Template/TwigEnvironment.php b/core/lib/Drupal/Core/Template/TwigEnvironment.php
|index 21755a5057..a3a8304116 100644
|--- a/core/lib/Drupal/Core/Template/TwigEnvironment.php
|+++ b/core/lib/Drupal/Core/Template/TwigEnvironment.php
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.

6 out of 6 hunks ignored

can't find file to patch at input line 95
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------

|diff --git a/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php b/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php
|index 5d6f61f205..47caa985a1 100644
|--- a/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php
|+++ b/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.

2 out of 2 hunks ignored

patch '-p2' --no-backup-if-mismatch -d 'docroot/core' < '/var/folders/j5/t41v9n6d1nvdsh36f9j6t9800000gn/T/5ba102ddb15d5.patch'
patching file includes/common.inc
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.

1 out of 1 hunk ignored -- saving rejects to file includes/common.inc.rej

patching file lib/Drupal/Core/Template/TwigEnvironment.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.

6 out of 6 hunks ignored -- saving rejects to file lib/Drupal/Core/Template/TwigEnvironment.php.rej

patching file tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php
Hunk #1 FAILED at 4.

Hunk #2 succeeded at 225 with fuzz 1 (offset 78 lines).

1 out of 2 hunks FAILED -- saving rejects to file tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php.rej

patch '-p4' --no-backup-if-mismatch -d 'docroot/core' < '/var/folders/j5/t41v9n6d1nvdsh36f9j6t9800000gn/T/5ba102ddb15d5.patch'
missing header for unified diff at line 5 of patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/core/includes/common.inc b/core/includes/common.inc
|index 323a666b89..98da691d73 100644
|--- a/core/includes/common.inc
|+++ b/core/includes/common.inc
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.

1 out of 1 hunk ignored
can't find file to patch at input line 18
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/core/lib/Drupal/Core/Template/TwigEnvironment.php b/core/lib/Drupal/Core/Template/TwigEnvironment.php
|index 21755a5057..a3a8304116 100644
|--- a/core/lib/Drupal/Core/Template/TwigEnvironment.php
|+++ b/core/lib/Drupal/Core/Template/TwigEnvironment.php
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
6 out of 6 hunks ignored
can't find file to patch at input line 95
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php b/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php
|index 5d6f61f205..47caa985a1 100644
|--- a/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php
|+++ b/core/tests/Drupal/KernelTests/Core/Theme/TwigEnvironmentTest.php
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.

2 out of 2 hunks ignored

   Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2752961-90.patch

  [Exception]
  Cannot apply patch Clear Twig caches on deploys (https://www.drupal.org/files/issues/2752961-90.patch)!

Exception trace:
 () at /Users/debdattasarkar/Sites/dep/vendor/cweagans/composer-patches/src/Patches.php:320
 cweagans\Composer\Patches->postInstall() at n/a:n/a
 call_user_func() at phar:///usr/local/Cellar/composer/1.6.4/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:176
 Composer\EventDispatcher\EventDispatcher->doDispatch() at phar:///usr/local/Cellar/composer/1.6.4/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:116
 Composer\EventDispatcher\EventDispatcher->dispatchPackageEvent() at phar:///usr/local/Cellar/composer/1.6.4/bin/composer/src/Composer/Installer.php:615
 Composer\Installer->doInstall() at phar:///usr/local/Cellar/composer/1.6.4/bin/composer/src/Composer/Installer.php:228
 Composer\Installer->run() at phar:///usr/local/Cellar/composer/1.6.4/bin/composer/src/Composer/Command/UpdateCommand.php:162
 Composer\Command\UpdateCommand->execute() at phar:///usr/local/Cellar/composer/1.6.4/bin/composer/vendor/symfony/console/Command/Command.php:241
 Symfony\Component\Console\Command\Command->run() at phar:///usr/local/Cellar/composer/1.6.4/bin/composer/vendor/symfony/console/Application.php:843
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/Cellar/composer/1.6.4/bin/composer/vendor/symfony/console/Application.php:193
 Symfony\Component\Console\Application->doRun() at phar:///usr/local/Cellar/composer/1.6.4/bin/composer/src/Composer/Console/Application.php:254
 Composer\Console\Application->doRun() at phar:///usr/local/Cellar/composer/1.6.4/bin/composer/vendor/symfony/console/Application.php:117
 Symfony\Component\Console\Application->run() at phar:///usr/local/Cellar/composer/1.6.4/bin/composer/src/Composer/Console/Application.php:103
 Composer\Console\Application->run() at phar:///usr/local/Cellar/composer/1.6.4/bin/composer/bin/composer:56
 require() at /usr/local/Cellar/composer/1.6.4/bin/composer:24

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [--with-dependencies] [--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...

And I expected this to happen:

Current my site is at Drupal Core 8.4.8 and Lightning 2.2.0. I am trying to use "Composer Update" to update the packages.

For Custom Module Updates am following the steps summed here: https://www.drupal.org/node/2863992

This patch is not on Composer.JSON file.

JSON file is:

{
    "name": "acquia/blt-project",
    "description": "Project template for Drupal 8 sites built with BLT.",
    "type": "project",
    "minimum-stability": "dev",
    "prefer-stable": true,
    "require": {
        "acquia/blt": "^8.9.7",
        "acquia/lightning": "3.2.0",
        "drupal/default_content": "^1.0@alpha",
        "drupal/acsf": "^1.48",
        "drupal/acquia_connector": "^1.14",
        "drupal/cog": "^1.7",
        "drupal/qa_accounts": "^1.0@alpha",
        "drupal/seckit": "^1.0",
        "drupal/memcache": "^2.0@alpha",
        "drupal/devel": "^1.0@RC",
        "drupal/features": "^3.8",
        "drupal/config_rewrite": "^1.0",
        "drupal/pathauto": "^1.0",
        "drupal/core": "8.5.6",
        "drupal/samlauth": "^1.3",
        "drupal/externalauth": "^1.0",
        "drupal/webform": "^5.0@beta",
        "drupal/paragraphs": "^1.2",
        "drupal/kint": "^1.0@RC",
        "drupal/twig_tweak": "^1.9",
        "drupal/maxlength": "^1.0",
        "drupal/context_active_trail": "^1.0",
        "drupal/link_attributes": "^1.3",
        "drupal/field_group": "^1.0",
        "drupal/pardot": "1.x-dev",
        "drupal/twig_field_value": "^1.1",
        "drupal/cdn": "^3.2",
        "drupal/password_policy": "^3.0",
        "drupal/linkit": "^5.0",
        "drupal/editor_advanced_link": "^1.4",
        "drupal/google_analytics": "^3.0",
        "drupal/sitemap": "^1.4",
        "drupal/simple_sitemap": "^2.12",
        "drupal/metatag": "^1.7",
        "drupal/tmgmt": "^1.6",
        "drupal/node_title_help_text": "^1.0",
        "solarium/solarium": "^3.8",
        "drupal/search_api_solr": "^1.2",
        "drupal/better_exposed_filters": "^3.0",
        "drupal/search_api_exclude_entity": "^1.0@beta",
        "drupal/image_max_size_crop": "^1.0",
        "drupal/rabbit_hole": "^1.0@beta",
        "drupal/redirect": "^1.2",
        "drupal/token": "^1.1",
        "drupal/config_update": "^1.5",
        "drupal/context": "^4.0",
        "drupal/entity": "^1.0",
        "drupal/entity_block": "^1.0",
        "drupal/entity_reference_revisions": "^1.5",
        "drupal/backup_migrate": "^4.0@beta",
        "drupal/quick_node_clone": "^1.10",
        "drupal/datatables": "^1.0@RC",
        "drupal/imageapi_optimize": "^2.0",
        "drush/drush": "^8.1.15",
        "drupal/acquia_purge": "^1.0@beta",
        "drupal/content_moderation_notifications": "^3.0",
        "drupal/google_tag": "^1.1",
        "drupal/console": "~1.0",
        "drupal/robotstxt": "^1.2",
        "phpoffice/phpspreadsheet": "^1.2",
        "drupal/inline_entity_form": "^1.0",
        "drupal/shield": "^1.2",
        "drupal/diff": "^1.0"
    },
    "require-dev": {
        "drupal/config_devel": "^1.0",
        "geerlingguy/drupal-vm": "~4.3"
    },
    "extra": {
        "enable-patching": true,
        "patches": {
            "drupal/core": {
                "Workflow fix to get first state from config in case empty initial state": "https://www.drupal.org/files/issues/2018-04-16/drupal_workflow-initial-state-fix-2901459-16.patch"
            },
            "drupal/acquia_connector": {
                "Adding support for enviornment specific default core.": "https://www.drupal.org/files/issues/acquia_connector-acsf-env-specific-cores-2873443-4.patch"
            }
        },
        "installer-paths": {
            "docroot/core": [
                "type:drupal-core"
            ],
            "docroot/modules/contrib/{$name}": [
                "type:drupal-module"
            ],
            "docroot/modules/custom/{$name}": [
                "type:drupal-custom-module"
            ],
            "docroot/profiles/contrib/{$name}": [
                "type:drupal-profile"
            ],
            "docroot/profiles/custom/{$name}": [
                "type:drupal-custom-profile"
            ],
            "docroot/themes/contrib/{$name}": [
                "type:drupal-theme"
            ],
            "docroot/themes/custom/{$name}": [
                "type:drupal-custom-theme"
            ],
            "docroot/libraries/{$name}": [
                "type:drupal-library",
                "type:bower-asset",
                "type:npm-asset",
                "type:bower-asset",
                "type:npm-asset"
            ],
            "drush/contrib/{$name}": [
                "type:drupal-drush"
            ]
        },
        "merge-plugin": {
            "require": [
                "vendor/acquia/blt/composer.required.json",
                "vendor/acquia/blt/composer.suggested.json"
            ],
            "include": [
                "blt/composer.overrides.json"
            ],
            "merge-extra": true,
            "merge-extra-deep": true,
            "merge-scripts": true,
            "replace": true
        },
        "installer-types": [
            "bower-asset",
            "npm-asset",
            "bower-asset",
            "npm-asset"
        ]
    },
    "config": {
        "platform": {
            "php": "7.1"
        }
    },
    "scripts": {
        "post-drupal-scaffold-cmd": [
            "patch -p1 <./patches/drupal/remove_robots_txt_file.patch"
        ]
    }
}
greylabel commented 6 years ago

Related: https://github.com/acquia/blt/pull/3108

ghost commented 6 years ago

@greylabel : I have removed the patches which were not on successful on JSON file. But this is on lock file. The lock file has these patches.

ghost commented 6 years ago

Closed it by mistake.

crittermike commented 5 years ago

Composer is installing Drupal 8.6.1 (see Installs: drupal/core:8.6.1,) but your BLT version has a patch that conflicts with it. You need a 9.2.x BLT release which is built for 8.6. See https://github.com/acquia/blt/releases/ and note that it's still in alpha.

Alternatively you can prevent Drupal from trying to upgrade to 8.6. I'm not sure what is forcing the upgrade for you though, so I'm not sure offhand how to do that.

sharique commented 5 years ago

I'm trying to add BLT to existing 8.6.1 site, (set BTL version ^9.2.0 in composer.json) but still failing to apply patch.

sharique commented 5 years ago

The issue (https://www.drupal.org/node/2752961) is fixed, I the patch is no longer required.

mikemadison13 commented 5 years ago

@sharique are you still having issues here?

sharique commented 5 years ago

This is not happening but getting following error when adding to plain drupal


Using version ^9.2 for acquia/blt
./composer.json has been updated
DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for consolidation/robo (locked at 1.3.1) -> satisfiable by consolidation/robo[1.3.1].
    - acquia/blt 9.2.0 requires consolidation/robo ~1.2.4 -> satisfiable by consolidation/robo[1.2.4].
    - acquia/blt 9.2.0-alpha1 requires consolidation/robo ~1.2.4 -> satisfiable by consolidation/robo[1.2.4].
    - acquia/blt 9.2.0-alpha2 requires consolidation/robo ~1.2.4 -> satisfiable by consolidation/robo[1.2.4].
    - acquia/blt 9.2.0-alpha3 requires consolidation/robo ~1.2.4 -> satisfiable by consolidation/robo[1.2.4].
    - acquia/blt 9.2.x-dev requires consolidation/robo ~1.2.4 -> satisfiable by consolidation/robo[1.2.4].
    - acquia/blt 9.x-dev requires consolidation/robo ~1.2.4 -> satisfiable by consolidation/robo[1.2.4].
    - Conclusion: don't install consolidation/robo 1.2.4
    - Installation request for acquia/blt ^9.2 -> satisfiable by acquia/blt[9.2.0, 9.2.0-alpha1, 9.2.0-alpha2, 9.2.0-alpha3, 9.2.x-dev, 9.x-dev].

Installation failed, reverting ./composer.json to its original content.```
mmrtnt commented 5 years ago

I am still having this problem with BLT 9.2.1 going from drupal/core 8.5.6 to 8.6.x

Gathering patches for root package.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 46 updates, 0 removals
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
  - Updating composer/installers (v1.5.0 => v1.6.0): Loading from cache
  - Updating aws/aws-sdk-php (3.69.12 => 3.70.2): Loading from cache
  - Updating commerceguys/addressing (v1.0.0 => v1.0.1): Loading from cache
  - Updating symfony/polyfill-php72 (v1.9.0 => v1.10.0): Loading from cache
  - Updating symfony/var-dumper (v4.1.3 => v4.1.6): Loading from cache
  - Updating jakub-onderka/php-console-color (0.1 => v0.2): Loading from cache
  - Updating jakub-onderka/php-console-highlighter (v0.3.2 => v0.4): Loading from cache
  - Updating psy/psysh (v0.9.7 => v0.9.9): Loading from cache
  - Updating symfony/css-selector (v3.4.14 => v3.4.17): Loading from cache
  - Updating dflydev/dot-access-configuration (v1.0.2 => v1.0.3): Loading from cache
  - Updating symfony/filesystem (v3.4.15 => v3.4.17): Loading from cache
  - Updating symfony/config (v3.4.14 => v3.4.17): Loading from cache
  - Updating drupal/core (8.5.8 => 8.6.1): Loading from cache
  - Applying patches for drupal/core
    https://www.drupal.org/files/issues/2752961-130.patch (Clear Twig caches on deploys)
   Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2752961-130.patch

  [Exception]                                                                                               
  Cannot apply patch Clear Twig caches on deploys (https://www.drupal.org/files/issues/2752961-130.patch)!  
ghost commented 5 years ago

Adding

"patches-ignore": {
            "drupal/core": {
                "Clear Twig caches on deploys": "https://www.drupal.org/files/issues/2752961-130.patch"
            }
        },

resolved the issue. Help from - https://github.com/acquia/blt/issues/3056#issuecomment-423841461

mmrtnt commented 5 years ago

This is not working for me adding

"patches-ignore": {
            "drupal/core": {
                "Clear Twig caches on deploys": "https://www.drupal.org/files/issues/2752961-130.patch"
            }
        },

in various places to composer.json

mmrtnt commented 5 years ago

Thanks.

May just be my setup, but this did not work until I put it right above "extra": at the same indentation.

mmrtnt commented 5 years ago

After considerable effort, I determined that the patch was not being ignored. I was mislead by the error disappearing after upgrading to blt 9.2.1. I have not gotten patches-ignore to work in any configuration I've tried so far.

phil-plencner-hl commented 5 years ago

I am getting the same error message when attempting to upgrade Drupal Core to 8.6.x with BLT.

I'm on version 9.2.3 of BLT.

Response I receive:

`$ composer update drupal/core acquia/lightning acquia/blt --with-all-dependencies Could not scan for classes inside "/var/www/harvard-library/vendor/drupal/core/lib/Drupal.php" which does not appear to be a file nor a folder Could not scan for classes inside "/var/www/harvard-library/vendor/drupal/core/lib/Drupal/Component/Utility/Timer.php" which does not appear to be a file nor a folder Could not scan for classes inside "/var/www/harvard-library/vendor/drupal/core/lib/Drupal/Component/Utility/Unicode.php" which does not appear to be a file nor a folder Could not scan for classes inside "/var/www/harvard-library/vendor/drupal/core/lib/Drupal/Core/Database/Database.php" which does not appear to be a file nor a folder Could not scan for classes inside "/var/www/harvard-library/vendor/drupal/core/lib/Drupal/Core/DrupalKernel.php" which does not appear to be a file nor a folder Could not scan for classes inside "/var/www/harvard-library/vendor/drupal/core/lib/Drupal/Core/DrupalKernelInterface.php" which does not appear to be a file nor a folder Could not scan for classes inside "/var/www/harvard-library/vendor/drupal/core/lib/Drupal/Core/Site/Settings.php" which does not appear to be a file nor a folder 1/3: http://repo.packagist.org/p/provider-latest$1fad6756bb1ed340ed49cae72b5e298a32f201f74d622b163f83ade34f794176.json 2/3: http://repo.packagist.org/p/provider-2019-01$211e37b550c12268c4041b4cc80537da1ebe82b879cc8dfd7b73bbe2ef139503.json 3/3: http://repo.packagist.org/p/provider-2018-10$c501882f36c0fc7ed638014fa7a9679a4a0ef0ecb789a4e51b35810131a7baa4.json Finished: success: 3, skipped: 0, failure: 0, total: 3 Gathering patches for root package. Removing package drupal/core so that it can be re-installed and re-patched.

my composer.json file: "require": { "acquia/blt": "9.2.3", "acquia/lightning": "~3.2.0", "drupal/address": "^1.0", "drupal/better_formats": "1.x-dev", "drupal/blazy": "^1.0@RC", "drupal/ckeditor_templates": "1.0", "drupal/components": "^1.0", "drupal/console": "~1.0", "drupal/core": "^8.6.0", "drupal/date_recur": "1.0", "drupal/double_field": "^3.0", "drupal/dynamic_entity_reference": "^1.0", "drupal/entity": "^1.0", "drupal/field_group": "^3.0", "drupal/field_validation": "1.x-dev", "drupal/focal_point": "^1.0@beta", "drupal/geofield": "^1.0", "drupal/google_tag": "^1.0", "drupal/hotjar": "^1.2", "drupal/linkit": "^5.0", "drupal/maxlength": "^1.0", "drupal/memcache": "2.0-alpha7", "drupal/menu_breadcrumb": "^1.0", "drupal/menu_link_attributes": "^1.0", "drupal/node_title_help_text": "^1.0", "drupal/paragraphs": "^1.5", "drupal/pathologic": "^1.0", "drupal/rabbit_hole": "^1.0", "drupal/realname": "1.x-dev", "drupal/redirect": "1.3", "drupal/rfv": "1.x-dev", "drupal/search_api_solr": "^1.0", "drupal/selectize": "1.x-dev", "drupal/simplesamlphp_auth": "3.x-dev", "drupal/slick_paragraphs": "^1.0@RC", "drupal/slick_views": "^1.0@RC", "drupal/svg_image_field": "^1.0", "drupal/themable_forms": "^1.0@beta", "drupal/verf": "^1.0", "drupal/views_autocomplete_filters": "^1.0", "drupal/views_bulk_edit": "^2.2", "drupal/views_data_export": "^1.0@beta", "drupal/views_taxonomy_term_name_depth": "6.x-dev", "drupal/viewsreference": "^2.0", "drupal/weight": "^3.0", "drupal/yaml_editor": "^1.0", "geerlingguy/drupal-vm": "~4.3", "graham-campbell/guzzle-factory": "3.0", "velir/harvard-patterns": "1.2.27" },

Any assistance you can provide would be very appreciated!

mikemadison13 commented 5 years ago

hi @phil-plencner-hl,

please try running your composer update in this way instead:

composer update webflo/drupal-core-require-dev drupal/core acquia/lightning acquia/blt --with-all-dependencies

note that in BLT 9.2.x + we use webflo to manage drupal core dependencies and my hunch is that you are getting bit by that. if it still fails, it might make sense to rm -rf vendor and try again.

if this issue persists, please submit a new issue related to this one instead of continuing a discussion on a closed issue