Skip to content

Commit 19c0967

Browse files
committed
[composer] Restore consumer command discovery compatibility (#185)
1 parent b30fc34 commit 19c0967

33 files changed

Lines changed: 189 additions & 89 deletions

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919

2020
- Keep packaged `.agents` payloads exportable and synchronize packaged skills and agents with repository-relative symlink targets so consumer repositories no longer receive broken absolute machine paths (#188)
2121
- Rewrite drifted Git hooks by removing the previous target first, restore the intended `0o755` executable mode, and report unwritable hook replacements cleanly when `.git/hooks` stays locked (#190)
22+
- Keep Composer plugin command discovery compatible with consumer environments by moving unsupported Symfony Console named parameters out of command metadata/configuration and by decoupling the custom filesystem wrapper from Composer's bundled Symfony Filesystem signatures (#185)
2223

2324
## [1.20.0] - 2026-04-23
2425

src/Console/Command/AgentsCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
*/
3636
#[AsCommand(
3737
name: 'agents',
38-
description: 'Synchronizes Fast Forward project agents into .agents/agents directory.',
39-
help: 'This command ensures the consumer repository contains linked Fast Forward project agents by creating symlinks to the packaged prompts and removing broken links.'
38+
description: 'Synchronizes Fast Forward project agents into .agents/agents directory.'
4039
)]
4140
final class AgentsCommand extends BaseCommand implements LoggerAwareCommandInterface
4241
{
@@ -63,6 +62,7 @@ public function __construct(
6362
*/
6463
protected function configure(): void
6564
{
65+
$this->setHelp('This command ensures the consumer repository contains linked Fast Forward project agents by creating symlinks to the packaged prompts and removing broken links.');
6666
$this->addJsonOption();
6767
}
6868

src/Console/Command/ChangelogCheckCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
*/
3636
#[AsCommand(
3737
name: 'changelog:check',
38-
description: 'Checks whether a changelog file contains meaningful unreleased entries.',
39-
help: 'This command validates the current Unreleased section and may compare it against a base git reference to enforce pull request changelog updates.'
38+
description: 'Checks whether a changelog file contains meaningful unreleased entries.'
4039
)]
4140
final class ChangelogCheckCommand extends BaseCommand implements LoggerAwareCommandInterface
4241
{
@@ -61,6 +60,7 @@ public function __construct(
6160
*/
6261
protected function configure(): void
6362
{
63+
$this->setHelp('This command validates the current Unreleased section and may compare it against a base git reference to enforce pull request changelog updates.');
6464
$this->addJsonOption()
6565
->addOption(
6666
name: 'against',

src/Console/Command/ChangelogEntryCommand.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@
3838
*/
3939
#[AsCommand(
4040
name: 'changelog:entry',
41-
description: 'Adds a changelog entry to Unreleased or a specific version section.',
42-
help: 'This command appends one categorized changelog entry to the selected changelog file so it can be reused by local authoring flows and skills.'
41+
description: 'Adds a changelog entry to Unreleased or a specific version section.'
4342
)]
4443
final class ChangelogEntryCommand extends BaseCommand implements LoggerAwareCommandInterface
4544
{
@@ -64,6 +63,7 @@ public function __construct(
6463
*/
6564
protected function configure(): void
6665
{
66+
$this->setHelp('This command appends one categorized changelog entry to the selected changelog file so it can be reused by local authoring flows and skills.');
6767
$this->addJsonOption()
6868
->addArgument(
6969
name: 'message',
@@ -76,10 +76,6 @@ protected function configure(): void
7676
mode: InputOption::VALUE_REQUIRED,
7777
description: 'The changelog category (added, changed, deprecated, removed, fixed, security).',
7878
default: 'added',
79-
suggestedValues: array_map(
80-
static fn(ChangelogEntryType $type): string => strtolower($type->value),
81-
ChangelogEntryType::ordered()
82-
),
8379
)
8480
->addOption(
8581
name: 'release',

src/Console/Command/ChangelogNextVersionCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@
3636
*/
3737
#[AsCommand(
3838
name: 'changelog:next-version',
39-
description: 'Infers the next semantic version from the Unreleased changelog section.',
40-
help: 'This command inspects Unreleased changelog categories and prints the next semantic version inferred from the current changelog state.'
39+
description: 'Infers the next semantic version from the Unreleased changelog section.'
4140
)]
4241
final class ChangelogNextVersionCommand extends BaseCommand implements LoggerAwareCommandInterface
4342
{
@@ -62,6 +61,7 @@ public function __construct(
6261
*/
6362
protected function configure(): void
6463
{
64+
$this->setHelp('This command inspects Unreleased changelog categories and prints the next semantic version inferred from the current changelog state.');
6565
$this->addJsonOption()
6666
->addOption(
6767
name: 'file',

src/Console/Command/ChangelogPromoteCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@
3838
*/
3939
#[AsCommand(
4040
name: 'changelog:promote',
41-
description: 'Promotes Unreleased entries into a published changelog version.',
42-
help: 'This command moves the current Unreleased entries into a released version section, records the release date, and restores an empty Unreleased section.'
41+
description: 'Promotes Unreleased entries into a published changelog version.'
4342
)]
4443
final class ChangelogPromoteCommand extends BaseCommand implements LoggerAwareCommandInterface
4544
{
@@ -66,6 +65,7 @@ public function __construct(
6665
*/
6766
protected function configure(): void
6867
{
68+
$this->setHelp('This command moves the current Unreleased entries into a released version section, records the release date, and restores an empty Unreleased section.');
6969
$this->addJsonOption()
7070
->addArgument(
7171
name: 'version',

src/Console/Command/ChangelogShowCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@
3737
*/
3838
#[AsCommand(
3939
name: 'changelog:show',
40-
description: 'Prints the notes body for a released changelog version.',
41-
help: 'This command renders the body of one released changelog section so it can be reused for GitHub release notes.'
40+
description: 'Prints the notes body for a released changelog version.'
4241
)]
4342
final class ChangelogShowCommand extends BaseCommand implements LoggerAwareCommandInterface
4443
{
@@ -63,6 +62,7 @@ public function __construct(
6362
*/
6463
protected function configure(): void
6564
{
65+
$this->setHelp('This command renders the body of one released changelog section so it can be reused for GitHub release notes.');
6666
$this->addJsonOption()
6767
->addArgument(
6868
name: 'version',

src/Console/Command/CodeOwnersCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@
3737
*/
3838
#[AsCommand(
3939
name: 'codeowners',
40-
description: 'Generates .github/CODEOWNERS from local project metadata.',
41-
help: 'This command infers CODEOWNERS entries from composer.json metadata, falls back to a commented template, and supports drift-aware preview and overwrite flows.'
40+
description: 'Generates .github/CODEOWNERS from local project metadata.'
4241
)]
4342
final class CodeOwnersCommand extends BaseCommand implements LoggerAwareCommandInterface
4443
{
@@ -67,6 +66,7 @@ public function __construct(
6766
*/
6867
protected function configure(): void
6968
{
69+
$this->setHelp('This command infers CODEOWNERS entries from composer.json metadata, falls back to a commented template, and supports drift-aware preview and overwrite flows.');
7070
$this->addJsonOption()
7171
->addOption(
7272
name: 'file',

src/Console/Command/CodeStyleCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@
3838
*/
3939
#[AsCommand(
4040
name: 'code-style',
41-
description: 'Checks and fixes code style issues using EasyCodingStandard and Composer Normalize.',
42-
help: 'This command runs EasyCodingStandard and Composer Normalize to check and fix code style issues.'
41+
description: 'Checks and fixes code style issues using EasyCodingStandard and Composer Normalize.'
4342
)]
4443
final class CodeStyleCommand extends BaseCommand implements LoggerAwareCommandInterface
4544
{
@@ -83,6 +82,7 @@ public function __construct(
8382
*/
8483
protected function configure(): void
8584
{
85+
$this->setHelp('This command runs EasyCodingStandard and Composer Normalize to check and fix code style issues.');
8686
$this->addJsonOption()
8787
->addOption(
8888
name: 'progress',

src/Console/Command/CopyResourceCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@
3939
*/
4040
#[AsCommand(
4141
name: 'copy-resource',
42-
description: 'Copies a file or directory resource into the current project.',
43-
help: 'This command copies a configured source file or every file in a source directory into the target path.'
42+
description: 'Copies a file or directory resource into the current project.'
4443
)]
4544
final class CopyResourceCommand extends BaseCommand implements LoggerAwareCommandInterface
4645
{
@@ -71,6 +70,7 @@ public function __construct(
7170
*/
7271
protected function configure(): void
7372
{
73+
$this->setHelp('This command copies a configured source file or every file in a source directory into the target path.');
7474
$this->addJsonOption()
7575
->addOption(
7676
name: 'source',

0 commit comments

Comments
 (0)