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

Do not require phpunit on production #41

Closed
wants to merge 1 commit into from

Conversation

soullivaneuh
Copy link
Contributor

PHPUnit is for your tests.

Lot of projects may not need it because of not using phpunit or use global version.

@stof
Copy link
Member

stof commented Nov 4, 2015

no, phpunit is not for our tests. The code of the WebApiContext currently depends on PHPUnit assertions, so this is a hard requirement of the library (unfortunately the assertions are not yet standalone). PHPUnit code needs to be autoloadable from behat runs.

See #38 which is about removing this dependency.

@stof stof closed this Nov 4, 2015
@soullivaneuh
Copy link
Contributor Author

The code of the WebApiContext currently depends on PHPUnit assertions

Yes, but what about global using of phpunit? I'm using .phar and I don't want to have a second phpunit to override it and have useless dependencies.

PHPUnit code needs to be autoloadable from behat runs.

What do you mean?

See #38 which is about removing this dependency.

Subscribed, thanks.

@stof
Copy link
Member

stof commented Nov 4, 2015

Yes, but what about global using of phpunit?

the code inside your global PHPUnit phar won't be accessible by your behat suite to use the PHPUnit codebase

@soullivaneuh
Copy link
Contributor Author

depends on PHPUnit assertions

AFAIK PHPUnit 6 use webmozart/assert.

Can't this be separated with PHPUnit 6 compatibility?

This is overkill for app to require the hole phpunit dependency.

@stof
Copy link
Member

stof commented Oct 12, 2017

Well, PHPUnit assertions are still there in PHPUnit, and are not using webmozart/assert

@soullivaneuh
Copy link
Contributor Author

@stof Indeed I was wrong.

Still, do you have any reason to use only PHPUnit assertion and not another library?

If not, you may migrate to a lighter one like webmozart/assert to get rid of the full phpunit requirement.

WDYT?

@soullivaneuh soullivaneuh deleted the patch-1 branch October 12, 2017 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants