Page MenuHomePhabricator

Demos page for OOUI in php is broken
Closed, ResolvedPublicBUG REPORT

Description

https://doc.wikimedia.org/oojs-ui/master/demos/demos.php

Reads: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.2.9".

Event Timeline

matmarex added subscribers: Jdforrester-WMF, matmarex.

OOUI itself has required 7.2.9 since 2019: rGOJU68ef71f8f81c: [BREAKING CHANGE] Require PHP 7.2.9+, up from 5.6.99/HHVM

This might be a problem with the setup on doc.wikimedia.org? Is it suddenly running an older version?

OOUI itself has required 7.2.9 since 2019: rGOJU68ef71f8f81c: [BREAKING CHANGE] Require PHP 7.2.9+, up from 5.6.99/HHVM

This might be a problem with the setup on doc.wikimedia.org? Is it suddenly running an older version?

Yes, although not suddenly. T247653: replace doc1001.eqiad.wmnet with a buster VM and create the codfw equivalent, Stretch has PHP 7.0.

In T297035#7553216, @Majavah wrote:

OOUI itself has required 7.2.9 since 2019: rGOJU68ef71f8f81c: [BREAKING CHANGE] Require PHP 7.2.9+, up from 5.6.99/HHVM

This might be a problem with the setup on doc.wikimedia.org? Is it suddenly running an older version?

Yes, although not suddenly. T247653: replace doc1001.eqiad.wmnet with a buster VM and create the codfw equivalent, Stretch has PHP 7.0.

This page has been working for years. What changed about the doc setup in the last week or two?

BTW I see here that I told Urbanecm on Nov. 23 about this page being down, but I'm pretty sure it was down even earlier when I tried to access it, just never reported as I thought it was temporary. On Nov I saw it was still broken, and told him, and today since it was *still* broken, I filed a task.

The PHP page does not show the PHP code for the widgets though. Isn't that the purpose of the demo?

Also it appear that the SelectFile Widget does not show up correctly either on Chrome 103.0.5060.66 and Firefox 102.0.

imagen.png (564×359 px, 27 KB)

The PHP page does not show the PHP code for the widgets though. Isn't that the purpose of the demo?

Well, it'd be better if it did, but I wouldn't say that this is the purpose of it. You can look up the PHP code in the source: https://github.com/wikimedia/oojs-ui/blob/master/demos/pages/widgets.php

(If you'd like to write a patch to make it work more like the JS demo in this regard, I'd be happy to merge it.)

Also it appear that the SelectFile Widget does not show up correctly either on Chrome 103.0.5060.66 and Firefox 102.0.

This is intentional, or rather an unavoidable limitation, see T170263. There are very limited options for styling file inputs, so we opted to do nothing instead of making it worse than the browser defaults.

That's a bit too flippant of a response, I think... the lack of the "Show code" arrows in the PHP version greatly decreases the usabilty. How are people even supposed to know about that source file?

Those arrows were there, before the PHP demo site broke about 8 months ago. Why are they not there now?

They were never there in the PHP demo. Only the JS demo has this feature.

I'm sorry if my tone was flippant, but I am not going to work on this.

They were never there in the PHP demo. Only the JS demo has this feature.

@matmarex - okay, sorry, you may be right - that may have been my faulty memory. I was sure that the PHP version had those links as well, but thinking back on it now, I do seem to remember consulting the JS version for the code, then mentally translating that into PHP to get the PHP code I needed.