Page MenuHomePhabricator

Upgrade Flow's Pimple dependency to 2.x
Closed, ResolvedPublic

Description

If I require_once both the Flow and OOUIPlayground extensions, I get

Fatal error: Call to undefined method Flow\Container::share() in /home/spage/projects/core/extensions/Flow/container.php on line 21

I think this happens because Flow invokes Pimple 1.x's share() method, but OOUIPlayground loads a later version of pimple that "wins". See Undefined Function share() #135 issue. I wasn't able to fix by changing the order of the require_once.

Perhaps pimple should be promoted to core/vendor as an External library, T1283.

Details

Related Gerrit Patches:
mediawiki/extensions/Flow : masterUpgrade Pimple to 2.x

Event Timeline

Spage created this task.Feb 2 2015, 9:02 PM
Spage raised the priority of this task from to Needs Triage.
Spage updated the task description. (Show Details)
Spage added a subscriber: Spage.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 2 2015, 9:02 PM
EBernhardson added a subscriber: EBernhardson.EditedFeb 2 2015, 9:16 PM

This is importing Pimple v2, while flow is still using Pimple v1.

Pimple v2 has different defaults, the explanation for share's removal is here: https://github.com/silexphp/Pimple/commit/352ed5ae634e09d906bb1667c5b488aae5427d29

It says, "the share method is kept as a no-op method". I guess they changed their mind on that later?

yea a later patch removed it, under the reasoning that it would make a silex v1 app look like it will work when it will actually have issues(because items not marked share will become share by default)

(note that pimple is from silex, both silex and pimple went v1 -> v2)

Mattflaschen-WMF triaged this task as High priority.Feb 3 2015, 6:44 PM
Prtksxna set Security to None.Feb 7 2015, 12:18 AM
Prtksxna added a subscriber: werdna.

What do we do? Does Flow upgrade to Pimple 2.x or does OOUIPlayground downgrade to 1.x or is there something else we can do that's clever?

Spage updated the task description. (Show Details)Feb 23 2015, 4:49 AM

We're going to upgrade Flow to 2.x.

Mattflaschen-WMF renamed this task from OOUIPlayground's pimple component conflicts with Flow to Upgrade Flow's Pimple dependency to 2.x.Feb 23 2015, 7:41 PM

Change 192608 had a related patch set uploaded (by EBernhardson):
Upgrade Pimple to 2.x

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

Patch-For-Review

Change 192608 merged by jenkins-bot:
Upgrade Pimple to 2.x

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