0

i downloaded a Symfony project from my friends run both Composer update and php bin/console doctrine:schema:update --force commands without errors

but when i open the project on my browser i get this error: Fatal error: Uncaught Symfony\Component\Routing\Exception\ResourceNotFoundException in /Applications/MAMP/htdocs/Animaux/Animaux/var/cache/prod/appProdProjectContainerUrlMatcher.php:407 Stack trace: #0 /Applications/MAMP/htdocs/Animaux/Animaux/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/UrlMatcher.php(90): appProdProjectContainerUrlMatcher->match('/app_dev.app/') #1 /Applications/MAMP/htdocs/Animaux/Animaux/vendor/symfony/symfony/src/Symfony/Component/Routing/Router.php(262): Symfony\Component\Routing\Matcher\UrlMatcher->matchRequest(Object(Symfony\Component\HttpFoundation\Request)) #2 /Applications/MAMP/htdocs/Animaux/Animaux/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php(104): Symfony\Component\Routing\Router->matchRequest(Object(Symfony\Component\HttpFoundation\Request)) #3 [internal function]: Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest(Object(Symfony\Component\HttpKernel\Event\GetResponseEvent), 'kernel.request', Object(Symfony\ in /Applications/MAMP/htdocs/Animaux/Animaux/vendor/twig/twig/lib/Twig/Loader/Filesystem.php on line 101 help me please

1 Answers1

3
  1. Composer update - It is a bad idea. For normal development or migrate to production, you need to use the same version of dependencies, with the project must be provided composer.lock file (versions of dependencies), and you need to use composer install instead of Composer update.
  2. ...Animaux/var/cache/prod/app... it meant you didn't clear the cache, for development use https://your_host.com/app_dev.php for production - clear the cache php bin/console cache:clear -e prod
  3. Check for PHP version, it must be the same of development.
0TshEL_n1ck
  • 441
  • 3
  • 9