Skip to content
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

Update checker inside vendor folder is not detected #640

Open
ernilambar opened this issue Sep 18, 2024 · 4 comments
Open

Update checker inside vendor folder is not detected #640

ernilambar opened this issue Sep 18, 2024 · 4 comments
Assignees
Labels
[Team] Plugin Review Issues owned by Plugin Review Team [Type] Bug An existing feature is broken

Comments

@ernilambar
Copy link
Member

For update checker, currently we look for plugin-update-checker.php.

But we ignore folders "node_modules" and "vendor" folder by default when we scan files.

Those who have plugin-update-checker inside the vendor folder as a composer package are not being detected. Interestingly that is the case for more than 90% of the plugins who bundle update checker.

@ernilambar ernilambar added [Type] Bug An existing feature is broken [Team] Plugin Review Issues owned by Plugin Review Team labels Sep 18, 2024
@ernilambar
Copy link
Member Author

ernilambar commented Sep 18, 2024

Another interesting case is that, in one plugin, author has renamed the updater like company-update-checker. It would be good to have those detected also but may be it would not be that easy I guess.

Edit: Instead of company name it seems the forked package of original update checker: "kernl/kernl-update-checker". Several plugins have bundled this updater.

@ernilambar
Copy link
Member Author

I checked several plugins today. Following are the frequent occurrences:

vendor/yahnis-elsts/plugin-update-checker
vendor/plugin-update-checker/
vendor/kernl/kernl-update-checker/

@swissspidy
Copy link
Member

Another interesting case is that, in one plugin, author has renamed the updater like company-update-checker. It would be good to have those detected also but may be it would not be that easy I guess.

Instead of looking for those specific file names and folder names, wouldn't it be better to look for the actual source code usage instead? Like search file contents for strings like PluginUpdateChecker.

@ernilambar
Copy link
Member Author

Like we don't have the files list of vendor folder due to exclusion, I think it would be inefficient to again scan and read all files and folder inside vendor folder which would probably have hundreds of files. Moreover, regex match in those large number of files could also take significant processing time. So I was thinking about is_dir() and file_exists() conditionals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Team] Plugin Review Issues owned by Plugin Review Team [Type] Bug An existing feature is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants