Interface “%s” not found

Description

This error message is reported when the interface could not be loaded, or when the name of the class is invalid.

Example

<?php

// '4f' is not a valid name for an interface
('4f')::c;

// it is not possible to have a class with the name 'interface'
('interface')::c;

?>

Literal Examples

  • Interface “4f” not found

  • Interface “interface” not found

Solutions

  • Check spelling and namespace for that interface.

  • Create the required interface.

  • Check if the interface is defined in an extension, and the extension is included in the current PHP engine.

  • Check if the interface is defined in a dependency, and the dependency is included in the current composer.json.

  • Do not use static, parent or self in a string to call a method statically.