Skip to content

Cannot use 'Object' as class name as it is reserved #3

Open
@mhoffmann75

Description

@mhoffmann75

On yii2 Version: 2.0.15.1 with php 7.2.8 it does crash with error:

PHP Compile Error – yii\base\ErrorException
Cannot use 'Object' as class name as it is reserved

To make it work change your BaseObject.php:

namespace lucidprogrammer\simplesamlphp;
use yii\base\BaseObject as Another;


if (class_exists('Another')) {
    class MiddleManClass extends Another { }
} else {
-    class MiddleManClass extends \yii\base\Object{ }
+   class MiddleManClass extends \yii\base\BaseObject{ }
}

Which actually makes me wonder why your class_exists('Another') workaround does not work properly ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions