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

Allow environment detector subclasses to override the isLocalEnv() #4336

Merged
merged 1 commit into from
Feb 4, 2021
Merged

Allow environment detector subclasses to override the isLocalEnv() #4336

merged 1 commit into from
Feb 4, 2021

Conversation

pavlosdan
Copy link
Contributor

Motivation

We wan't to treat the Acquia IDE as a "local" environment. For that purpose we'd like to override the isLocalEnv() function but without this we can't as BLT won't check for subclasses when checking if it's a local environment.

Proposed changes

This PR adds the same check as other overridable functions to check for subclasses of the EnvironmentDetector and return their results.

Testing steps

To replicate the issue, instantiate an Acquia IDE and run blt setup. The setup will ask you for Drupal database settings and look for private file paths that are all usually defined in local.settings.php. Because it can't find these it will fail. An alternative would be to create a settings.local.php and edit the settings.php file to get around this but then the local config split won't import unless you add a symlink for an IDE split and configure one.

IMO these are too many hoops a developer needs to jump through to make the IDE run and behave like a local environment would. With this PR in place we can use https://github.com/pavlosdan/blt-ide-local to have BLT recognize the IDE as a local environment.

@danepowell danepowell merged commit 60bf184 into acquia:main Feb 4, 2021
@danepowell danepowell added the Enhancement A feature or feature request label Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement A feature or feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants