-
-
Notifications
You must be signed in to change notification settings - Fork 10
Add alternative configurations, add throwing exceptions to Config class #64
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
Conversation
@yiiliveext suggests to rename "alternatives" to "environments". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't work if application use option source-directory
.
Error:
λ yii serve
Fatal error: Uncaught ErrorException: The "/" configuration build does not exist. in E:\open-source\yiisoft\yii-dev-tool\dev\config\src\Config.php on line 365
ErrorException: The "/" configuration build does not exist. in E:\open-source\yiisoft\yii-dev-tool\dev\config\src\Config.php on line 365
Call Stack:
0.0003 405976 1. {main}() E:\open-source\yiisoft\yii-dev-tool\dev\demo\yii:0
0.0538 4844960 2. Yiisoft\Config\Config->get($group = 'console', $build = ???) E:\open-source\yiisoft\yii-dev-tool\dev\demo\yii:22
0.0538 4844960 3. Yiisoft\Config\Config->buildGroup($group = 'params', $build = '/', $rootBuildGroupConfig = ???) E:\open-source\yiisoft\yii-dev-tool\dev\config\src\Config.php:68
0.0538 4844960 4. Yiisoft\Config\Config->checkBuildGroup($group = 'params', $build = '/') E:\open-source\yiisoft\yii-dev-tool\dev\config\src\Config.php:101
0.0538 4845280 5. Yiisoft\Config\Config->throwException($message = 'The "/" configuration build does not exist.') E:\open-source\yiisoft\yii-dev-tool\dev\config\src\Config.php:314
Did you regenerate merge_plan.php? This PR changes its format. |
Oh, sorry. Yes, it's work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When getting alternative configuration params
from alternatives should merged with params
from general configuration and then pass both to general configs and alternative configs.
Now merged params pass only to alternative configs. In general configs pass only general params. This is wrong behavior.
Done. |
Done. |
👍 |
Adding it to
composer.json
for the root package:Getting the configuration of the alternative build group:
Getting the configuration of the root build group: