Class %s declares abstract method %s() and must therefore be declared abstract

Description

A class that contains an abstract method must also be declared abstract.

Example

<?php

class A {
    abstract function foo() ;
}

?>

Solutions

  • Remove the abstract method.

  • Remove the abstract option on the method and give it a body.

  • Add the abstract option to the class.

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>`_.