]> granicus.if.org Git - php/commitdiff
Add UPGRADING/NEWS entries
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 24 May 2019 08:58:33 +0000 (10:58 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 24 May 2019 09:00:13 +0000 (11:00 +0200)
NEWS
UPGRADING

diff --git a/NEWS b/NEWS
index 4ce8b5dca501d0a5a57b7bdc8d56d3e75cd561e7..b9553f15499c9fbb87d16e8b4434f8bd90eb0da5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,8 @@ PHP                                                                        NEWS
     (Nikita)
   . Implemented FR #62397 (disable_functions does not work with eval). (Benjamin
     Eberlei).
+  . Fixed bug #76451 (Aliases during inheritance type checks affected by
+    opcache). (Nikita)
 
 - CLI:
   . The built-in CLI server now reports the request method in log files.
index 91f26e9a076628a73c383308dc2066338e99284e..20a0348badbe1db61c2fc5b12078c4de2f7d4a2c 100644 (file)
--- a/UPGRADING
+++ b/UPGRADING
@@ -27,16 +27,6 @@ PHP 7.4 UPGRADE NOTES
   . "fn" is now a reserved keyword. In particular it can no longer be used as a
     function or class name. It can still be used as a method or class constant
     name.
-  . Nesting ternary operators without explicit parentheses is deprecated:
-
-        // Code like
-        $a ? $b : $c ? $d : $e
-        // should be replaced by (current interpretation)
-        ($a ? $b : $c) ? $d : $e
-        // or (likely intended interpretation)
-        $a ? $b : ($c ? $d : $e)
-
-    RFC: https://wiki.php.net/rfc/ternary_associativity
   . Passing the result of a (non-reference) list() assignment by reference is
     consistently disallowed now. Previously this worked if the right hand side
     was a simple (CV) variable and did not occur as part of the list().
@@ -160,6 +150,22 @@ PHP 7.4 UPGRADE NOTES
 
     RFC: https://wiki.php.net/rfc/arrow_functions_v2
 
+  . Added support for limited return type covariance and argument type
+    contravariance. The following code will now work:
+
+        class A {}
+        class B extends A {}
+
+        class Producer {
+            public function method(): A {}
+        }
+        class ChildProducer extends Producer {
+            public function method(): B {}
+        }
+
+    This feature is currently restricted to non-cyclic type references only.
+    RFC: https://wiki.php.net/rfc/covariant-returns-and-contravariant-parameters
+
   . Added support for coalesce assign (??=) operator. For example:
 
         $array['key'] ??= computeDefault();
@@ -262,10 +268,23 @@ PHP 7.4 UPGRADE NOTES
 ========================================
 
 - Core:
+  . Nesting ternary operators without explicit parentheses is deprecated:
+
+        // Code like
+        $a ? $b : $c ? $d : $e
+        // should be replaced by (current interpretation)
+        ($a ? $b : $c) ? $d : $e
+        // or (likely intended interpretation)
+        $a ? $b : ($c ? $d : $e)
+
+    RFC: https://wiki.php.net/rfc/ternary_associativity
   . Unbinding $this of a non-static method through a combination of
     ReflectionMethod::getClosure() and closure rebinding is deprecated. Doing
     so is equivalent to calling a non-static method statically, which has been
     deprecated since PHP 7.0.
+  . Using "parent" inside a class without parent is deprecated, and will throw
+    a compile-time error in the future. Currently an error will only be
+    generated if/when the parent is accessed at run-time.
 
 - COM:
   . Importing type libraries with case-insensitive constant registering has been