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

DrupalFinder drush replacement PR did not fully replaced it in Preflight #5965

Closed
AlexSkrypnyk opened this issue Apr 25, 2024 · 3 comments
Closed

Comments

@AlexSkrypnyk
Copy link
Contributor

Describe the bug
This PR replaced the DrupalFinder with DrushDrupalFinder in 12.x.

However, the Preflight.php still uses DrupalFinder:

$localAliasDrupalFinder = new DrupalFinder($this->environment());

Judging by the passed argument, this should have been DrushDrupalFinder.

This works on sites with the DrupalFinder because the current version 1.2 does not have a constructor. I caught this because I'm using the dev version of the DrupalFinder and it has a constructor incompatible with the code above.

Drush 13.x does not have this issue.

System Configuration

Q A
Drush version? 12.x
Drupal version? 10.2
PHP version 8.2
OS? Mac/Linux
@AlexSkrypnyk
Copy link
Contributor Author

AlexSkrypnyk commented Apr 25, 2024

To solve this, either need to replace

$localAliasDrupalFinder = new DrupalFinder($this->environment());

with

$localAliasDrupalFinder = new DrupalFinder($this->environment()->cwd());

to make it compatible with the future versions of the DrupalFinder's constructor.

OR

Remove the DrupalFinder reference from the preflight altogether as it is done in 13.x.

@AlexSkrypnyk
Copy link
Contributor Author

AlexSkrypnyk commented Apr 25, 2024

@weitzman
Thank you for looking into this.

To test your PR #5966, I've created 2 PRs:

@AlexSkrypnyk
Copy link
Contributor Author

Closed in #5966

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

No branches or pull requests

1 participant