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:
parent
046c54fdb8
commit
bd6f62c535
17 changed files with 25 additions and 25 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue