-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Application configuration in debug panel #7475
Comments
What's the use case for it? |
You'll know what's the app config in the end, after merging and populating with eg. ENV vars. |
Hmm, makes sense. @yiisoft/core-developers thoughts? |
need validators for all components allow configure |
It's not always possible in case your config contains anonymous function. |
@qiangxue Its rare case when config contains anonymous functions due to significant drawbacks with them. But in that case we just can write instance information. |
I'm just pointing out the possibility because when this happens, your app will crash. |
@qiangxue I know we discussed that before about anonymous functions. But we do not touch events aspect... It probably would be interesting to look on http://laravel.com/docs/5.0/events#basic-usage. Event handlers as classes structured inside some directory. This allow to never use any anonymous inside configs since config always should be plain and support any storage formats (php, xml, yml). Also for example Laravel never require anonymous for registering any services since it use Service Providers concept for its own and any 3rd party libraries. |
This is nothing special. You can already use Anyway, I wasn't against this enhancement. I was just pointing out a possible problem that we should solve, because it is not acceptable that using debugger would affect the execution of the main app. |
@qiangxue This could be covered by a test case, I think. But another thing is, how to access the application config other than using |
@schmunk42 If implemented, this should be optional. I'm not sure, how you would obtain the configuration (looping over all app components?) but it seems that it could easily break if you have some special setup in your app. |
There is already an application configuration section in the debug panel, but it's rather incomplete. I'd suggest to add tabs to that view, like Request has
And for sure it should not break your application. |
Great plan. |
Nice :) So what's the best way to get the application config? |
Probably via application constructor. |
Issue moved to yiisoft/yii2-debug#79 |
Hi,
would you like to have the application configuration available in the debug module?
Similar to the screenshots below, but in the debug module...
If yes, let me know - I'd create a PR.
If not simply close this issue.
The text was updated successfully, but these errors were encountered: