Class %s cannot extend %s %s

Description

A class that is marked final cannot be extended.

Example

<?php

final class X {}

class Y extends X {}

?>

Literal Examples

  • Class T cannot extend class X

Solutions

  • Remove the final keyword on the parent class.

  • Use composition in the intended child class.