Yii2 and MediaWiki conflict

Guys need your help. We have Yii2 and MediaWiki in project. The problem is that Yii2 has in vendor/phpspec/php-diff/Diff.php Class and Mediawiki has class which is called as Diff. The both files is in global namespace and We can’t change these files. What should we do?)

It’s a conflict not between Yii and MediaWiki, but between phpspec/php-diff and MediaWiki.
Yii has no measure to solve this conflict. So, IMO, it’s a desperate situation.

I would probably fork phpdpec/php-diff (or MediaWiki, I’m not sure) and give it a namespace.

Oh, I’m sorry. Yii 2 seems to have a dependency on phpspec/php-diff. I wonder what component of Yii depends on php-diff.

I got it. It is “yii2-gii” that requires “phpspec/php-diff”.

This is the “composer.json” of “yiisoft/yii2-gii”:

    "name": "yiisoft/yii2-gii",
    "description": "The Gii extension for the Yii framework",
    "require": {
        "yiisoft/yii2": "~2.0.13",
        "yiisoft/yii2-bootstrap": "~2.0.0",
        "phpspec/php-diff": ">=1.0.2",
        "bower-asset/typeahead.js": "0.10.* | ~0.11.0"

So, if you could develop the project without yii2-gii, you could safely use MediaWiki.

thank you)