Last modified: 2014-06-24 20:48:38 UTC
HHVM bundles a port of the OAuth PECL extension by default, and it defines an OAuthException class. Attempting to load Extension:OAuth under HHVM causes a "Class already declared" fatal to be thrown.
Since the PECL extension just extends the default exception with two extra properties (if I understand the code right), which is compatible with the library we're using, I think we can just conditionally define the exception, and everything will work. Changing the name would be fine, except we already have an MWOAuthException, which has a slightly different usage, and I'd rather not have to refactor those.
Change 141496 had a related patch set uploaded by CSteipp: Play nice with PECL https://gerrit.wikimedia.org/r/141496
Change 141608 had a related patch set uploaded by CSteipp: Add MWOAuth namespace https://gerrit.wikimedia.org/r/141608
Change 141496 abandoned by CSteipp: Play nice with PECL https://gerrit.wikimedia.org/r/141496
Change 141608 merged by Ori.livneh: Add MediaWiki\Extensions\OAuth namespace https://gerrit.wikimedia.org/r/141608