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

composer-require-checker: /usr/bin/env: ‘php\r’: No such file or directory #473

Closed
2 of 5 tasks
Slamdunk opened this issue Jul 12, 2021 · 4 comments
Closed
2 of 5 tasks
Assignees
Labels
bug Something isn't working upstream-issue Issue in an upstream project

Comments

@Slamdunk
Copy link

Describe the bug

Now:

Run composer-require-checker check --ansi --config-file=$(realpath .require-checker.json)
  composer-require-checker check --ansi --config-file=$(realpath .require-checker.json)
  shell: /usr/bin/bash -e {0}
/usr/bin/env: ‘php\r’: No such file or directory
Error: Process completed with exit code 127.

4 days ago:

Run composer-require-checker check --ansi --config-file=$(realpath .require-checker.json)
  composer-require-checker check --ansi --config-file=$(realpath .require-checker.json)
  shell: /usr/bin/bash -e {0}
ComposerRequireChecker 3.2.0@cd6c6b91ee3c065e60a35ca1a67becb0ae86dbb7
There were no unknown symbols found.

Version

  • I have checked releases, and the bug exists in the latest patch version of v1 or v2.
  • v2
  • v1

Runners

  • GitHub Hosted
  • Self Hosted

Operating systems
ubuntu-latest

Current runner version: '2.278.0'
Operating System
  Ubuntu
  20.04.2
  LTS
Virtual Environment
  Environment: ubuntu-20.04
  Version: 20210628.1

PHP versions

Run shivammathur/setup-php@v2
  with:
    coverage: none
    php-version: 8.0
    tools: composer-normalize, composer-require-checker
/usr/bin/bash /opt/hostedtoolcache/linux.sh 8.0 /home/runner/work/_actions/shivammathur/setup-php/v2/dist

==> Setup PHP
✓ PHP Found PHP 8.0.7

==> Setup Tools
✓ composer Added composer 2.1.3
✓ composer-normalize Added composer-normalize 
✓ composer-require-checker Added composer-require-checker 

==> Setup Coverage
✓ none Disabled Xdebug and PCOV

To Reproduce

jobs:
  composer-json-lint:
    name: "Lint composer.json"

    runs-on: "ubuntu-latest"

    strategy:
      matrix:
        php-version:
          - "8.0"

    steps:
      - name: "Checkout"
        uses: "actions/checkout@v2"

      - name: "Install PHP"
        uses: "shivammathur/setup-php@v2"
        with:
          coverage: "none"
          php-version: "${{ matrix.php-version }}"
          tools: composer-normalize, composer-require-checker

      - name: "Get composer cache directory"
        id: composercache
        run: echo "::set-output name=dir::$(composer config cache-files-dir)"

      - name: "Cache dependencies"
        uses: "actions/cache@v2"
        with:
          path: ${{ steps.composercache.outputs.dir }}
          key: composer-json-lint-${{ runner.os }}-php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json', '**/composer.lock') }}
          restore-keys: composer-json-lint-${{ runner.os }}-php-${{ matrix.php-version }}-composer-

      - name: "Validate composer.json"
        run: "composer validate --ansi --strict --no-check-all --no-check-publish"

      - name: "Normalize composer.json"
        run: "composer-normalize --ansi --dry-run"

      - name: "Install dependencies"
        run: "composer install --ansi --classmap-authoritative"

      - name: "Check composer.json explicit dependencies"
        run: "composer-require-checker check --ansi --config-file=$(realpath .require-checker.json)"

Additional context
Nothing changed in my code within the last 4 days.
It's also weird because it's been a month since the last commit con https://github.com/maglnet/ComposerRequireChecker

@Slamdunk Slamdunk added the bug Something isn't working label Jul 12, 2021
@shivammathur
Copy link
Owner

shivammathur commented Jul 12, 2021

@Slamdunk in 3.3.0 release of composer-require-checker the phar has wrong line endings. Please report this upstream.

https://github.com/shivammathur/test-setup-php/runs/3044920268?check_suite_focus=true#step:2:5

@Slamdunk
Copy link
Author

Thank you very much and sorry that I haven't checked it myself 🙏

Discussion continue at maglnet/ComposerRequireChecker#281

@shivammathur shivammathur added the upstream-issue Issue in an upstream project label Jul 12, 2021
@shivammathur
Copy link
Owner

@Slamdunk After 2.12.0 release composer is used to set up composer-require-checker, so this error should not be there now in CI workflows.

@Slamdunk
Copy link
Author

Thank you very much for your quick fixes and hard work providing a great GHA experience with PHP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream-issue Issue in an upstream project
Projects
None yet
Development

No branches or pull requests

2 participants