sonata-project / dev-kit

Development kit of the Sonata-Project
https://master-7rqtwti-ptm4dx6rjpjko.eu-5.platformsh.site/
42 stars 42 forks source link

Using phpunit from the vendors #197

Closed greg0ire closed 4 years ago

greg0ire commented 8 years ago

@sonata-project/contributors, I have big issue with phpunit. The fact that we don't require and treat it as a dependency of our project seems to mean that as soon as we require a library the phpunit phar also bundles, test can fuck up in unexpected ways. It is the case in this PR since I required matthiasnoback/symfony-dependency-injection-test to test the Sonata Admin Symfony extension (which was not covered at all, it seems, by the way). My last commit, where I require and use phpunit provided by Composer fixes this issue. Here is what I get otherwise. This way of doing things has caused issues in the past, and will probably cause more if we continue like this. Can we agree that this is no longer relevant? As an argument against this, doing things like that also makes the travis workflow unnecessarily complicated IMO. And finally, we were warned against this by Jordi himself, and I really think we should listen to what this guy has to say.

Related issues (each one has been very time-consuming) :

greg0ire commented 7 years ago

Solution 3: do nothing and wait for php-scoper.

greg0ire commented 7 years ago

I vote 2. b/c I think reacting on the fly is not something we are that good at, because of the nature of dev-kit, and I don't want to wait for an undetermined period of time and bang my head against the wall on weird problems. Also, it might be more simple to implement.

core23 commented 6 years ago

As we don't want to use composer to handle developer tools (e.g. PHPUnit), what about adding the allowed tools to the conflict section inside the composer.json file. So we have no hard dependency on PHPUnit, but we communicate the used version.

greg0ire commented 6 years ago

As we don't want to use composer as a required-dev dependency

Sorry, what?

core23 commented 6 years ago

Reword the text xD

greg0ire commented 6 years ago

Ah ok I get it now! It's a way to communicate it indeed, but it will not "do" anything, will it? Plus this will prevent people using conflicting versions of phpunit or whatever in their project, and we should have zero influence on that.

core23 commented 6 years ago

Or we use this: https://github.com/sonata-project/dev-kit/issues/372

VincentLanglet commented 4 years ago

@greg0ire I'll close this since we're now using simple-phpunit. But maybe I'm missing something.

greg0ire commented 4 years ago

No it's fine I think :)