Page MenuHomePhabricator

Fatal error: Cannot redeclare class CallbackFilterIterator when linting (pre-deploy) on mira
Closed, ResolvedPublic

Description

A fatal error occurred during sync-dir for the 1.27.0-wmf.11 branch, linting files via the PHP 5.5 cli.

Fatal error: Cannot redeclare class CallbackFilterIterator in /srv/mediawiki-staging/php-1.27.0-wmf.11/extensions/Echo/includes/iterator/CallbackFilterIterator.php on line 24
Errors parsing /srv/mediawiki-staging/php-1.27.0-wmf.11/extensions/Echo/includes/iterator/CallbackFilterIterator.php

It appears this is a shim to provide CallbackFilterIterator for PHP implementations that don't yet provide it.

Event Timeline

dduvall created this task.Jan 26 2016, 9:37 PM
dduvall raised the priority of this task from to Unbreak Now!.
dduvall updated the task description. (Show Details)
dduvall added a project: Notifications.
dduvall added a subscriber: dduvall.
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptJan 26 2016, 9:37 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

More context from the SAL:

== 2016-01-26 ==
* 21:41 marxarelli: filed https://phabricator.wikimedia.org/T124828 for fatal in extensions/Echo
* 21:22 marxarelli: Fatal error: Cannot redeclare class CallbackFilterIterator in /srv/mediawiki-staging/php-1.27.0-wmf.11/extensions/Echo/includes/iterator/CallbackFilterIterator.php on line 24
* 21:21 marxarelli: lint error found when running sync-dir 'Errors parsing /srv/mediawiki-staging/php-1.27.0-wmf.11/extensions/Echo/includes/iterator/CallbackFilterIterator.php'
* 21:11 marxarelli: sync-dir php linting failed

Change 266598 had a related patch set uploaded (by BryanDavis):
Wrap CallbackFilterIterator in an check

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

Change 266601 had a related patch set uploaded (by Dduvall):
Wrap CallbackFilterIterator in a condition check

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

Change 266598 merged by jenkins-bot:
Wrap CallbackFilterIterator in a condition check

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

Change 266601 merged by jenkins-bot:
Wrap CallbackFilterIterator in a condition check

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

This appears to have been a longstanding bug but only when using zend >= 5.4. It surfaced today due to our move to the new deployment host deployment.eqiad.wmnet (mira.codfw.wmnet), the newer version of php5-cli (5.5) there, and a local modification to scap's linting task to temporarily use php5 -l instead of HHVM.

It's possible we'll still need a backport of this for wmf.10 SWATs this week.

It's possible we'll still need a backport of this for wmf.10 SWATs this week.

@dduvall: Who to find out? (Or is this obsolete now?)
Wondering what's left to do in this task.

It's possible we'll still need a backport of this for wmf.10 SWATs this week.

@dduvall: Who to find out? (Or is this obsolete now?)
Wondering what's left to do in this task.

https://gerrit.wikimedia.org/r/#/c/270424/ deletes the shim. Once CI is unbroken enough to let it merge, that should resolve this issue.

dduvall closed this task as Resolved.Feb 15 2016, 6:15 PM
dduvall claimed this task.