Skip to content

Conversation

@localheinz
Copy link
Member

@localheinz localheinz commented Jun 30, 2025

This pull request

  • adds a fixture for reproducing an issue with nesbot/carbon
  • adjusts expectations

Related to #953.

@localheinz localheinz self-assigned this Jun 30, 2025
@localheinz localheinz requested a review from ergebnis-bot as a code owner June 30, 2025 12:25
@codecov
Copy link

codecov bot commented Jun 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.27%. Comparing base (6129787) to head (69949a2).

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #959   +/-   ##
=========================================
  Coverage     98.27%   98.27%           
  Complexity      312      312           
=========================================
  Files            37       37           
  Lines          1274     1274           
=========================================
  Hits           1252     1252           
  Misses           22       22           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@eithed
Copy link

eithed commented Jun 30, 2025

Hmm - must be invalid version of Carbon I've been looking at. Indeed with 2.72.6 I cannot replicate the issue, but if I use ^3.0 then I'm able to (PHP version 8.4). Here's the stacktrace:

1) Ergebnis\PHPStan\Rules\Test\Integration\CallLikes\NoNamedArgumentRuleTest::testNoNamedArgumentRule
PHPStan\ShouldNotHappenException: Internal error.

/test/sites/phpstan-rules/src/CallLikes/NoNamedArgumentRule.php:115
/test/sites/phpstan-rules/src/CallLikes/NoNamedArgumentRule.php:53
phar:///test/sites/phpstan-rules/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/FileAnalyser.php:110
phar:///test/sites/phpstan-rules/vendor/phpstan/phpstan/phpstan.phar/src/Node/ClassStatementsGatherer.php:116
phar:///test/sites/phpstan-rules/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php:662
phar:///test/sites/phpstan-rules/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php:763
phar:///test/sites/phpstan-rules/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php:3373
phar:///test/sites/phpstan-rules/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php:1922
phar:///test/sites/phpstan-rules/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php:762
phar:///test/sites/phpstan-rules/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php:468
phar:///test/sites/phpstan-rules/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php:661
phar:///test/sites/phpstan-rules/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php:468
phar:///test/sites/phpstan-rules/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php:841
phar:///test/sites/phpstan-rules/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php:468
phar:///test/sites/phpstan-rules/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php:792
phar:///test/sites/phpstan-rules/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php:416
phar:///test/sites/phpstan-rules/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/FileAnalyser.php:184
phar:///test/sites/phpstan-rules/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/Analyser.php:68
phar:///test/sites/phpstan-rules/vendor/phpstan/phpstan/phpstan.phar/src/Testing/RuleTestCase.php:142
phar:///test/sites/phpstan-rules/vendor/phpstan/phpstan/phpstan.phar/src/Testing/RuleTestCase.php:91
/test/sites/phpstan-rules/test/Integration/CallLikes/NoNamedArgumentRuleTest.php:35

Apologies!

@localheinz
Copy link
Member Author

Cool, thank you, @eithed - taking a closer look!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants