codeclimate-phpcodesniffer
codeclimate-phpcodesniffer copied to clipboard
ReturnTypeWillChange attribute triggers error, false positive
#[\ReturnTypeWillChange]
is an attribute added in PHP 8.1, which "signals that a mismatching tentative return type should not emit a deprecation notice". In my local environment, this is not throwing any errors in PHPCS, but CodeClimate reports it as an error:
The actual attribute can't be seen there, but the code being checked looks like this:
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function jsonSerialize() {