Skip to content

Commit

Permalink
Merge pull request #7292 from pantheon-systems/cms-639-docs
Browse files Browse the repository at this point in the history
[CMS-639] Change drupal-recommended to drupal-composer-managed when referring to upstream
  • Loading branch information
michellecolon-pantheon authored May 5, 2022
2 parents 30e9251 + 3c2dd24 commit 5501594
Show file tree
Hide file tree
Showing 16 changed files with 52 additions and 55 deletions.
8 changes: 4 additions & 4 deletions source/content/core-updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ This process can potentially cause loss of data. Be sure you have no custom code
<Tab title="Drupal 9" id="d9" active={true}>

```bash{promptUser: user}
git pull -Xtheirs https://github.com/pantheon-systems/drupal-recommended master
git pull -Xtheirs https://github.com/pantheon-upstreams/drupal-composer-managed main
# resolve conflicts
git push origin master
```
Expand Down Expand Up @@ -195,7 +195,7 @@ This process lets you manually resolve the conflict using the command line and a
<Tab title="Drupal 9" id="d9-1conflict">

```bash{promptUser: user}
git remote add pantheon-drupal-9 https://github.com/pantheon-systems/drupal-recommended
git remote add pantheon-drupal-9 https://github.com/pantheon-systems/drupal-composer-managed
```

</Tab>
Expand Down Expand Up @@ -377,9 +377,9 @@ This issue happens when you attempt to update very outdated core files from the

<Tab title="Drupal 9" id="d9-2conflict-merge">

GITHUB-EMBED https://github.com/pantheon-systems/drupal-recommended/blob/default/pantheon.upstream.yml yaml:title=pantheon.yml GITHUB-EMBED
GITHUB-EMBED https://github.com/pantheon-systems/drupal-composer-managed/blob/default/pantheon.upstream.yml yaml:title=pantheon.yml GITHUB-EMBED

[View on GitHub](https://github.com/pantheon-systems/drupal-recommended/blob/default/pantheon.upstream.yml)
[View on GitHub](https://github.com/pantheon-systems/drupal-composer-managed/blob/default/pantheon.upstream.yml)

</Tab>

Expand Down
6 changes: 3 additions & 3 deletions source/content/create-custom-upstream.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ To avoid incompatibilities, you must track Pantheon's corresponding upstream rep
<Tab title="Drupal 9" id="d91">
```bash{promptUser: user}
git remote add pantheon-drupal-9 https://github.com/pantheon-upstreams/drupal-recommended.git
git remote add pantheon-drupal-9 https://github.com/pantheon-upstreams/drupal-composer-managed.git
```
</Tab>
Expand Down Expand Up @@ -215,8 +215,8 @@ To avoid incompatibilities, you must track Pantheon's corresponding upstream rep
```bash{promptUser: user}
git checkout -b master
git fetch pantheon-drupal-9 master
git merge pantheon-drupal-9/master
git fetch pantheon-drupal-9 main
git merge pantheon-drupal-9/main
git push origin master
```
Expand Down
4 changes: 2 additions & 2 deletions source/content/custom-upstream.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ There are three levels of repositories in play here, and updates flow "downstrea
<div className="upstream-content-inner-content">
<h3>Level 1: Pantheon's Core Upstream</h3>

The top level repository will be one of Pantheon's core upstreams (either [WordPress](https://github.com/pantheon-systems/wordpress),[Drupal 9](https://github.com/pantheon-upstreams/drupal-recommended), [Drupal 8](https://github.com/pantheon-systems/drops-8), or [Drupal 7](https://github.com/pantheon-systems/drops-7)). Core upstream updates are distributed by Pantheon and must be applied downstream.
The top level repository will be one of Pantheon's core upstreams (either [WordPress](https://github.com/pantheon-systems/wordpress),[Drupal 9](https://github.com/pantheon-upstreams/drupal-composer-managed), [Drupal 8](https://github.com/pantheon-systems/drops-8), or [Drupal 7](https://github.com/pantheon-systems/drops-7)). Core upstream updates are distributed by Pantheon and must be applied downstream.

</div>
</div>
Expand Down Expand Up @@ -112,7 +112,7 @@ Here are definitions for commonly used terms:

- **Upstream**: A repository that acts as a parent for another repository, like [Pantheon's WordPress Upstream](https://github.com/pantheon-systems/wordpress). The next two definitions are specific types of Upstreams.

- **Custom Upstream**: A repository restricted to members of an organization, containing a common codebase for new sites. This type of repository is a child repository to Pantheon's core upstreams ([WordPress](https://github.com/pantheon-systems/wordpress),[Drupal 9](https://github.com/pantheon-upstreams/drupal-recommended), [Drupal 8](https://github.com/pantheon-systems/drops-8), [Drupal 7](https://github.com/pantheon-systems/drops-7)) and acts as a parent for site level repositories.
- **Custom Upstream**: A repository restricted to members of an organization, containing a common codebase for new sites. This type of repository is a child repository to Pantheon's core upstreams ([WordPress](https://github.com/pantheon-systems/wordpress),[Drupal 9](https://github.com/pantheon-upstreams/drupal-composer-managed), [Drupal 8](https://github.com/pantheon-systems/drops-8), [Drupal 7](https://github.com/pantheon-systems/drops-7)) and acts as a parent for site level repositories.

- **Public Upstream**: A repository that is open to all Pantheon users which contains a common codebase for new sites, like [Panopoly](https://github.com/populist/panopoly-drops-7).

Expand Down
2 changes: 1 addition & 1 deletion source/content/environment-specific-config-d9.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ contributors: [peter-pantheon, rachelwhitton]
The following instructions enable Twig debugging and set development-friendly performance options across Pantheon's pre-production environments (Dev & Multidevs). This approach prevents debugging output and potentially harmful performance settings from being deployed to staging and production environments (Test and Live).

## Enable Twig Debugging on Dev & Multidevs
Pantheon handles the inclusion of service configuration files. The [default file provided](https://github.com/pantheon-systems/drupal-recommended/tree/default/web/sites/default) has everything you need, so enabling Twig debugging is simple:
Pantheon handles the inclusion of service configuration files. The [default file provided](https://github.com/pantheon-systems/drupal-composer-managed/tree/default/web/sites/default) has everything you need, so enabling Twig debugging is simple:

1. If you haven't done so already, clone the site's codebase using the [Git command string provided on the Site Dashboard](/git/#clone-your-site-codebase) or via [Terminus](/terminus):

Expand Down
2 changes: 1 addition & 1 deletion source/content/guides/build-tools/02-create-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ terminus auth:login --machine-token=<machine-token>

Pantheon's Composer-based example repositories are maintained and supported on GitHub. After browsing existing issues, report errors in the appropriate repository's issue queue:

- [Drupal 9](https://github.com/pantheon-upstreams/drupal-recommended/issues)
- [Drupal 9](https://github.com/pantheon-upstreams/drupal-composer-managed/issues)
- [Drupal 8](https://github.com/pantheon-systems/example-drops-8-composer/issues)
- [WordPress](https://github.com/pantheon-systems/example-wordpress-composer/issues)

Expand Down
10 changes: 5 additions & 5 deletions source/content/guides/composer-convert.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ contributors: [dustinleblanc, greg-1-anderson, stovak]
reviewed: "2021-10-23"
---

In this guide, we'll convert a standard Drupal 8 site to use Composer to manage deployments and dependencies, then switch from `drops-8` to the new Integrated Composer `drupal-recommended` upstream while remaining on Drupal 8.
In this guide, we'll convert a standard Drupal 8 site to use Composer to manage deployments and dependencies, then switch from `drops-8` to the new Integrated Composer `drupal-composer-managed` upstream while remaining on Drupal 8.

## Overview

Expand All @@ -20,9 +20,9 @@ The goals of this conversion are:

1. Remove dependencies that Composer will manage from the existing Drupal 8 site's Git repository, and have Composer manage those dependencies instead.

1. Switch to the `drupal-recommended` Integrated Composer upstream.
1. Switch to the `drupal-composer-managed` Integrated Composer upstream.

The `drupal-recommended` Integrated Composer upstream works with Drupal 8, and following the `drupal-recommended` upstream will help keep your site up to date with any general configuration changes recommended by Pantheon.
The `drupal-composer-managed` Integrated Composer upstream works with Drupal 8, and following the `drupal-composer-managed` upstream will help keep your site up to date with any general configuration changes recommended by Pantheon.

Add Drupal 8 core dependency instructions to `drupal/core-recommended`, to keep the site on Drupal 8 until you are ready to upgrade to Drupal 9.

Expand Down Expand Up @@ -65,10 +65,10 @@ If you receive the error message "The provided host name is not valid for this s
Your Pantheon site is now set up to use the Drupal 9 Integrated Composer upstream. To continue tracking additional changes to the Pantheon upstream, change the upstream your site is tracking with Composer:

```bash{promptUser:user}
terminus site:upstream:set $SITE drupal-recommended
terminus site:upstream:set $SITE drupal-composer-managed
```

Following the `drupal-recommended` upstream will help keep your site up to date with any general configuration changes recommended by Pantheon. The dependency you added above on `drupal/core-recommended` will keep you on Drupal 8 until you are ready to upgrade to Drupal 9.
Following the `drupal-composer-managed` upstream will help keep your site up to date with any general configuration changes recommended by Pantheon. The dependency you added above on `drupal/core-recommended` will keep you on Drupal 8 until you are ready to upgrade to Drupal 9.

## Working With Dependency Versions

Expand Down
4 changes: 2 additions & 2 deletions source/content/guides/drupal-9-commerce.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ This guide covers installing [Drupal Commerce](https://drupalcommerce.org/), an

## Create a New Drupal 9 Site

1. Use the Terminus Build Tools plugin to create a new Drupal 9 site from the Pantheon [Drupal Recommended](https://github.com/pantheon-systems/drupal-recommended) repository on GitHub:
1. Use the Terminus Build Tools plugin to create a new Drupal 9 site from the Pantheon [Drupal Recommended](https://github.com/pantheon-systems/drupal-composer-managed) repository on GitHub:

```bash{promptUser: user}
terminus build:project:create pantheon-systems/example-drupal-recommended $SITENAME
terminus build:project:create d9 $SITENAME
```

*Do not* go to the web interface to continue installation. You now have a repository on GitHub containing your new site.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Pantheon support is not available to users who avoid the Multidev steps.

## Convert to Composer

We provide detailed steps on how to convert a standard Pantheon Drupal 8 site to a Composer-managed Drupal 8 site on the `drupal-recommended` upstream.
We provide detailed steps on how to convert a standard Pantheon Drupal 8 site to a Composer-managed Drupal 8 site on the `drupal-composer-managed` upstream.

<Alert title="Note" type="info" >

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Your existing site may have customizations to `settings.php` or other configurat

1. Copy the existing `settings.php` to the Pantheon site and remove the `$databases` array if it exists.

1. Ensure that everything in the [Pantheon settings.php](https://github.com/pantheon-upstreams/drupal-recommended/blob/master/web/sites/default/settings.php) is included.
1. Ensure that everything in the [Pantheon settings.php](https://github.com/pantheon-upstreams/drupal-composer-managed/blob/main/web/sites/default/settings.php) is included.

1. Confirm that the `settings.php` file on the Pantheon D9 site:

Expand Down
6 changes: 3 additions & 3 deletions source/content/guides/integrated-composer.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ You can remove site dependencies if they are no longer needed.

## Upstream

Upstream refers to the source code that is hosted in the Pantheon code repository and includes the core code for [Drupal](https://github.com/pantheon-upstreams/drupal-recommended), [WordPress](https://github.com/pantheon-upstreams/wordpress-project), and some customizations for the Pantheon platform.
Upstream refers to the source code that is hosted in the Pantheon code repository and includes the core code for [Drupal](https://github.com/pantheon-upstreams/drupal-composer-managed), [WordPress](https://github.com/pantheon-upstreams/wordpress-project), and some customizations for the Pantheon platform.

### Upstream and Site Structure

Expand Down Expand Up @@ -289,7 +289,7 @@ code/web/
└─ sites/*/private/
└─ themes/contrib/
```
See the `.gitignore` file for Drupal [here](https://github.com/pantheon-upstreams/drupal-recommended/blob/master/.gitignore).
See the `.gitignore` file for Drupal [here](https://github.com/pantheon-upstreams/drupal-composer-managed/blob/main/.gitignore).

The `contrib` folders are where community contributed modules, profiles, and themes would reside.
The `custom` folders, which are not ignored, are where modules, profiles, and themes created by you would reside.
Expand Down Expand Up @@ -362,7 +362,7 @@ Pantheon does not offer support for Composer GUIs or any conflicts that might be

Contrib modules added by Integrated Composer from the now deprecated [Drupal Project](https://github.com/pantheon-upstreams/drupal-project/blob/master/composer.json#L29) upstream are placed in the `/modules/composer` directory in case a site already has non-Composer-managed modules in the standard `/modules/contrib` directory. If your site does not fall into this category, it is safe to rename the `composer` directory back to the standard `contrib` and alter the installer path to match.

We recommend upgrading to the [Drupal Recommended Project](https://github.com/pantheon-upstreams/drupal-recommended/blob/master/composer.json#L50), which installs modules to the standard `contrib` directory. This `/modules/contrib` directory is added by default to the `.gitignore` file which tells Git to ignore files generated by Composer. You can manually add packages and make commits up to the repository by modifying the `.gitignore` file with the following exception:
We recommend upgrading to the [Drupal Composer Managed Project](https://github.com/pantheon-upstreams/drupal-composer-managed/blob/main/composer.json#L50), which installs modules to the standard `contrib` directory. This `/modules/contrib` directory is added by default to the `.gitignore` file which tells Git to ignore files generated by Composer. You can manually add packages and make commits up to the repository by modifying the `.gitignore` file with the following exception:

```bash
!/web/modules/contrib/my-non-composer-module
Expand Down
33 changes: 15 additions & 18 deletions source/content/guides/switch-drupal-recommended-upstream.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
---
title: Switch from Drupal 9 to Drupal with Composer Upstream
title: Switch from Drupal 9 to Drupal Composer Managed Upstream
description: Switch to the new Pantheon upstream to take advantage of the new structure and future updates.
type: guide
permalink: docs/guides/:basename
cms: "Drupal"
categories: [develop]
tags: [composer, site, workflow]
contributors: [kporras07]
reviewed: "2022-04-03"
contributors: [kporras07, jspellman814]
reviewed: "2022-04-22"
---

In this guide, we will convert an existing site from the Drupal 9 (`drupal9`) upstream to the new Drupal with Composer (`drupal-recommended`) upstream.
In this guide, we will convert an existing site from the Drupal 9 (`drupal9`) upstream to the new Drupal Composer Managed (`drupal-composer-managed`) upstream.

## Overview

Drupal 9 sites created on the platform prior to November 30, 2021 use the [Drupal 9](https://github.com/pantheon-upstreams/drupal-project) upstream. Based on community needs, we have released a new upstream. [Drupal with Composer](https://github.com/pantheon-upstreams/drupal-recommended) is now the default Drupal 9 upstream on the platform and users are encouraged to switch to it to take advantage of the improved structure and updates.
Drupal 9 sites created on the platform prior to November 30, 2021 use the [Drupal 9](https://github.com/pantheon-upstreams/drupal-project) upstream. Drupal 9 sites created on the platform prior to May 4, 2021 use the [Drupal Recommended](https://github.com/pantheon-upstreams/drupal-recommended) upstream.

Based on community needs, we have released a new upstream. [Drupal Composer Managed](https://github.com/pantheon-upstreams/drupal-composer-managed) is now the default Drupal 9 upstream on the platform and users are encouraged to switch to it to take advantage of the improved structure and updates.

The goals of this conversion doc include the following:

Expand All @@ -26,15 +28,15 @@ The goals of this conversion doc include the following:

You must confirm that your site meets the following requirement before you continue:

- Ensure your site uses the [Drupal 9](https://github.com/pantheon-upstreams/drupal-project) upstream.
- Ensure your site uses the [Drupal 9](https://github.com/pantheon-upstreams/drupal-project) or [Drupal Recommended](https://github.com/pantheon-upstreams/drupal-recommended) upstream.

### Use Terminus to Confirm the Drupal 9 Upstream

Run the command `terminus site:info $SITE` to display the site's basic information and properties.

The following values indicate that a site is using a `drupal9` upstream:
* The `Framework` is `drupal8`
* The `Upstream` includes `https://github.com/pantheon-upstreams/drupal-project`
* The `Upstream` includes `https://github.com/pantheon-upstreams/drupal-project` or `https://github.com/pantheon-upstreams/drupal-recommended`

The following is an abridged example of the output for the `terminus site:info $SITE` command, if the site upstream is set to `drupal9`:

Expand Down Expand Up @@ -69,10 +71,10 @@ Run the command `terminus site:info $SITE` to display the site's basic informati
Change the upstream that your site is tracking with the following command:

```bash{promptUser:user}
terminus site:upstream:set $SITE drupal-recommended
terminus site:upstream:set $SITE drupal-composer-managed
```

Follow the `drupal-recommended` upstream to keep your site current with any general configuration changes recommended by Pantheon.
Follow the `drupal-composer-managed` upstream to keep your site current with any general configuration changes recommended by Pantheon.

## Apply New Upstream Updates

Expand All @@ -82,26 +84,21 @@ After you complete the upstream change, you need to apply the available upstream

Conflicts can occur when a modified file in your site's codebase does not align with changes made to the same file in the site's upstream.

> When a merge isn’t resolved automatically, Git leaves the index and the working tree in a state that provides the information you need to resolve the merge.
>
> \- [Git Manual](https://www.kernel.org/pub/software/scm/git/docs/)
If you receive an error that you have conflicts while updating, resolve using the `-Xtheirs` flag. This will automatically resolve the conflict with a preference for upstream changes.
If you receive an error that you have conflicts while updating upstream files, resolve using the `-Xtheirs` flag. This will automatically resolve the conflict with a preference for upstream changes. Alternatively, you can choose to [manually resolve conflicts](/git-resolve-merge-conflicts#manually-resolve-conflicts) to fix this issue.

This is safe to run if you don't have your own changes in any of the conflicting files, such as problems with `.gitignore`.

```bash{promptUser: user}
git pull -Xtheirs https://github.compantheon-upstreams/drupal-recommended.git master
git pull -Xtheirs https://github.com/pantheon-upstreams/drupal-composer-managed.git main
# resolve conflicts
git push origin master
```
Check that the files are correct before going forward to ensure no bugs are introduced.

If you modified upstream files, the `-Xtheirs` flag will drop your changes. You can [manually resolve conflicts](/git-resolve-merge-conflicts#manually-resolve-conflicts) to fix this issue.
Check that the files are correct before going forward to ensure no bugs are introduced.

You will be in the Drupal with Composer upstream after you apply the upstream updates.

## See Also

- [Composer Fundamentals and Workflows](/composer)
- [Composer Fundamentals and Workflows](/guides/composer)
- [Resolve Git Merge Conflicts](/git-resolve-merge-conflicts)
Loading

0 comments on commit 5501594

Please sign in to comment.