cvs: ZendEngine2 / zend.c zend_builtin_functions.c zend_constants.c zend_errors.h /tests 015.phpt php-src php.ini-dist php.ini-recommended run-tests.php php-src/main main.c

"Hannes Magnusson" <[email protected]>
Newsgroups gmane.comp.php.cvs.zend
Message-ID <cvsbjori1216632981@cvsserver>
bjori		Mon Jul 21 09:36:21 2008 UTC

  Modified files:              
    /php-src	run-tests.php php.ini-dist php.ini-recommended 
    /php-src/main	main.c 
    /ZendEngine2	zend.c zend_builtin_functions.c zend_constants.c 
                	zend_errors.h 
    /ZendEngine2/tests	015.phpt 
  Log:
  Add E_USER_DEPRECATED (patch by Lars Strojny)

-- 
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
bjori-20080721093621.txt (text/plain, 8.2 KB)
http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.361&r2=1.362&diff_format=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.361 php-src/run-tests.php:1.362
--- php-src/run-tests.php:1.361	Tue Jul  8 18:18:49 2008
+++ php-src/run-tests.php	Mon Jul 21 09:36:21 2008
@@ -24,7 +24,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: run-tests.php,v 1.361 2008/07/08 18:18:49 nlopess Exp $ */
+/* $Id: run-tests.php,v 1.362 2008/07/21 09:36:21 bjori Exp $ */
 
 /* Sanity check to ensure that pcre extension needed by this script is available.
  * In the event it is not, print a nice error message indicating that this script will
@@ -166,7 +166,7 @@
 		'open_basedir=',
 		'disable_functions=',
 		'output_buffering=Off',
-		'error_reporting=16383',
+		'error_reporting=30719',
 		'display_errors=1',
 		'display_startup_errors=1',
 		'log_errors=0',
@@ -447,7 +447,7 @@
 					$html_output = is_resource($html_file);
 					break;
 				case '--version':
-					echo '$Revision: 1.361 $' . "\n";
+					echo '$Revision: 1.362 $' . "\n";
 					exit(1);
 				default:
 					echo "Illegal switch '$switch' specified!\n";
http://cvs.php.net/viewvc.cgi/php-src/php.ini-dist?r1=1.274&r2=1.275&diff_format=u
Index: php-src/php.ini-dist
diff -u php-src/php.ini-dist:1.274 php-src/php.ini-dist:1.275
--- php-src/php.ini-dist:1.274	Mon Apr  7 21:23:28 2008
+++ php-src/php.ini-dist	Mon Jul 21 09:36:21 2008
@@ -245,6 +245,7 @@
 ; E_USER_NOTICE     - user-generated notice message
 ; E_DEPRECATED      - warn about code that will not work in future versions
 ;                     of PHP
+; E_USER_DEPRECATED - user-generated deprecation warnings
 ;
 ; Examples:
 ;
http://cvs.php.net/viewvc.cgi/php-src/php.ini-recommended?r1=1.224&r2=1.225&diff_format=u
Index: php-src/php.ini-recommended
diff -u php-src/php.ini-recommended:1.224 php-src/php.ini-recommended:1.225
--- php-src/php.ini-recommended:1.224	Mon Apr  7 21:23:28 2008
+++ php-src/php.ini-recommended	Mon Jul 21 09:36:21 2008
@@ -282,6 +282,7 @@
 ; E_USER_NOTICE     - user-generated notice message
 ; E_DEPRECATED      - warn about code that will not work in future versions
 ;                     of PHP
+; E_USER_DEPRECATED - user-generated deprecation warnings
 ;
 ; Examples:
 ;
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.772&r2=1.773&diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.772 php-src/main/main.c:1.773
--- php-src/main/main.c:1.772	Mon Jul 21 08:42:35 2008
+++ php-src/main/main.c	Mon Jul 21 09:36:21 2008
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: main.c,v 1.772 2008/07/21 08:42:35 dmitry Exp $ */
+/* $Id: main.c,v 1.773 2008/07/21 09:36:21 bjori Exp $ */
 
 /* {{{ includes
  */
@@ -944,6 +944,7 @@
 				break;
 			case E_STRICT:
 			case E_DEPRECATED:
+			case E_USER_DEPRECATED:
 				/* for the sake of BC to old damaged code */
 				break;
 			case E_NOTICE:
@@ -994,6 +995,7 @@
 				error_type_str = "Strict Standards";
 				break;
 			case E_DEPRECATED:
+			case E_USER_DEPRECATED:
 				error_type_str = "Deprecated";
 				break;
 			default:
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend.c?r1=1.418&r2=1.419&diff_format=u
Index: ZendEngine2/zend.c
diff -u ZendEngine2/zend.c:1.418 ZendEngine2/zend.c:1.419
--- ZendEngine2/zend.c:1.418	Sun Jul 13 21:30:18 2008
+++ ZendEngine2/zend.c	Mon Jul 21 09:36:21 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend.c,v 1.418 2008/07/13 21:30:18 helly Exp $ */
+/* $Id: zend.c,v 1.419 2008/07/21 09:36:21 bjori Exp $ */
 
 #include "zend.h"
 #include "zend_extensions.h"
@@ -1521,6 +1521,7 @@
 		case E_USER_ERROR:
 		case E_USER_WARNING:
 		case E_USER_NOTICE:
