-
Notifications
You must be signed in to change notification settings - Fork 49
[Borg] MAGETWO-52209: Inconsistent composer behaviour #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Borg] MAGETWO-52209: Inconsistent composer behaviour #18
Conversation
|
|
||
| if (isset($this->sortPriority[$package->getPackageName()])) { | ||
| $result = $this->sortPriority[$package->getPackageName()]; | ||
| } elseif (isset($this->highPriority[$package->getPackageName()])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The highPriority check should be first so it's used even if the package appears in both highPriority and sortPriority.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Change made.
| $packagePriority = $this->highPriority[$package->getPackageName()]; | ||
| $result = intval($maxPriority) + intval($packagePriority); | ||
| } elseif ($package->getDeployStrategy() instanceof Copy) { | ||
| $result = 101; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of this specific value? Are Copy packages supposed to be before/after packages that have a specific priority? As written they could be in the middle of packages in the sortPriority array if that array has entries on both sides of 101. If they're supposed to be last, instead of specifically 101, use min - 1 similar to how you're using max + highPriority.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy packages should have a higher default priority than the default priority for other packages. So keeping the default priority as 100 and the default for Copy packages as 101 maintains this behavior. A package can define whatever priority they wish so they could have always had it higher priority than Copy packages. So this is different than highPriority and keeping these values maintains the current behavior.
Issue
https://jira.corp.magento.com/browse/MAGETWO-52209
CE base package overwrites EE base package.
Any duplicate files in ee-base are overwritten by ce-base. By design ee-base should overwrite ce-base.
To Reproduce
This issue is difficult to reproduce since it is random and occurs seldom.
Run the following command and check the last few lines to verify the order of deployment:
Expected result
ce-base is deployed before ee-base