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

Drop PHP 5.x #62

Open
2 tasks
aidantwoods opened this issue Aug 2, 2017 · 8 comments
Open
2 tasks

Drop PHP 5.x #62

aidantwoods opened this issue Aug 2, 2017 · 8 comments
Milestone

Comments

@aidantwoods
Copy link
Owner

aidantwoods commented Aug 2, 2017

SecureHeaders was originally written in PHP 7.

However, I wanted as many people as possible to be able to use these browser security features easily, and didn't want it to be unusable by someone just because they were stuck with a lazy hosting provider.

So I backported the codebase all the way back to PHP 5.3 (and I took scalar type exceptions back with me! 😉)
PHP 5.6 initial backport: 4565833
PHP 5.4: 2192058
PHP 5.3: cdab04a

A year(-ish) later and two major versions out, the minimum version has increased to PHP 5.4. I think that's where I'm comfortable drawing the line though. It certainly doesn't make sense to continue supporting versions of PHP that the PHP team themselves don't.
As far as official support goes, PHP 5.6 is the only version on 5.x not to be end of life, and it will no longer receive updates unless they are security related. It'll be that way for a while longer, so it might make sense to still support that. We'd even gain the ... operator for type-hinting collections of objects.
However, we're still missing proper language enforced type safety for scalars, return type hints, and strict mode to disable "type coercion". For these features, I feel it will be worth dropping 5.6 too.

If you really have to use PHP 5.x, 2.x isn't going anywhere. 2.x will likely enjoy quite a few more updates too. This just forewarning that when 3.0 finally rolls around, it'll be modern PHP only.


Edit: Starting a checklist of sub-tasks/issues in this meta-issue, that'll need to be completed when the transition is underway (don't worry, still not yet).

  • Type Safety
    • Scalar type hints
    • Return type hints
    • strict_types=1
    • Type hint collections when possible with ... operator
  • Move away from OpenSSL for randomness (could perhaps do this sooner in 2.x too)
@aidantwoods aidantwoods added this to the Future milestone Aug 2, 2017
@jens1o
Copy link

jens1o commented Aug 3, 2017

I would not drop support for PHP 5.4, since the latest Ubuntu LTS version is served with that version. Then, you may not be able to use this library when you want things to be secure now.

@franzliedke
Copy link
Contributor

To be fair, using PHP 5.4 should be considered a security risk as well.

@jens1o
Copy link

jens1o commented Aug 3, 2017

Well, it's that old, that hackers don't care about this (ancient) version. 😝

@aidantwoods
Copy link
Owner Author

aidantwoods commented Aug 3, 2017

I would not drop support for PHP 5.4, since the latest Ubuntu LTS version is served with that version. Then, you may not be able to use this library when you want things to be secure now.

If Ubuntu LTS is shipping with dead software then that's their problem to fix 😉
I've provided availability of this library for old versions, but it would be irresponsible to continue to support a security library on a software platform that can't hope to be secure itself (because it will never be updated).

As said this is a future goal (with no date as of yet), so no immediate drop of support. If it matters to you, please push relevant providers to use non EOL software before that future becomes present :)

@jens1o
Copy link

jens1o commented Aug 3, 2017

If Ubuntu LTS is shipping with dead software then that's their problem to fix 😉

Well, LTS version aren't provide up2date software, but only security release by definition.

@aidantwoods
Copy link
Owner Author

aidantwoods commented Aug 3, 2017 via email

@jens1o
Copy link

jens1o commented Aug 3, 2017

Once they started shipped it, it was the newest php version. And it is maintained until the mid of 2019.

@aidantwoods
Copy link
Owner Author

aidantwoods commented Aug 3, 2017 via email

@aidantwoods aidantwoods modified the milestones: Future, Version 3.0 Apr 23, 2018
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

3 participants