-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Simple-phpunit] Composer.phar require to be in the path #26637
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
Comments
I'm not 100% sure to understand the issue, but if you want to submit a PR, please do :) |
i am currently busy with an end of training project on symfony, but once i'am done (around 3weeks from now) i will try a PR ! |
@FroggyDev Did you create the |
To figure this out i create a composer.bat with a link to composer.phar in it, as it is in path "composer" command work but composer.phar isnt in the same folder (like that i can separate tool from path which is a better practice for security). Anyway I am thinking just about a minor PR warning users that did like me to put composer.phar in same path as composer.bat. Even if i think it would be better to rely on "composer" command rather than composer.phar. |
Same happens with linux etc. Running
The |
@nicolas-grekas what do you think of such a warning ? @FroggDev do you still want to create the PR ? |
@Simperfit Hi sorry for the late answer, you can take it, i am really busy nowadays |
…t folder (MaPePeR) This PR was squashed before being merged into the 4.4 branch. Discussion ---------- [PhpUnitBridge] Also search for composer.phar in git root folder | Q | A | ------------- | --- | Branch? | 4.4 for features | Bug fix? | kindof | New feature? | addition to existing feature | Deprecations? | no | Tickets | Related: #26637 (comment) | License | MIT When you don't have a system `composer` installation, but a `composer.phar` in the project folder, you cannot use the `simple-phpunit` script from a subfolder of the project with e.g. `../vendor/bin/simple-phpunit`. This change also searches for the `composer.phar` in the current git root folder if it was not found at any o 5B62 ther places to increase the likelihood of it being found. Commits ------- 97fd204 [PhpUnitBridge] Also search for composer.phar in git root folder
Uh oh!
There was an error while loading. Please reload this page.
[Simple-phpunit] Composer.phar require to be in the path
(On windows) if composer.phar is not in the path as composer.bat the "php bin/phpunit" command will make an error.
in /vendor/symfony/phpunit-bridge/bin/simple-phpunit line 46 where.exe composer.phar
For example:
c:\dev\path\composer.bat content:
@php "C:\dev\composer\composer.phar" %*
composer.bat is in the path & composer.phar is in composer folder which is not in the path.
In this case the php bin/phpunit will trigger an error.
Maybe it is possible to set an error message to the user to explain this. Or maybe work with composer.bat instead of composer.phar.
The text was updated successfully, but these errors were encountered: