You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Abstract methods not allowed in classes that are not abstract (GH-16067)
3
+
--FILE--
4
+
<?php
5
+
6
+
// Still allowed via trait
7
+
trait TraitWithAbstract {
8
+
abstractpublicfunctionfoo();
9
+
}
10
+
class TraitWorks {
11
+
use TraitWithAbstract;
12
+
}
13
+
14
+
class NotAbstract {
15
+
abstractpublicfunctionbar();
16
+
}
17
+
?>
18
+
--EXPECTF--
19
+
Fatal error: Class NotAbstract contains 1 abstract method and must therefore be declared abstract or implement the remaining method (NotAbstract::bar) in %s on line %d
0 commit comments