-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[RFC][5.0][PhpunitBridge] deprecate/remove simple-phpunit #31948
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
The simple-phpunit does not only handle the dependencies for phpunit it also register the symfony tests listener 8000 which enables the features listed in https://symfony.com/doc/current/components/phpunit_bridge.html if I'm not wrong, but think @nicolas-grekas know more about it. |
Nvm :) |
@wouterj no, because Prophecy supports newer versions of the phpdocumentor library now (since years). So composer would be able to find a matching package. |
Alrighty, if there are no conflicts anymore, 👍 to use normal PHPunit. (IIRC, the only thing Simple PHPunit provided was removing conflicting deps) |
The remaining feature of simple-phpunit is the automatic registration of test listeners (for the time mocking and so on). |
@alexander-schranz @stof via recipes we could provide a phpunit template where those listener are enabled by default. |
@smoench 👍 sounds good for me, so its also not hidden :) |
I'm all in favor as it has confused some junior dev a lot:
|
Big 👎 on my side. |
@nicolas-grekas this RFC is not about enforcing a bad practice but improving PHPUnit's DX. Instead of doing it our way both communities should come together, improving the DX and providing a guide. IMHO as long as PHPUnit (respectively @sebastianbergmann) is telling us it is installable via composer the vast majority will do it. We all have great knowledge about software developing and testing. Let's come together and improving the DX. |
@smoench sure, I'm only giving my pov on the initial question: it's way too early to even consider deprecating the bridge. If some of us want to improve the state of things up to the point where no remaining features of the bridge need the simple-phpunit script, fine. But that's not the case right now. Please dig deeper into the set of features. I'd be happy to be wrong by mean of future contributions. |
I created symfony/symfony-docs#11757 to clarify what the script does. Note that the excerpt in the description of this issue is misleading: the doc already tells about more things the script provides. If that was the original motivation (if not, what's the problem this issue wants to tackle?), I agree that using composer to control the version of phpunit to use in an app would be nice, but having a single pool of dependencies for the app + the tooling is really bad practice. But clearly, deprecating the script without any credible alternative is doing things the reverse way. |
Personally i appreciate 💯 agree with @nicolas-grekas for our ultimate goal being to decouple tools from the project deps. Also work is done to install Nevertheless, if the wrapper can be simplified/cleaned up from redundant checks that's nice. |
@nicolas-grekas Don't get me wrong. I don't want deprecate phpunit-bridge but simple-phpunit. IMHO simple-phpunit is a script respectively a tool and should not be part of a bridge. phpunit-bridge contains many great features / extensions for phpunit. They could be used independently from simple-phpunit. PHPUnit provides a scoped phar-file which should be the preferred one anyway. A big disadvantage of simple-phpunit it could not be extended with more great PHPUnit extensions. |
Sure, I edited the word "bridge" and replaced it by "script", because this is really what I was talking about. |
This won't happen without a credible alternative. I'm therefore closing as this is not actionable. Of course, any steps that could help migrate features provided by the script to e.g. phpunit would be good I suppose. |
Description
With version 4.8 phpunit had required the yaml component but starting with 5.0 they didn't anymore. The phpunit-bridge documentation still says there will be issues:
Provides a modified version of PHPUnit that does not embed symfony/yaml nor prophecy to prevent any conflicts with these dependencies.
My prosposal would be deprecate simple-phpunit with 4.4 and remove it with version 5.0. simple-phpunit still has its issues (no extentions possible), lacks behind the latest phpunit versions and the arguments in the documentation are not valid anymore. In the documentation the official installation guide should be referenced.
If simple-phpunit is still required for (symfony) development I would recommend to extract this to another repository. But for end-users it is not really convenient.
The text was updated successfully, but these errors were encountered: