HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Namespace Question

I was brave enough to name one of the classes in my plugin "SettingsController" because I am using namespaces. Nevertheless I receive the following PHP notice:

Declaration of RJ\MyPlugin\SettingsController::index($args) should be compatible with SettingsController::index()

My expectation would have been that \MyNamespace\SettingsController and \Vanilla\SettingsController are totally unrelated.

Can anyone tell me if the reason for the notice is that Vanillas class.settingscontroller.php is not namespaced (that's what I hope) or if I am wrong and PHP will always do that check for classes with the same name?

Sign In or Register to comment.