🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@Kocal
Copy link
Contributor

@Kocal Kocal commented Nov 11, 2025

As discussed internally some months ago, I suggested to add support for .symfony.cli.yaml file.

In 2025, such a name reflects better the purpose of the file, which is to configure the Symfony CLI tool for a given Symfony project. It's more user-friendly rather than .symfony.local.yaml, which IIRC is something legacy, and may be confusing.

The PR adds support for the following files:

  • .symfony.cli.dist.yaml
  • .symfony.cli.yaml
  • .symfony.cli.override.yaml

@Kocal Kocal changed the title Add support for symfony-cli* and .symfony-cli* configuration files Add support for symfony-cli.yaml configuration files (and its variants) Nov 11, 2025
@Kocal Kocal changed the title Add support for symfony-cli.yaml configuration files (and its variants) Add support for symfony-cli.yaml configuration file (and its variants) Nov 11, 2025
} else if fileConfig == nil {
continue
}
for _, configFilePrefix := range []string{".symfony.local", "symfony-cli", ".symfony-cli"} {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would move this as the outerLoop. This way we can break as soon as we have a a match on one prefix and not let users mix everything together

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@tucksaun
Copy link
Member

I don't think having both symfony-cli AND .symfony-cli make senses, it also adds confusion IMHO.
Using a dot prefixed file is my personal preference as this the convention most tools are using nowadays.
If the reason behind this is offering alternatives to users then we might instead take inspiration on Docker Compose and add support for configuring this via a flag and a environment variable.

Now regarding the out-of-the-box naming I'm not against getting rid of .symfony.local but I would like to have the whole Symfony Core Team(s) opinion as this will affect the ecosystem as a whole.

@tucksaun
Copy link
Member

And to be considered: there's the possibility for a .symfony.insight.yaml file to exists so we might want to consider .symfony.cli.yaml.

And this file is also configuring the behavior of the "Local" web server so some might prefer .symfoy.local.yaml 🤓

@Kocal
Copy link
Contributor Author

Kocal commented Nov 13, 2025

Given your arguments and since that .symfony.bundle.yaml also exists, let's go for .symfony.cli.yaml only? (while keeping a BC layer for .symfony.local.yaml and variants ofc)

The Slack discussion has since disappeared, but people seemed to be pretty okay with it... I'm not sure.

@tucksaun
Copy link
Member

.symfony.cli.yaml it is then I guess. wdyt @fabpot ?

@fabpot
Copy link
Contributor

fabpot commented Nov 14, 2025

I don't get why the current name would be "legacy". It configures Symfony for local usage. I'm not opposed, but I don't remember the rationale behind this change.

@Kocal
Copy link
Contributor Author

Kocal commented Nov 14, 2025

I think the reason was given in the Slack thread (which expired since), but I don't really remember.

The idea with supporting a new name as a configuration file, is to improve the DX.

Having a configuration file named according to its tool's name, helps developers to find them and understand what these files are doing. Some examples from the PHP and JS worlds:

  • PHP-CS-Fixer with .php-cs-fixer.php
  • PHPStan with phpstan.neon*
  • PHPUnit with phpunit.xml*
  • Composer with composer.json
  • Babel with babel.config.*
  • ESLint with .eslintrc
  • Prettier with .prettierrc
  • Vite with vite.config.*
  • etc...

But with the Symfony CLI configuration file .symfony.local.yaml, it describes its purpose: configuring Symfony locally (which is more or less true, I have often used the Symfony CLI on a CI to run a web-server for running E2E tests with Cypress or Playwright). It does not fully reflect that this file is used by the Symfony CLI.

@Kocal Kocal force-pushed the feat/allow-symfony-cli-yaml-file branch from 55a2de5 to d28c1b7 Compare November 15, 2025 14:11
@Kocal Kocal changed the title Add support for symfony-cli.yaml configuration file (and its variants) Add support for .symfony.cli.yaml configuration file Nov 15, 2025
@Kocal Kocal requested a review from tucksaun November 15, 2025 14:15
@Kocal Kocal force-pushed the feat/allow-symfony-cli-yaml-file branch from d28c1b7 to 76483de Compare November 28, 2025 12:08
@Kocal
Copy link
Contributor Author

Kocal commented Nov 29, 2025

Deprecation added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants