Page MenuHomePhabricator

Test on PHP 7.0.0-dev reports PHP Fatal error: on MWExceptionHandler::handleException()
Closed, ResolvedPublic

Description

Tests run on PHP 7.0.0-dev (PHP 7.0.0-dev (cli) (built: Aug 3 2015 22:41:58) ) are reporting:

MediaWiki: 1.26alpha (MediaWiki vendor autoloader)
Semantic MediaWiki: 2.3 alpha (SMWSQLStore3, sqlite)
PHPUnit 4.7.7 by Sebastian Bergmann and contributors.
Runtime:	PHP 7.0.0-dev
Configuration:	/home/travis/build/SemanticMediaWiki/mw/extensions/SemanticMetaTags/phpunit.xml.dist
....................................................
Fatal error: Uncaught TypeError: Argument 1 passed to MWExceptionHandler::handleException() must be an instance of Exception, instance of Error given in /home/travis/build/SemanticMediaWiki/mw/includes/exception/MWExceptionHandler.php:156
Stack trace:
#0 [internal function]: MWExceptionHandler::handleException(Object(Error))
#1 {main}
  thrown in /home/travis/build/SemanticMediaWiki/mw/includes/exception/MWExceptionHandler.php on line 156
PHP Fatal error:  Uncaught TypeError: Argument 1 passed to MWExceptionHandler::handleException() must be an instance of Exception, instance of Error given in /home/travis/build/SemanticMediaWiki/mw/includes/exception/MWExceptionHandler.php:156
Stack trace:
#0 [internal function]: MWExceptionHandler::handleException(Object(Error))
#1 {main}
  thrown in /home/travis/build/SemanticMediaWiki/mw/includes/exception/MWExceptionHandler.php on line 156

The same tests just run on PHP 5.4/5.6 pass as expected.

https://travis-ci.org/SemanticMediaWiki/SemanticMetaTags/jobs/74127448

Event Timeline

mwjames raised the priority of this task from to Needs Triage.
mwjames updated the task description. (Show Details)
mwjames subscribed.

Hi @mwjames. Which project is this task about? MediaWiki-Core-Tests? Associating a project is highly welcome so other people could find this task when searching in that project. Thanks in advance!

@mwjames: Which project is this task about? MediaWiki-Core-Tests? Associating a project is highly welcome so other people could find this task when searching in that project. Thanks in advance!

Legoktm set Security to None.
Legoktm added a subscriber: bd808.

Change 236592 had a related patch set uploaded (by Legoktm):
Make MWExceptionHandler work with PHP7's exception changes

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

Change 236592 merged by jenkins-bot:
Make MWExceptionHandler work with PHP7's exception changes

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

mwjames claimed this task.

It looks good, the error is longer reported on [0] for PHP 7.1.0-dev (cli) (built: Sep 15 2015 22:41:41).

[0] https://travis-ci.org/SemanticMediaWiki/SemanticMetaTags/jobs/75846020