com php-src: More UPGRADING: UPGRADING

From: Date: Wed, 01 Apr 2015 09:50:46 +0000
Subject: com php-src: More UPGRADING: UPGRADING
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-86011@lists.php.net to get a copy of this message
Commit: ac470ddf1cf45ce0a9f6c2bec6c61a913d979351 Author: Nikita Popov <nikic@php.net> Wed, 1 Apr 2015 11:50:46 +0200 Parents: 085774997b591c2babbb623fe7102ce2c77bc9fb Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ac470ddf1cf45ce0a9f6c2bec6c61a913d979351 Log: More UPGRADING Changed paths: M UPGRADING Diff: diff --git a/UPGRADING b/UPGRADING index ed59ea3...b13bd70 100644 --- a/UPGRADING +++ b/UPGRADING @@ -340,15 +340,41 @@ Changes to error handling ParseException in addition to the previous return value / error_get_last() based handling. +* Constructors of internal classes will now always throw an exception on + failure. Previously some constructors returned NULL or an unusable object. + * The error level of some E_STRICT notices has been changed. Relevant RFCs: * https://wiki.php.net/rfc/engine_exceptions_for_php7 +* https://wiki.php.net/rfc/internal_constructor_behaviour * https://wiki.php.net/rfc/reclassify_e_strict Other language changes ---------------------- +* Removed support for static calls to non-static calls form an incompatible + $this context. In this case $this will not be defined, but the call will be + allowed with a deprecation notice. An example: + + class A { + public function test() { var_dump($this); } + } + + // Note: Does NOT extend A + class B { + public function callNonStaticMethodOfA() { A::test(); } + } + + (new B)->callNonStaticMethodOfA(); + + // Deprecated: Non-static method A::test() should not be called statically + // Notice: Undefined variable $this + NULL + + Note that this only applies to calls from an incompatible context. If class B + extended from A the call would be allowed without any notices. + * The yield language construct no longer requires parentheses when used in an expression context. It is now a right-associative operator with precedence between the "print" and "=>" operators. This can result in different behavior

« previous php.cvs (#86011) next »