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
Copy file name to clipboardExpand all lines: Zend/tests/bug69084.phpt
+1-1
Original file line number
Diff line number
Diff line change
@@ -26,4 +26,4 @@ $b->main();
26
26
27
27
?>
28
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
29
+
Fatal error: Class Bar contains 1 abstract method and must therefore be declared abstract or implement the remaining method (Bar::doOtherStuff) in %s on line %d
Copy file name to clipboardExpand all lines: Zend/tests/errmsg_018.phpt
+1-1
Original file line number
Diff line number
Diff line change
@@ -10,4 +10,4 @@ class test {
10
10
echo"Done\n";
11
11
?>
12
12
--EXPECTF--
13
-
Fatal error: Class test contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (test::foo) in %s on line %d
13
+
Fatal error: Class test contains 1 abstract method and must therefore be declared abstract or implement the remaining method (test::foo) in %s on line %d
Copy file name to clipboardExpand all lines: Zend/tests/property_hooks/abstract_get_set_readonly.phpt
+1-1
Original file line number
Diff line number
Diff line change
@@ -10,4 +10,4 @@ class C extends P {
10
10
}
11
11
?>
12
12
--EXPECTF--
13
-
Fatal error: Class C contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (P::$prop::set) in %s on line %d
13
+
Fatal error: Class C contains 1 abstract method and must therefore be declared abstract or implement the remaining method (P::$prop::set) in %s on line %d
Copy file name to clipboardExpand all lines: Zend/tests/property_hooks/abstract_hook_in_non_abstract_class.phpt
+1-1
Original file line number
Diff line number
Diff line change
@@ -12,4 +12,4 @@ class Test {
12
12
13
13
?>
14
14
--EXPECTF--
15
-
Fatal error: Class Test contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Test::$prop::get) in %s on line %d
15
+
Fatal error: Class Test contains 1 abstract method and must therefore be declared abstract or implement the remaining method (Test::$prop::get) in %s on line %d
Copy file name to clipboardExpand all lines: Zend/tests/property_hooks/abstract_hook_not_implemented.phpt
+1-1
Original file line number
Diff line number
Diff line change
@@ -14,4 +14,4 @@ class B extends A {}
14
14
15
15
?>
16
16
--EXPECTF--
17
-
Fatal error: Class B contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (A::$prop::get) in %s on line %d
17
+
Fatal error: Class B contains 1 abstract method and must therefore be declared abstract or implement the remaining method (A::$prop::get) in %s on line %d
Copy file name to clipboardExpand all lines: Zend/tests/property_hooks/invalid_abstract_indirect.phpt
+1-1
Original file line number
Diff line number
Diff line change
@@ -13,4 +13,4 @@ class B extends A {
13
13
14
14
?>
15
15
--EXPECTF--
16
-
Fatal error: Class B contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (A::$prop::get) in %s on line %d
16
+
Fatal error: Class B contains 1 abstract method and must therefore be declared abstract or implement the remaining method (A::$prop::get) in %s on line %d
Copy file name to clipboardExpand all lines: Zend/tests/property_hooks/invalid_abstract_indirect_2.phpt
+1-1
Original file line number
Diff line number
Diff line change
@@ -12,4 +12,4 @@ class B extends A {
12
12
13
13
?>
14
14
--EXPECTF--
15
-
Fatal error: Class B contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (A::$prop::get) in %s on line %d
15
+
Fatal error: Class B contains 1 abstract method and must therefore be declared abstract or implement the remaining method (A::$prop::get) in %s on line %d
Copy file name to clipboardExpand all lines: Zend/tests/traits/interface_002.phpt
+1-1
Original file line number
Diff line number
Diff line change
@@ -21,4 +21,4 @@ new bar;
21
21
22
22
?>
23
23
--EXPECTF--
24
-
Fatal error: Class bar contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (baz::abc) in %s on line %d
24
+
Fatal error: Class bar contains 1 abstract method and must therefore be declared abstract or implement the remaining method (baz::abc) in %s on line %d
? "%s %s contains %d abstract method%s and must therefore be declared abstract or implement the remaining methods ("MAX_ABSTRACT_INFO_FMTMAX_ABSTRACT_INFO_FMTMAX_ABSTRACT_INFO_FMT")"
3014
-
: "%s %s must implement %d abstract private method%s ("MAX_ABSTRACT_INFO_FMTMAX_ABSTRACT_INFO_FMTMAX_ABSTRACT_INFO_FMT")",
3015
-
zend_get_object_type_uc(ce),
3016
-
ZSTR_VAL(ce->name), ai.cnt,
3017
-
ai.cnt>1 ? "s" : "",
3018
-
DISPLAY_ABSTRACT_FN(0),
3019
-
DISPLAY_ABSTRACT_FN(1),
3020
-
DISPLAY_ABSTRACT_FN(2)
3012
+
if (!is_explicit_abstract&&can_be_abstract) {
3013
+
zend_error_noreturn(E_ERROR,
3014
+
"%s %s contains %d abstract method%s and must therefore be declared abstract or implement the remaining method%s ("MAX_ABSTRACT_INFO_FMTMAX_ABSTRACT_INFO_FMTMAX_ABSTRACT_INFO_FMT")",
3015
+
zend_get_object_type_uc(ce),
3016
+
ZSTR_VAL(ce->name), ai.cnt,
3017
+
ai.cnt>1 ? "s" : "",
3018
+
ai.cnt>1 ? "s" : "",
3019
+
DISPLAY_ABSTRACT_FN(0),
3020
+
DISPLAY_ABSTRACT_FN(1),
3021
+
DISPLAY_ABSTRACT_FN(2)
3022
+
);
3023
+
} else {
3024
+
zend_error_noreturn(E_ERROR,
3025
+
"%s %s must implement %d abstract private method%s ("MAX_ABSTRACT_INFO_FMTMAX_ABSTRACT_INFO_FMTMAX_ABSTRACT_INFO_FMT")",
3026
+
zend_get_object_type_uc(ce),
3027
+
ZSTR_VAL(ce->name), ai.cnt,
3028
+
ai.cnt>1 ? "s" : "",
3029
+
DISPLAY_ABSTRACT_FN(0),
3030
+
DISPLAY_ABSTRACT_FN(1),
3031
+
DISPLAY_ABSTRACT_FN(2)
3021
3032
);
3033
+
}
3022
3034
} else {
3023
3035
/* now everything should be fine and an added ZEND_ACC_IMPLICIT_ABSTRACT_CLASS should be removed */
Fatal error: Class Fails contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (MyInterface::MyInterfaceFunc) in %sabstract_by_interface_001.php on line %d
33
+
Fatal error: Class Fails contains 1 abstract method and must therefore be declared abstract or implement the remaining method (MyInterface::MyInterfaceFunc) in %sabstract_by_interface_001.php on line %d
Fatal error: Class Fails contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (MyInterface::MyInterfaceFunc) in %sabstract_by_interface_002.php on line %d
33
+
Fatal error: Class Fails contains 1 abstract method and must therefore be declared abstract or implement the remaining method (MyInterface::MyInterfaceFunc) in %sabstract_by_interface_002.php on line %d
Copy file name to clipboardExpand all lines: tests/classes/abstract_derived.phpt
+1-1
Original file line number
Diff line number
Diff line change
@@ -13,4 +13,4 @@ class derived extends base {
13
13
?>
14
14
===DONE===
15
15
--EXPECTF--
16
-
Fatal error: Class derived contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (derived::show) in %sabstract_derived.php on line %d
16
+
Fatal error: Class derived contains 1 abstract method and must therefore be declared abstract or implement the remaining method (derived::show) in %sabstract_derived.php on line %d
Copy file name to clipboardExpand all lines: tests/classes/abstract_not_declared.phpt
+1-1
Original file line number
Diff line number
Diff line change
@@ -10,4 +10,4 @@ class fail {
10
10
echo"Done\n"; // shouldn't be displayed
11
11
?>
12
12
--EXPECTF--
13
-
Fatal error: Class fail contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (fail::show) in %s on line %d
13
+
Fatal error: Class fail contains 1 abstract method and must therefore be declared abstract or implement the remaining method (fail::show) in %s on line %d
Copy file name to clipboardExpand all lines: tests/classes/abstract_redeclare.phpt
+1-1
Original file line number
Diff line number
Diff line change
@@ -16,4 +16,4 @@ class fail extends pass {
16
16
echo"Done\n"; // Shouldn't be displayed
17
17
?>
18
18
--EXPECTF--
19
-
Fatal error: Class fail contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (fail::show) in %sabstract_redeclare.php on line %d
19
+
Fatal error: Class fail contains 1 abstract method and must therefore be declared abstract or implement the remaining method (fail::show) in %sabstract_redeclare.php on line %d
Copy file name to clipboardExpand all lines: tests/classes/abstract_static.phpt
+1-1
Original file line number
Diff line number
Diff line change
@@ -31,4 +31,4 @@ echo "Done\n"; // shouldn't be displayed
31
31
--EXPECTF--
32
32
Call to function show()
33
33
34
-
Fatal error: Class fail contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (fail::func) in %sabstract_static.php(%d) : eval()'d code on line %d
34
+
Fatal error: Class fail contains 1 abstract method and must therefore be declared abstract or implement the remaining method (fail::func) in %sabstract_static.php(%d) : eval()'d code on line %d
Copy file name to clipboardExpand all lines: tests/classes/interface_must_be_implemented.phpt
+1-1
Original file line number
Diff line number
Diff line change
@@ -12,4 +12,4 @@ class derived_a implements if_a {
12
12
13
13
?>
14
14
--EXPECTF--
15
-
Fatal error: Class derived_a contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (if_a::f_a) in %s on line %d
15
+
Fatal error: Class derived_a contains 1 abstract method and must therefore be declared abstract or implement the remaining method (if_a::f_a) in %s on line %d
Fatal error: Class Exception_foo contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (ThrowableInterface::getErrno) in %s on line %d
26
+
Fatal error: Class Exception_foo contains 1 abstract method and must therefore be declared abstract or implement the remaining method (ThrowableInterface::getErrno) in %s on line %d
0 commit comments