Skip to content

Conversation

@keradus
Copy link
Member

@keradus keradus commented Dec 10, 2025

before playing with SplFileInfo vs Symfony\Finder\SplFileInfo, let's clean up the actual type in config

@keradus keradus marked this pull request as ready for review December 10, 2025 17:28
@keradus keradus requested review from gharlan and removed request for gharlan December 10, 2025 17:28
@keradus
Copy link
Member Author

keradus commented Dec 10, 2025

fyi @mlocati

@coveralls
Copy link

coveralls commented Dec 10, 2025

Coverage Status

coverage: 93.186%. remained the same
when pulling c58feff on finder_mismatch
into e4461ae on master.

$config->getFinder()
$finder = $config->getFinder();

assert($finder instanceof Finder); // Config::getFinder() ensures only `iterable`
Copy link
Contributor

Choose a reason for hiding this comment

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

Why assert() instead of self::assertInstanceOf() ?

Copy link
Member Author

Choose a reason for hiding this comment

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

this assertion was not added because of test case assertions needs, but because of PHPStan

we use assert when we want to hint PHPStan on the type.

@keradus keradus merged commit 7b15cb5 into master Dec 12, 2025
33 checks passed
@keradus keradus deleted the finder_mismatch branch December 12, 2025 10:25
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.

4 participants