+		case E_USER_DEPRECATED:
 		case E_RECOVERABLE_ERROR:
 			if (zend_is_compiling(TSRMLS_C)) {
 				error_filename = zend_get_compiled_filename(TSRMLS_C);
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_builtin_functions.c?r1=1.377&r2=1.378&diff_format=u
Index: ZendEngine2/zend_builtin_functions.c
diff -u ZendEngine2/zend_builtin_functions.c:1.377 ZendEngine2/zend_builtin_functions.c:1.378
--- ZendEngine2/zend_builtin_functions.c:1.377	Sun Jul  6 05:03:46 2008
+++ ZendEngine2/zend_builtin_functions.c	Mon Jul 21 09:36:21 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_builtin_functions.c,v 1.377 2008/07/06 05:03:46 felipe Exp $ */
+/* $Id: zend_builtin_functions.c,v 1.378 2008/07/21 09:36:21 bjori Exp $ */
 
 #include "zend.h"
 #include "zend_API.h"
@@ -1480,6 +1480,7 @@
 		case E_USER_ERROR:
 		case E_USER_WARNING:
 		case E_USER_NOTICE:
+		case E_USER_DEPRECATED:
 			break;
 		default:
 			zend_error(E_WARNING, "Invalid error type specified");
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_constants.c?r1=1.110&r2=1.111&diff_format=u
Index: ZendEngine2/zend_constants.c
diff -u ZendEngine2/zend_constants.c:1.110 ZendEngine2/zend_constants.c:1.111
--- ZendEngine2/zend_constants.c:1.110	Tue May 20 15:29:01 2008
+++ ZendEngine2/zend_constants.c	Mon Jul 21 09:36:21 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_constants.c,v 1.110 2008/05/20 15:29:01 tony2001 Exp $ */
+/* $Id: zend_constants.c,v 1.111 2008/07/21 09:36:21 bjori Exp $ */
 
 #include "zend.h"
 #include "zend_constants.h"
@@ -112,6 +112,7 @@
 	REGISTER_MAIN_LONG_CONSTANT("E_USER_ERROR", E_USER_ERROR, CONST_PERSISTENT | CONST_CS);
 	REGISTER_MAIN_LONG_CONSTANT("E_USER_WARNING", E_USER_WARNING, CONST_PERSISTENT | CONST_CS);
 	REGISTER_MAIN_LONG_CONSTANT("E_USER_NOTICE", E_USER_NOTICE, CONST_PERSISTENT | CONST_CS);
+	REGISTER_MAIN_LONG_CONSTANT("E_USER_DEPRECATED", E_USER_DEPRECATED, CONST_PERSISTENT | CONST_CS);
 
 	REGISTER_MAIN_LONG_CONSTANT("E_ALL", E_ALL, CONST_PERSISTENT | CONST_CS);
 
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_errors.h?r1=1.25&r2=1.26&diff_format=u
Index: ZendEngine2/zend_errors.h
diff -u ZendEngine2/zend_errors.h:1.25 ZendEngine2/zend_errors.h:1.26
--- ZendEngine2/zend_errors.h:1.25	Sat Feb 23 17:03:51 2008
+++ ZendEngine2/zend_errors.h	Mon Jul 21 09:36:21 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_errors.h,v 1.25 2008/02/23 17:03:51 helly Exp $ */
+/* $Id: zend_errors.h,v 1.26 2008/07/21 09:36:21 bjori Exp $ */
 
 #ifndef ZEND_ERRORS_H
 #define ZEND_ERRORS_H
@@ -36,8 +36,9 @@
 #define E_STRICT			(1<<11L)
 #define E_RECOVERABLE_ERROR		(1<<12L)
 #define E_DEPRECATED		(1<<13L)
+#define E_USER_DEPRECATED	(1<<14L)
 
-#define E_ALL (E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE | E_STRICT | E_RECOVERABLE_ERROR | E_DEPRECATED)
+#define E_ALL (E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE | E_STRICT | E_RECOVERABLE_ERROR | E_DEPRECATED | E_USER_DEPRECATED)
 #define E_CORE (E_CORE_ERROR | E_CORE_WARNING)
 
 #endif /* ZEND_ERRORS_H */
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/015.phpt?r1=1.2&r2=1.3&diff_format=u
Index: ZendEngine2/tests/015.phpt
diff -u ZendEngine2/tests/015.phpt:1.2 ZendEngine2/tests/015.phpt:1.3
--- ZendEngine2/tests/015.phpt:1.2	Mon May 26 14:33:42 2008
+++ ZendEngine2/tests/015.phpt	Mon Jul 21 09:36:21 2008
@@ -9,20 +9,19 @@
 var_dump(trigger_error("error", -1));
 var_dump(trigger_error("error", 0));
 var_dump(trigger_error("error", E_USER_WARNING));
+var_dump(trigger_error("error", E_USER_DEPRECATED));
 
 echo "Done\n";
 ?>
---EXPECTF--
-Warning: Wrong parameter count for trigger_error() in %s on line %d
+--EXPECTF--	
+Warning: trigger_error() expects at least 1 parameter, 0 given in %s on line %d
 NULL
 
 Notice: error in %s on line %d
 bool(true)
 
-Notice: Array to string conversion in %s on line %d
-
-Notice: Array in %s on line %d
-bool(true)
+Warning: trigger_error() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d
+NULL
 
 Warning: Invalid error type specified in %s on line %d
 bool(false)
@@ -32,4 +31,7 @@
 
 Warning: error in %s on line %d
 bool(true)
+
+Deprecated: error in %s on line %d
+bool(true)
 Done
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.