-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
4.0.0-a1, 4.0.0-a2, 4.0.0-b1
-
None
In a foreach loop in the composer extension installer, where it processes $compatible_packages, the {{$versions }}array contains versions from all iterations, not just the current package. So it needlessly loops through every single possible extension and version, while processing each extension.
The problem is a variable naming conflict where $versions is being used both:
- As a local variable in the inner loops when collecting packages from repositories
- As the loop variable in the final foreach loop that processes $compatible_packages
This causes the {{$versions }}variable in the final loop to potentially contain accumulated data from previous iterations rather than just the versions for the current package.
So the loop variables should be renamed.