cvs: ZendEngine2(PHP_5_3) / zend.c zend_builtin_functions.c zend_constants.c zend_errors.h /tests 015.phpt php-src NEWS 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 <cvsbjori1216633260@cvsserver>
bjori		Mon Jul 21 09:41:00 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src	NEWS php.ini-dist php.ini-recommended run-tests.php 
    /php-src/main	main.c 
    /ZendEngine2	zend.c zend_builtin_functions.c zend_constants.c 
                	zend_errors.h 
    /ZendEngine2/tests	015.phpt 
  Log:
  MFH: 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-20080721094100.txt (text/plain, 9.4 KB)
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.206&r2=1.2027.2.547.2.965.2.207&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.206 php-src/NEWS:1.2027.2.547.2.965.2.207
--- php-src/NEWS:1.2027.2.547.2.965.2.206	Sun Jul 20 19:03:17 2008
+++ php-src/NEWS	Mon Jul 21 09:40:59 2008
@@ -33,8 +33,8 @@
   . Added __DIR__ constant. (Lars Strojny)
   . Added PHP_MAJOR_VERSION, PHP_MINOR_VERSION, PHP_RELEASE_VERSION,
     PHP_EXTRA_VERSION, PHP_VERSION_ID, PHP_ZTS and PHP_DEBUG constants. (Pierre)
-  . Added new error mode E_DEPRECATED which is used to inform about stuff to be
-    dropped in future PHP versions. (Lars Strojny, Felipe, Marcus)
+  . Added new error modes E_USER_DEPRECATED and E_DEPRECATED which is used to inform
+    about stuff to be dropped in future PHP versions. (Lars Strojny, Felipe, Marcus)
   . Added "request_order" INI variable to control specifically $_REQUEST behavior.
     (Stas)
   . Added support for exception linking. (Marcus)
http://cvs.php.net/viewvc.cgi/php-src/php.ini-dist?r1=1.231.2.10.2.22.2.6&r2=1.231.2.10.2.22.2.7&diff_format=u
Index: php-src/php.ini-dist
diff -u php-src/php.ini-dist:1.231.2.10.2.22.2.6 php-src/php.ini-dist:1.231.2.10.2.22.2.7
--- php-src/php.ini-dist:1.231.2.10.2.22.2.6	Mon Apr  7 21:24:04 2008
+++ php-src/php.ini-dist	Mon Jul 21 09:40:59 2008
@@ -295,6 +295,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.179.2.11.2.23.2.6&r2=1.179.2.11.2.23.2.7&diff_format=u
Index: php-src/php.ini-recommended
diff -u php-src/php.ini-recommended:1.179.2.11.2.23.2.6 php-src/php.ini-recommended:1.179.2.11.2.23.2.7
--- php-src/php.ini-recommended:1.179.2.11.2.23.2.6	Mon Apr  7 21:24:04 2008
+++ php-src/php.ini-recommended	Mon Jul 21 09:40:59 2008
@@ -344,6 +344,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/run-tests.php?r1=1.226.2.37.2.35.2.30&r2=1.226.2.37.2.35.2.31&diff_format=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.226.2.37.2.35.2.30 php-src/run-tests.php:1.226.2.37.2.35.2.31
--- php-src/run-tests.php:1.226.2.37.2.35.2.30	Wed Jul 16 15:41:58 2008
+++ php-src/run-tests.php	Mon Jul 21 09:40:59 2008
@@ -24,7 +24,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: run-tests.php,v 1.226.2.37.2.35.2.30 2008/07/16 15:41:58 pajoye Exp $ */
+/* $Id: run-tests.php,v 1.226.2.37.2.35.2.31 2008/07/21 09:40:59 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
@@ -177,7 +177,7 @@
 		'safe_mode=0',
 		'disable_functions=',
 		'output_buffering=Off',
-		'error_reporting=16383',
+		'error_reporting=30719',
 		'display_errors=1',
 		'display_startup_errors=1',
 		'log_errors=0',
@@ -449,7 +449,7 @@
 					$html_output = is_resource($html_file);
 					break;
 				case '--version':
-					echo '$Revision: 1.226.2.37.2.35.2.30 $'."\n";
+					echo '$Revision: 1.226.2.37.2.35.2.31 $'."\n";
 					exit(1);
 
 				case 'u':
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.25&r2=1.640.2.23.2.57.2.26&diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.25 php-src/main/main.c:1.640.2.23.2.57.2.26
--- php-src/main/main.c:1.640.2.23.2.57.2.25	Mon Jul 21 08:43:36 2008
+++ php-src/main/main.c	Mon Jul 21 09:40:59 2008
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.25 2008/07/21 08:43:36 dmitry Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.26 2008/07/21 09:40:59 bjori Exp $ */
 
 /* {{{ includes
  */
