You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any way I can provide a list of Forbidden Class Methods?
For classes I own, I know I can simply make them 'private' rather than 'public',
but for classes installed by Composer, it would be nice to forbid the use of some methods, to ensure an alternative method is used instead.
Thank you.
The text was updated successfully, but these errors were encountered:
And we would like to forbid calls to Exception::getTraceAsString(), also in subclasses. This is where the complexity kicks in: it is not enough to detect a method name lexically, the sniffer also needs to resolve the class name and unwind the parent class chain to figure out whether it is indeed the method in question. And this is where the autoloading comes into question: how shall the sniffer know where to look for the parent class at? What if the project uses a non-standard autoloader configuration?
Hello,
Is there any way I can provide a list of Forbidden Class Methods?
For classes I own, I know I can simply make them 'private' rather than 'public',
but for classes installed by Composer, it would be nice to forbid the use of some methods, to ensure an alternative method is used instead.
Thank you.
The text was updated successfully, but these errors were encountered: