Search code examples
symfonysymfony-3.3

Symfony looks for app folder in wrong place


My Symfony 3.3 application is looking for app folder in wrong place.

I deployed Symfony 3.3 project to a subdomain (subdomain.domain.com). Subdomain folder location on server is: /home/USERNAME/public_html/PROJECTNAME Subdomain document root is: /home/USERNAME/public_html/PROJECTNAME/web

This is normal Symfony folder structure, nothing changed. Why it doesn't look for app folder in correct place? What am I missing?

Error I get is:

request.CRITICAL: Uncaught PHP Exception Symfony\Component\Config\Exception\FileLocatorFileNotFoundException: "The file "/home/USERNAME/public_html/app/config/routing.yml" does not exist." at /home/USERNAME/public_html/PROJECTNAME/var/cache/prod/classes.php line 3040 {"exception":"[object] (Symfony\\Component\\Config\\Exception\\FileLocatorFileNotFoundException(code: 0): The file \"/home/USERNAME/public_html/app/config/routing.yml\" does not exist. at /home/USERNAME/public_html/PROJECTNAME/var/cache/prod/classes.php:3040)"} []

EDIT:

I found out that composer.json was not in the correct folder. I posted that as an answer and accepted it.


Solution

  • composer.json file needs to be in the root folder of the app.