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
add a strict mode to Composer and enable it by default #5404
Comments
It is ignored because it should be a repository by itself. Your configuration should be:
|
Also, see During runtime of normal commands, Composer will prefer trying to do the right thing, rather than failing instantly. |
Ignoring the "packagist" key in that case is not ideal. I'd prefer it to cause an error message and either halt Composer or at least cause that entire "repository" entry to be ignored. At the very least, if the current ignorance behavior is kept, a warning message needs to be given. |
Why? Neither install nor update imply validation. That is explicitly what the validate command is for. Your opinion is noted, but I do not agree. |
Then I ask you the same question about the warning given for duplicate keys within an object. Why is that shown during update and install if validation isn't implied? I've also wondered: why the special key for "packagist"? Why not use |
Is a JSON schema definition available for composer.json files? |
I added a warning for the case where packagist:false is in the wrong place, as this can help debugging a problem there. |
With the following composer.json:
When I run this command:
It will give the warning "
Key url is a duplicate in ./composer.json at line 5
", but it will continue executing. This should be an error and execution should stop then.Also, the
"packagist":false,
line is ignored, andthing-one
is installed from Packagist. If disabling Packagist there in that way is not valid, it should cause an error.Please add a "strict mode" to Composer for parsing its JSON files and enable that mode by default. Allow an option (command line or in the JSON file) to disable strict mode if necessary.
The text was updated successfully, but these errors were encountered: