- Issue created by @quietone
- 🇳🇱Netherlands spokje
Experiencing the exact same thing as @quietone.
Local env is Windows using XAMPP and MINGW64, before 📌 Fix PHPStan error in run-tests.sh Fixed there were no differences between running PHPStan locally or on Drupal CI
I work around the
Function t
once (which adds a lot of errors) by suppressing it inphpstan.neon.dist
by adding this- "#^Function t invoked with .* parameters, 1 required#"
as the last line.Then I only have to worry about the locally not found
#^Variable \$error in empty\(\)
- First commit to issue fork.
- last update
over 1 year ago 30,136 pass - @smustgrave opened merge request.
- last update
over 1 year ago 30,136 pass - 🇺🇸United States smustgrave
Experienced this today myself. This solved it for me.
- last update
over 1 year ago Custom Commands Failed - 🇺🇸United States smustgrave
Chatting with catch in https://drupal.slack.com/archives/C1BMUQ9U6/p1694113654557499 going to try and delete the redefinition
- last update
over 1 year ago 30,146 pass - Status changed to RTBC
over 1 year ago 12:23am 8 September 2023 - 🇳🇿New Zealand quietone
After reading the slack discussion I was able to track what this is doing. @smustgrave, I think we shouldn't rely on Slack history to be available or accessible to everyone.We should document on the issue.
The block of code being removed was added in #1938892: Switch from ISO-3166-1 country data to CLDR unicode data → . Years later, #3151118: Include bootstrap.inc using composer → removed the redefinition of t() but missed the one in update-countries.sh. And this make sense since it started when PHPStan began scanning .sh files.
I tested this by adding a comment to migrate.module and ran commit-code-check.sh. Without the change I got the PHPStan errors without I did not.
Thanks!
- 🇳🇱Netherlands spokje
Nice sleuthing @catch and @smustgrave, as @quietone already said, this gets rid of my PHPStan woes.
- Status changed to Fixed
over 1 year ago 8:55am 8 September 2023 - 🇬🇧United Kingdom catch
Committed/pushed to 11.x and cherry-picked to 10.1.x, thanks!
- 🇫🇮Finland lauriii Finland
I think I pushed at the same time with you and your commits didn't actually push 😇
Automatically closed - issue fixed for 2 weeks with no activity.