-
-
Notifications
You must be signed in to change notification settings - Fork 196
Description
Description
DockerComposeConfigurator
do not honors composer.json
configuration. For example, the following configuration will create docker compose files:
{
...
"extra": {
"symfony": {
"docker": "false"
}
}
}
However follwing configurations will work as expected, they will not create nor update docker compose files:
{
...
"extra": {
"symfony": {
"docker": false
}
}
}
{
...
"extra": {
"symfony": {
"docker": "0"
}
}
}
How to reproduce
- Configure your project with the following Composer command
composer config extra.symfony.docker false
. - Install a pack that updates
docker compose
files, for examplecomposer require orm
. - Docker compose files will be created/updated even if this is not desired.
Problem
So clearly the catch is that a string "false"
is set with the composer config extra.symfony.docker false
command, and this string is not recognized by PHP as a proper boolean (unlike "0"
string in my examples). However because composer config
command can only set strings! There is no way to set a proper boolean.
IMHO, Flex should be capable to recognize "false"
string as a boolean since composer config
is an a configuration command provided by Composer itself.
I identified this bug because I run composer config extra.symfony.docker false
programatically in every project I create.
Fix
I created an MR that fixes this issue: #1061