summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2015-03-15 09:47:25 +0100
committerNikita Popov <nikic@php.net>2015-04-01 11:17:55 +0200
commit8d00385871c6dca1f18a5e7924c655a2cb381564 (patch)
treeaeaa0503ba613bc77332dde492b71f6f105d0ef2 /tests
parent4796e0242b8cdd2a77b552fcbaa74d70d87f6d0a (diff)
downloadphp-git-8d00385871c6dca1f18a5e7924c655a2cb381564.tar.gz
Reclassify E_STRICT notices
Per RFC https://wiki.php.net/rfc/reclassify_e_strict While reviewing this, found that there are still three E_STRICTs left in libraries - need to discuss those.
Diffstat (limited to 'tests')
-rw-r--r--tests/classes/abstract_static.phpt2
-rw-r--r--tests/classes/clone_006.phpt9
-rw-r--r--tests/classes/inheritance_003.phpt2
-rw-r--r--tests/classes/inheritance_004.phpt2
-rw-r--r--tests/classes/method_override_optional_arg_001.phpt2
-rw-r--r--tests/classes/method_override_optional_arg_002.phpt2
-rw-r--r--tests/classes/static_properties_003.phpt10
-rw-r--r--tests/classes/type_hinting_005a.phpt2
-rw-r--r--tests/classes/type_hinting_005b.phpt2
-rw-r--r--tests/classes/type_hinting_005c.phpt2
-rw-r--r--tests/classes/type_hinting_005d.phpt2
-rw-r--r--tests/lang/bug20175.phpt2
-rw-r--r--tests/lang/bug21600.phpt4
-rw-r--r--tests/lang/bug23384.phpt4
-rw-r--r--tests/lang/passByReference_004.phpt2
-rw-r--r--tests/lang/passByReference_005.phpt12
-rw-r--r--tests/lang/passByReference_006.phpt2
-rw-r--r--tests/lang/passByReference_007.phpt6
-rw-r--r--tests/lang/passByReference_010.phpt6
-rw-r--r--tests/lang/passByReference_012.phpt4
-rw-r--r--tests/lang/returnByReference.002.phpt2
-rw-r--r--tests/lang/returnByReference.003.phpt2
-rw-r--r--tests/lang/returnByReference.004.phpt2
-rw-r--r--tests/lang/returnByReference.005.phpt2
24 files changed, 45 insertions, 42 deletions
diff --git a/tests/classes/abstract_static.phpt b/tests/classes/abstract_static.phpt
index bcebec599f..9b9205af3e 100644
--- a/tests/classes/abstract_static.phpt
+++ b/tests/classes/abstract_static.phpt
@@ -31,6 +31,4 @@ echo "Done\n"; // shouldn't be displayed
--EXPECTF--
Call to function show()
-Strict Standards: Static function fail::func() should not be abstract in %sabstract_static.php(%d) : eval()'d code on line %d
-
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
diff --git a/tests/classes/clone_006.phpt b/tests/classes/clone_006.phpt
index 15f0a5ec52..713670aba8 100644
--- a/tests/classes/clone_006.phpt
+++ b/tests/classes/clone_006.phpt
@@ -34,8 +34,15 @@ echo $clone->name . "\n";
echo $clone->address . "\n";
?>
---EXPECT--
+--EXPECTF--
+Notice: Accessing static property MyCloneable::$id as non static in %s on line %d
+
+Notice: Accessing static property MyCloneable::$id as non static in %s on line %d
0
+
+Notice: Accessing static property MyCloneable::$id as non static in %s on line %d
+
+Notice: Accessing static property MyCloneable::$id as non static in %s on line %d
1
Hello
New York
diff --git a/tests/classes/inheritance_003.phpt b/tests/classes/inheritance_003.phpt
index 1f4eafa537..919e03126f 100644
--- a/tests/classes/inheritance_003.phpt
+++ b/tests/classes/inheritance_003.phpt
@@ -17,5 +17,5 @@ class B extends A
===DONE===
--EXPECTF--
-Strict Standards: Declaration of B::f() should be compatible with A::f($x) in %sinheritance_003.php on line %d
+Warning: Declaration of B::f() should be compatible with A::f($x) in %sinheritance_003.php on line %d
===DONE===
diff --git a/tests/classes/inheritance_004.phpt b/tests/classes/inheritance_004.phpt
index d1f5faf5da..d783f7437a 100644
--- a/tests/classes/inheritance_004.phpt
+++ b/tests/classes/inheritance_004.phpt
@@ -17,5 +17,5 @@ class B extends A
===DONE===
--EXPECTF--
-Strict Standards: Declaration of B::f() should be compatible with A::f() in %sinheritance_004.php on line %d
+Warning: Declaration of B::f() should be compatible with A::f() in %sinheritance_004.php on line %d
===DONE===
diff --git a/tests/classes/method_override_optional_arg_001.phpt b/tests/classes/method_override_optional_arg_001.phpt
index 333c29d128..bea95756c6 100644
--- a/tests/classes/method_override_optional_arg_001.phpt
+++ b/tests/classes/method_override_optional_arg_001.phpt
@@ -28,6 +28,6 @@ $b->foo(1);
?>
--EXPECTF--
-Strict Standards: Declaration of C::foo() should be compatible with A::foo($arg1 = 1) in %s on line %d
+Warning: Declaration of C::foo() should be compatible with A::foo($arg1 = 1) in %s on line %d
int(1)
int(3)
diff --git a/tests/classes/method_override_optional_arg_002.phpt b/tests/classes/method_override_optional_arg_002.phpt
index 669a8ca836..c62e3a562e 100644
--- a/tests/classes/method_override_optional_arg_002.phpt
+++ b/tests/classes/method_override_optional_arg_002.phpt
@@ -18,5 +18,5 @@ $b->foo();
?>
--EXPECTF--
-Strict Standards: Declaration of B::foo() should be compatible with A::foo($arg = 1) in %s on line %d
+Warning: Declaration of B::foo() should be compatible with A::foo($arg = 1) in %s on line %d
foo
diff --git a/tests/classes/static_properties_003.phpt b/tests/classes/static_properties_003.phpt
index 3303d7c1fd..61c9857b58 100644
--- a/tests/classes/static_properties_003.phpt
+++ b/tests/classes/static_properties_003.phpt
@@ -30,17 +30,17 @@ var_dump(isset($c->y));
--> Access visible static prop like instance prop:
bool(false)
-Strict Standards: Accessing static property C::$x as non static in %s on line 11
+Notice: Accessing static property C::$x as non static in %s on line 11
-Strict Standards: Accessing static property C::$x as non static in %s on line 12
+Notice: Accessing static property C::$x as non static in %s on line 12
Notice: Undefined property: C::$x in %s on line 12
-Strict Standards: Accessing static property C::$x as non static in %s on line 13
+Notice: Accessing static property C::$x as non static in %s on line 13
-Strict Standards: Accessing static property C::$x as non static in %s on line 15
+Notice: Accessing static property C::$x as non static in %s on line 15
-Strict Standards: Accessing static property C::$x as non static in %s on line 16
+Notice: Accessing static property C::$x as non static in %s on line 16
%unicode|string%(3) "ref"
%unicode|string%(5) "C::$x"
diff --git a/tests/classes/type_hinting_005a.phpt b/tests/classes/type_hinting_005a.phpt
index 5e4c43b8af..5fe1097a5d 100644
--- a/tests/classes/type_hinting_005a.phpt
+++ b/tests/classes/type_hinting_005a.phpt
@@ -12,7 +12,7 @@ Class D2 extends C { function f(SomeClass $a) {} }
?>
==DONE==
--EXPECTF--
-Strict Standards: Declaration of D2::f() should be compatible with C::f(array $a) in %s on line 8
+Warning: Declaration of D2::f() should be compatible with C::f(array $a) in %s on line 8
Compatible hint.
Class hint, should be array.
==DONE==
diff --git a/tests/classes/type_hinting_005b.phpt b/tests/classes/type_hinting_005b.phpt
index f13ab957bb..8a7b4466f7 100644
--- a/tests/classes/type_hinting_005b.phpt
+++ b/tests/classes/type_hinting_005b.phpt
@@ -9,6 +9,6 @@ Class D extends C { function f($a) {} }
?>
==DONE==
--EXPECTF--
-Strict Standards: Declaration of D::f() should be compatible with C::f(array $a) in %s on line 5
+Warning: Declaration of D::f() should be compatible with C::f(array $a) in %s on line 5
No hint, should be array.
==DONE==
diff --git a/tests/classes/type_hinting_005c.phpt b/tests/classes/type_hinting_005c.phpt
index 30a114e2a4..3378dcb398 100644
--- a/tests/classes/type_hinting_005c.phpt
+++ b/tests/classes/type_hinting_005c.phpt
@@ -9,6 +9,6 @@ Class D extends C { function f(array $a) {} }
?>
==DONE==
--EXPECTF--
-Strict Standards: Declaration of D::f() should be compatible with C::f(SomeClass $a) in %s on line 5
+Warning: Declaration of D::f() should be compatible with C::f(SomeClass $a) in %s on line 5
Array hint, should be class.
==DONE==
diff --git a/tests/classes/type_hinting_005d.phpt b/tests/classes/type_hinting_005d.phpt
index 830054d03d..ab86c68eea 100644
--- a/tests/classes/type_hinting_005d.phpt
+++ b/tests/classes/type_hinting_005d.phpt
@@ -9,6 +9,6 @@ Class D extends C { function f(array $a) {} }
?>
==DONE==
--EXPECTF--
-Strict Standards: Declaration of D::f() should be compatible with C::f($a) in %s on line 5
+Warning: Declaration of D::f() should be compatible with C::f($a) in %s on line 5
Array hint, should be nothing.
==DONE==
diff --git a/tests/lang/bug20175.phpt b/tests/lang/bug20175.phpt
index a3fdd297e1..a42e35c41e 100644
--- a/tests/lang/bug20175.phpt
+++ b/tests/lang/bug20175.phpt
@@ -146,7 +146,7 @@ foo:1
bar_static()
bar_global()
-Strict Standards: Only variables should be assigned by reference in %sbug20175.php on line 47
+Notice: Only variables should be assigned by reference in %sbug20175.php on line 47
bar:1
bar_static()
bar:1
diff --git a/tests/lang/bug21600.phpt b/tests/lang/bug21600.phpt
index 6ecf69a11f..a94fa260f4 100644
--- a/tests/lang/bug21600.phpt
+++ b/tests/lang/bug21600.phpt
@@ -26,13 +26,13 @@ function fubar($text){
}
?>
--EXPECTF--
-Strict Standards: Only variables should be assigned by reference in %sbug21600.php on line 4
+Notice: Only variables should be assigned by reference in %sbug21600.php on line 4
array(1) {
["foo"]=>
string(4) "test"
}
-Strict Standards: Only variables should be assigned by reference in %sbug21600.php on line 11
+Notice: Only variables should be assigned by reference in %sbug21600.php on line 11
array(1) {
["foo"]=>
string(4) "test"
diff --git a/tests/lang/bug23384.phpt b/tests/lang/bug23384.phpt
index 382bdfe90f..2c41217b90 100644
--- a/tests/lang/bug23384.phpt
+++ b/tests/lang/bug23384.phpt
@@ -1,7 +1,5 @@
--TEST--
Bug #23384 (use of class constants in statics)
---INI--
-error_reporting=4095
--FILE--
<?php
define('TEN', 10);
@@ -21,7 +19,7 @@ Foo::test();
echo Foo::HUN."\n";
?>
--EXPECTF--
-Strict Standards: Non-static method Foo::test() should not be called statically in %sbug23384.php on line %d
+Deprecated: Non-static method Foo::test() should not be called statically in %sbug23384.php on line %d
Array
(
[100] => ten
diff --git a/tests/lang/passByReference_004.phpt b/tests/lang/passByReference_004.phpt
index e8a7963d26..a890411b71 100644
--- a/tests/lang/passByReference_004.phpt
+++ b/tests/lang/passByReference_004.phpt
@@ -17,5 +17,5 @@ foo(bar(5));
?>
--EXPECTF--
-Strict Standards: Only variables should be passed by reference in %s on line 13
+Notice: Only variables should be passed by reference in %s on line 13
int(5)
diff --git a/tests/lang/passByReference_005.phpt b/tests/lang/passByReference_005.phpt
index b90f0ce912..d637467681 100644
--- a/tests/lang/passByReference_005.phpt
+++ b/tests/lang/passByReference_005.phpt
@@ -179,17 +179,17 @@ string(12) "Ref2 changed"
---- Pass by ref / pass by val: static method calls ----
-Strict Standards: Non-static method C::v() should not be called statically in %s on line 95
+Deprecated: Non-static method C::v() should not be called statically in %s on line 95
Notice: Undefined variable: u1 in %s on line 95
-Strict Standards: Non-static method C::r() should not be called statically in %s on line 96
+Deprecated: Non-static method C::r() should not be called statically in %s on line 96
Notice: Undefined variable: u1 in %s on line 97
NULL
string(11) "Ref changed"
-Strict Standards: Non-static method C::vv() should not be called statically in %s on line 100
+Deprecated: Non-static method C::vv() should not be called statically in %s on line 100
Notice: Undefined variable: u1 in %s on line 100
@@ -201,7 +201,7 @@ Notice: Undefined variable: u2 in %s on line 101
NULL
NULL
-Strict Standards: Non-static method C::vr() should not be called statically in %s on line 104
+Deprecated: Non-static method C::vr() should not be called statically in %s on line 104
Notice: Undefined variable: u1 in %s on line 104
@@ -209,7 +209,7 @@ Notice: Undefined variable: u1 in %s on line 105
NULL
string(11) "Ref changed"
-Strict Standards: Non-static method C::rv() should not be called statically in %s on line 108
+Deprecated: Non-static method C::rv() should not be called statically in %s on line 108
Notice: Undefined variable: u2 in %s on line 108
@@ -217,7 +217,7 @@ Notice: Undefined variable: u2 in %s on line 109
string(11) "Ref changed"
NULL
-Strict Standards: Non-static method C::rr() should not be called statically in %s on line 112
+Deprecated: Non-static method C::rr() should not be called statically in %s on line 112
string(12) "Ref1 changed"
string(12) "Ref2 changed"
diff --git a/tests/lang/passByReference_006.phpt b/tests/lang/passByReference_006.phpt
index c452f27b3d..d3857cac40 100644
--- a/tests/lang/passByReference_006.phpt
+++ b/tests/lang/passByReference_006.phpt
@@ -91,7 +91,7 @@ object(stdClass)#%d (1) {
---- Pass uninitialised arrays & objects by ref: static method call ---
-Strict Standards: Non-static method C::refs() should not be called statically in %s on line 39
+Deprecated: Non-static method C::refs() should not be called statically in %s on line 39
array(1) {
[0]=>
string(12) "Ref1 changed"
diff --git a/tests/lang/passByReference_007.phpt b/tests/lang/passByReference_007.phpt
index a743245e2c..300ce56d7c 100644
--- a/tests/lang/passByReference_007.phpt
+++ b/tests/lang/passByReference_007.phpt
@@ -79,7 +79,7 @@ var_dump($a);
--EXPECTF--
Pass a function call that returns a value:
-Strict Standards: Only variables should be passed by reference in %s on line 44
+Notice: Only variables should be passed by reference in %s on line 44
string(8) "original"
string(8) "original"
Pass a function call that returns a reference:
@@ -88,7 +88,7 @@ string(7) "changed"
Pass a static method call that returns a value:
-Strict Standards: Only variables should be passed by reference in %s on line 55
+Notice: Only variables should be passed by reference in %s on line 55
string(8) "original"
string(8) "original"
Pass a static method call that returns a reference:
@@ -97,7 +97,7 @@ string(7) "changed"
Pass a method call that returns a value:
-Strict Standards: Only variables should be passed by reference in %s on line 67
+Notice: Only variables should be passed by reference in %s on line 67
string(8) "original"
string(8) "original"
Pass a method call that returns a reference:
diff --git a/tests/lang/passByReference_010.phpt b/tests/lang/passByReference_010.phpt
index 0393cce2d1..c2e4ba1eaf 100644
--- a/tests/lang/passByReference_010.phpt
+++ b/tests/lang/passByReference_010.phpt
@@ -37,14 +37,14 @@ var_dump($a);
---> Pass constant assignment by reference:
-Strict Standards: Only variables should be passed by reference in %s on line 9
+Notice: Only variables should be passed by reference in %s on line 9
string(10) "a.original"
string(10) "a.original"
---> Pass variable assignment by reference:
-Strict Standards: Only variables should be passed by reference in %s on line 15
+Notice: Only variables should be passed by reference in %s on line 15
string(10) "a.original"
string(10) "a.original"
@@ -56,6 +56,6 @@ string(9) "a.changed"
---> Pass concat assignment by reference:
-Strict Standards: Only variables should be passed by reference in %s on line 28
+Notice: Only variables should be passed by reference in %s on line 28
string(20) "b.originala.original"
string(10) "a.original"
diff --git a/tests/lang/passByReference_012.phpt b/tests/lang/passByReference_012.phpt
index c6ce705ab7..3ed17539b6 100644
--- a/tests/lang/passByReference_012.phpt
+++ b/tests/lang/passByReference_012.phpt
@@ -17,9 +17,9 @@ var_dump(array_shift(array_shift($stack)));
?>
===DONE===
--EXPECTF--
-Strict Standards: Only variables should be passed by reference in %s on line %d
+Notice: Only variables should be passed by reference in %s on line %d
string(3) "two"
-Strict Standards: Only variables should be passed by reference in %s on line %d
+Notice: Only variables should be passed by reference in %s on line %d
string(3) "one"
===DONE===
diff --git a/tests/lang/returnByReference.002.phpt b/tests/lang/returnByReference.002.phpt
index 3494eb588a..1c635b5298 100644
--- a/tests/lang/returnByReference.002.phpt
+++ b/tests/lang/returnByReference.002.phpt
@@ -24,6 +24,6 @@ var_dump($a); //expecting "changed"
?>
--EXPECTF--
-Strict Standards: Only variables should be assigned by reference in %s on line 13
+Notice: Only variables should be assigned by reference in %s on line 13
string(8) "original"
string(7) "changed"
diff --git a/tests/lang/returnByReference.003.phpt b/tests/lang/returnByReference.003.phpt
index 04a6338515..3f03037bf5 100644
--- a/tests/lang/returnByReference.003.phpt
+++ b/tests/lang/returnByReference.003.phpt
@@ -40,7 +40,7 @@ var_dump($a, $b);
---> 1. Trying to assign by reference the return value of a function that returns by value:
-Strict Standards: Only variables should be assigned by reference in %s on line 17
+Notice: Only variables should be assigned by reference in %s on line 17
int(5)
int(100)
diff --git a/tests/lang/returnByReference.004.phpt b/tests/lang/returnByReference.004.phpt
index f185c1275b..f7d1165a22 100644
--- a/tests/lang/returnByReference.004.phpt
+++ b/tests/lang/returnByReference.004.phpt
@@ -42,7 +42,7 @@ var_dump($a, $b);
---> 1. Trying to assign by reference the return value of a function that returns by value:
-Strict Standards: Only variables should be assigned by reference in %s on line 19
+Notice: Only variables should be assigned by reference in %s on line 19
int(5)
int(100)
diff --git a/tests/lang/returnByReference.005.phpt b/tests/lang/returnByReference.005.phpt
index a7b6da2f16..840b89fa53 100644
--- a/tests/lang/returnByReference.005.phpt
+++ b/tests/lang/returnByReference.005.phpt
@@ -43,7 +43,7 @@ var_dump($a, $b);
---> 1. Trying to assign by reference the return value of a function that returns by value:
-Strict Standards: Only variables should be assigned by reference in %s on line 20
+Notice: Only variables should be assigned by reference in %s on line 20
int(5)
int(100)