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

RecursiveDirectoryIterator due to symbolic links in main folders #159

Closed
1 task done
dunebaud opened this issue Apr 19, 2020 · 3 comments
Closed
1 task done

RecursiveDirectoryIterator due to symbolic links in main folders #159

dunebaud opened this issue Apr 19, 2020 · 3 comments
Labels
bug Something isn't working phpstan Issue relates to PHPStan upstream Ticket involves dependencies

Comments

@dunebaud
Copy link

How is drupal-check installed?

  • drupal-check is installed globally via Composer

Environment:

  • OS: Linux
  • PHP Version: 7.2
  • Drupal core: 8.x.x

Describe the bug
I ran drupal-check -d . from within my drupal directory and I got failed to open dir: Too many levels of symbolic links

Console output
`In RecursiveDirectoryIterator.php line 91:
RecursiveDirectoryIterator::__construct(/var/www/html/d8mbs4/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site
/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_other_site/my_site/my_site/my_other_site/my_other_site/themes/contrib/olivero/node_modules/stylelint-no-browser-hacks
/node_modules/stylelint/lib/rules/media-query-list-comma-newline-before): failed to open dir: Too many levels of symbolic links

In RecursiveDirectoryIterator.php line 42:
RecursiveDirectoryIterator::__construct(/var/www/html/d8mbs4/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site
/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_site/my_other_site/my_site/my_site/my_other_site/my_other_site/themes/contrib/olivero/node_modules/stylelint-no-browser-hacks
/node_modules/stylelint/lib/rules/media-query-list-comma-newline-before): failed to open dir: Too many levels of symbolic links
`
This is due to the fact that I have symbolic links in the drupal root (this is required in multi site environment)...
I have also other symlinks pointing to custom modules to ease my dev (not required by Drupal installation)

Removing all those symlinks remove my problem

@jacobsaw
Copy link

I have a similar issue on any of my projects that use the kporras07/composer-symlinks composer package to link custom modules/themes.

Parser.php returns an error for Duplicate key "services" detected at line 6.

@mglaman mglaman added the phpstan Issue relates to PHPStan label May 10, 2020
@mglaman
Copy link
Owner

mglaman commented May 10, 2020

So this is either a problem with PHPStan or the webflo/drupal-finder package.

@mglaman mglaman added bug Something isn't working upstream Ticket involves dependencies labels May 10, 2020
@mglaman
Copy link
Owner

mglaman commented Feb 4, 2022

I don't plan on chasing these bugs. It's a problem in phpstan-drupal or PHPStan. Not something to be fixed here though.

@mglaman mglaman closed this as completed Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working phpstan Issue relates to PHPStan upstream Ticket involves dependencies
Projects
None yet
Development

No branches or pull requests

3 participants