symfony-docs icon indicating copy to clipboard operation
symfony-docs copied to clipboard

Wrong default value for `http_method_override`

Open UlrichThomasGabor opened this issue 3 years ago • 4 comments

https://symfony.com/doc/current/reference/configuration/framework.html#http-method-override Documentation still lists the default value for http_method_override as true whereas it is false now, see https://github.com/symfony/symfony/issues/45278

UlrichThomasGabor avatar Jun 28 '22 09:06 UlrichThomasGabor

I don't think so. The default value will be changed in 7.0. Currently it still defaults to true if you do not configure it yourself.

xabbuh avatar Jun 30 '22 07:06 xabbuh

composer.json with

"symfony/framework-bundle": "6.1.*",

then updating the "framework" recipe gives the following in symfony.lock

    "symfony/framework-bundle": {
        "version": "6.1",
        "recipe": {
            "repo": "github.com/symfony/recipes",
            "branch": "main",
            "version": "5.4",
            "ref": "3cd216a4d007b78d8554d44a5b1c0a446dab24fb"
        },
        "files": [
            "config/packages/cache.yaml",
            "config/packages/framework.yaml",
            "config/preload.php",
            "config/routes/framework.yaml",
            "config/services.yaml",
            "public/index.php",
            "src/Controller/.gitignore",
            "src/Kernel.php"
        ]
    },

and that results in the following config file loaded into the project: https://github.com/symfony/recipes/blob/dc6172e02d59d9bcaadabc9f95a885aace2b35bb/symfony/framework-bundle/5.4/config/packages/framework.yaml#L5

Don't know if it's just possible to update the framework recipe "above" the Symfony version? Then maybe both versions of the framework recipe are valid packages for 6.1 of Symfony?

UlrichThomasGabor avatar Jun 30 '22 08:06 UlrichThomasGabor

This one is tricky. The default value in the framework did not change yet. So if you have an application that you just upgrade from an older version without resyncing the recipes, the value will still be true. However, if you start a new application or reapply the recipe the value will indeed be false as it is then configured in your application explicitly.

@symfony/team-symfony-docs Any idea how we can deal with that?

xabbuh avatar Jul 21 '22 07:07 xabbuh

Shouldn't we keep the default value from the framework in the recipe until we create a new recipe for Symfony 7 and maybe only add a comment which recommends the new option?

cc @nicolas-grekas

OskarStark avatar Jul 22 '22 08:07 OskarStark