'Uncaught RuntimeException: A facade root has not been set' upon, seemingly, too many files in the /config directory #45661
Unanswered
BondITSolutions
asked this question in
Q&A
Replies: 1 comment
-
I have this issue, but it happened only after updating from php 8.0 to php 8.1 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
I get the following stack trace after having, seemingly, too many files in the
/config
directory:Steps To Reproduce:
Create a fresh Laravel installation and create the following 42 files in
/config
with all the following content:Files:
Together with the config files from Laravel itself you should end up with 57 config files in total.
Now browse to any URL of the Laravel project and you'll receive the above stack trace.
If I rename all these custom config files from 1.php to 42.php the error won't occur.
If I rename any single one of them individually to 1.php, the error continues to occur.
If I rename a few of them sequentially from 1.php onwards, at some point, the error doesn't occur anymore. (Seems to be related to the cumulative filename size someshow?)
If I, randomly, delete any of these empty config files, it works again. (The config files aren't empty in my main project, but apparently the issue is unrelated to their contents as I can reproduce it with the above steps.)
Beta Was this translation helpful? Give feedback.
All reactions