Can't reach plugin controller


I just baked a plugin and put a controller inside … but I can’t reach it. Its says to create the controller, but it is already there

So i get " Error Test.ContactsController could not be found." with " Suggestion Create the class ContactsController below in file: D:\cakephp/plugins/Test/src\Controller\ContactsController.php"

ContactsController.php is in that location and has the right stuff inside (even tried just copying the suggestion)

The plugin routing seems fine, as it sees that the url i try is for the plugin.

The plugin gets loaded in the bootstrap part of application.php, and to me it looks like it actually does this. I see it in the “includes” part of the debug toolbar and the routes are loaded too.

I don’t see what i’m doing wrong. The only thing “off” i see are the directory seperators in the filepath

Can anyone help?

So … I didn’t give up.

In the docs ( Plugins - 4.x ( ) it says " If you install your plugins via composer or bake you shouldn’t need to configure class autoloading for your plugins."

But apparantly when i baked the plugin it said "Do you want to overwrite? (y/n/a/q)
[n] > Skip D:\cakephp\composer.json" … (it skipped automaticaly)

So i did have to manually add the plugin to the autoload stuff in composer.json.

That worked.

Basically what is stated here: