Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Console] Completion version should not use application's version #44733

Closed
@wouterj

Description

@wouterj

Symfony version(s) affected

5.4

Description

From #44729

However, this issue made me realize that we probably forgot about the standalone app usage when implementing --symfony.

This option is used to determine if the installed shell completion script is still compatible with the complete command in Symfony (e.g. if we add a feature in 6.1 that requires a modification of the bash script). However, we currently set it using $application->getVersion(). This means that we're no longer checking Symfony versions when it's used by e.g. PHPstan. I have no idea how we can set this to the real symfony/console version here.
Maybe we should use a custom version scheme for completion? (e.g. one that we increase manually, independently from Symfony releases, whenever we break/change something?)

Possible fixes:

From @GromNaN:

+1 for adding a completion version that is incremented only when there is a breaking change. Like composer does for plugins.

From @stof:

yeah. either that or we should use \Composer\InstalledVersions::getVersion('symfony/console') to get the version (but then, that will be a pain when using a dev version of symfony/console).

Let's investigate how hard dev versions are here. That seems the most simple solution here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions