jhedstrom / drupalextension

An integration layer between Behat, Mink Extension, and Drupal.
GNU General Public License v2.0
209 stars 192 forks source link

Remove DrupalFinder #652

Closed sylus closed 1 year ago

sylus commented 1 year ago

Hi there, I was wondering if it would be possible to remove DrupalFinder as it doesn't seem to really work in most cases on finding the proper Drupal root and causes quite a few problems.

You can see all of the issues here:

However most notably as soon as you use a distribution or anything else that has installer-paths it will assume that that is the root and then the full test suite will fail.

pfrenssen commented 1 year ago

The dependency on DrupalFinder was introduced recently in #628.

For us it makes sense to use DrupalFinder rather than implement our own discovery mechanism. It is the standard way to find the root of a Drupal installation and the location of the vendor folder. Is very widely used (26 million installs) and since it is a hard dependency of Drush it can be found on the vast majority of Drupal projects.

The library is not perfect, and from the issues you linked it is clear that it is affected by some bugs that prevent the correct location from being found.

Would it be in any way possible to get these issues fixed upstream in the DrupalFinder project itself?

sylus commented 1 year ago

Yeah that makes sense to me ^_^

Thank you for the considered response I didn't even realize it was part of Drush.

For now I just reverted to 5.0.0-alpha1 and it allowed my behat tests to run successfully.

I'll look at the issues over in DrupalFinder and see if can find a way to ideally provide an override where you can specify the docroot path if there are competing composer.json files!