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

Replace hyphen with underscore in ahSettingsFile (#86) #87

Merged
merged 7 commits into from
Jun 27, 2024
Merged

Replace hyphen with underscore in ahSettingsFile (#86) #87

merged 7 commits into from
Jun 27, 2024

Conversation

ssu-carlsoni
Copy link
Contributor

Fixes #

#86

Motivation

Acquia Cloud does not support hyphens in db names. FilePaths::ahSettingsFile handles periods but not hyphens.

Proposed changes

Ensure FilePaths::ahSettingsFile return the correct settings file when a site_name contains a hyphen

Alternatives considered

A hyphen is valid character in domain names.

Testing steps

Add a multisite with a hyphen in the name to a project on Acquia Cloud using Acquia Recommended Settings.
example: childrens-school.domain.com

@danepowell danepowell added the bug Something isn't working label Jun 25, 2024
Copy link
Contributor

@danepowell danepowell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be simplified. Check my suggestion, make sure tests pass, then I'm happy to merge.

src/FilePaths.php Outdated Show resolved Hide resolved
@ssu-carlsoni
Copy link
Contributor Author

Thank you @danepowell. I learned str_replace can accept arrays for search and/or replace.

@danepowell
Copy link
Contributor

Thanks. I think there's a CI outage right now but I'll circle back to this tomorrow.

@danepowell danepowell enabled auto-merge (squash) June 27, 2024 19:41
@danepowell danepowell merged commit c8b84a4 into acquia:main Jun 27, 2024
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants