Skip to content

Commit

Permalink
Merge branch 'PHP-5.5'
Browse files Browse the repository at this point in the history
* 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
keyurdg committed Mar 29, 2013
2 parents 15c3d3a + b2a760f commit 415d077
Show file tree
Hide file tree
Showing 223 changed files with 20,430 additions and 2,331 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ sapi/continuity/capi.c ident
Zend/RFCs/002.txt ident
Zend/RFCs/003.txt ident
NEWS merge=NEWS
UPGRADING merge=NEWS
UPGRADING.INTERNALS merge=NEWS
/ext/bz2/tests/with_strings.phpt -crlf
/ext/dom/tests/bug40836.phpt -crlf
/ext/dom/tests/domelement.phpt -crlf
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ notifications:
email: false

env:
- REPORT_EXIT_STATUS=1 TEST_PHP_EXECUTABLE=./sapi/cli/php
- REPORT_EXIT_STATUS=1

before_script:
# Compile PHP
Expand All @@ -21,4 +21,4 @@ before_script:
- . ./travis/ext/pdo_pgsql/setup.sh

# Run PHPs run-tests.php
script: ./sapi/cli/php run-tests.php -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP"
script: ./sapi/cli/php run-tests.php -p `pwd`/sapi/cli/php -g "FAIL,XFAIL,BORK,WARN,LEAK,SKIP" --show-diff
13 changes: 11 additions & 2 deletions README.RELEASE_PROCESS
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions Zend/tests/bug55156.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
--TEST--
Bug #55156 (ReflectionClass::getDocComment() returns comment even though the class has none)
--INI--
opcache.save_comments=1
opcache.load_comments=1
--FILE--
<?php

Expand Down
27 changes: 27 additions & 0 deletions Zend/tests/bug61025.phpt
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
13 changes: 13 additions & 0 deletions Zend/tests/bug62343.phpt
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"
20 changes: 20 additions & 0 deletions Zend/tests/bug63976.phpt
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"
28 changes: 28 additions & 0 deletions Zend/tests/bug64239_1.phpt
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
)
58 changes: 58 additions & 0 deletions Zend/tests/bug64239_2.phpt
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] => ->
)

)
33 changes: 33 additions & 0 deletions Zend/tests/bug64239_3.phpt
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]
31 changes: 31 additions & 0 deletions Zend/tests/bug64239_4.phpt
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]
24 changes: 24 additions & 0 deletions Zend/tests/bug64354.phpt
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"
39 changes: 39 additions & 0 deletions Zend/tests/bug64417.phpt
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

12 changes: 12 additions & 0 deletions Zend/tests/bug64515.phpt
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
31 changes: 7 additions & 24 deletions Zend/tests/generators/clone.phpt
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
Loading

0 comments on commit 415d077

Please sign in to comment.