composer-install icon indicating copy to clipboard operation
composer-install copied to clipboard

Display composer validation output

Open defunctl opened this issue 7 months ago • 2 comments

Description

Currently, if composer validate fails, you don't actually know why. This displays the error message.

Motivation and context

Not an exact fix for this, but at least it would tell the user what went wrong: https://github.com/ramsey/composer-install/issues/250

How has this been tested?

I ran it in my private GitHub repo.

Before: image

After: image

Types of changes

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

PR checklist

  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [x] I have read the CONTRIBUTING.md document.
  • [ ] I have added tests to cover my changes.

defunctl avatar Apr 30 '25 21:04 defunctl

Please check the test failures. I can help with the Bats tests, if needed—just let me know.

ramsey avatar May 03 '25 03:05 ramsey

I don't know context of @defunctl workflow run, but I would like to share my experience here because I cause a same error messages as show by his before screenshots.

My workflow release.yml install a repository with my fork of at least one dependency.

After many tests, I realized that my context is reusable worflows and I don't PASS it as expected.

See Official Documentation that save me : https://docs.github.com/en/actions/how-tos/sharing-automations/reuse-workflows#using-inputs-and-secrets-in-a-reusable-workflow

I.e: https://github.com/llaville/graph-uml/commit/3bd38bbf1fbc28051f705946f22bbcf946c4c5d5

@ramsey Perharps a NOTE on documentation about such context will help future users that could run in trouble

composer_auth_empty

This issue (screenshot) also raised when you define a COMPOSER_AUTH with an empty content (secret variable is not defined or empty)

                name: Install Composer dependencies
                uses: ramsey/composer-install@v3
                with:
                    composer-options: "--prefer-dist"
                env: # https://github.com/ramsey/composer-install?tab=readme-ov-file#fork-and-private-repositories
                    COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.COMPOSER_AUTH }}"}}'

llaville avatar Jul 23 '25 13:07 llaville