Skip to content

[Bug]: Running PHP linters with php-parallel-lint throws an executable related issue #631

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

Closed
piqusy opened this issue Apr 10, 2024 · 1 comment
Labels

Comments

@piqusy
Copy link

piqusy commented Apr 10, 2024

Platform

macOS

Operating system version

macOS 14.4.1 (23E224)

System architecture

ARM64 (M1, M2, etc)

Herd Version

1.50 (Build 23)

PHP Version

PHP 8.3.4 (cli) (built: Apr 9 2024 10:42:16) (NTS)

Bug description

Running php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . throws Unable to execute '/Users/{username}/Library/Application Support/Herd/bin/php83'.

Traced the issues to method getPhpExecutableat L:97 - https://github.com/JakubOnderka/PHP-Parallel-Lint/blob/9df953cd03414e88dca163b4a3e8e9e972252513/src/Process/PhpExecutable.php#L97

php-parallel-lint/php-parallel-lint Package version 1.3.2

Steps to reproduce

  1. Install Herd by Laravel for local development
  2. Initialize composer
  3. Install php-parallel-lint/php-parallel-lint package
  4. Run the following in the project folder: php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint .

Relevant log output

No response

@issuelabeler issuelabeler bot added the macOS label Apr 10, 2024
@mpociot
Copy link
Member

mpociot commented Apr 10, 2024

This is an issue within the parallel-lint package, as it does not properly wrap the php executable in quotes to handle the space in the folder name.

I forked the package and applied the fix to make it work: JakubOnderka/PHP-Parallel-Lint@766d5f1

Unfortunately, the package is archived, which means that I can not PR my changes back to the project. Feel free to fork parallel-lint yourself with the changes from my commit above.

@mpociot mpociot closed this as completed Apr 10, 2024
dingo-d added a commit to dingo-d/PHP-Parallel-Lint that referenced this issue Apr 11, 2024
jrfnl pushed a commit to dingo-d/PHP-Parallel-Lint that referenced this issue May 20, 2024
dingo-d added a commit to dingo-d/PHP-Parallel-Lint that referenced this issue May 20, 2024
grogy pushed a commit to php-parallel-lint/PHP-Parallel-Lint that referenced this issue May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants