Skip to content
Advertisement

Annotations in Symfony 4

I try to develop with Symfony 4 so I follow the tutorial on symfony.com

I’ve got an error when I try to access at :

JavaScript

This is the error :

[Syntax Error] Expected PlainValue, got ”’ at position 7 in method AppControllerHomeController::home() in /Users//Documents/ProjetSymfo4/my-project/config/routes/../../src/Controller/ (which is being imported from “/Users//Documents/ProjetSymfo4/my-project/config/routes/annotations.yaml”). Make sure annotations are installed and enabled.

I already ran

composer require annotations

And it is installed

JavaScript

This is my project :

enter image description here

Advertisement

Answer

I found the issue and how to fix it

As you can see on my screen I wrote

JavaScript

However to work we have to put ” instead of ‘

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement