If after PHP upgrade you're getting error "PHP Fatal error: Cannot declare class error, because the name is already in use ...", you will have to rename your "error" class.Since PHP 7 classname "Error" is predefined and used internally.