diff --git a/src/Plugin.php b/src/Plugin.php index 28703c2d..4857ac55 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -269,7 +269,7 @@ private function updateInstalledPaths() $finder->files() ->ignoreVCS(true) ->in($packageInstallPath) - ->depth('> 1') + ->depth('>= 1') ->depth('< 4') ->name('ruleset.xml'); foreach ($finder as $ruleset) { @@ -287,6 +287,9 @@ private function updateInstalledPaths() /** * Iterates through Composers' local repository looking for valid Coding * Standard packages. + * + * If the package is the RootPackage (the one the plugin is installed into), + * the package is ignored for now since it needs a different install path logic. * * @return array Composer packages containing coding standard(s) */ @@ -302,7 +305,7 @@ function (PackageInterface $package) { } ); - if ($this->composer->getPackage()->getType() === self::PACKAGE_TYPE) { + if (!$this->composer->getPackage() instanceof \Composer\Package\RootpackageInterface && $this->composer->getPackage()->getType() === self::PACKAGE_TYPE) { $codingStandardPackages[] = $this->composer->getPackage(); }