Skip to content

Incorrect AddOverrideAttributeToOverriddenMethodsRector on __call #9553

@xPaw

Description

@xPaw
<?php
class test extends Memcached {
	public function __call( string $function_name, array $parameters ) : mixed {
		//
	}
}

In this example it suggests adding #[\Override] attribute on the __call, but this does not actually work:

Fatal error: test::__call() has #[\Override] attribute, but no matching parent method exists

It does work fine on other methods like get, delete, etc.

Rector 2.2.14

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions