Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ComposerRequireChecker broken since 2.16.0 #549

Closed
1 task done
ruudk opened this issue Dec 30, 2021 · 2 comments
Closed
1 task done

ComposerRequireChecker broken since 2.16.0 #549

ruudk opened this issue Dec 30, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@ruudk
Copy link

ruudk commented Dec 30, 2021

Describe the bug
Since a day we notice that ComposerRequireChecker doesn't work properly anymore.

This might be related to this commit: d0696f9

ComposerRequireChecker 4.0.0@baa11a4e9e5072117e3d180ef16c07036cafa4a2

In JsonLoader.php line 56:

  unable to read .composer-require-checker.json

In Assert.php line 2060:

  The file ".composer-require-checker.json" does not exist.

check [--config-file CONFIG-FILE] [--ignore-parse-errors] [--output OUTPUT] [--] [<composer-json>]

Version

  • 2.16.0

Runners

  • GitHub Hosted

Operating systems
Ubuntu 20.04

PHP versions
PHP 8.0

To Reproduce

    composer-require-checker:
        strategy:
            fail-fast: false
        runs-on: ubuntu-20.04
        steps:
            -   name: Checkout
                uses: actions/checkout@v2.4.0
            -   name: Setup PHP
                uses: shivammathur/setup-php@2.16.0
                with:
                    php-version: '8.0'
                    coverage: none
                    tools: composer-require-checker
            -   uses: ramsey/composer-install@2.0.5
            -   name: Check dependencies
                run: composer-require-checker check --config-file=.composer-require-checker.json

Expected behavior
It should just load the config from the checked out directory, instead of the directory where ComposerRequireChecker is installed.

When I change the command to:

composer-require-checker check --config-file=$(pwd)/.composer-require-checker.json

it works.

@ruudk ruudk added the bug Something isn't working label Dec 30, 2021
@shivammathur
Copy link
Owner

shivammathur commented Dec 30, 2021

@ruudk
We switched to using the phar for composer-require-checker as there were some conflicts with other tools while installing it globally using composer. I think the phar requires an absolute path for the config file.

After f24f33e, We now scope the packages correctly to avoid conflicts, and now composer-require-checker is again installed using composer.

Please test and let me know if it works as before.

@ruudk
Copy link
Author

ruudk commented Jan 2, 2022

It works indeed. Thank you :)

@ruudk ruudk closed this as completed Jan 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants