79680260

Date: 2025-06-26 09:44:55
Score: 3
Natty:
Report link

Let's break this down. I assume you are using Metabolism/Wordpress-Bundle which allows Symfony and Wordpress to work together.

Your question is rather hard to read, next time, put code in code blocks.

But it seems you are confusing how routes.yaml is supposed to work.

You currently have (I assume):

controllers: 
  resource: 
    path: ../../src/Controller/ 
    namespace: App\Controller 
    type: annotation

Which is incorrect. You currently have an array of path, namespace and type all in one. Looking at Symfony's docs on routing, it should look like this:

# config/routes/attributes.yaml
controllers:
    resource:
        path: ../../src/Controller/
        namespace: App\Controller
    type: attribute

kernel:
    resource: App\Kernel
    type: attribute

Again, I cannot see the indentation of your controllers: declaration but I assume there is a mistake there. Could you update your question with either a screenshot or a code block of routes.yaml?

Reasons:
  • Blacklisted phrase (1): Could you update
  • Blacklisted phrase (0.5): I cannot
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: Julian Koster