Skip to content

COMPOSER env variable is ignored since 3.1 #264

@derrabus

Description

@derrabus

Description

Since the 3.1.0 release of the action, our workflow that uses an alternative composer.json file is failing. My guess is that the introduction of the feature #261 is resposible for this.

Since the action did not expose a way to set an alternative composer.json file, we've set the COMPOSER environment variable which had the same effect. Apparently, this does not work anymore.

Steps to reproduce

Use this configuration to install dependencies from a composer.json file called composer.old.json:

- name: Install dependencies with Composer
  uses: "ramsey/composer-install@v3"
  env:
    COMPOSER: composer.old.json

Expected behavior

Dependencies are read from composer.old.json. This used to work prior to the 3.1.0 release.

Screenshots or output

Composer installs the dependencies from our default composer.json file.

Environment details

  • version of this package: 3.1.0
  • PHP version: 5.6.40, 8.4.4
  • OS: Ubuntu 22.04 (GitHub's runner)

Additional context

Apparently, the code introduced in #261 always sets the COMPOSER env var, even if the new feature is not used. My proposal would be to not touch the COMPOSER env var unless the new composer-filename option is explicitly set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions