Skip to content

Commit e06ec22

Browse files
committed
Merge branch 'PHP-7.4'
2 parents 378aeb8 + 49a3b03 commit e06ec22

23 files changed

+544
-96
lines changed

Zend/tests/bug62441.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ namespace ns {
1616
}
1717
?>
1818
--EXPECTF--
19-
Fatal error: Declaration of ns\Foo::method(ns\stdClass $o) must be compatible with Iface::method(stdClass $o) in %s on line %d
19+
Fatal error: Could not check compatibility between ns\Foo::method(ns\stdClass $o) and Iface::method(stdClass $o), because class ns\stdClass is not available in %s on line %d

Zend/tests/bug76451.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?php
2+
3+
class Foo {}
4+
class_alias('Foo', 'Bar');

Zend/tests/bug76451.phpt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--TEST--
2+
Bug #76451: Aliases during inheritance type checks affected by opcache
3+
--FILE--
4+
<?php
5+
require __DIR__ . "/bug76451.inc";
6+
7+
class A {
8+
public function test(Foo $foo) {}
9+
}
10+
class B extends A {
11+
public function test(Bar $foo) {}
12+
}
13+
?>
14+
===DONE===
15+
--EXPECT--
16+
===DONE===

Zend/tests/bug76451_2.inc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
class A {
3+
public function test(Foo $foo) {}
4+
}
5+
class B extends A {
6+
public function test(Bar $foo) {}
7+
}
8+
?>

Zend/tests/bug76451_2.phpt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--TEST--
2+
Bug #76451: Aliases during inheritance type checks affected by opcache (variation)
3+
--FILE--
4+
<?php
5+
class Foo {}
6+
class_alias('Foo', 'Bar');
7+
8+
require __DIR__ . '/bug76451_2.inc';
9+
?>
10+
===DONE===
11+
--EXPECT--
12+
===DONE===

Zend/tests/return_types/008.phpt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ class qux implements foo {
1414
}
1515

1616
$qux = new qux();
17-
var_dump($qux->bar());
18-
--EXPECTF--
19-
Fatal error: Declaration of qux::bar(): qux must be compatible with foo::bar(): foo in %s008.php on line 8
17+
echo get_class($qux->bar());
18+
19+
?>
20+
--EXPECT--
21+
qux

Zend/tests/return_types/generators003.phpt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ class SomeCollection implements Collection {
1515
}
1616

1717
$some = new SomeCollection();
18-
var_dump($some->getIterator());
19-
--EXPECTF--
20-
Fatal error: Declaration of SomeCollection::getIterator(): Generator must be compatible with Collection::getIterator(): Iterator in %sgenerators003.php on line 7
18+
echo get_class($some->getIterator());
19+
20+
?>
21+
--EXPECT--
22+
Generator

Zend/tests/return_types/inheritance005.phpt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,9 @@ class Bar extends Foo {
1313
return new Bar;
1414
}
1515
}
16-
--EXPECTF--
17-
Fatal error: Declaration of Bar::test(): Bar must be compatible with Foo::test(): Foo in %sinheritance005.php on line 9
16+
17+
echo get_class(Bar::test());
18+
19+
?>
20+
--EXPECT--
21+
Bar

Zend/tests/return_types/inheritance006.phpt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,9 @@ class Bar extends Foo {
1717
return new B;
1818
}
1919
}
20-
--EXPECTF--
21-
Fatal error: Declaration of Bar::test(): B must be compatible with Foo::test(): A in %sinheritance006.php on line 11
20+
21+
echo get_class(Bar::test());
22+
23+
?>
24+
--EXPECT--
25+
B

Zend/tests/return_types/inheritance007.phpt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,9 @@ class Bar extends Foo {
1515
return new ArrayObject([1, 2]);
1616
}
1717
}
18-
--EXPECTF--
19-
Fatal error: Declaration of Bar::test(): ArrayObject must be compatible with Foo::test(): Traversable in %sinheritance007.php on line 9
18+
19+
echo get_class(Bar::test());
20+
21+
?>
22+
--EXPECT--
23+
ArrayObject

0 commit comments

Comments
 (0)