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

Typeerror for ArrayRepository when passed FilterRepository #80

Open
webmake opened this issue Sep 9, 2024 · 0 comments
Open

Typeerror for ArrayRepository when passed FilterRepository #80

webmake opened this issue Sep 9, 2024 · 0 comments

Comments

@webmake
Copy link

webmake commented Sep 9, 2024

When using exclude under config, it gives a type error:

In VersionsCheck.php line 25:
                                                                                                    
  [TypeError]                                                                                       
  SLLH\ComposerVersionsCheck\VersionsCheck::checkPackages(): Argument #1 ($distRepository) must be  
   of type Composer\Repository\ArrayRepository, Composer\Repository\FilterRepository given, called  
   in /var/composer/vendor/sllh/composer-versions-check/src/VersionsCheckPlugin.php on line 134     
                                                                                                    

Exception trace:
  at /var/composer/vendor/sllh/composer-versions-check/src/VersionsCheck.php:25
 SLLH\ComposerVersionsCheck\VersionsCheck->checkPackages() at /var/composer/vendor/sllh/composer-versions-check/src/VersionsCheckPlugin.php:134
 SLLH\ComposerVersionsCheck\VersionsCheckPlugin->checkVersions() at /var/composer/vendor/sllh/composer-versions-check/src/VersionsCheckPlugin.php:98

Problematic place


I suggest to add instead:

                $repository instanceOf \Composer\Repository\FilterRepository ? $repository->getRepository() : $repository,
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

No branches or pull requests

1 participant