From 7c9027747646ad14990f4dbea7214a1f266e14b6 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Thu, 26 Sep 2024 13:28:23 -0600 Subject: [PATCH 01/10] rename pages so they are re-ordered correctly --- .../{02-dependencies.md => 04-dependencies.md} | 0 .../{03-private-repo-package.md => 05-private-repo-package.md} | 0 .../{04-one-click-updates.md => 06-one-click-updates.md} | 0 .../{05-ic-upstreams.md => 07-ic-upstreams.md} | 0 .../integrated-composer/{06-ic-support.md => 08-ic-support.md} | 0 .../{07-ic-troubleshooting.md => 09-ic-troubleshooting.md} | 0 .../guides/integrated-composer/{08-ic-faq.md => 10-ic-faq.md} | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename source/content/guides/integrated-composer/{02-dependencies.md => 04-dependencies.md} (100%) rename source/content/guides/integrated-composer/{03-private-repo-package.md => 05-private-repo-package.md} (100%) rename source/content/guides/integrated-composer/{04-one-click-updates.md => 06-one-click-updates.md} (100%) rename source/content/guides/integrated-composer/{05-ic-upstreams.md => 07-ic-upstreams.md} (100%) rename source/content/guides/integrated-composer/{06-ic-support.md => 08-ic-support.md} (100%) rename source/content/guides/integrated-composer/{07-ic-troubleshooting.md => 09-ic-troubleshooting.md} (100%) rename source/content/guides/integrated-composer/{08-ic-faq.md => 10-ic-faq.md} (100%) diff --git a/source/content/guides/integrated-composer/02-dependencies.md b/source/content/guides/integrated-composer/04-dependencies.md similarity index 100% rename from source/content/guides/integrated-composer/02-dependencies.md rename to source/content/guides/integrated-composer/04-dependencies.md diff --git a/source/content/guides/integrated-composer/03-private-repo-package.md b/source/content/guides/integrated-composer/05-private-repo-package.md similarity index 100% rename from source/content/guides/integrated-composer/03-private-repo-package.md rename to source/content/guides/integrated-composer/05-private-repo-package.md diff --git a/source/content/guides/integrated-composer/04-one-click-updates.md b/source/content/guides/integrated-composer/06-one-click-updates.md similarity index 100% rename from source/content/guides/integrated-composer/04-one-click-updates.md rename to source/content/guides/integrated-composer/06-one-click-updates.md diff --git a/source/content/guides/integrated-composer/05-ic-upstreams.md b/source/content/guides/integrated-composer/07-ic-upstreams.md similarity index 100% rename from source/content/guides/integrated-composer/05-ic-upstreams.md rename to source/content/guides/integrated-composer/07-ic-upstreams.md diff --git a/source/content/guides/integrated-composer/06-ic-support.md b/source/content/guides/integrated-composer/08-ic-support.md similarity index 100% rename from source/content/guides/integrated-composer/06-ic-support.md rename to source/content/guides/integrated-composer/08-ic-support.md diff --git a/source/content/guides/integrated-composer/07-ic-troubleshooting.md b/source/content/guides/integrated-composer/09-ic-troubleshooting.md similarity index 100% rename from source/content/guides/integrated-composer/07-ic-troubleshooting.md rename to source/content/guides/integrated-composer/09-ic-troubleshooting.md diff --git a/source/content/guides/integrated-composer/08-ic-faq.md b/source/content/guides/integrated-composer/10-ic-faq.md similarity index 100% rename from source/content/guides/integrated-composer/08-ic-faq.md rename to source/content/guides/integrated-composer/10-ic-faq.md From 70eab832c59d891caec80373d3caec23dc2471e9 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Thu, 26 Sep 2024 13:28:35 -0600 Subject: [PATCH 02/10] remove /drupal --- source/content/drupal.md | 89 ---------------------------------------- 1 file changed, 89 deletions(-) delete mode 100644 source/content/drupal.md diff --git a/source/content/drupal.md b/source/content/drupal.md deleted file mode 100644 index b9cc9ef389..0000000000 --- a/source/content/drupal.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: "Drupal on Pantheon" -description: Get started with Drupal on the Pantheon WebOps Platform. -tags: [site, D8, D9, D10] -contributors: [populist, edwardangert, whitneymeredith] -reviewed: "2022-12-09" -contenttype: [doc] -innav: [true] -categories: [cms] -cms: [drupal] -audience: [development] -product: [integrated-composer] -integration: [--] ---- - -Drupal 10 is available to all new sites, and is available as an [upgrade path for Drupal 9 sites](/drupal-10#update-a-drupal-9-site-to-drupal-10). Refer to [Drupal 10 on Pantheon](/drupal-10) for more information. - -Drupal 9 is similarly available on Pantheon to all new sites, and as an [upgrade path for Drupal 8+ sites](/drupal-migration). - -Since Drupal itself is in active development and each new version brings a number of significant changes from previous versions, this doc outlines the biggest changes and answers frequently asked questions. - -## About Drupal - -Drupal includes many of the features and layout that Drupal users are familiar with, and it removes deprecated code to help improve future Drupal development. - -The latest version of Drupal updates Drupal’s underlying dependencies like [Symfony](https://symfony.com/) and [Twig](https://twig.symfony.com/), removes several deprecated API functions in favor of better options, and allows everyone running Drupal 8.8+ an easy upgrade path to Drupal and beyond. - -## Drupal With Integrated Composer - -On the Pantheon Platform, Drupal sites use [Integrated Composer](/guides/integrated-composer), letting you deploy your site on Pantheon with one-click updates for both upstream commits and Composer dependencies, while still receiving upstream updates. - -### Site Structure - - - -### Managing Dependencies with Composer - -Learn more about working with upstream and site dependencies in the [Integrated Composer](/guides/integrated-composer) documentation. - -## Before You Begin - -- Log in to your Pantheon account. If you don't have one, [create one first](https://pantheon.io/register?docs) and familiarize yourself with [Workspaces](/guides/account-mgmt/workspace-sites-teams/workspaces) before you create a new site. - -- Set up [SSH Keys](/ssh-keys) on your local computer and Pantheon account. - -- Install and configure [Git](/guides/git/git-config) and [Composer](https://getcomposer.org/download/) on your local computer. - -- Mac users can use [Homebrew](https://brew.sh/) to install both Git, Composer, and Terminus along with their required dependencies: - - ```bash{promptUser:user} - brew install git composer pantheon-systems/external/terminus - ``` - -## Create a New Drupal Site with Integrated Composer - -[Create a new Drupal site from the Dashboard](/add-site-dashboard) as you would with any new site. Integrated Composer is built in and ready to use. - -## Upgrade or Migrate to Drupal - -To upgrade or migrate an existing Drupal site to Drupal with Integrated Composer, see the [Drupal Migration Guide](/drupal-migration). - -To check an existing site's compatibility to upgrade, visit the appropriate [Drupal Migration Guide](/drupal-migration). - -## Troubleshooting and Support - -See the appropriate [Drupal Migration Guide](/drupal-migration) for help troubleshooting common issues with Drupal with Integrated Composer. - -### Where can I report an issue? - -[Contact support](/guides/support) to report any issues that you encounter. - -### Can I Use Lando or Localdev for Drupal? - -Some users have reported success using [Lando](https://docs.lando.dev/basics/) with Drupal, but it relies on a workaround and requires extra configuration. Check the status of the [Lando repo's issue](https://github.com/lando/lando/issues/2831#issuecomment-771833900) before you continue. - -Manually update the [landofile](https://docs.lando.dev/config/lando.html#base-file) in the project folder, and set `drupal9` as the framework: - - ```yml:title=lando.yml - # Lando issue 2831 workaround for D9 - framework: drupal9 - ``` - -When you create a project with Lando from the Pantheon recipe, the `framework` will default to `drupal8` for a Drupal site. - -If you created new project with Lando, change the value for `framework` to `drupal8`, then run `lando rebuild`. - -### Site-local Drush Is Required for Drupal Sites - -Do not remove `drush/drush` from `composer.json`. If it's removed, `terminus drush` commands will fail with errors related to Twig. From fce134152002d296cb38d883d77f7c4c0b4e24cb Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Thu, 26 Sep 2024 13:28:57 -0600 Subject: [PATCH 03/10] add site-local drush note to supported-drupal where we will redirect requests to /drupal --- source/content/supported-drupal.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/content/supported-drupal.md b/source/content/supported-drupal.md index b6cb7c05bb..1eb0e0c619 100644 --- a/source/content/supported-drupal.md +++ b/source/content/supported-drupal.md @@ -35,6 +35,14 @@ To create a new Drupal 11 site on Pantheon, first you have to [create a new Drup Refer to [Manage Drush Versions on Pantheon](/guides/drush/drush-versions/) for information on Drush versions that are compatible with each Drupal version. + + +### Site-local Drush is required for Drupal sites. + +Do not remove `drush/drush` from `composer.json`. If it's removed, `terminus drush` commands will fail with errors related to Twig. + + + ## Modules Support Refer to [Drupal Modules with Known Issues](/modules-known-issues) for a list of known compatibility issues. From ff177cb2e7abc73d5155423085d83a9f9fd03b57 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Thu, 26 Sep 2024 13:50:58 -0600 Subject: [PATCH 04/10] move all the pages again --- .../integrated-composer/04-dependencies.md | 91 ------------------- ...-package.md => 04-private-repo-package.md} | 0 ...ick-updates.md => 05-one-click-updates.md} | 0 ...{07-ic-upstreams.md => 06-ic-upstreams.md} | 0 .../{08-ic-support.md => 07-ic-support.md} | 0 ...leshooting.md => 08-ic-troubleshooting.md} | 0 .../{10-ic-faq.md => 09-ic-faq.md} | 0 7 files changed, 91 deletions(-) delete mode 100644 source/content/guides/integrated-composer/04-dependencies.md rename source/content/guides/integrated-composer/{05-private-repo-package.md => 04-private-repo-package.md} (100%) rename source/content/guides/integrated-composer/{06-one-click-updates.md => 05-one-click-updates.md} (100%) rename source/content/guides/integrated-composer/{07-ic-upstreams.md => 06-ic-upstreams.md} (100%) rename source/content/guides/integrated-composer/{08-ic-support.md => 07-ic-support.md} (100%) rename source/content/guides/integrated-composer/{09-ic-troubleshooting.md => 08-ic-troubleshooting.md} (100%) rename source/content/guides/integrated-composer/{10-ic-faq.md => 09-ic-faq.md} (100%) diff --git a/source/content/guides/integrated-composer/04-dependencies.md b/source/content/guides/integrated-composer/04-dependencies.md deleted file mode 100644 index f55064ae96..0000000000 --- a/source/content/guides/integrated-composer/04-dependencies.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: Integrated Composer -subtitle: Add or Remove Individual Site Dependencies -description: Learn how to add or remove an individual site dependency. -tags: [composer, workflow] -contributors: [ari, edwardangert] -showtoc: true -permalink: docs/guides/integrated-composer/dependencies -contenttype: [guide] -innav: [false] -categories: [dependencies] -cms: [drupal, wordpress] -audience: [development] -product: [composer] -integration: [--] -reviewed: "2022-12-13" ---- - -This sections provides information on dependency requirements and how to add or remove individual site dependencies. - -## Composer `require` and `require dev` Sections - -It's important to understand how `require` and `require dev` are used on the Pantheon platform. - -### Composer `require` Section - -Drupal modules / themes and WordPress plugins / themes should always be in the `require` section, not the `require-dev` section. Dependencies in the `require` section are pushed to all Pantheon environments. - -### Composer `require dev` Section - -You should use the `require-dev` section for dependencies that are not a part of the web application but are necessary to build or test your project. Some examples are `php_codesniffer` and `phpunit`. Dev dependencies are deployed to Pantheon Dev and Multidev environments, but not to Test and Live environments. - -Third-party dependencies, such as modules / plugins and themes, are added to the project via `composer.json`. The `composer.lock` file keeps track of the exact version of dependency. [Composer `installer-paths`](https://getcomposer.org/doc/faqs/how-do-i-install-a-package-to-a-custom-path-for-my-framework.md#how-do-i-install-a-package-to-a-custom-path-for-my-framework-) are used to ensure the dependencies are downloaded into the appropriate directory. - -### Select Dependencies Locally - -When running `composer install` on a local clone of your Pantheon site's repository, you can use the `--no-dev` option to install the dependencies that will be installed on the Pantheon Test and Live environments. Do not include this option to install the dependencies that will be installed on Dev and Multidev environments on Pantheon. The `--no-dev` option has no effect on what is written to the `composer.lock` file, and therefore does not change the behavior of your site on Pantheon. This option is only relevant to local testing. - -## Add a Dependency to an Individual Site - -1. [Clone the Git repository](/guides/git/git-config#clone-your-site-codebase) from the Pantheon site's dashboard. - -1. Run `composer install`: - - ```bash{promptUser: user} - composer install - ``` - -1. Add a new dependency locally: - - ```bash{promptUser: user} - composer require drupal/pkg-name - ``` - -1. Commit `composer.json` and `composer.lock` and push the changes. - - ```bash{promptUser: user} - git add composer.json composer.lock && git commit -m "added composer.json and composer.lock" && git push - ``` - - - Pantheon will run Composer, build artifacts, and deploy the changes to your Dev or Multidev environment. You can now deploy the changes from the updated Dev environment to the Test and Live environments. - -1. Complete the steps to [commit Dev changes to Test and Live](/pantheon-workflow#combine-code-from-dev-and-content-from-live-in-test) through your Pantheon dashboard or with [Terminus env:deploy](/terminus/commands/env-deploy). - -## Remove Individual Site Dependencies - -You can remove site dependencies if they are no longer needed. You should use caution when removing individual site dependencies. You can cause problems with your site if you decide you no longer need a module but leave it installed, and then remove site dependencies. - -1. [Clone the database from Live](/pantheon-workflow#combine-code-from-dev-and-content-from-live-in-test) to all other environments before continuing. - -1. Ensure that all modules in the package have been uninstalled. You can uninstall modules in the Drupal admin dashboard, or from the command line with Terminus: - - ```bash{promptUser: user} - terminus drush site.live -- pm:uninstall module1 module2 - ``` - -1. Remove the dependency locally: - - ```bash{promptUser: user} - composer remove drupal/pkg-name - ``` - -1. Commit `composer.json` and `composer.lock` and push the changes. - - - Pantheon will run Composer, generate build artifacts, etc. - -## More Resources - -- [Manage Some Dependencies with Composer](/guides/partial-composer) - -- [Build Tools](/guides/build-tools/) diff --git a/source/content/guides/integrated-composer/05-private-repo-package.md b/source/content/guides/integrated-composer/04-private-repo-package.md similarity index 100% rename from source/content/guides/integrated-composer/05-private-repo-package.md rename to source/content/guides/integrated-composer/04-private-repo-package.md diff --git a/source/content/guides/integrated-composer/06-one-click-updates.md b/source/content/guides/integrated-composer/05-one-click-updates.md similarity index 100% rename from source/content/guides/integrated-composer/06-one-click-updates.md rename to source/content/guides/integrated-composer/05-one-click-updates.md diff --git a/source/content/guides/integrated-composer/07-ic-upstreams.md b/source/content/guides/integrated-composer/06-ic-upstreams.md similarity index 100% rename from source/content/guides/integrated-composer/07-ic-upstreams.md rename to source/content/guides/integrated-composer/06-ic-upstreams.md diff --git a/source/content/guides/integrated-composer/08-ic-support.md b/source/content/guides/integrated-composer/07-ic-support.md similarity index 100% rename from source/content/guides/integrated-composer/08-ic-support.md rename to source/content/guides/integrated-composer/07-ic-support.md diff --git a/source/content/guides/integrated-composer/09-ic-troubleshooting.md b/source/content/guides/integrated-composer/08-ic-troubleshooting.md similarity index 100% rename from source/content/guides/integrated-composer/09-ic-troubleshooting.md rename to source/content/guides/integrated-composer/08-ic-troubleshooting.md diff --git a/source/content/guides/integrated-composer/10-ic-faq.md b/source/content/guides/integrated-composer/09-ic-faq.md similarity index 100% rename from source/content/guides/integrated-composer/10-ic-faq.md rename to source/content/guides/integrated-composer/09-ic-faq.md From d67b1077e81ff9334ae11cc567b710fa0d662459 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Thu, 26 Sep 2024 13:51:12 -0600 Subject: [PATCH 05/10] update dependencies to include more resources and composer update docs --- .../integrated-composer/03-dependencies.md | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 source/content/guides/integrated-composer/03-dependencies.md diff --git a/source/content/guides/integrated-composer/03-dependencies.md b/source/content/guides/integrated-composer/03-dependencies.md new file mode 100644 index 0000000000..3acae99ba1 --- /dev/null +++ b/source/content/guides/integrated-composer/03-dependencies.md @@ -0,0 +1,109 @@ +--- +title: Integrated Composer +subtitle: Add or Remove Individual Site Dependencies +description: Learn how to add or remove an individual site dependency. +tags: [composer, workflow] +contributors: [ari, edwardangert] +showtoc: true +permalink: docs/guides/integrated-composer/dependencies +contenttype: [guide] +innav: [false] +categories: [dependencies] +cms: [drupal, wordpress] +audience: [development] +product: [composer] +integration: [--] +reviewed: "2022-12-13" +--- + +This sections provides information on dependency requirements and how to add or remove individual site dependencies. + +## Composer `require` and `require dev` Sections + +It's important to understand how `require` and `require dev` are used on the Pantheon platform. + +### Composer `require` Section + +Drupal modules / themes and WordPress plugins / themes should always be in the `require` section, not the `require-dev` section. Dependencies in the `require` section are pushed to all Pantheon environments. + +### Composer `require dev` Section + +You should use the `require-dev` section for dependencies that are not a part of the web application but are necessary to build or test your project. Some examples are `php_codesniffer` and `phpunit`. Dev dependencies are deployed to Pantheon Dev and Multidev environments, but not to Test and Live environments. + +Third-party dependencies, such as modules / plugins and themes, are added to the project via `composer.json`. The `composer.lock` file keeps track of the exact version of dependency. [Composer `installer-paths`](https://getcomposer.org/doc/faqs/how-do-i-install-a-package-to-a-custom-path-for-my-framework.md#how-do-i-install-a-package-to-a-custom-path-for-my-framework-) are used to ensure the dependencies are downloaded into the appropriate directory. + +### Select Dependencies Locally + +When running `composer install` on a local clone of your Pantheon site's repository, you can use the `--no-dev` option to install the dependencies that will be installed on the Pantheon Test and Live environments. Do not include this option to install the dependencies that will be installed on Dev and Multidev environments on Pantheon. The `--no-dev` option has no effect on what is written to the `composer.lock` file, and therefore does not change the behavior of your site on Pantheon. This option is only relevant to local testing. + +## Add a Dependency to an Individual Site + +1. [Clone the Git repository](/guides/git/git-config#clone-your-site-codebase) from the Pantheon site's dashboard. + +1. Run `composer install`: + + ```bash{promptUser: user} + composer install + ``` + +1. Add a new dependency locally: + + ```bash{promptUser: user} + composer require drupal/pkg-name + ``` + +1. Commit `composer.json` and `composer.lock` and push the changes. + + ```bash{promptUser: user} + git add composer.json composer.lock && git commit -m "added composer.json and composer.lock" && git push + ``` + + - Pantheon will run Composer, build artifacts, and deploy the changes to your Dev or Multidev environment. You can now deploy the changes from the updated Dev environment to the Test and Live environments. + +1. Complete the steps to [commit Dev changes to Test and Live](/pantheon-workflow#combine-code-from-dev-and-content-from-live-in-test) through your Pantheon dashboard or with [Terminus env:deploy](/terminus/commands/env-deploy). + +## Remove Individual Site Dependencies + +You can remove site dependencies if they are no longer needed. You should use caution when removing individual site dependencies. You can cause problems with your site if you decide you no longer need a module but leave it installed, and then remove site dependencies. + +1. [Clone the database from Live](/pantheon-workflow#combine-code-from-dev-and-content-from-live-in-test) to all other environments before continuing. + +1. Ensure that all modules in the package have been uninstalled. You can uninstall modules in the Drupal admin dashboard, or from the command line with Terminus: + + ```bash{promptUser: user} + terminus drush site.live -- pm:uninstall module1 module2 + ``` + +1. Remove the dependency locally: + + ```bash{promptUser: user} + composer remove drupal/pkg-name + ``` + +1. Commit `composer.json` and `composer.lock` and push the changes. + + - Pantheon will run Composer, generate build artifacts, etc. + +## Updating dependencies + +To update all Composer dependencies, run: + +```bash{promptUser: user} +composer update +``` + +This will update all Composer-managed packages according to the version constraints in your `composer.json` file. For more information on Composer version constraints, see the [Composer documentation](https://getcomposer.org/doc/articles/versions.md). + +To update a specific package, run: + +```bash{promptUser: user} +composer update vendor/package +``` + +Replace `vendor/package` with the package name you want to update. This will update only the named package to the latest version that matches the version constraints in your `composer.json` file. + +## More Resources + +- [Manage Some Dependencies with Composer](/guides/partial-composer) +- [Build Tools](/guides/build-tools/) +- [Composer Dependencies - Basic Usage](https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies) From 2da1be895c21fbe101f8270e609195a1e8f1116d Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Thu, 26 Sep 2024 13:51:26 -0600 Subject: [PATCH 06/10] move wpcm docs into integrated composer --- .../02-wordpress-composer-managed.md | 25 +++++-------------- 1 file changed, 6 insertions(+), 19 deletions(-) rename source/content/guides/{wordpress-composer => integrated-composer}/02-wordpress-composer-managed.md (90%) diff --git a/source/content/guides/wordpress-composer/02-wordpress-composer-managed.md b/source/content/guides/integrated-composer/02-wordpress-composer-managed.md similarity index 90% rename from source/content/guides/wordpress-composer/02-wordpress-composer-managed.md rename to source/content/guides/integrated-composer/02-wordpress-composer-managed.md index ca4263062d..6d118d5f7a 100644 --- a/source/content/guides/wordpress-composer/02-wordpress-composer-managed.md +++ b/source/content/guides/integrated-composer/02-wordpress-composer-managed.md @@ -1,5 +1,5 @@ --- -title: WordPress with Composer on Pantheon +title: Integrated Composer subtitle: Create a Composer-managed WordPress Site with Bedrock description: Learn more about Bedrock and Composer-managed WordPress sites. contenttype: [guide] @@ -7,14 +7,15 @@ innav: [false] categories: [dependencies] cms: [wordpress] audience: [development] -product: [--] +product: [composer] integration: [--] tags: [wordpress] contributors: [whitneymeredith, jspellman814, jazzsequence] layout: guide showtoc: true -permalink: docs/guides/wordpress-composer/wordpress-composer-managed +permalink: docs/guides/integrated-composer/wordpress-composer-managed anchorid: wordpress-composer-managed +reviewed: "2024-09-26" --- This section provides information on how to use Bedrock with Integrated Composer on a WordPress site. @@ -99,23 +100,9 @@ composer require wpackagist-plugin/advanced-custom-fields #### Check first It's generally a good idea when using either Packagist or WPackagist to check the repository before `require`ing the package. If you search Packagist for a WordPress plugin or theme and don't see it, you can be sure that if it exists in the WordPress plugin or theme repository, it will be available on WPackagist. Checking WPackagist for the package can be beneficial if you want to check what versions are available. -### Updating dependencies +### Further Learning about Dependencies -To update all Composer dependencies, run: - -```bash{promptUser: user} -composer update -``` - -This will update all Composer-managed packages according to the version constraints in your `composer.json` file. For more information on Composer version constraints, see the [Composer documentation](https://getcomposer.org/doc/articles/versions.md). - -To update a specific package, run: - -```bash{promptUser: user} -composer update vendor/package -``` - -Replace `vendor/package` with the package name you want to update. This will update only the named package to the latest version that matches the version constraints in your `composer.json` file. +For more information about managing dependencies with Composer on Pantheon, see our documentation about [dependencies](/guides/integrated-composer/dependencies) or the [Composer documentation](https://getcomposer.org/doc/). ## Troubleshooting ### Restore overwritten `composer.json` From 8638df0b50d5ec8abb256c6f7099c6d640f74e87 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Thu, 26 Sep 2024 13:56:23 -0600 Subject: [PATCH 07/10] add ic note about code sync and upstream update composer actions --- .../integrated-composer/03-dependencies.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source/content/guides/integrated-composer/03-dependencies.md b/source/content/guides/integrated-composer/03-dependencies.md index 3acae99ba1..3d96995593 100644 --- a/source/content/guides/integrated-composer/03-dependencies.md +++ b/source/content/guides/integrated-composer/03-dependencies.md @@ -102,8 +102,24 @@ composer update vendor/package Replace `vendor/package` with the package name you want to update. This will update only the named package to the latest version that matches the version constraints in your `composer.json` file. +## Applying Updates and Pushing Code to Pantheon with Integrated Composer + +Integrated Composer on Pantheon runs Composer operations on the server level. Which operations are run depends on what you are doing with your code. + +### Pushing Code to Pantheon + +When you push code to Pantheon, a `composer install` operation is run. This operation installs the dependencies listed in the `composer.lock` file. This ensures that the same versions of dependencies are installed on all environments. + +### Applying Upstream Updates + +When you check for an upstream update, the `composer update` operation is run. This operation updates all Composer-managed packages according to the version constraints in your `composer.json` file. This ensures that your site is up-to-date with the latest versions of all Composer-managed packages. Refer to the [Composer Versions](https://getcomposer.org/doc/articles/versions.md) documentation for more information on version constraints. + +When you click to _apply_ these upstream updates, the `composer update` operation is run on the Pantheon server. This updates the `composer.lock` file with the new versions of the packages. The `composer.lock` file is then committed to the repository and pushed to Pantheon. + ## More Resources - [Manage Some Dependencies with Composer](/guides/partial-composer) - [Build Tools](/guides/build-tools/) - [Composer Dependencies - Basic Usage](https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies) +- [Composer Versions](https://getcomposer.org/doc/articles/versions.md) + From b8c0ac41afcbc607ea5e5eecfb07281fec64cd5c Mon Sep 17 00:00:00 2001 From: Rachel Whitton Date: Tue, 15 Oct 2024 13:13:08 -0500 Subject: [PATCH 08/10] Consolidation and blending of each framework across the guide --- .../guides/integrated-composer/02-create.md | 103 ++++++++ .../02-wordpress-composer-managed.md | 130 ---------- .../integrated-composer/03-dependencies.md | 224 ++++++++++++++++-- .../04-private-repo-package.md | 140 ----------- .../05-one-click-updates.md | 46 ---- .../integrated-composer/06-ic-upstreams.md | 8 +- .../integrated-composer/07-ic-support.md | 60 ++++- .../08-ic-troubleshooting.md | 16 +- .../guides/integrated-composer/09-ic-faq.md | 82 ------- 9 files changed, 379 insertions(+), 430 deletions(-) create mode 100644 source/content/guides/integrated-composer/02-create.md delete mode 100644 source/content/guides/integrated-composer/02-wordpress-composer-managed.md delete mode 100644 source/content/guides/integrated-composer/04-private-repo-package.md delete mode 100644 source/content/guides/integrated-composer/05-one-click-updates.md delete mode 100644 source/content/guides/integrated-composer/09-ic-faq.md diff --git a/source/content/guides/integrated-composer/02-create.md b/source/content/guides/integrated-composer/02-create.md new file mode 100644 index 0000000000..1c7fe26e92 --- /dev/null +++ b/source/content/guides/integrated-composer/02-create.md @@ -0,0 +1,103 @@ +--- +title: Integrated Composer +subtitle: Create a new Composer-managed CMS site +description: Learn how to create new integrated composer Drupal and WordPress sites on Pantheon. +contenttype: [guide] +innav: [false] +categories: [dependencies] +cms: [wordpress] +audience: [development] +product: [composer] +integration: [--] +tags: [wordpress] +contributors: [whitneymeredith, jspellman814, jazzsequence] +layout: guide +showtoc: true +permalink: docs/guides/integrated-composer/create +anchorid: wordpress-composer-managed +reviewed: "2024-09-26" +--- +## Requirements + +- [PHP version](/guides/php/php-versions#verify-current-php-versions) 8.0 or greater +- [Composer](https://getcomposer.org/) + +## Drupal with Integrated Composer +This section provides information on how to use Drupal with Integrated Composer. + +### Create Your Site + +There are two ways you can spin up a site using WordPress Composer Managed: + +- Running the following terminus command: + + ```bash{promptUser: user} + terminus site:create --org ORG --region REGION --