Skip to content

Commit b70dc5d

Browse files
committed
bug #1061 feat: Make DockerComposeConfigurator compatible with "false" string (jawira)
This PR was merged into the 2.x branch. Discussion ---------- feat: Make DockerComposeConfigurator compatible with "false" string This fixes #1060 With this MR `DockerComposeConfigurator` will recognize `"false"` string a proper boolean. I use `filter_var` function, I think this is a good solution because it requires only a single method call to fix the issue. With `filter_var` function: * true, 1, "true", "yes", "1", and "on" are recognized as `true` as well. * any other value is `false`. Additionally this function is already used in the same method some lines below: https://github.com/symfony/flex/blob/423c36e369361003dc31ef11c5f15fb589e52c01/src/Configurator/DockerComposeConfigurator.php#L115-L117 Commits ------- 2ca7843 feat: Make DockerComposeConfigurator compatible with "false" string
2 parents 423c36e + 2ca7843 commit b70dc5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Configurator/DockerComposeConfigurator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public static function shouldConfigureDockerRecipe(Composer $composer, IOInterfa
101101
}
102102

103103
if (null !== $dockerPreference = $composer->getPackage()->getExtra()['symfony']['docker'] ?? null) {
104-
self::$configureDockerRecipes = $dockerPreference;
104+
self::$configureDockerRecipes = filter_var($dockerPreference, \FILTER_VALIDATE_BOOLEAN);
105105

106106
return self::$configureDockerRecipes;
107107
}

0 commit comments

Comments
 (0)