-
-
Notifications
You must be signed in to change notification settings - Fork 195
[UX][Bug] Avoid considering "false" as a truthy value for "synchronize_package_json" #1064
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
|
Note: the CI step for CS fails on code that I didn't wrote. |
|
This doesn't make sense to my. json is a typed language that allows differentiating booleans from strings. |
|
@nicolas-grekas JSON is typed. But the |
|
@nicolas-grekas and @stof The following command with the
But I wanted to add this PR for those who already have the |
|
I forgot that then I would rather be in favor of reporting an error when they use a string value, instead of adding support for |
|
Yep |
This PR was merged into the 2.x branch. Discussion ---------- Add --json flag to composer config command | Q | A | -------------- | --- | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- if yes, also update UPGRADE-*.md and src/**/CHANGELOG.md --> | Documentation? | yes <!-- required for new features, or documentation updates --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT <!-- Replace this notice by a description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - For new features, provide some code snippets to help understand usage. - Features and deprecations must be submitted against branch main. - Update/add documentation as required (we can help!) - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> Follows #3091 and symfony/flex#1064 Commits ------- 92f37a9 Add --json flag to composer config command
The current command
composer config "extra.symfony/flex.synchronize_package.json" falsewrite a string containing"false":e.g.
{ { "symfony/flex": { "synchronize_package_json": "false", } } }It does not skip the
package.jsonas expected so I suggest to add thefilter_var, so for all those who use thed previous "wrong" command, it'll work as expected now.ping @smnandre and @Kocal
related: symfony/ux#3091