-
-
Notifications
You must be signed in to change notification settings - Fork 704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infinite recursion loop in file loader when testing TYPO3 extension standalone #6712
Comments
Had the same issue lately for a phpstan related run. I solved it by whitelisting files and folders. So the . (dot) is not working here. I don´t know what will be the effect if we set the followLinks to false. Would vote against it and work with the whitelist approach. |
@sabbelasichon could you provide a different init template for standalone extensions with this whitelist approach? I guess many people will stumble over this issue sooner or later... |
rectorphp/rector-src@49e323a [automated] Apply Coding Standard (#6712)
rectorphp/rector-src@49e323a [automated] Apply Coding Standard (#6712)
Bug Report
Following the best practices to setup an extension for development here: https://docs.typo3.org/m/typo3/reference-coreapi/10.4/en-us/Testing/ExtensionTesting.html#preparing-composer-json to make it ready for unit testing and executing
composer install
in the extension directory results in a new folder.Build
where all the "vendor" stuff will be inside. The last step is to symlink the current directory into the.Build/public/typo3conf/ext/extension_name/
in order to have a standalone TYPO3 test installation within the.Build/public/
folder.Now I tried to upgrade this extension with some TYPO3 rector rules witih:
and then the basic template from: https://github.com/sabbelasichon/typo3-rector/blob/main/docs/configuration_and_processing.md
and then I ran rector like this:
which never showed the progress bar as it was trying to load all the files recursively and following the symlink forever even though I configured the following paths as skipped:
but when I debugged the whole thing, I noticed that they are actually NOT used directly for the symfony finder but afterwards.
Expected Behaviour
The root cause is in https://github.com/rectorphp/rector/blob/main/src/FileSystem/FilesFinder.php#L84 where the
followLinks
is explicitly set.The expected behaviour is obviously that infinite recursion is detected and avoided but I don't know what is the best solution here. Removing the
followLinks
would fix my issue but maybe some other people need it?The text was updated successfully, but these errors were encountered: