yiisoft / yii2-apidoc

Yii 2 apidoc extension.
https://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
258 stars 121 forks source link

PHP 7.2 Cannot use yii\base\Object as Object because 'Object' is a special class name #165

Closed neoacevedo closed 6 years ago

neoacevedo commented 6 years ago

What steps will reproduce the problem?

run ./vendor/bin/apidoc api . --exclude="vendor"

What's expected?

Generate APIDoc

What do you get instead?

PHP Fatal error: Cannot use yii\base\Object as Object because 'Object' is a special class name in /home/nestor/public_html/openbiblio2/vendor/yiisoft/yii2-apidoc/models/BaseDoc.php on line 12

Additional info

Q A
Yii vesion 2.0.15.1
Yii APIDoc version latest
PHP version 7.2.4
Operating system openSUSE Tumbleweed
PHP 7.2 Cannot use yii\base\Object as Object because 'Object' is a special class name in vendor/yiisoft/yii2-apidoc/models/BaseDoc.php on line 12

Changing in this line Object to BaseObject and in the class extension doing the same, this error is solved only for this file but is replicated in models/ParamDoc.php on line 11 and so on in each class that extends Object

dmill-bz commented 6 years ago

Experiencing this as well.

Edit: This seems to be fixed on master as per https://github.com/yiisoft/yii2-apidoc/commit/dbc640a153cc53ca99d4ec36efbb0c39e16b62bb There just hasn't been a release version since. We'll need to wait for 2.1.1

samdark commented 6 years ago

@cebe is it release time?