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

Increase minimum PHP version to 7.0 #23

Closed
grappler opened this issue Oct 2, 2018 · 12 comments
Closed

Increase minimum PHP version to 7.0 #23

grappler opened this issue Oct 2, 2018 · 12 comments
Assignees
Labels
Milestone

Comments

@grappler
Copy link
Contributor

grappler commented Oct 2, 2018

Currently we have <config name="testVersion" value="5.6-"/>. I would like to increase the default to 7.0. I would prefer to set it down 5.6 as the exception.

If all are agreed I can create a PR.

@grappler grappler self-assigned this Oct 2, 2018
@swissspidy
Copy link
Contributor

Or even 7.1 or 7.2?

@grappler
Copy link
Contributor Author

grappler commented Oct 2, 2018

Actually I could not find a way to override the testVersion so it may be best to define it on a package level.

I think 7.1 should be good for most projects with the plan to move to 7.2. wearerequired.local is still running on PHP 7.1 due to Kaufleuten.

@swissspidy
Copy link
Contributor

Actually I could not find a way to override the testVersion so it may be best to define it on a package level.

Do you mean the current definition is not working? Or changing it isn't possible in this ruleset here? Then why should it work in another package? 🤔

We should set the testVersion here in the coding standards package, not in each and every project of ours.

@grappler
Copy link
Contributor Author

grappler commented Oct 2, 2018

For different projects we may have different minimum PHP requirements due to Libraries that we use.

We could only update the minimum version only once all of our projects are compatible with the next version.

If we set the minimum to 7.1 we should be mostly good. If we went for 7.0 then in some of our plugins there will be warnings for using code that is not 7.0 compatible.

@swissspidy
Copy link
Contributor

When we set it to 7.0 here we can simply set it to 7.1 in a plugin that requires that, no?

@grappler
Copy link
Contributor Author

grappler commented Oct 2, 2018

When we set it to 7.0 here we can simply set it to 7.1 in a plugin that requires that, no?

No, not that I could work out. That is what I was trying to say #23 (comment)

@grappler
Copy link
Contributor Author

@ocean90 What do you think? Need a third opinion.

@ocean90
Copy link
Member

ocean90 commented Oct 18, 2018

Why is it not possible to override this value per project? Sound like a bug which should get reported upstream.

@grappler
Copy link
Contributor Author

I have created an issue for this squizlabs/PHP_CodeSniffer#2197

@ocean90
Copy link
Member

ocean90 commented Feb 19, 2019

@grappler Feel free to bump it to 7.0. Projects which still require 5.6 probably don't even use this ruleset.

ocean90 added a commit that referenced this issue Feb 20, 2019
7.1 is the current mimimum version supported by PHP, see http://php.net/supported-versions.php.

See #23
@ocean90
Copy link
Member

ocean90 commented Feb 20, 2019

In 7d0dbb9 I actually went ahead and bumped it to 7.1 since that's the version most of our projects is using. By end of the year we should bump it to 7.2, see http://php.net/supported-versions.php.

@ocean90 ocean90 added this to the 1.0.0 milestone Mar 15, 2019
@ocean90 ocean90 closed this as completed Mar 15, 2019
@ocean90
Copy link
Member

ocean90 commented Mar 6, 2020

The upstream issue was closed a few days ago. With 4.0.0 a project config should be able to override the default config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants