Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The file "/config" does not exist. at FileLocator.php line 46 #19719

Open
featuriz opened this issue Mar 28, 2024 · 3 comments
Open

The file "/config" does not exist. at FileLocator.php line 46 #19719

featuriz opened this issue Mar 28, 2024 · 3 comments

Comments

@featuriz
Copy link
Contributor

I'm trying Building your own Framework with the MicroKernelTrait from: https://symfony.com/doc/current/configuration/micro_kernel_trait.html

composer require symfony/config symfony/http-kernel \
  symfony/http-foundation symfony/routing \
  symfony/dependency-injection symfony/framework-bundle

This run success and created a index.php as per doc and copy pasted the code (<?php ... )

Then symfony server:start => server starts with no problem. But when i go to http://localhost:8000/random/10 .

Screenshot from 2024-03-28 10-13-39

@featuriz
Copy link
Contributor Author

I completed the tutorial in this page. and came back and recreated this file index.php also I deleted public,src,templates. Then this works fine.

  • /config folder is must.

Because in use MicroKernelTrait; file /vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php there is hardcode for /config folder.
$configDir = $this->getConfigDir();

@OskarStark
Copy link
Contributor

That sounds like something for you @xabbuh 😄

@OskarStark
Copy link
Contributor

I tried and you are right, after creating an empty config/ folder it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants