-
-
Notifications
You must be signed in to change notification settings - Fork 739
Closed
Labels
Description
When upgrading from Rector 0.8 to 0.11, you should no longer implement provideConfigFileInfo() in tests but instead return the config file path from provideConfigFilePath(). If you don't do this, the error you get will be hard to interpret and fix:
File path "" was not found while creating "RectorPrefix20210514\Symplify\SmartFileSystem\SmartFileInfo" object.
/opt/project/vendor/rector/rector/vendor/symplify/smart-file-system/src/SmartFileInfo.php:31
/opt/project/vendor/rector/rector/packages/Testing/PHPUnit/AbstractRectorTestCase.php:58
/opt/.phpstorm_helpers/codeception.php:51
The empty string comes from the default implementation in AbstractRectorTestCase, but instead of saying "// must be implementedand returning''` it should throw an exception (imo) because it will help the user find out what's wrong.
Reactions are currently unavailable