1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-11 01:22:54 +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

@ -156,7 +156,7 @@ class FilesystemRepository extends WritableArrayRepository
foreach ($packages as $package) {
foreach ($package->getReplaces() as $replace) {
// exclude platform replaces as when they are really there we can not check for their presence
if (preg_match(PlatformRepository::PLATFORM_PACKAGE_REGEX, $replace->getTarget())) {
if (PlatformRepository::isPlatformPackage($replace->getTarget())) {
continue;
}
$replaced = $replace->getPrettyConstraint();
@ -169,7 +169,7 @@ class FilesystemRepository extends WritableArrayRepository
}
foreach ($package->getProvides() as $provide) {
// exclude platform provides as when they are really there we can not check for their presence
if (preg_match(PlatformRepository::PLATFORM_PACKAGE_REGEX, $provide->getTarget())) {
if (PlatformRepository::isPlatformPackage($provide->getTarget())) {
continue;
}
$provided = $provide->getPrettyConstraint();