Skip to content

[Mate] Remove composer plugin and use recipes instead #1994

@wachterjohannes

Description

@wachterjohannes

After a discussion with Nicolas Grekas, the symfony/ai-mate-composer-plugin package should be removed and its behaviour replaced by a Symfony Flex recipe. This issue tracks the full cross-repo plan — nothing in the plugin can be dropped until the pieces below are in place.

Cross-repo PRs

# Repo PR What Status
1 symfony/ai symfony/ai#2027 mate discover --ignore-missing-file open
2 symfony/ai symfony/ai#2026 Drop symfony/ai-mate-composer-plugin from symfony/ai-mate's require list (depends on #2027) draft
3 symfony/flex symfony/flex#1089 Auto-wire @auto-scripts into post-install-cmd / post-update-cmd draft
4 symfony/recipes symfony/recipes#1535 The symfony/ai-mate recipe draft
5 symfony/ai follow-up Delete the composer plugin source not started

Summary

The plugin (see src/mate/composer-plugin/src/MatePlugin.php) subscribes to Composer's POST_INSTALL_CMD / POST_UPDATE_CMD and:

  • prints a "run vendor/bin/mate init" banner if mate/extensions.php is missing,
  • otherwise runs php vendor/bin/mate discover --composer and forwards its output (non-zero exit → warning, not failure).

This behaviour is replaced by:

Plugin behaviour Replaced by
"Run mate init" banner Recipe post-install-output (symfony/recipes#1535)
Run discover on install/update Recipe composer-scripts@auto-scripts (symfony/recipes#1535), wired by Flex (symfony/flex#1089)
Guard on mate/extensions.php existing mate discover --ignore-missing-file (#2027)

Usage

After all five PRs are merged and released, a fresh composer require symfony/ai-mate reproduces the current plugin's UX on both Symfony skeleton and plain PHP projects — without any custom Composer plugin shipped from the package.

Open points

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions