pyrech / composer-changelogs

:notebook: Display better summary after Composer update
MIT License
589 stars 26 forks source link

Change how classes are force-autoloaded #47

Closed pyrech closed 5 years ago

pyrech commented 6 years ago

Composer plugins need to ensure all their classes are loaded to ensure a smooth run when upgraded. I propose to change how this is done in this plugin here by what does Symfony Flex (which is way more maintenable) :

foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator(__DIR__, \FilesystemIterator::SKIP_DOTS)) as $file) {
if ('.php' === substr($file, 0, -4)) {
    require_once $file;
}
pyrech commented 5 years ago

Fixed in #63