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

Add support for $_composer_autoload_path from global variable #69

Closed
wants to merge 1 commit into from

Conversation

webflo
Copy link
Owner

@webflo webflo commented May 10, 2024

@webflo webflo changed the title Add support for from global variable Add support for $_composer_autoload_path from global variable May 10, 2024
@balagan73
Copy link

balagan73 commented May 14, 2024

Even after applying this patch, I receive the type error running drush cr

PHP Fatal error:  Uncaught TypeError: is_link(): Argument #1 ($filename) must be of type string, Drush\Config\Environment given in /var/www/html/vendor/webflo/drupal-finder/src/DrupalFinder.php:153
Stack trace:
#0 /var/www/html/vendor/webflo/drupal-finder/src/DrupalFinder.php(153): is_link(Object(Drush\Config\Environment))
#1 /var/www/html/vendor/webflo/drupal-finder/src/DrupalFinder.php(75): DrupalFinder\DrupalFinder->discoverRoots(Object(Drush\Config\Environment))
#2 /var/www/html/vendor/drush/drush/src/Preflight/Preflight.php(310): DrupalFinder\DrupalFinder->__construct(Object(Drush\Config\Environment))
#3 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(58): Drush\Preflight\Preflight->preflight(Array)
#4 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /var/www/html/vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run(Array)
#6 /var/www/html/vendor/drush/drush/drush(4): require('/var/www/html/v...')
#7 /var/www/html/vendor/bin/drush(119): include('/var/www/html/v...')
#8 {main}
  thrown in /var/www/html/vendor/webflo/drupal-finder/src/DrupalFinder.php on line 153

This error occurs, when upgrading drupal 10.2.5 to 10.2.6, which in turn updates drupal-finder from 1.2.2 to 1.3.0. Downgrading this module to 1.2.2 I got rid of this error.

@webflo
Copy link
Owner Author

webflo commented May 14, 2024

I am pretty sure this is a bug in drush and was fixed with the last drush release.

@balagan73
Copy link

That's right, error disappears with drush 12.5.2.0 and drupal-finder 1.3.0.

@webflo
Copy link
Owner Author

webflo commented Jun 28, 2024

Fixed with #73

@webflo webflo closed this Jun 28, 2024
@webflo webflo deleted the composer-runtime-fixes branch June 28, 2024 13:46
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.

2 participants