Upgrade PHPUnit
XedinUnknown opened this issue · 5 comments
Hi,
I have a project that uses PHPUnit >= 5.4. I would like to use your library, because your require-dev PHPUnit constraint ~4.5
won't allow it. Therefore, I ask if it's possible that you could upgrade the required version of PHPUnit. I understand that you would like to be able to test the library with older versions of PHPUnit, and therefore I suggest that you specify the version for phpunit/phpunit
as ~4.5 || ^5.0
or similar. I ran composer update phpunit/phpunit --with-dependencies
while having the above constraint, and with PHPUnit then at 5.4 I ran phpunit
in the project directory without any issues, and all tests passing.
Thanks.
Hey @XedinUnknown,
I think it makes sense, but the version should be ^4.5|^5.0
.
Do you want to open a PR for these changes?
@bocharsky-bw, thank you for the quick response. I agree, and will open a PR soon. Do you think it may be a good idea to also include the composer.lock file?
Great, thanks!
No, we should always avoid composer.lock
files for libraries otherwise you'll lock users to install specific versions. It useful only for projects.
@bocharsky-bw, ok, no lockfile then. But for your information, the composer docs state that the benefit of committing the lockfile is that everyone can test against specific versions, while not having an effect on projects that depend on the lib. I tend to agree. But I respect your decision. Thanks.
Hm, fair enough, but as I know, a lot of popular libraries don't commit .lock
file. I prefer do not commit it.
Anyways, thanks for pointing that.