Skip to content

Commit

Permalink
Merge pull request platformsh#3548 from platformsh/chore/3546
Browse files Browse the repository at this point in the history
Update Drupal9 mentions to Drupal
  • Loading branch information
chadwcarlson authored Oct 25, 2023
2 parents 69abd48 + 92e26a5 commit 6d5e1cc
Show file tree
Hide file tree
Showing 24 changed files with 92 additions and 109 deletions.
42 changes: 23 additions & 19 deletions .platform/routes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,21 @@ https://{default}/:
"/tutorials/region-migration.html": { "to": "/guides/general/region-migration.html", "code": 301, "prefix": false }
"/tutorials/mysql-replication.html": { "to": "/guides/general/mysql-replication.html", "code": 301, "prefix": false }
# PR 1560
"/frameworks/drupal8.html": { "to": "/guides/drupal9/deploy.html", "code": 301, "prefix": false }
"/frameworks/drupal8/developing-with-drupal.html": { "to": "/guides/drupal9/deploy.html", "code": 301, "prefix": false }
"/frameworks/drupal8/drush.html": { "to": "/guides/drupal9/deploy/next-steps.html#use-drush-aliases", "code": 301, "prefix": false }
"/frameworks/drupal8/elasticsearch.html": { "to": "/guides/drupal9/deploy/elasticsearch.html", "code": 301, "prefix": false }
"/frameworks/drupal8/faq.html": { "to": "/guides/drupal9/deploy/faq.html", "code": 301, "prefix": false }
"/frameworks/drupal8.html": { "to": "/guides/drupal/deploy.html", "code": 301, "prefix": false }
"/frameworks/drupal8/developing-with-drupal.html": { "to": "/guides/drupal/deploy.html", "code": 301, "prefix": false }
"/frameworks/drupal8/drush.html": { "to": "/guides/drupal/deploy/next-steps.html#use-drush-aliases", "code": 301, "prefix": false }
"/frameworks/drupal8/elasticsearch.html": { "to": "/guides/drupal/elasticsearch.html", "code": 301, "prefix": false }
"/frameworks/drupal8/faq.html": { "to": "/guides/drupal/faq.html", "code": 301, "prefix": false }
"/frameworks/drupal8/lando.html": { "to": "/development/local/lando.html", "code": 301, "prefix": false }
"/frameworks/drupal8/memcached.html": { "to": "/guides/drupal9/deploy/memcached.html", "code": 301, "prefix": false }
"/frameworks/drupal8/multi-site.html": { "to": /guides/drupal9/deploy/multi-site.html", "code": 301, "prefix": false }
"/frameworks/drupal8/redis.html": { "to": "/guides/drupal9/deploy/redis.html", "code": 301, "prefix": false }
"/frameworks/drupal8/simplesaml.html": { "to": "/guides/drupal9/deploy/simplesaml.html", "code": 301, "prefix": false }
"/frameworks/drupal8/solr.html": { "to": "/guides/drupal9/deploy/solr.html", "code": 301, "prefix": false }
"/frameworks/drupal8/memcached.html": { "to": "/guides/drupal/memcached.html", "code": 301, "prefix": false }
"/frameworks/drupal8/multi-site.html": { "to": "/guides/drupal/multi-site.html", "code": 301, "prefix": false }
"/frameworks/drupal8/redis.html": { "to": "/guides/drupal/redis.html", "code": 301, "prefix": false }
"/frameworks/drupal8/simplesaml.html": { "to": "/guides/drupal/simplesaml.html", "code": 301, "prefix": false }
"/frameworks/drupal8/solr.html": { "to": "/guides/drupal/solr.html", "code": 301, "prefix": false }

# chore/3546 & PR 3548
"^/guides/drupal9/(.*)$": { "to": "/guides/drupal/$1", "regexp": true }

# PR 1562
"/frameworks/typo3.html": { "to": "/guides/typo3/deloy.html", "code": 301, "prefix": false }
"/frameworks/typo3/faq.html": { "to": "/guides/typo3/deploy/next-steps.html", "code": 301, "prefix": false }
Expand Down Expand Up @@ -85,14 +89,14 @@ https://{default}/:
"/bestpractices/environment-build.html": { "to": "/development/variables.html", "code": 301, "prefix": false }

# Drupal 7 EOL
"/frameworks/drupal7.*": { "to": "/guides/drupal9/deploy.html", "code": 301, "regexp": true }
"/frameworks/drupal7.*": { "to": "/guides/drupal/deploy.html", "code": 301, "regexp": true }

# Removal of featured frameworks
"/frameworks/(?!deploy|drupal)(.*).html": { "to": "/guides/$1/deploy.html", "code": 301, "regexp": true }
"/frameworks/ibexa/fastly.html": { "to": "/guides/ibexa/fastly.html", "code": 301, "prefix": false }

"/configuration/app/web.html#how-can-i-rewrite-an-incoming-request-without-a-redirect": { "to": "/create-apps/web/rewrite-requests.html", "code": 301, "prefix": false }

# Navigation restructure in April 2021
"/configuration/app-containers.html": { "to": "/create-apps/app-reference.html", "code": 301, "prefix": false }
"/configuration/app/access.html": { "to": "/create-apps/app-reference.html#access", "code": 301, "prefix": false }
Expand Down Expand Up @@ -152,7 +156,7 @@ https://{default}/:
"/configuration/yaml.html": { "to": "/overview/yaml.html", "code": 301 }
"/administration/web/delete.html": { "to": "/projects/delete-project.html", "code": 301 }
"/guides/general/region-migration.html": { "to": "/projects/region-migration.html", "code": 301 }

# Remove get started index pages
"/get-started/deploy.html(.*)" : { "to": "/get-started/deploy/init.html$1", "code": 301, "regexp": true }
"/get-started/add-data.html(.*)" : { "to": "/get-started/add-data/branch.html$1", "code": 301, "regexp": true }
Expand All @@ -177,11 +181,11 @@ https://{default}/:
"/development/protective-block.html" : { "to": "/security.html", "code": 301 }
"/drupal_migrate/guides/local/git-initialize-repository.html" : { "to": "/tutorials/migrating.html", "code": 301 }
"/drupal_migrate/guides/type/php/drupal/migrate/import-database.html" : { "to": "/tutorials/migrating.html", "code": 301 }
"/drupal_migrate/guides/type/php/drupal/migrate/import-files.html" : { "to": "/tutorials/migrating.html", "code": 301 }
"/drupal_migrate/guides/type/php/drupal/migrate/import-files.html" : { "to": "/tutorials/migrating.html", "code": 301 }
"/drupal_migrate/guides/type/php/drupal/rebuild-site-registry.html" : { "to": "/tutorials/migrating.html", "code": 301 }
"/drupal/guides/local/get-project.html" : { "to": "/guides/drupal9/deploy.html", "code": 301 }
"/drupal/guides/prerequisites/platform-cli.html" : { "to": "/guides/drupal9/deploy.html", "code": 301 }
"/frameworks/drupal.html" : { "to": "/guides/drupal9/deploy.html", "code": 301 }
"/drupal/guides/local/get-project.html" : { "to": "/guides/drupal/deploy.html", "code": 301 }
"/drupal/guides/prerequisites/platform-cli.html" : { "to": "/guides/drupal/deploy.html", "code": 301 }
"/frameworks/drupal.html" : { "to": "/guides/drupal/deploy.html", "code": 301 }
"/guides/general/composer-auth.html" : { "to": "/languages/php/composer-auth.html", "code": 301 }
"/images/getting-started/free-trial.png" : { "to": "/get-started/introduction.html", "code": 301 }
"/images/integrations/bitbucket_server.png" : { "to": "/integrations/source/bitbucket.html", "code": 301 }
Expand Down Expand Up @@ -216,7 +220,7 @@ https://{default}/:
"/user_guide/reference/toolstacks/nodejs/index.html" : { "to": "/languages/nodejs.html", "code": 301 }
"/user_guide/reference/toolstacks/php/configure-php.html" : { "to": "/languages/php.html", "code": 301 }
"/user_guide/reference/toolstacks/php/drupal/customizing-settings-php.html" : { "to": "/languages/php.html#customize-php-settings", "code": 301 }
"/user_guide/reference/toolstacks/php/drupal7/redis.html" : { "to": "/guides/drupal9/redis.html", "code": 301 }
"/user_guide/reference/toolstacks/php/drupal7/redis.html" : { "to": "/guides/drupal/redis.html", "code": 301 }
"/user_guide/reference/upgrade/index.html" : { "to": "/get-started/introduction.html", "code": 301 }
"/user_guide/using/backup-and-restore.html" : { "to": "/security/backups.html", "code": 301 }
"/user_guide/using/going-live.html" : { "to": "/domains/steps.html", "code": 301 }
Expand Down Expand Up @@ -276,7 +280,7 @@ https://docs.upsun.com/:
enabled: false
redirects:
paths:
# Console tooltips
# Console tooltips
"/anchors/resources/configuration.html": { "to": "/manage-resources.html", "code": 301, "prefix": false }
"/anchors/scaling/down.html": { "to": "/administration/pricing.html", "code": 301, "prefix": false }
"/anchors/organizations/admin.html": { "to": "/administration/organizations.html", "code": 301, "prefix": false }
Expand Down
2 changes: 1 addition & 1 deletion shared/data/remote-examples/templates/drupal-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ repoOrg: "platformsh-templates"
branch: "master"
file: "web/sites/default/settings.platformsh.php"
repos:
- drupal9
- drupal10
2 changes: 1 addition & 1 deletion shared/data/remote-examples/templates/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repoOrg: "platformsh-templates"
branch: "master"
file: ".platform/services.yaml"
repos:
- drupal9
- drupal10
- typo3
- wordpress-composer
- wordpress-vanilla
Expand Down
2 changes: 1 addition & 1 deletion sites/platform/src/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The **Frameworks** section is a collection of framework-specific how-to guides -
| Language | Frameworks |
| :---------------- | :------ |
| [Python](/languages/python/_index.md) | [Django](/guides/django/_index.md) |
| [PHP](/languages/php/_index.md) | [Drupal](/guides/drupal9/_index.md)<br/>[Ibexa](/guides/ibexa/_index.md)<br/>[Laravel](/guides/laravel/_index.md)<br/>[Symfony](/guides/symfony/_index.md)<br/>[TYPO3](/guides/typo3/_index.md)<br/>[WordPress](/guides/wordpress/_index.md) |
| [PHP](/languages/php/_index.md) | [Drupal](/guides/drupal/_index.md)<br/>[Ibexa](/guides/ibexa/_index.md)<br/>[Laravel](/guides/laravel/_index.md)<br/>[Symfony](/guides/symfony/_index.md)<br/>[TYPO3](/guides/typo3/_index.md)<br/>[WordPress](/guides/wordpress/_index.md) |
| [Javascript/Node.js](/languages/nodejs/_index.md) | [Gatsby](/guides/gatsby/_index.md)<br/>[Next.js](/guides/nextjs/_index.md)<br/>[Strapi](/guides/strapi/_index.md) |
| [Java](/languages/java/_index.md) | [Hibernate](/guides/hibernate/_index.md)<br/>[Jakarta](/guides/jakarta/_index.md)<br/>[Micronaut](/guides/micronaut/_index.md)<br/>[Quarkus](/guides/quarkus/_index.md)<br/>[Spring](/guides/spring/_index.md) |

Expand Down
2 changes: 1 addition & 1 deletion sites/platform/src/add-services/elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ See the [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsea

{{% frameworks version="1" %}}

- [Drupal](../guides/drupal9/elasticsearch.md)
- [Drupal](../guides/drupal/elasticsearch.md)
- [Jakarta EE](../guides/jakarta/deploy.md#elasticsearch)
- [Micronaut](../guides/micronaut/elasticsearch.md)
- [Quarkus](../guides/quarkus/elasticsearch.md)
Expand Down
2 changes: 1 addition & 1 deletion sites/platform/src/add-services/memcached.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Both Memcached and Redis can be used for application caching. As a general rule,

{{% frameworks version="1" %}}

- [Drupal](../guides/drupal9/memcached.md)
- [Drupal](../guides/drupal/memcached.md)

{{% /frameworks %}}

Expand Down
2 changes: 1 addition & 1 deletion sites/platform/src/add-services/redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ for high-performance data retrieval and key-value storage.

{{% frameworks version="1" %}}

- [Drupal](../guides/drupal9/redis.md)
- [Drupal](../guides/drupal/redis.md)
- [Ibexa DXP](../guides/ibexa/deploy.md#cache-and-sessions)
- [Jakarta EE](../guides/jakarta/deploy.md#redis)
- [Micronaut](../guides/micronaut/redis.md)
Expand Down
2 changes: 1 addition & 1 deletion sites/platform/src/add-services/solr.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Solr search with generic schemas provided, and a custom schema is also supported

{{% frameworks version="1" %}}

- [Drupal](../guides/drupal9/solr.md)
- [Drupal](../guides/drupal/solr.md)
- [Ibexa DXP](../guides/ibexa/deploy.md#solr-specificity)
- [Jakarta EE](../guides/jakarta/deploy.md#apache-solr)
- [Spring](../guides/spring/solr.md)
Expand Down
6 changes: 3 additions & 3 deletions sites/platform/src/development/variables/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ but still adapt the behavior to each environment.
{{% version/only "1" %}}
#### Implementation example
The [Drupal 9 template](https://github.com/platformsh-templates/drupal9/) shows an example of
The [Drupal template](https://github.com/platformsh-templates/drupal10/) shows an example of
overriding Drupal configuration using environment variables.
These variables are parsed in the [`settings.platformsh.php` script](https://github.com/platformsh-templates/drupal9/blob/8d5d23cdcb91ffa3f96727adf9d3dba74dfc01db/web/sites/default/settings.platformsh.php#L125-L162).
These variables are parsed in the [`settings.platformsh.php` script](https://github.com/platformsh-templates/drupal10/blob/386ea35b034b5d78da8060925940e793bea479d9/web/sites/default/settings.platformsh.php#L126-L164).

For example, the site name is overridden by a variable named `drupalsettings:system.site:name`.
Variables for the override are composed of three distinct parts each separated by colons:
Expand All @@ -223,4 +223,4 @@ You need to name your {{% vendor/name %}} variables to match the ones used in yo
Make sure that the {{% vendor/name %}} variables start with a string present in your `switch` statement.

You can apply similar logic for [other frameworks and languages](../../development/variables/use-variables.md#access-variables-in-your-app).
{{% /version/only %}}
{{% /version/only %}}
11 changes: 11 additions & 0 deletions sites/platform/src/guides/drupal/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "Drupal"
weight: -180
sectionBefore: PHP
description: |
Everything you need to get started with Drupal on {{% vendor/name %}}.
---

{{% description %}}

{{% guides/link-philosophy %}}
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
---
title: Deploy Drupal 9 on {{% vendor/name %}}
title: Deploy Drupal on {{% vendor/name %}}
sidebarTitle: Get started
weight: -110
layout: single
description: |
Create a {{% vendor/name %}} account, download a few tools, and prepare to deploy Drupal.
banner:
title: A note on version
body: While this guide focuses on Drupal 9, you can also refer to it when using Drupal 10 as differences in settings are minimal. Note that a {{% vendor/name %}} [Drupal 10 template](https://github.com/platformsh-templates/drupal10) is available.
---

Drupal is a flexible and extensible PHP-based CMS framework. To deploy Drupal 9 on {{% vendor/name %}}, the recommended way is to use Composer, the PHP package management suite.
Drupal is a flexible and extensible PHP-based CMS framework. To deploy Drupal on {{% vendor/name %}}, the recommended way is to use Composer, the PHP package management suite.

This guide assumes you are using the well-supported Composer flavor of Drupal 9.
This guide assumes you are using the well-supported Composer flavor of Drupal.

{{% guides/starting-point name="Drupal 9" templateRepo="drupal9" composerLink="https://github.com/drupal/recommended-project/tree/9.0.x" initExample=true %}}
{{% guides/starting-point name="Drupal" templateRepo="drupal" composerLink="https://github.com/drupal/recommended-project/" initExample=true %}}

{{% guides/requirements %}}

## Initialize a project

{{< guides/initialize name="Drupal 9" template="drupal9" >}}
{{< guides/initialize name="Drupal" template="drupal" >}}

If you don't have code, create a new Drupal project from scratch.
The following commands create a brand new Drupal project using Composer.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
---
title: "Configure Drupal 9 for {{% vendor/name %}}"
title: "Configure Drupal for {{% vendor/name %}}"
sidebarTitle: "Configure"
weight: -100
description: |
Review the basics of what makes up a {{% vendor/name %}} project, including its three principle configuration files and how to define them for Drupal.
banner:
title: A note on version
body: While this guide focuses on Drupal 9, you can also refer to it when using Drupal 10 as differences in settings are minimal. Note that a {{% vendor/name %}} [Drupal 10 template](https://github.com/platformsh-templates/drupal10) is available.
---

{{% guides/config-desc name="Drupal 9" %}}
{{% guides/config-desc name="Drupal" %}}

{{% guides/config-app template="drupal9" /%}}
{{% guides/config-app template="drupal10" /%}}

{{% guides/config-service name="Drupal" %}}

Expand All @@ -20,12 +17,12 @@ although you can also use Oracle MySQL or [PostgreSQL](../../../add-services/pos
For Drupal caching, we strongly recommend [Redis](../../../add-services/redis.md).
Drupal's cache can be very aggressive,
and keeping that data out of the database helps with both performance and disk usage.
See an example of Redis for caching in our [Drupal template](https://github.com/platformsh-templates/drupal9).
See an example of Redis for caching in our [Drupal template](https://github.com/platformsh-templates/drupal10).

{{% /guides/config-service %}}

{{< readFile file="static/files/fetch/servicesyaml/drupal9" highlight="yaml" >}}
{{< readFile file="static/files/fetch/servicesyaml/drupal10" highlight="yaml" >}}

{{% guides/config-routes template="drupal9" name="Drupal 9" %}}
{{% guides/config-routes template="drupal10" name="Drupal" %}}

{{< guide-buttons next="Customize Drupal9" >}}
{{< guide-buttons next="Customize Drupal" >}}
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
---
title: "Customize Drupal 9 for {{% vendor/name %}}"
title: "Customize Drupal for {{% vendor/name %}}"
sidebarTitle: "Customize"
weight: -90
description: |
Add some helpful dependencies, and modify your Drupal site to read from a {{% vendor/name %}} environment.
banner:
title: A note on version
body: While this guide focuses on Drupal 9, you can also refer to it when using Drupal 10 as differences in settings are minimal. Note that a {{% vendor/name %}} [Drupal 10 template](https://github.com/platformsh-templates/drupal10) is available.
---

Now that your code contains all of the configuration to deploy on {{% vendor/name %}},
Expand All @@ -22,7 +19,7 @@ There are a number of additional steps that are either required or recommended,
`settings.php` is the main Drupal environment-configuration file.
In a stock Drupal installation it contains the database credentials, various other settings, and an enormous amount of comments.

In the Drupal 9 template, the [`settings.php`](https://github.com/platformsh-templates/drupal9/blob/master/web/sites/default/settings.php) file
In the Drupal template, the [`settings.php`](https://github.com/platformsh-templates/drupal10/blob/master/web/sites/default/settings.php) file
is mostly replaced with a stub that contains only the most basic configuration
and then includes a `settings.platformsh.php` and `settings.local.php` file, if they exist.
The latter is a common Drupal pattern, and the `settings.local.php` file should never be committed to Git.
Expand All @@ -35,7 +32,7 @@ That includes the database credentials, Redis caching, and file system paths.

The file itself is a bit long, but reasonably self-explanatory.

{{< readFile file="static/files/fetch/config-examples/drupal9" highlight="php" >}}
{{< readFile file="static/files/fetch/config-examples/drupal10" highlight="php" >}}

If you add additional services to your application, such as Solr, Elasticsearch, or RabbitMQ,
you would add configuration for those services to the `settings.platformsh.php` file as well.
Expand All @@ -47,7 +44,7 @@ when a project starts, before cron commands are run, and when you log into an en
That gives you a place to do extra environment variable setup before the app runs,
including modifying the system `$PATH` and other shell level customizations.

The Drupal template includes a small [`.environment` file](https://github.com/platformsh-templates/drupal9/blob/master/.environment).
The Drupal template includes a small [`.environment` file](https://github.com/platformsh-templates/drupal10/blob/master/.environment).
This modifies the `$PATH` to include the `vendor/bin` directory,
where command line tools like Drush are stored.

Expand All @@ -67,12 +64,12 @@ fi

Drush requires a YAML file that declares what its URL is.
That value varies depending on the branch you're on, so it can't be included in a static file.
Instead, the `drush` directory includes a [short script](https://github.com/platformsh-templates/drupal9/blob/master/drush/platformsh_generate_drush_yml.php)
Instead, the `drush` directory includes a [short script](https://github.com/platformsh-templates/drupal10/blob/master/drush/platformsh_generate_drush_yml.php)
that generates that file on each deploy, writing it to `.drush/drush.yml`.
That allows Drush to run successfully on {{% vendor/name %}}, such as to run cron tasks.

The script contents aren't especially interesting.
For the most part, you can download it from the template,
place it in a `drush` directory in your project so they can be called from the deploy hook, and then forget about it.

{{< guide-buttons next="Deploy Drupal 9" >}}
{{< guide-buttons next="Deploy Drupal" >}}
Loading

0 comments on commit 6d5e1cc

Please sign in to comment.