0

I'm following a symfony tutorial from youtube, https://www.youtube.com/watch?v=yu5ILexR3Yk

Its about creating your own bundle in the project. Now when I delete default bundle i.e Appbundle folder from src directory and deleted its entry from Appkernal.php file, now when I run "php bin/console" command from terminal, it shows me following errors,

C:\xampp\htdocs\first_app>php bin/console

PHP Fatal error:  Uncaught exception 
'Symfony\Component\Config\Exception\FileLocatorFileNotFoundException' with message 'The file "../../src/AppBundle" does not exist (in: C:\xampp\htdocs\first_app\app/config).' in C:\xampp\htdocs\first_app\vendor\symfony\symfony\src\Symfony\Component\Config\FileLocator.php:73

Stack trace:
#0 C:\xampp\htdocs\first_app\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Config\FileLocator.php(54): Symfony\Component\Config\FileLocator->locate('../../src/AppBu...', 'C:\\xampp\\htdocs...', true)

#1 C:\xampp\htdocs\first_app\vendor\symfony\symfony\src\Symfony\Component\Config\Loader\FileLoader.php(121): Symfony\Component\HttpKernel\Config\FileLocator->locate('../../src/AppBu...', 'C:\\xampp\\htdocs...', true)

#2 C:\xampp\htdocs\first_app\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\Loader\FileLoader.php(96): Symfony\Component\Config\Loader\FileLoader::glob('../../src/AppBu...', true, NULL)

#3 C:\xampp\htdocs\first_app\vendor\symfony\symfony\src\Symfony\Component\DependencyIn in C:\xampp\htdocs\first_app\vendor\symfony\symfony\src\Symfony\Component\Config\Loader\FileLoader.php on line 179


Fatal error: Uncaught exception 'Symfony\Component\Config\Exception\FileLocatorFileNotFoundException' with message 'The file "../../src/AppBundle" does not exist (in: C:\xampp\htdocs\first_app\app/config).' in C:\xampp\htdocs\first_app\vendor\symfony\symfony\src\Symfony\Component\Config\FileLocator.php:73

Stack trace:

#0 C:\xampp\htdocs\first_app\vendor\symfony\symfony\src\Symfony\Component\HttpKern\Config\FileLocator.php(54): Symfony\Component\Config\FileLocator->locate('../../src/AppBu...', 'C:\\xampp\\htdocs...', true)

#1 C:\xampp\htdocs\first_app\vendor\symfony\symfony\src\Symfony\Component\Config
\Loader\FileLoader.php(121): Symfony\Component\HttpKernel\Config\FileLocator->lo
cate('../../src/AppBu...', 'C:\\xampp\\htdocs...', true)
#2 C:\xampp\htdocs\first_app\vendor\symfony\symfony\src\Symfony\Component\Depend
encyInjection\Loader\FileLoader.php(96): Symfony\Component\Config\Loader\FileLoa
der::glob('../../src/AppBu...', true, NULL)
#3 C:\xampp\htdocs\first_app\vendor\symfony\symfony\src\Symfony\Component\Depend
encyIn in C:\xampp\htdocs\first_app\vendor\symfony\symfony\src\Symfony\Component
\Config\Loader\FileLoader.php on line 179

I'm using symfony version 3.3.6, Any help is much appreciated.

1
  • 1
    You might need to actually delete the cache directory in order for it be rebuilt properly. If that does not help then search your complete src and app directories for any reference to AppBundle. Clearly something is still looking for it. Commented Aug 17, 2017 at 12:24

1 Answer 1

1

I think you should also remove the routing for it. That'd be in app/config/routing.yml.

Also, depending on the Symfony version you're using, you'll need to remove also service registration in app/config/*.yml

Sign up to request clarification or add additional context in comments.

2 Comments

Hi I'm using symfony version 3.3.6, I removed routing from app/config/routing.yml , Now routing.yml is empty after removing, when I run "php bin/console" its showing me same errors.
I didn't mean you should remove it all, but just the registration for the bundle routing. Look at this: symfony.com/doc/current/bundles/remove.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.