Goal
All new releases under Laminas organisation can replace legacy Zend Framework components.
Background
During the migration to Laminas we have added:
"replace": {
"zend-xyz": "self.version"
}
into composer. It means that for example release 1.7.3 of laminas-xyz replaces ONLY zend-xyz in version 1.7.3.
Now, in Laminas we have released several bugfix and new minor versions. Unfortunately we haven’t changed replace value in composer.json so it is still self.version. This is not working, because new version released under Laminas org has never been released under ZF org. It means newer releases from Laminas do not replace any ZF packages.
Suggested Approach
- create script to update
composer.jsonof all Laminas components - setreplaceto the latest version released under ZF organisation, as an example: latest ofzend-xyzis1.7.3==> we need updatemasteranddevelopbranches so we have incomposer.json:
"replace": {
"zend-xyz": "^1.7.3"
}
- fix all releases under Laminas, where
replacewas not updated incomposer.json, for example:
- latest
zend-xyzis1.7.3, - we have released
laminas-xyz1.7.4and1.8.0==> we should issue two new releases:1.7.5and1.8.1; both with:
"replace": {
"zend-xyz" : "^1.7.3"
}
- we should remove
replacefromcomposer.jsonfor next major releases of Laminas components.