From: Dmitry Stogov Date: Fri, 20 Mar 2015 07:51:41 +0000 (+0300) Subject: Merge branch 'scalar_type_hints_v5' of github.com:ircmaxell/php-src into scalar_type_... X-Git-Tag: PRE_PHP7_NSAPI_REMOVAL~573^2~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aee2985f3557698302206eeb291e2942c9194a05;p=php Merge branch 'scalar_type_hints_v5' of github.com:ircmaxell/php-src into scalar_type_hints_v5 * 'scalar_type_hints_v5' of github.com:ircmaxell/php-src: (54 commits) Add check for maintaining reference all the way through both type and return values Reduce the number of times that the zval needs to be separated in return type checking to those that are necessary Add test to ensure namespaced code can't use scalar types as class names Disallow relative namespace type declarations Add support and tests for null constant default values. Refactor complex conditionals into an extracted function for clarity and code-reuse Refactor as to not use call info, but add the flag to the op_array. Fix severity issues with callbacks, start work porting ZEND_STRLEN opcode to work with strict mode, more refactoring to come Fix C89 compatibility by moving a misplaced if statement Refactor gotos into more elaborate ifs to eliminate goto failure Fix return type separation with references. It now includes a check in the opcode handler and properly separates the value in both cases Add error case with invalid type declaration default value Add tests for using constants as defaults with scalar type declarations Refactor error messages to only append defined in the event of rendering as a fatal error. Fix relative typehints to not work Revert gd and mysqli to former calls for arg count errors. Fix first identified issues with zend_compile.c from nikic. Add tests for generator returns prior to first yield Style cleanup, as well as fixing bug with missing argument for WRONG_PARAM_COUNT_WITH_RETVAL Clean up API renames for zend_wrong_param_count to maintain BC, introducing a zend_wrong_param_count_ex() function when you know strict value Fix executor issue with ignoring strict types, which cleans up a bunch of errors. Additionally fix the expected error of 2 unrelated tests that was caused by a change to the core error messages Fix more tests, improve error messages in failure output for thrown exception Refactor error implementation significantly to centralize error mode behavior. Add zend_internal_type_error() function Refactor declare placement detection, allow encoding declares before type declares ... --- aee2985f3557698302206eeb291e2942c9194a05