PHP Fatal error: Declaration of SuggestionContext::buildForIndex(NodeInterface $node): SuggestionContext must be compatible with SuggestionContextInterface::buildForIndex(NodeInterface $node): SuggestionContextInterface in /…/SuggestionContext.php on line 18
Well, yes self doesn't match. The interface is not the class: https://3v4l.org/lWsh2
And self
Can only be used in classes.
according to https://www.php.net/manual/en/language.types.declarations.php#language.types.declarations.base
It works when using the interface name: https://3v4l.org/mhOKM
PHP Fatal error: Declaration of SuggestionContext::buildForIndex(NodeInterface $node): SuggestionContext must be compatible with SuggestionContextInterface::buildForIndex(NodeInterface $node): SuggestionContextInterface in /…/SuggestionContext.php on line 18Well, yes
selfdoesn't match. The interface is not the class: https://3v4l.org/lWsh2And
selfaccording to https://www.php.net/manual/en/language.types.declarations.php#language.types.declarations.base
It works when using the interface name: https://3v4l.org/mhOKM