symfony / flex

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

feat: support for compose.yml #994

Closed dunglas closed 1 year ago

dunglas commented 1 year ago

Docker Compose now recommends using a definition file named compose.yaml and also supports compose.yml (the legacy docker-compose.ya?ml are still supported): https://docs.docker.com/compose/compose-file/03-compose-file/

This PR adds support for compose.ya?ml file to Flex, and changes the name of the generated file to compose.yaml, according to Docker best practices.

Closes #992.

nicolas-grekas commented 1 year ago

Alternatively, can we detect the version of docker that is in use?

dunglas commented 1 year ago

It might be too early to generate composer.yaml by default.

Docker Compose support compose.yaml since 1.28.6 (2021-03-23). Docker Compose v1 stopped receiving updates in July 2023. All currently maintained Docker Compose installations support this file name.

Also, it's weird to generate files on new projects (existing projects will continue working and are unaffected) that are marked as legacy by the upstream vendor.

Alternatively, can we detect the version of docker that is in use?

This should be possible, but is it worth it? Starting a new project with an EOLed version of Docker Compose looks very weird.

fabpot commented 1 year ago

Thank you @dunglas.