Skip to content

Conversation

@dantleech
Copy link
Collaborator

@dantleech dantleech commented Oct 29, 2025

I'm not really sure what the benefit of the original "git" approach was. This PR essentially simplifies things by generating the snapshot (expected output) if it doesn't exist.

  • Generate snapshot if file does not exist rather than whatever it was doing before.
  • Upgrade phpunit
  • Bump minimum PHP version to 8.1
  • Removed CallbackTestListener
  • Add hint about regeneration in assertions
  • Fix the names of two test cases (seems they were either causing failures either before or after the PHPUnit upgrade)

Note: apart from anything else overriding PHPUnit's TestCase#run is no longer allowed as it's final.

@dantleech dantleech force-pushed the test-dx branch 3 times, most recently from 719f7fc to 5308dff Compare October 29, 2025 17:26
$testProviderArray[basename($testCase)] = [$testCase, $testCase . ".tree", $testCase . ".diag"];
}
foreach (self::PATTERNS_FOR_MINIMUM_PHP_VERSION as [$minVersionId, $filePattern]) {
if (PHP_VERSION_ID < $minVersionId) {
Copy link
Collaborator Author

@dantleech dantleech Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a refactor for having an early continue

- Generate snapshot if file does not exist rather than whatever it was
  doing before.
- Upgrade phpunit
- Removed CallbackTestListener
- Add hint about regeneration in assertions
@rlerdorf rlerdorf merged commit 57264d1 into phan:main Oct 29, 2025
5 checks passed
@dantleech dantleech deleted the test-dx branch October 29, 2025 17:45
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