From: Nikita Popov Date: Tue, 3 Mar 2020 11:10:18 +0000 (+0100) Subject: Add test for bug #69084 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aa9a3ff891a84e19739ac394d32561ff4179d1e5;p=php Add test for bug #69084 This is another bug fixed by the precending commit. --- diff --git a/NEWS b/NEWS index 5b47d27c89..055afa4896 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,8 @@ PHP NEWS renamed). (Nikita) . Fixed bug #70839 (Converting optional argument to variadic forbidden by LSP checks). (Nikita) + . Fixed bug #69084 (Unclear error message when not implementing a renamed + abstract trait function). (Nikita) - CURL: . Bumped required libcurl version to 7.29.0. (cmb) diff --git a/Zend/tests/bug69084.phpt b/Zend/tests/bug69084.phpt new file mode 100644 index 0000000000..2cefcc5432 --- /dev/null +++ b/Zend/tests/bug69084.phpt @@ -0,0 +1,29 @@ +--TEST-- +Bug #69084: Unclear error message when not implementing a renamed abstract trait function +--FILE-- +doStuff(); + } +} + +class Bar { + use Foo { + Foo::doStuff as doOtherStuff; + } + + public function doStuff() { + var_dump(__FUNCTION__); + } +} + +$b = new Bar(); +$b->main(); + +?> +--EXPECTF-- +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