-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Windows vs POSIX #406
Comments
Hm. I'm not sure what to do here: https://github.com/mglaman/phpstan-drupal/blob/main/src/Rules/Drupal/ModuleLoadInclude.php#L40
Which is from
|
@mglaman I think for this case we're looking at https://github.com/mglaman/phpstan-drupal/blob/main/src/Rules/Drupal/LoadIncludes.php#L73, but the principle seems to be the same. For reasons, I as a mere mortal don't understand, on Windows OS, the phpstan-drupal/src/Drupal/Extension.php Line 121 in 2453a2e
/ as directory separator (hence the core/modules/system/tests/modules/entity_test -bit in the message), but the actual DIRECTORY_SEPARATOR in line https://github.com/mglaman/phpstan-drupal/blob/main/src/Rules/Drupal/LoadIncludes.php#L73 always returns a \ (which seems to gets double-escaped and ends up as a \\\\ in the message).That leaves us with the worst of both worlds. I would replace the In fact I see that you're already doing so in lines like this phpstan-drupal/src/Drupal/Extension.php Line 157 in 2453a2e
phpstan-drupal/src/Drupal/Extension.php Line 182 in 2453a2e
Does that make any sense? |
@mglaman Works for me :) |
When creating a new baseline on a Windows OS machine using
vendor/bin/phpstan analyze --configuration=core/phpstan.neon.dist --generate-baseline ./core/phpstan-baseline.neon
ondrupal/core
with (at least) 1.1.16 I get this suppression:on a POSIX machine I get:
This leads to sad TestBots and sad users.
The text was updated successfully, but these errors were encountered: