Interface method %s::%s() must not be final

Description

A method in an interface cannot be final, as it has to be implemented: it is actually abstract. The same method, in the implementing class, may be final.

Example

<?php

interface X {
    final function foo();
}

?>

Literal Examples

  • Interface method X::foo() must not be final

Solutions

  • Remove the final option in the interface, add it to any implementing class, or its children.

Changed Behavior

This error may appear following an evolution in behavior, in previous versions. See ` <https://php-changed-behaviors.readthedocs.io/en/latest/behavior/.html>`_.