-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* PHP-5.5: (276 commits) Patch for Bug #64544. The process title change module keeps track of the locally allocated environ, so it doesn't need to worry about when environ changes underneath it, for example by putenv()/setenv() Fix "passing NULL to non-pointer argument" warnings in intl Remove support for cloning generators Removed deprecated check Fix whitespace issue in the SOAP test Fix SOAP test Forgot to fix the test on 5.4 Exclude Travis build for 5.3 and 5.4 Fix tests after addition of ^ (xor) operator to ini Fix Bug #64545: PHP Error in ef93a93 Attempt to fix SKIP This will PHP 5.3.25 Typo fix (greater then => greater than) don't optimize script if it's not going to be cached Reimplemented OPcache restart trigger. Now, if memory or hash are full the restart is scheduled only in case the amount of wasted memory is above opcache.max_wasted_percentage. Otherwise OPcahce continue serving the following requests using already cached files, but doesn't try to add new files (the cache is full anyway). With pkgconfig < 0.28 output is a single space With pkgconfig = 0.28 output is an empty string, This breaks the test on the 2 vars Fixed issue #78 (incorrect file path validation) Fix test on Mac (\D shows up) Add test for #64529 will be 5.4.15 ...
- Loading branch information
Showing
223 changed files
with
20,430 additions
and
2,331 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,7 +64,8 @@ Do not use abbreviations for alpha and beta. | |
``git push --tags origin HEAD`` | ||
|
||
8. run: ``./makedist 5.4.2RC2``, this will export the tree, create configure | ||
and build three tarballs (gz,bz2 and xz). | ||
and build three tarballs (gz,bz2 and xz). Make sure you use the same GNU Bison | ||
version as snaps. Recent bison version are known to break ZTS. | ||
|
||
9. Copy those three tarballs to www.php.net, in your homedir there should be a | ||
directory "downloads/". Copy them into there, so that the system can generate | ||
|
@@ -154,7 +155,15 @@ origin <branch>``". | |
11. run: ``./makedist php 5.4.1``, this will export the tree, create configure | ||
and build two tarballs (one gz and one bz2). | ||
|
||
12. Commit those two tarballs to Git (php-distributions.git) | ||
12. Commit those two tarballs to web/php-distributions.git, then update the git | ||
submodule reference in web/php.git: | ||
git submodule init; | ||
git submodule update; | ||
cd distributions; | ||
git pull origin master; | ||
cd ..; | ||
git commit distributions; | ||
git push; | ||
|
||
13. Once the release has been tagged, contact the PHP Windows development team | ||
([email protected]) so that Windows binaries can be created. Once | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--TEST-- | ||
Bug #61025 (__invoke() visibility not honored) | ||
--FILE-- | ||
<?php | ||
|
||
Interface InvokeAble { | ||
static function __invoke(); | ||
} | ||
|
||
class Bar { | ||
private function __invoke() { | ||
return __CLASS__; | ||
} | ||
} | ||
|
||
$b = new Bar; | ||
echo $b(); | ||
|
||
echo $b->__invoke(); | ||
|
||
?> | ||
--EXPECTF-- | ||
Warning: The magic method __invoke() must have public visibility and cannot be static in %sbug61025.php on line %d | ||
|
||
Warning: The magic method __invoke() must have public visibility and cannot be static in %sbug61025.php on line %d | ||
Bar | ||
Fatal error: Call to private method Bar::__invoke() from context '' in %sbug61025.php on line %d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--TEST-- | ||
Bug #62343 (Show class_alias In get_declared_classes()) | ||
--FILE-- | ||
<?php | ||
class a { } | ||
class_alias("a", "b"); | ||
$c = get_declared_classes(); | ||
var_dump(end($c)); | ||
var_dump(prev($c)); | ||
?> | ||
--EXPECT-- | ||
string(1) "b" | ||
string(1) "a" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--TEST-- | ||
Bug #63976 (Parent class incorrectly using child constant in class property) | ||
--FILE-- | ||
<?php | ||
if (1) { | ||
class Foo { | ||
const TABLE = "foo"; | ||
public $table = self::TABLE; | ||
} | ||
} | ||
if (1) { | ||
class Bar extends Foo { | ||
const TABLE = "bar"; | ||
} | ||
} | ||
$bar = new Bar(); | ||
var_dump($bar->table); | ||
?> | ||
--EXPECT-- | ||
string(3) "foo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--TEST-- | ||
Bug #64239 (get_class_methods() changed behavior) | ||
--FILE-- | ||
<?php | ||
class A { | ||
use T2 { t2method as Bmethod; } | ||
} | ||
|
||
class B extends A { | ||
} | ||
|
||
trait T2 { | ||
public function t2method() { | ||
} | ||
} | ||
print_r(get_class_methods("A")); | ||
print_r(get_class_methods("B")); | ||
--EXPECT-- | ||
Array | ||
( | ||
[0] => Bmethod | ||
[1] => t2method | ||
) | ||
Array | ||
( | ||
[0] => Bmethod | ||
[1] => t2method | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--TEST-- | ||
Bug #64239 (debug_backtrace() changed behavior) | ||
--FILE-- | ||
<?php | ||
class A { | ||
use T1; | ||
public function test() { $this->backtrace(); } | ||
} | ||
|
||
class B { | ||
use T2 { t2method as Bmethod; } | ||
} | ||
|
||
class C extends A { | ||
} | ||
|
||
trait T1 { | ||
protected function backtrace() { | ||
$b = new B(); | ||
$b->Bmethod(); | ||
} | ||
} | ||
trait T2 { | ||
public function t2method() { | ||
print_r(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1)); | ||
} | ||
} | ||
$a = new A(); | ||
$a->test(); | ||
|
||
$c = new C(); | ||
$c->test(); | ||
?> | ||
--EXPECTF-- | ||
Array | ||
( | ||
[0] => Array | ||
( | ||
[file] => %sbug64239_2.php | ||
[line] => %d | ||
[function] => Bmethod | ||
[class] => B | ||
[type] => -> | ||
) | ||
|
||
) | ||
Array | ||
( | ||
[0] => Array | ||
( | ||
[file] => %sbug64239_2.php | ||
[line] => %d | ||
[function] => Bmethod | ||
[class] => B | ||
[type] => -> | ||
) | ||
|
||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--TEST-- | ||
Bug #64239 (debug_print_backtrace() changed behavior) | ||
--FILE-- | ||
<?php | ||
class A { | ||
use T2 { t2method as Bmethod; } | ||
} | ||
|
||
class C extends A { | ||
public function Bmethod() { | ||
debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); | ||
} | ||
} | ||
|
||
trait T2 { | ||
public function t2method() { | ||
debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); | ||
} | ||
} | ||
|
||
$a = new A(); | ||
$a->Bmethod(); | ||
$a->t2method(); | ||
|
||
$c = new C(); | ||
$c->Bmethod(); | ||
$c->t2method(); | ||
?> | ||
--EXPECTF-- | ||
#0 A->Bmethod() called at [%sbug64239_3.php:%d] | ||
#0 A->t2method() called at [%sbug64239_3.php:%d] | ||
#0 C->Bmethod() called at [%sbug64239_3.php:%d] | ||
#0 A->t2method() called at [%sbug64239_3.php:%d] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--TEST-- | ||
Bug #64239 (debug_print_backtrace() changed behavior) | ||
--FILE-- | ||
<?php | ||
class A { | ||
use T2 { t2method as Bmethod; } | ||
} | ||
|
||
class C extends A { | ||
public static function Bmethod() { | ||
debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); | ||
} | ||
} | ||
|
||
trait T2 { | ||
public static function t2method() { | ||
debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); | ||
} | ||
} | ||
|
||
A::Bmethod(); | ||
A::t2method(); | ||
|
||
C::Bmethod(); | ||
C::t2method(); | ||
?> | ||
--EXPECTF-- | ||
#0 A::Bmethod() called at [%sbug64239_4.php:%d] | ||
#0 A::t2method() called at [%sbug64239_4.php:%d] | ||
#0 C::Bmethod() called at [%sbug64239_4.php:%d] | ||
#0 A::t2method() called at [%sbug64239_4.php:%d] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--TEST-- | ||
Bug #64354 (Unserialize array of objects whose class can't be autoloaded fail) | ||
--FILE-- | ||
<?php | ||
class B implements Serializable { | ||
public function serialize() { | ||
throw new Exception("serialize"); | ||
return NULL; | ||
} | ||
|
||
public function unserialize($data) { | ||
} | ||
} | ||
|
||
$data = array(new B); | ||
|
||
try { | ||
serialize($data); | ||
} catch (Exception $e) { | ||
var_dump($e->getMessage()); | ||
} | ||
?> | ||
--EXPECTF-- | ||
string(9) "serialize" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--TEST-- | ||
Bug #64417 (BC break: ArrayAccess::&offsetGet() in a trait causes fatal error) | ||
--FILE-- | ||
<?php | ||
trait aa { | ||
private $container = array(); | ||
public function offsetSet($offset, $value) { | ||
if (is_null($offset)) { | ||
$this->container[] = $value; | ||
} else { | ||
$this->container[$offset] = $value; | ||
} | ||
} | ||
public function offsetExists($offset) { | ||
return isset($this->container[$offset]); | ||
} | ||
public function offsetUnset($offset) { | ||
unset($this->container[$offset]); | ||
} | ||
public function &offsetGet($offset) { | ||
$result = null; | ||
if (isset($this->container[$offset])) { | ||
$result = &$this->container[$offset]; | ||
} | ||
return $result; | ||
} | ||
} | ||
|
||
class obj implements ArrayAccess { | ||
use aa; | ||
} | ||
|
||
$o = new obj; | ||
$o['x'] = 1; | ||
++$o['x']; | ||
echo $o['x'], "\n"; | ||
--EXPECT-- | ||
2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--TEST-- | ||
Bug #64515 (Memoryleak when using the same variablename 2times in function declaration) | ||
--FILE-- | ||
<?php | ||
function foo($unused = null, $unused = null, $arg = array()) { | ||
return 1; | ||
} | ||
foo(); | ||
echo "okey"; | ||
?> | ||
--EXPECT-- | ||
okey |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,15 @@ | ||
--TEST-- | ||
Generators can be cloned | ||
Generators cannot be cloned | ||
--FILE-- | ||
<?php | ||
|
||
function firstN($end) { | ||
for ($i = 0; $i < $end; ++$i) { | ||
yield $i; | ||
} | ||
function gen() { | ||
yield; | ||
} | ||
|
||
$g1 = firstN(5); | ||
var_dump($g1->current()); | ||
$g1->next(); | ||
|
||
$g2 = clone $g1; | ||
var_dump($g2->current()); | ||
$g2->next(); | ||
|
||
var_dump($g2->current()); | ||
var_dump($g1->current()); | ||
|
||
$g1->next(); | ||
var_dump($g1->current()); | ||
$gen = gen(); | ||
clone $gen; | ||
|
||
?> | ||
--EXPECT-- | ||
int(0) | ||
int(1) | ||
int(2) | ||
int(1) | ||
int(2) | ||
--EXPECTF-- | ||
Fatal error: Trying to clone an uncloneable object of class Generator in %s on line %d |
Oops, something went wrong.