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

Declare compatible PHP version in composer.json #4

Closed
reedy opened this issue Oct 3, 2017 · 8 comments
Closed

Declare compatible PHP version in composer.json #4

reedy opened this issue Oct 3, 2017 · 8 comments

Comments

@reedy
Copy link
Contributor

reedy commented Oct 3, 2017

There's no declared minimum compatible php version in the composer.json

Based on the travis.yml, this seems to be PHP >= 5.4 ?

@pleonasm
Copy link
Owner

pleonasm commented Oct 3, 2017

It's 5.4 right now, but I'm working on an update right now that will allow the filter to be serialized and deserialized as JSON. At that point I'll set a minimum version of 5.6 since that's the current supported version of PHP.

@reedy
Copy link
Contributor Author

reedy commented Oct 4, 2017

If you're using PHP 5.6 features, sure... But if it'll still run on PHP 5.4 or 5.5... There's no reason to declare it needs a higher PHP version :)

@pleonasm
Copy link
Owner

pleonasm commented Oct 8, 2017

Closed by b8d98b0. I had some trouble getting travis to work with phpunit AND all versions of PHP 5.4 and up, so I marked it 5.6+. It very likely works in 5.4 though... I just don't have an easy way to test that.

@pleonasm pleonasm closed this as completed Oct 8, 2017
@reedy
Copy link
Contributor Author

reedy commented Oct 8, 2017

You might be able to do a phpunit version or... `^4.8 || ^5.7 || ^6.4" or similar might allow it to select a version that works with that PHP version. Or maybe it wouldn't...

Might have a play around in a fork and see what travis will do. Of course, for testing a specific version, if you make a branch, remove the other versions from the travis.yml file and then just fix phpunit.. Maybe :)

Or you just use the version of phpunit shipped with that php verison... https://docs.travis-ci.com/user/languages/php

@reedy
Copy link
Contributor Author

reedy commented Oct 8, 2017

Yeah, it works fine on PHP 5.5.9. See https://travis-ci.org/reedy/bloom-filter/builds/285089394

Swap back to old PHPUnit (4.8), remove the other hard coded dependancies, and also the lock file (easiest to prevent any conflicts)

reedy/bloom-filter@cc94d56...c3bd939

@reedy
Copy link
Contributor Author

reedy commented Oct 8, 2017

Aaand, it also works on PHP 5.4 - https://travis-ci.org/reedy/bloom-filter/builds/285095500

reedy@a3f6868

@reedy
Copy link
Contributor Author

reedy commented Oct 8, 2017

Guess it all depends what you want to do...

With reedy@bb40b47 composer will use the newest PHPUnit version that works with a PHP version

"phpunit/phpunit": "^4.8 || ^5.7 || ^6.4"

So 7.0/7.1 get 6.4.1. 5.6 and HHVM gets 5.7.22. 5.5/5.4 gets 4.8.36.

So my 2c here. If you're not using any newer PHP features that require newer PHP, there's not much point cutting support off for older versions. People have to use older versions in production for varying reasons, and it takes longer to update. So having access to libraries that support is always a good thing.

Let me know if you want me to add that pull request into this repo for you (with a better commit summary). satooshi/php-coveralls needs re-adding, but that's easy to fix. I just removed the lot for ease of "getting it working"

@reedy
Copy link
Contributor Author

reedy commented Oct 8, 2017

#5

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

No branches or pull requests

2 participants