magento2 – What is the alternative of Zend Form Annotation Object in PHP 7.2


If you look at the source file, you can see that they have added a note.

Since PHP 7 adds "object" as a reserved keyword, we can not have
a class * named so and maintaining compatibility with PHP 7. The original
* the class has been renamed "Instance", and this class is now a
extension of it. It raises an * E_USER_DEPRECATED to warn users of

So, as advised, use Zend Form Annotation Instance instead of Zend Form Annotation Object

from PHP 7.2+ the ClassName will not be allowed to be named after
Special / reserved keywords such as Object

You must either upgrade your version of Magento, which is compatible with PHP 7.2+, or degrade your version of PHP.

Good news, you are not alone, there are people who are facing this problem and this one can solve it. (I hope it's okay)