nikic · GitHub

RFC: https://wiki.php.net/rfc/lsp_errors

When a method signature (LSP) check during inheritance fails, always generate a fatal compile error. Previously, this generated either a warning or a fatal error based on the following rules:

  • If the method signatures have an incompatible return type, generate a fatal error.
  • If the prototype of the method is abstract (or part of an interface), generate a fatal error.
  • Otherwise, generate a warning. Prior to PHP 7.0 a strict standards warnings was generated.

This change removes the distinction between abstract and non-abstract methods and always generates a fatal error.

Read the original on github.com ↗