8000 PHPunit Bridge - Installation process is non standard and can cause problems with other tools like PHPStam · Issue #32405 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

PHPunit Bridge - Installation process is non standard and can cause problems with other tools like PHPStam #32405

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
brpaz opened this issue Jul 6, 2019 · 3 comments

Comments

@brpaz
Copy link
brpaz commented Jul 6, 2019

Hello.

Right now, PHPUnit bridge only effectively installs PHPUnit package, when running vendor/bin/simple-phpunit for the first time.

This process is non-standard and it can cause some problems and confusion.

For example, I am using PHPStan to analyze my code in my CI Pipeline, including test code.

PHPStan requires me to specify the path to the PHPunit autoload file in its configuration, which doesn't exist unless I ran the simple-phpunit command before, which I don't want to do, since these are two different stages on my Pipeline.

Also, this behavior of installing other packages at runtime is also not common regarding other composer packages and can lead to some confusion.

Why can´t PHPUnit cant be installed as a regular composer package? Or maybe using some "post-install" script to handle the PHPUnit installation instead of doing it at runtime.

Thank you.

@derrabus
Copy link
Member
derrabus commented Jul 7, 2019

Why can´t PHPUnit cant be installed as a regular composer package?

It can. Just do it. 😃

Related: #31948

@ro0NL
Copy link
Contributor
ro0NL commented Jul 7, 2019

PHPStan requires me to specify the path to the PHPunit autoload file in its configuration, which doesn't exist unless I ran the simple-phpunit command before, which I don't want to do, since these are two different stages on my Pipeline

PHPStan requires it for analyzing, installing PHPUnit first belongs to this stage IMHO

vendor/bin/simple-phpunit install && phpstan ...

@xabbuh
Copy link
Member
xabbuh commented Jul 13, 2019

The install command looks like the solution to the initial issue to me. I am closing here as it doesn't seem that there is anything to be done. But please leave a comment if you disagree and we can consider to reopen.

@xabbuh xabbuh closed this as completed Jul 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
0