Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Viewing all articles
Browse latest Browse all 3925

Symfony 4.x route annotations not working on homestead

$
0
0

On Windows, when I install a clean symfony project with

composer create-project symfony/skeleton my-project

and set a Route like

/**
 * @Route("/login", name="login")
 */

and then start the symfony dev server, everything works just fine.

If I try to run the same environment on a homestead vagrant box, then the annotations get ignored. bin/console debug:router shows no routes either.

If I define them in the routes.yaml though they work. What am I missing?

I have tried with homestead 8.5.3 and with 8.4.0.

My homestead.yaml is like:

ip: 192.168.10.10
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
    - ~/.ssh/id_rsa
folders:
    -
        map: '/path/to/code'
        to: /home/vagrant/code
sites:
    -
        map: homestead.test
        to: /home/vagrant/code/public
        type: symfony4
databases:
    - homestead
name: my_project
hostname: my_project

I have a feeling that it has to do with the shared folders. Have you ever experienced such a behavior?


Viewing all articles
Browse latest Browse all 3925

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>