Skip to content

Commit aa9a3ff

Browse files
committed
Add test for bug #69084
This is another bug fixed by the precending commit.
1 parent 53efa1b commit aa9a3ff

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ PHP NEWS
1212
renamed). (Nikita)
1313
. Fixed bug #70839 (Converting optional argument to variadic forbidden by LSP
1414
checks). (Nikita)
15+
. Fixed bug #69084 (Unclear error message when not implementing a renamed
16+
abstract trait function). (Nikita)
1517

1618
- CURL:
1719
. Bumped required libcurl version to 7.29.0. (cmb)

Zend/tests/bug69084.phpt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
--TEST--
2+
Bug #69084: Unclear error message when not implementing a renamed abstract trait function
3+
--FILE--
4+
<?php
5+
6+
trait Foo {
7+
abstract public function doStuff();
8+
9+
public function main() {
10+
$this->doStuff();
11+
}
12+
}
13+
14+
class Bar {
15+
use Foo {
16+
Foo::doStuff as doOtherStuff;
17+
}
18+
19+
public function doStuff() {
20+
var_dump(__FUNCTION__);
21+
}
22+
}
23+
24+
$b = new Bar();
25+
$b->main();
26+
27+
?>
28+
--EXPECTF--
29+
Fatal error: Class Bar contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Bar::doOtherStuff) in %s on line %d

0 commit comments

Comments
 (0)