jjdunn opened a new issue, #7766:
URL: https://github.com/apache/netbeans/issues/7766
### Description
#6701 added support for PHP 8.3 #[\Override] attribute. This feature works
nicely.
However if the parent method has a function signature which is
"incompatible" with the child method (i.e. the parent method has more
arguments), then adding the #[\Override] attribute results in a PHP runtime
error:
`PHP Fatal error: {CLASSNAME}::__construct() has #[\Override] attribute,
but no matching parent method exists`
The wording of this runtime error is misleading because the parent method
DOES exist, but has more arguments than the child.
We went through a large code base, adding the #[\Override] attribute
according the NB hinting, only to find that our code was breaking. Now we have
to review every instance of #[\Override] checking to be sure that the parent
class is compatible.
It would be nice if NetBeans detected this situation and either did not
offer the "Override" hint (or) offered a warning about too-few-arguments.
p.s. this is on PHP 8.3.10
### Use case/motivation
_No response_
### Related issues
_No response_
### Are you willing to submit a pull request?
No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists