symfony / flex

Composer plugin for Symfony
MIT License
4.17k stars 183 forks source link

Remove version tag in compose file as marked as obsolete by lastest docker compose version #1023

Closed sabruss closed 7 months ago

sabruss commented 7 months ago

With the latest version of Docker Compose,

When specifying a version tag in any compose*.yaml, When running any docker compose command a warning appears stating that the version tag is obsolete.

Referring to the Compose documentation here, it appears that this tag has been purely informational for a long time. Some research suggests that it has been obsolete since the release of Docker Compose v1.27.x on 2020-09-10.

Do you think it can be removed safely ?

dunglas commented 7 months ago

Yes. It has already been removed from Symfony Docker and API Platform. You can remove it safely, it's supported by Flex.

fabpot commented 7 months ago

@dunglas Does it mean we should remove this line? https://github.com/symfony/flex/blob/2.x/src/Configurator/DockerComposeConfigurator.php#L239

dunglas commented 7 months ago

Indeed, good catch.