@@ -844,6 +844,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:
@@ -894,6 +895,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.308.2.12.2.35.2.19&r2=1.308.2.12.2.35.2.20&diff_format=u
Index: ZendEngine2/zend.c
diff -u ZendEngine2/zend.c:1.308.2.12.2.35.2.19 ZendEngine2/zend.c:1.308.2.12.2.35.2.20
--- ZendEngine2/zend.c:1.308.2.12.2.35.2.19	Sun Jun 29 08:21:34 2008
+++ ZendEngine2/zend.c	Mon Jul 21 09:40:59 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend.c,v 1.308.2.12.2.35.2.19 2008/06/29 08:21:34 hirokawa Exp $ */
+/* $Id: zend.c,v 1.308.2.12.2.35.2.20 2008/07/21 09:40:59 bjori Exp $ */
 
 #include "zend.h"
 #include "zend_extensions.h"
@@ -1000,6 +1000,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.277.2.12.2.25.2.23&r2=1.277.2.12.2.25.2.24&diff_format=u
Index: ZendEngine2/zend_builtin_functions.c
diff -u ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.25.2.23 ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.25.2.24
--- ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.25.2.23	Sun Jul  6 01:57:39 2008
+++ ZendEngine2/zend_builtin_functions.c	Mon Jul 21 09:41:00 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.25.2.23 2008/07/06 01:57:39 felipe Exp $ */
+/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.25.2.24 2008/07/21 09:41:00 bjori Exp $ */
 
 #include "zend.h"
 #include "zend_API.h"
@@ -1479,6 +1479,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.71.2.5.2.7.2.9&r2=1.71.2.5.2.7.2.10&diff_format=u
Index: ZendEngine2/zend_constants.c
diff -u ZendEngine2/zend_constants.c:1.71.2.5.2.7.2.9 ZendEngine2/zend_constants.c:1.71.2.5.2.7.2.10
--- ZendEngine2/zend_constants.c:1.71.2.5.2.7.2.9	Sat Feb 23 17:06:19 2008
+++ ZendEngine2/zend_constants.c	Mon Jul 21 09:41:00 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_constants.c,v 1.71.2.5.2.7.2.9 2008/02/23 17:06:19 helly Exp $ */
+/* $Id: zend_constants.c,v 1.71.2.5.2.7.2.10 2008/07/21 09:41:00 bjori Exp $ */
 
 #include "zend.h"
 #include "zend_constants.h"
@@ -109,6 +109,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.18.2.1.2.5.2.2&r2=1.18.2.1.2.5.2.3&diff_format=u
Index: ZendEngine2/zend_errors.h
diff -u ZendEngine2/zend_errors.h:1.18.2.1.2.5.2.2 ZendEngine2/zend_errors.h:1.18.2.1.2.5.2.3
--- ZendEngine2/zend_errors.h:1.18.2.1.2.5.2.2	Sat Feb 23 17:06:19 2008
+++ ZendEngine2/zend_errors.h	Mon Jul 21 09:41:00 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_errors.h,v 1.18.2.1.2.5.2.2 2008/02/23 17:06:19 helly Exp $ */
+/* $Id: zend_errors.h,v 1.18.2.1.2.5.2.3 2008/07/21 09:41:00 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_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_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.1.2.2.2.1&r2=1.1.2.2.2.2&diff_format=u
Index: ZendEngine2/tests/015.phpt
diff -u ZendEngine2/tests/015.phpt:1.1.2.2.2.1 ZendEngine2/tests/015.phpt:1.1.2.2.2.2
--- ZendEngine2/tests/015.phpt:1.1.2.2.2.1	Wed Jun 18 23:38:37 2008
+++ ZendEngine2/tests/015.phpt	Mon Jul 21 09:41:00 2008
@@ -9,6 +9,7 @@
 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";
 ?>
@@ -30,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.