Bug report
| Question |
Answer |
| Box version |
main |
| PHP version |
8.3 |
| Platform with version |
Ubuntu |
| Github Repo |
.. |
I first noticed this issue with grumphp.
phpro/grumphp-shim#30
We have a box with ext-redis 6.3, the grumphp phar has a package (symfony/cache) which declares "conflict" with ext-redis < 6.1. This causes The package "symfony/cache" conflicts with the extension "redis". in the box requirements check, even though the package only has a problem with lower versions of redis.
I then looked into the code in this project in main branch.
The code that collects version conflicts only collects package names, but not the actual version constraints.
I am not sure yet how I would reproduce this with just box, but the code itself already looks wrong.
E.g. here in AppRequirementsFactory::collectComposerLockExtensionRequirements():
foreach ($packageInfo->getConflictingExtensions() as $extension) {
$conflicts[$extension][] = $packageInfo->getName();
}
The $conflicts array has no place for the extension version constraint.
Bug report
I first noticed this issue with grumphp.
phpro/grumphp-shim#30
We have a box with ext-redis 6.3, the grumphp phar has a package (
symfony/cache) which declares "conflict" with ext-redis < 6.1. This causesThe package "symfony/cache" conflicts with the extension "redis".in the box requirements check, even though the package only has a problem with lower versions of redis.I then looked into the code in this project in
mainbranch.The code that collects version conflicts only collects package names, but not the actual version constraints.
I am not sure yet how I would reproduce this with just box, but the code itself already looks wrong.
E.g. here in
AppRequirementsFactory::collectComposerLockExtensionRequirements():The
$conflictsarray has no place for the extension version constraint.