1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 16:42:57 +00:00

Consistently reuse the new PlatformRepository::isPlatformPackage() method

This commit is contained in:
Yanick Witschi 2020-09-01 17:19:19 +02:00
parent 046c54fdb8
commit bd6f62c535
17 changed files with 25 additions and 25 deletions

View file

@ -130,7 +130,7 @@ abstract class Rule
}
if ($this->getReason() === self::RULE_PACKAGE_REQUIRES) {
if (preg_match(PlatformRepository::PLATFORM_PACKAGE_REGEX, $this->reasonData->getTarget())) {
if (PlatformRepository::isPlatformPackage($this->reasonData->getTarget())) {
return false;
}
foreach ($request->getFixedPackages() as $package) {
@ -147,7 +147,7 @@ abstract class Rule
}
if ($this->getReason() === self::RULE_ROOT_REQUIRE) {
if (preg_match(PlatformRepository::PLATFORM_PACKAGE_REGEX, $this->reasonData['packageName'])) {
if (PlatformRepository::isPlatformPackage($this->reasonData['packageName'])) {
return false;
}
foreach ($request->getFixedPackages() as $package) {