Skip to content

Bug: composer tool install is unreliable #956

@mvorisek

Description

@mvorisek

Describe the bug

setup-php is failing in ~0.25% cases (1 in 400) when composer tool install is required.

I am not sure where the issue is, but as you can see in the "To Reproduce" section, the repro configuration is very standard, thus the failure rate should be orders or magnitude smaller.

Version

  • v2
  • v1

Runners

GitHub Hosted

Operating systems

ubuntu-latest

PHP versions

8.3, probably any

To Reproduce

https://github.com/atk4/data/blob/fb365fde99e0cccfe1cd388d5ca2d4fdf7553c41/.github/workflows/test-unit.yml#L207-L213

Expected behavior

no error

Logs

https://github.com/atk4/data/actions/runs/15345495521/job/43180723698#step:3:26

Run shivammathur/setup-php@v2
/usr/bin/bash /home/runner/work/_actions/shivammathur/setup-php/v2/src/scripts/run.sh

==> Setup PHP
✓ PHP Updated to PHP 8.3.21

==> Setup Extensions
✓ none Disabled all shared extensions
✓ curl Enabled
✓ tokenizer Enabled
✓ mbstring Enabled
✓ iconv Enabled
✓ dom Enabled
✓ xml Enabled
✓ xmlwriter Enabled
✓ ssh2 Installed and enabled

==> Setup Tools
chmod: cannot access '/usr/local/bin/composer': No such file or directory
chmod: cannot access '/usr/local/bin/composer': No such file or directory
✗ composer Could not setup composer
Error: The process '/usr/bin/bash' failed with exit code 1

Are you willing to submit a PR?

No

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions