Page MenuHomePhabricator

Deprecation Notice: The Composer\Package\LinkConstraint\VersionConstraint class is deprecated, use Composer\Semver\Constraint\Constraint instead. in /usr/share/php/Composer/Package/LinkConstraint/VersionConstraint.php:17
Closed, ResolvedPublic

Description

I think the ComposerPackageModifier class is causing these warnings.

Event Timeline

Legoktm created this task.Nov 25 2015, 1:19 AM
Legoktm raised the priority of this task from to Needs Triage.
Legoktm updated the task description. (Show Details)
Legoktm added subscribers: Legoktm, JeroenDeDauw.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptNov 25 2015, 1:19 AM

Change 255312 had a related patch set uploaded (by Legoktm):
Don't use the deprecated VersionConstraint class

https://gerrit.wikimedia.org/r/255312

Ckujau added a subscriber: Ckujau.Dec 6 2015, 5:07 AM

Need to upgrade to composer alpha 11.

Updated composer here https://gerrit.wikimedia.org/r/#/c/267548/ previously done by legoktm then reverted by hashhar because it broke all the composer tests. But it is now fixed because it was using symfony/console 3.0+ whereas it should have been using symfony/console 2.8.2 since composer wasent updated for 3.0.

Change 267548 had a related patch set uploaded (by Paladox):
Update composer to 1.0.0-alpha11

https://gerrit.wikimedia.org/r/267548

Change 267548 abandoned by Hashar:
Update composer to 1.0.0-alpha11

Reason:
Krinkle / Paladox had a discussion on https://gerrit.wikimedia.org/r/259241 stating alpha11 is broken. We need a more recent version, lets track it on https://gerrit.wikimedia.org/r/#/c/270548/

https://gerrit.wikimedia.org/r/267548

Change 285000 had a related patch set uploaded (by Ori.livneh):
Stop using deprecated VersionConstraint class; use Semver's instead

https://gerrit.wikimedia.org/r/285000

On https://gerrit.wikimedia.org/r/285000 I wrote:

This code is a little different, it doesn't actually run in the context of MediaWiki or even use the vendor that MediaWiki depends upon - it is loaded into the composer process and executed using whatever version of semver or composer the user has. So having the right version in our vendor doesn't really make a difference. I'll post some more thoughts on the bug.

I've been thinking about composer b/c stuff since it came up for composer-merge-plugin, but for the MediaWiki 1.27 release I think we should just require composer 1.0.0, mostly because it's an actual stable version, and due to the security improvements that they've made (and that it would also let us fix this bug by not caring about old composer versions). Thoughts?

[Also tagging as a 1.27 blocker]

bd808 added a comment.Apr 25 2016, 3:25 PM

Requiring Composer ^1.0 seems like a reasonable solution to me. I've been thinking about making a similar requirements bump for composer-merge-plugin to allow removal of some back-compat code there as well.

I submitted a patch here https://gerrit.wikimedia.org/r/#/c/283852/ that updates composer on the ci.

So this would be blocked until https://gerrit.wikimedia.org/r/#/c/283852/ is merged it there is a way on keeping backward compatibility.

Composer was updated today on ci to 1.1.0-RC stable composer release.

This now passes https://gerrit.wikimedia.org/r/#/c/267546/

Change 267546 had a related patch set uploaded (by Paladox):
Replace deprecated Composer\Package\LinkConstraint\VersionConstraint class

https://gerrit.wikimedia.org/r/267546

Change 285000 merged by jenkins-bot:
Stop supporting old versions of composer for ComposerPackageModifier

https://gerrit.wikimedia.org/r/285000

Change 287277 had a related patch set uploaded (by Legoktm):
Stop supporting old versions of composer for ComposerPackageModifier

https://gerrit.wikimedia.org/r/287277

Change 287277 merged by jenkins-bot:
Stop supporting old versions of composer for ComposerPackageModifier

https://gerrit.wikimedia.org/r/287277

Jdforrester-WMF closed this task as Resolved.May 6 2016, 11:07 PM
Jdforrester-WMF claimed this task.

Change 267546 abandoned by Paladox:
Replace deprecated Composer\Package\LinkConstraint\VersionConstraint class

https://gerrit.wikimedia.org/r/267546

Change 255312 abandoned by Legoktm:
Don't use the deprecated VersionConstraint class

https://gerrit.wikimedia.org/r/255312