-
Notifications
You must be signed in to change notification settings - Fork 17
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
Merge array #20
Comments
First of all I think we don't need yii-web in yii-console. Please check this direction. Another idea: add |
We need yii-web or yii-console to satisfy some dependencies, I think. Then, I'd try to solve the issue, because now we could force \yii\console\Response object adding (unuseful for me) formatters, but it could not be possible in other cases. Finally, I should be sure that ascendant config json don't add properties that not exist in the class, so I should be able to avoid merge. |
If I'm reading and understanding the report right, and considering this simple structure: class Root
{
}
class Fork1 extends Root
{
public $foo;
}
class Fork2 extends Root
{
} having a package configuring |
@FabrizioCaldarelli I agree with what you say. I don't have general solution at the moment. Need to think some more. |
What about this: "config-plugin": {
"tests": "ONLYTHIS-config/console.php"
} We need to fix this as soon as possible, it is a big issue. |
I thought about adding "config-plugin-dev": {
"tests": "-vendor/yiisoft/yii-web/config/web.php"
} But the problem is: the package has its configuration and the package may NOT work without its configuration. So it's a bit doubtful. |
Instead excluding files (I have to know what files to exclude and in the future this list could change), I'd prefer to specify what is the just one file to include. |
I'm trying to tell that this will solve formatters problem but may create others. Because if we use |
What other problems? |
That there is no configuration which is need for some yii-web classes to work. |
In yii-console we have a problem with array merge.
This is the order of reading configs, that it is right:
the content of last config yii-console\config\console.php contains:
The final output is:
because is the merge of
'/vendor/yiisoft/view/config/tests.php' and
yii-console\config\console.php`.The problem is that \yii\console\Response class has not 'formatters' property, and when $config is loaded inside that object, it returns an error.
I thought 2 solutions:
So, if I had an "onlythis" prefix:
this should consider only config/console.php for tests and nothing else.
The text was updated successfully, but these errors were encountered: