Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

[2.3.0] change php require version from 5.3.3 to 5.3.23 in all resources and update tests that no longer support 5.3.3 #5604

Merged
merged 17 commits into from

8 participants

@samsonasik

Per @weierophinney change on af3e982 at PR #5602

@macnibblet

Ehm, shouldn't you be removing all the class_aliases and using the proper implementation instead ?

@macnibblet

You should do a grep on all instances of version_compare in the library folder because there are many more instances

@samsonasik

@macnibblet all version_compare checked. I'm not sure about removing class_aliases, any suggestions for it that need to be removed / updated ?

@macnibblet

The reason that we have class_aliases is because we need to fix a bug in PHP, if we bump the minor version we don't need to use those fixes thus they should be removed...

@samsonasik

@macnibblet updated. please let me know if I missed something ^^

@samsonasik

@macnibblet wait, last commit cause travis error because I remove class_aliases, I will reset it and check again.

@macnibblet

You are going to need to fix tests aswell :)

@samsonasik

@macnibblet updated. travis green again ;)

tests/ZendTest/Validator/File/IsImageTest.php
((9 lines not shown))
) {
return __DIR__ . '/_files/magic.lte.5.3.10.mime';
}
// Ubuntu has backported the changes in 12.04 to PHP 5.3.10.
- if (strpos(PHP_VERSION, 'ubuntu') !== false && version_compare(PHP_VERSION, '5.3.10', '>=')) {
+ if (strpos(PHP_VERSION, 'ubuntu') !== false) {
return __DIR__ . '/_files/magic.lte.5.3.10.mime';
}
@gws
gws added a note

I think that whole block can go away now.

I'm not sure about it //cc @weierophinney

@gws I think ubuntu check should still exist because version_compare is check for PHP_VERSION >= 5.3.10 , not < , so, the conditional still valid, and we need to only remove the version_compare check because we are already in PHP_VERSION >= 5.3.23. /cc @weierophinney

@gws
gws added a note

My thinking: the PHP version requirements in ZF2 are now beyond the magic database change in 5.3.11 for the 5.3.x line, regardless of Ubuntu's backport to 5.3.10. The only remaining supported version which requires the old magic file format is 5.4.0, which is tested for in the first block.

@weierophinney any suggestions for this ?

@gws Ok, now removed as your suggestion. thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@samsonasik

rebased agains develop cause #5724

tests/ZendTest/Crypt/Password/BcryptTest.php
@@ -129,8 +126,6 @@ public function testVerifyFailureVersion()
'backwards compatibility settings.'
);
$this->bcrypt->verify('test', $hash);
- } else {
@Maks3w Collaborator
Maks3w added a note

Remove if too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
library/Zend/Stdlib/ArrayObject.php
((19 lines not shown))
/**
* Custom framework ArrayObject implementation
*
* Extends version-specific "abstract" implementation.
*/
-class ArrayObject extends AbstractArrayObject
+class ArrayObject extends PhpReferenceCompatibility
@Maks3w Collaborator
Maks3w added a note

Move the code from PhpReferenceCompatibility to this file and remove the old class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
library/Zend/Session/Storage/SessionArrayStorage.php
@@ -9,15 +9,11 @@
namespace Zend\Session\Storage;
-if (PHP_VERSION_ID < 50304) {
- class_alias('Zend\Session\Storage\AbstractSessionArrayStorage', 'Zend\Session\Storage\AbstractBaseSessionArrayStorage');
-} else {
- class_alias('Zend\Session\Storage\SessionArrayStorage\PhpReferenceCompatibility', 'Zend\Session\Storage\AbstractBaseSessionArrayStorage');
-}
+use Zend\Session\Storage\SessionArrayStorage\PhpReferenceCompatibility;
@Maks3w Collaborator
Maks3w added a note

The code of this class can be moved to this class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@Maks3w Maks3w added this to the 2.3.0 milestone
@samsonasik

@Maks3w removed ;)

@samsonasik

@Maks3w done, now removed, I did :
1. move Zend/Stdlib/ArrayObject/PhpReferenceCompatibility.php into Zend/Stdlib/ArrayObject.php and remove the Zend/Stdlib/ArrayObject/PhpReferenceCompatibility.php
2. move Zend/Session/Storage/SessionArrayStorage/PhpReferenceCompatibility.php into Zend/Session/Storage/SessionArrayStorage.php and remove Zend/Session/Storage/SessionArrayStorage/PhpReferenceCompatibility.php

Please let me know if I missed something ^^

library/Zend/Session/Container.php
@@ -23,6 +19,6 @@ class_alias('Zend\Session\Container\PhpReferenceCompatibility', 'Zend\Session\Ab
* Additionally, expiries may be absolute TTLs or measured in "hops", which
* are based on how many times the key or container were accessed.
*/
-class Container extends AbstractBaseContainer
+class Container extends PhpReferenceCompatibility
@Maks3w Collaborator
Maks3w added a note

include the code from the parent class here

@Maks3w Collaborator
Maks3w added a note

and remove the old class

@Maks3w done. code included from the parent class, and old class removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@HardieBoeve

Why not set the minimum to php 5.4? And maybe even better to 5.5 cause 5.3 is already deprecated for almost an year, and 5.4 will be soon deprecated with the release of 5.6.

@samsonasik

@HardieBoeve 5.4 will be for ZF3 //cc @weierophinney ;)

@HardieBoeve

ok :) .. but would it not be better for ZF3 to require at least PHP5.5? Because 5.4 is almost eol.

@blanchonvincent

@HardieBoeve "Adoption of PHP 5.4 and/or PHP 5.5. Right now, we want to target 5.4
for ZF3, but the main stumbling block is adoption. Right now, most LTS
distributions are on PHP 5.3.3, and may or may not have new releases
by then; we don't want to risk having a version that nobody can adopt." by @weierophinney

@HardieBoeve

@blanchonvincent thats sadly true .....

But what is the time schedule for releasing ZF3? Will it be this year? Else i personally think it will be pointless to adopt an eol version of php, because most developers are using other resources than the main resources an LTS comes with to get the latest version, but also i know some not, and yes .. when closing them out will be not an good idea.

@Ocramius
Collaborator

Afaik, only RHEL will be 5.4, and RHEL is designed to run ancient systems anyway (not for what is yet to be built), so 5.5 could eventually be a good candidate. I'd move this to the mailing list though.

@samsonasik

rebased agains develop cause #5865

@weierophinney weierophinney self-assigned this
samsonasik added some commits
@samsonasik samsonasik [2.3.0] change php require version from 5.3.3 to 5.3.23 in all resour…
…ces, and remove tests that no longer support 5.3.3
7dd4f89
@samsonasik samsonasik update class_alias condition for PHP_VERSION_ID < 50304 2fe3202
@samsonasik samsonasik remove 5.3.11 check 9c6c915
@samsonasik samsonasik update class_alias on Zend/Session/Container.php 3432356
@samsonasik samsonasik update class_alias on SessionArrayStorage 192ef6e
@samsonasik samsonasik check all version_compare 00fa6d5
@samsonasik samsonasik remove class_aliases for php 5.3 and use implementation instead 22cc765
@samsonasik samsonasik fix PHP_VERSION_ID < 50304 check 962b97a
@samsonasik samsonasik fix rebase conflict 0c101e8
@samsonasik samsonasik remove ubuntu block backported as @gws suggestion 67184f8
@samsonasik samsonasik fix version_compare backported on tests/ZendTest/Validator/File/IsCom…
…pressedTest.php
b852309
@samsonasik samsonasik remove if on BcryptTest::testVerifyFailureVersion() d7f95a0
@samsonasik samsonasik 1. move Zend/Stdlib/ArrayObject/PhpReferenceCompatibility.php into Ze…
…nd/Stdlib/ArrayObject.php and remove the Zend/Stdlib/ArrayObject/PhpReferenceCompatibility.php

2. move Zend/Session/Storage/SessionArrayStorage/PhpReferenceCompatibility.php into Zend/Session/Storage/SessionArrayStorage.php and remove Zend/Session/Storage/SessionArrayStorage/PhpReferenceCompatibility.php
36d214c
@samsonasik samsonasik include the PhpReferenceCompatibility into Zend\Session\Container, an…
…d remove the Zend/Session/Container/PhpReferenceCompatibility.php
07ed78e
@samsonasik samsonasik patch eof_ending cs 0223f93
@samsonasik samsonasik remove BcryptTest::testVerifyFailureVersion() because already >5.3.7 5a765d3
@samsonasik samsonasik fix cs : remove unused_use in Zend/Stdlib/ArrayObject.php 1fd76bf
@Maks3w Maks3w merged commit c9e980b into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 4, 2014
  1. @samsonasik

    [2.3.0] change php require version from 5.3.3 to 5.3.23 in all resour…

    samsonasik authored
    …ces, and remove tests that no longer support 5.3.3
  2. @samsonasik
  3. @samsonasik

    remove 5.3.11 check

    samsonasik authored
  4. @samsonasik
  5. @samsonasik
  6. @samsonasik

    check all version_compare

    samsonasik authored
  7. @samsonasik
  8. @samsonasik
  9. @samsonasik

    fix rebase conflict

    samsonasik authored
  10. @samsonasik
  11. @samsonasik
  12. @samsonasik
  13. @samsonasik

    1. move Zend/Stdlib/ArrayObject/PhpReferenceCompatibility.php into Ze…

    samsonasik authored
    …nd/Stdlib/ArrayObject.php and remove the Zend/Stdlib/ArrayObject/PhpReferenceCompatibility.php
    
    2. move Zend/Session/Storage/SessionArrayStorage/PhpReferenceCompatibility.php into Zend/Session/Storage/SessionArrayStorage.php and remove Zend/Session/Storage/SessionArrayStorage/PhpReferenceCompatibility.php
  14. @samsonasik

    include the PhpReferenceCompatibility into Zend\Session\Container, an…

    samsonasik authored
    …d remove the Zend/Session/Container/PhpReferenceCompatibility.php
  15. @samsonasik

    patch eof_ending cs

    samsonasik authored
  16. @samsonasik
  17. @samsonasik
Something went wrong with that request. Please try again.