Skip to content

Feature: Allow composer/installers (and other dependencies needing allow-plugins) when installing Composer libraries #908

Open
@tyrann0us

Description

@tyrann0us

Describe the feature

Right now, shivammathur/setup-php correctly sets up allow-plugins for Composer libraries that are installed directly via the tools option. However, if one of those tools has a dependency that itself needs allow-plugins—for example, composer/installers—it isn’t automatically allow-listed by the action. That leads to Composer blocking the plugin installation, causing errors such as:

composer/installers (installed globally) contains a Composer plugin which is blocked by your allow-plugins config.

It would be very helpful if shivammathur/setup-php could either automatically allow composer/installers whenever installing any Composer tool or detect sub-dependencies that need allow-plugins and handle them accordingly.

Please check the latest release

  • I have checked releases, and the feature is missing in the latest patch version of v2.

Underlying issue

composer/installers is blocked by the default allow-plugins config. If shivammathur/setup-php installs a Composer library that depends on composer/installers, the dependency is blocked by Composer’s stricter plugin policy, causing errors in CI.

Describe alternatives

  • Manually running composer global config --no-plugins allow-plugins.composer/installers true in every workflow.
  • Explicitly requiring composer/installers in the tools options.

Both approaches work but negate the convenience of the action automatically handling this.

Additional context

Are you willing to submit a PR?

Yes (Depending on which approach you prefer, if any, I can potentially submit a PR, although I haven't looked into your test logic yet.)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions