Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust hosting provider drupal/php settings include order #142

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

jesconstantine
Copy link
Contributor

@jesconstantine jesconstantine commented Feb 7, 2023

Description

This PR updates the settings.php file to reverse the include order of the hosting provider boilerplate settings and project-specific settings.

Context from slack conversation:

On DHS we implemented memcache per Acquia Cloud’s documentation (it’s a bit different than what was in the version of the-build that we used as we spun up the project).

Here’s the change we needed to make to include a new memcache settings file: https://github.com/palantirnet/wisdhs-public/pull/297/files#diff-208032be2366940b330741b39e4f3ce6b7535d00732cb82449d581df957c59f4

We recently learned that the memcache include needed to come after the standard Acquia settings line which is in the settings.acquia.php which is included after settings.acquia-custom.php in our settings.php file.

Notes on Hosting Platform recommendations

From Byron:

Acquia: https://docs.acquia.com/cloud-platform/manage/code/require-line/

Any modifications made to the settings.php file should be placed after this require line. Modifications made before the require line may be overridden by Acquia’s required file.

It seems like that aligns with including overrides after the settings files provided by each platform.

And, there's this for Pantheon which doesn't say anything about the order, just that it should always be included:
https://github.com/pantheon-systems/drops-8/blob/default/sites/default/settings.php#L8-L17

Pantheon docs: https://pantheon.io/docs/guides/php/settings-php#drupal-9

From Jes:

Similar to Pantheon, Platform.sh mentions adding custom settings to their settings file (which needs to be included) but nothing about the order: https://docs.platform.sh/guides/drupal9/deploy/customize.html#settingsphp

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.

Testing instructions

Jes can validate that making this change in the DHS project codebases fixed the memcache setup. Prior to this change, Drupal was reporting memcache versions and no errors but New Relic was not showing any memcache resourcing being used.

  1. Add your testing instructions here, for example...
  2. phing install migrate

Open questions

Delete this section if there are no open questions.

  • What questions are blocking this work?

Remaining tasks

Delete this section if there are no remaining tasks.

  • Update the README

This helps to ensure that project-specific settings that rely on OOTB acquia settings can be used and aren't overwritten
This helps to ensure that project-specific settings that rely on OOTB pantheon settings can be used and aren't overwritten
This helps to ensure that project-specific settings that rely on OOTB platformsh settings can be used and aren't overwritten
@jesconstantine jesconstantine self-assigned this Feb 7, 2023
@jesconstantine jesconstantine marked this pull request as draft February 7, 2023 17:51
@jesconstantine jesconstantine marked this pull request as ready for review June 7, 2023 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant