Skip to content

Fix the Variable name for the test. #3

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

Merged
merged 2 commits into from
May 7, 2025

Conversation

ulamthelucky
Copy link
Contributor

I keep getting this error:
Warning: include(/usr/local/bin/../phpmd/phpmd/src/bin/phpmd): Failed to open stream: No such file or directory in /usr/local/bin/phpmd on line 119
Warning: include(): Failed opening '/usr/local/bin/../phpmd/phpmd/src/bin/phpmd' for inclusion (include_path='.:/usr/local/lib/php') in /usr/local/bin/phpmd on line 119

when trying to use this action with a vendored phpmd.

I found the Variable name in the final test was $ACTION_PHPUNIT_PATH which I think should be $ACTION_PHPMD_PATH

@g105b
Copy link
Member

g105b commented May 7, 2025

Thank you for finding this issue! I'll make a new release soon.

@g105b g105b linked an issue May 7, 2025 that may be closed by this pull request
@g105b g105b merged commit 5e43612 into php-actions:master May 7, 2025
@bytehead
Copy link

bytehead commented May 7, 2025

Hi :)

This release does not work in my case, requiring @v1.0.0 solves my issue.
TBH, I have no clue where to search :)

Here's my debug output:

##[debug]Evaluating condition for step: 'Run PHP Mess Detector'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Run PHP Mess Detector
##[debug]Loading inputs
##[debug]Loading env
Run php-actions/phpmd@v1
  with:
    php_version: 7.4
    path: src/extensions/internal
    output: text
    ruleset: phpmd-ruleset.xml
    exclude: vendor
    version: latest
  env:
    COMPOSER_PROCESS_TIMEOUT: 0
    COMPOSER_NO_INTERACTION: 1
    COMPOSER_NO_AUDIT: 1
    COMPOSER_AUTH: {"github-oauth": {"github.com": "***"}}
##[debug]Evaluating: github.token
##[debug]Evaluating Index:
##[debug]..Evaluating github:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'token'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Evaluating: inputs.version
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'version'
##[debug]=> 'latest'
##[debug]Result: 'latest'
##[debug]Evaluating: inputs.php_version
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'php_version'
##[debug]=> '7.4'
##[debug]Result: '7.4'
##[debug]Evaluating: inputs.vendored_phpmd_path
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]bash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/cee5b9fa9fbc4c888e7a62bbb7b8eade18e3c56b/php-build.bash) phpmd
##[debug]/home/runner/work/_actions/php-actions/phpmd/v1/phpmd-action.bash
##[debug]'
##[debug]Result: 'set -e
##[debug]bash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/cee5b9fa9fbc4c888e7a62bbb7b8eade18e3c56b/php-build.bash) phpmd
##[debug]/home/runner/work/_actions/php-actions/phpmd/v1/phpmd-action.bash
##[debug]'
##[debug]Loading env
Run set -e
  set -e
  bash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/cee5b9fa9fbc4c888e7a62bbb7b8eade18e3c56b/php-build.bash) phpmd
  /home/runner/work/_actions/php-actions/phpmd/v1/phpmd-action.bash
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    COMPOSER_PROCESS_TIMEOUT: 0
    COMPOSER_NO_INTERACTION: 1
    COMPOSER_NO_AUDIT: 1
    COMPOSER_AUTH: {"github-oauth": {"github.com": "***"}}
    ACTION_TOKEN: ***
    ACTION_VERSION: latest
    ACTION_PHP_VERSION: 7.4
    ACTION_PHPMD_PATH: 
    ACTION_PATH: src/extensions/internal
    ACTION_RULESET: phpmd-ruleset.xml
    ACTION_OUTPUT: text
    ACTION_MINIMUMPRIORITY: 
    ACTION_REPORTFILE: 
    ACTION_SUFFIXES: 
    ACTION_EXCLUDE: vendor
    ACTION_STRICT: 
    ACTION_ARGS: 
##[debug]/usr/bin/bash --noprofile --norc -e -o pipefail /home/runner/work/_temp/ca5ea7b9-570d-4ccb-96c2-3c7f70d0e6b5.sh
Building PHP 7.4 with extensions:  ...
##[debug]phar_path=/home/runner/work/_actions/php-actions/phpmd/v1/phpmd.phar
Error: Process completed with exit code 1.
##[debug]Finished: run
##[debug]Finishing: Run PHP Mess Detector

@g105b
Copy link
Member

g105b commented May 7, 2025

Once again, thank you for your contribution, but I jumped the gun earlier and should have done some more testing before making the release.

I've rolled the release back, and I'm going to make a v2 release with the Version: composer feature shared by phpunit and phpstan, along with your fix here.

@g105b
Copy link
Member

g105b commented May 7, 2025

Oh hey @bytehead , you've run into the same issue as what I described above. v1.0.0 is again the latest - you can continue to trust v1 too as I'll be making these changes into a v2 release at some point soon. Thank you for your debugging code.

@bytehead
Copy link

bytehead commented May 7, 2025

Thank you @g105b!

@g105b g105b mentioned this pull request May 7, 2025
@ulamthelucky ulamthelucky deleted the MDVarName branch May 10, 2025 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Vendored PHPMD binary issue.
3 participants