Skip to content

PHP Fatal error with v5.3.1 on PHP 7.3 #72

@kdambekalns

Description

@kdambekalns

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions