[PHP-CVS] svn: /php/php-src/branches/ PHP_5_3/win32/build/config.w32.h.in PHP_5_4/win32/build/config.w32.h.in
pajoye Sun, 04 Mar 2012 22:15:12 + Revision: http://svn.php.net/viewvc?view=revision&revision=323903 Log: - fix bug #54407, Incorrectly defined NTDDI_VERSION macro Bug: https://bugs.php.net/54407 (Closed) Incorrectly defined NTDDI_VERSION macro Changed paths: U php/php-src/branches/PHP_5_3/win32/build/config.w32.h.in U php/php-src/branches/PHP_5_4/win32/build/config.w32.h.in Modified: php/php-src/branches/PHP_5_3/win32/build/config.w32.h.in === --- php/php-src/branches/PHP_5_3/win32/build/config.w32.h.in2012-03-04 20:37:28 UTC (rev 323902) +++ php/php-src/branches/PHP_5_3/win32/build/config.w32.h.in2012-03-04 22:15:12 UTC (rev 323903) @@ -6,7 +6,7 @@ /* Define the minimum supported version */ #undef _WIN32_WINNT #undef NTDDI_VERSION -#define _WIN32_WINNT 0x502 +#define _WIN32_WINNT 0x0501 #define NTDDI_VERSION 0x05010200 /* Default PHP / PEAR directories */ Modified: php/php-src/branches/PHP_5_4/win32/build/config.w32.h.in === --- php/php-src/branches/PHP_5_4/win32/build/config.w32.h.in2012-03-04 20:37:28 UTC (rev 323902) +++ php/php-src/branches/PHP_5_4/win32/build/config.w32.h.in2012-03-04 22:15:12 UTC (rev 323903) @@ -6,7 +6,7 @@ /* Define the minimum supported version */ #undef _WIN32_WINNT #undef NTDDI_VERSION -#define _WIN32_WINNT 0x502 +#define _WIN32_WINNT 0x0501 #define NTDDI_VERSION 0x05010200 /* Default PHP / PEAR directories */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/Zend/tests/traits/bug61052.phpt branches/PHP_5_4/Zend/zend_compile.c trunk/Zend/tests/traits/bug61052.phpt trunk/Zend/zend_compile.c
gron Sun, 04 Mar 2012 19:34:19 + Revision: http://svn.php.net/viewvc?view=revision&revision=323898 Log: Fixed Bug #61052 (Missing error check in trait 'insteadof' clause) Bug: https://bugs.php.net/61052 (Assigned) missing error check in trait 'insteadof' clause Changed paths: U php/php-src/branches/PHP_5_4/NEWS A php/php-src/branches/PHP_5_4/Zend/tests/traits/bug61052.phpt U php/php-src/branches/PHP_5_4/Zend/zend_compile.c A php/php-src/trunk/Zend/tests/traits/bug61052.phpt U php/php-src/trunk/Zend/zend_compile.c Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2012-03-04 19:30:01 UTC (rev 323897) +++ php/php-src/branches/PHP_5_4/NEWS 2012-03-04 19:34:19 UTC (rev 323898) @@ -23,6 +23,7 @@ vars). (Laruence) . Fixed bug #61011 (Crash when an exception is thrown by __autoload accessing a static property). (Laruence) + . Fixed bug #61052 (Missing error check in trait 'insteadof' clause). (Stefan) . Fixed bug #61072 (Memory leak when restoring an exception handler). (Nikic, Laruence) . Fixed bug #61087 (Memory leak in parse_ini_file when specifying Added: php/php-src/branches/PHP_5_4/Zend/tests/traits/bug61052.phpt === --- php/php-src/branches/PHP_5_4/Zend/tests/traits/bug61052.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/Zend/tests/traits/bug61052.phpt 2012-03-04 19:34:19 UTC (rev 323898) @@ -0,0 +1,18 @@ +--TEST-- +Bug #61052 (missing error check in trait 'insteadof' clause) +--FILE-- +exclude_from_classes[j]) { char* class_name = (char*)cur_precedence->exclude_from_classes[j]; zend_uint name_length = strlen(class_name); cur_precedence->exclude_from_classes[j] = zend_fetch_class(class_name, name_length, ZEND_FETCH_CLASS_TRAIT TSRMLS_CC); + + /* make sure that the trait method is not from a class mentioned in +exclude_from_classes, for consistency */ + if (cur_precedence->trait_method->ce == cur_precedence->exclude_from_classes[i]) { + zend_error(E_COMPILE_ERROR, + "Inconsistent insteadof definition. " + "The method %s is to be used from %s, but %s is also on the exclude list", + cur_method_ref->method_name, + cur_precedence->trait_method->ce->name, + cur_precedence->trait_method->ce->name); + } + efree(class_name); j++; } Added: php/php-src/trunk/Zend/tests/traits/bug61052.phpt === --- php/php-src/trunk/Zend/tests/traits/bug61052.phpt (rev 0) +++ php/php-src/trunk/Zend/tests/traits/bug61052.phpt 2012-03-04 19:34:19 UTC (rev 323898) @@ -0,0 +1,18 @@ +--TEST-- +Bug #61052 (missing error check in trait 'insteadof' clause) +--FILE-- +exclude_from_classes[j]) { char* class_name = (char*)cur_precedence->exclude_from_classes[j]; zend_uint name_length = strlen(class_name); cur_precedence->exclude_from_classes[j] = zend_fetch_class(class_name, name_length, ZEND_FETCH_CLASS_TRAIT TSRMLS_CC); + + /* make sure that the trait method is not from a class mentioned in +exclude_from_classes, for consistency */ + if (cur_precedence->trait_method->ce == cur_precedence->exclude_from_classes[i]) { + zend_error(E_COMPILE_ERROR, + "Inconsistent insteadof definition. " + "The method %s is to be used from %s, but %s is also on the exclude list", + cur_method_ref->method_name, + cur_precedence->trait_method->ce->name, + cur_precedence->trait_method->ce->name); +
Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/tests/streams/bug60106.phpt branches/PHP_5_3/main/streams/xp_socket.c branches/PHP_5_4/NEWS branches/PHP_5_4/ext/st
The operation can continue on-successfully so E_NOTICE seemed appropriate, I don't see a problem with escalating this to E_WARNING. On Sat, Mar 3, 2012 at 9:34 PM, Laruence wrote: > Hi: > is a WARNING better? :) > > thanks > > On Sun, Mar 4, 2012 at 4:36 AM, Ilia Alshanetsky wrote: >> iliaa Sat, 03 Mar 2012 20:36:14 + >> >> Revision: http://svn.php.net/viewvc?view=revision&revision=323852 >> >> Log: >> Fixed bug #60106 (stream_socket_server silently truncates long unix socket >> paths) >> >> Bug: https://bugs.php.net/60106 (Open) stream_socket_server + long unix >> socket path = 'Unknown error' >> >> Changed paths: >> U php/php-src/branches/PHP_5_3/NEWS >> A php/php-src/branches/PHP_5_3/ext/standard/tests/streams/bug60106.phpt >> U php/php-src/branches/PHP_5_3/main/streams/xp_socket.c >> U php/php-src/branches/PHP_5_4/NEWS >> A php/php-src/branches/PHP_5_4/ext/standard/tests/streams/bug60106.phpt >> U php/php-src/branches/PHP_5_4/main/streams/xp_socket.c >> A php/php-src/trunk/ext/standard/tests/streams/bug60106.phpt >> U php/php-src/trunk/main/streams/xp_socket.c >> >> >> -- >> PHP CVS Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- > Laruence Xinchen Hui > http://www.laruence.com/ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/main/streams/xp_socket.c branches/PHP_5_4/main/streams/xp_socket.c trunk/main/streams/xp_socket.c
cataphract Sun, 04 Mar 2012 19:30:01 + Revision: http://svn.php.net/viewvc?view=revision&revision=323897 Log: - size_t may be shorter than long and definitely is not signed. Note that the z modifier was only added in C99, so we can't use it. Changed paths: U php/php-src/branches/PHP_5_3/main/streams/xp_socket.c U php/php-src/branches/PHP_5_4/main/streams/xp_socket.c U php/php-src/trunk/main/streams/xp_socket.c Modified: php/php-src/branches/PHP_5_3/main/streams/xp_socket.c === --- php/php-src/branches/PHP_5_3/main/streams/xp_socket.c 2012-03-04 19:17:49 UTC (rev 323896) +++ php/php-src/branches/PHP_5_3/main/streams/xp_socket.c 2012-03-04 19:30:01 UTC (rev 323897) @@ -514,7 +514,9 @@ * BUT, to get into this branch of code, the name is too long, * so we don't care. */ xparam->inputs.namelen = sizeof(unix_addr->sun_path) - 1; - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "socket path exceeded the maximum allowed length of %ld bytes and was truncated", sizeof(unix_addr->sun_path)); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, + "socket path exceeded the maximum allowed length of %lu bytes " + "and was truncated", (unsigned long)sizeof(unix_addr->sun_path)); } memcpy(unix_addr->sun_path, xparam->inputs.name, xparam->inputs.namelen); Modified: php/php-src/branches/PHP_5_4/main/streams/xp_socket.c === --- php/php-src/branches/PHP_5_4/main/streams/xp_socket.c 2012-03-04 19:17:49 UTC (rev 323896) +++ php/php-src/branches/PHP_5_4/main/streams/xp_socket.c 2012-03-04 19:30:01 UTC (rev 323897) @@ -510,7 +510,9 @@ * BUT, to get into this branch of code, the name is too long, * so we don't care. */ xparam->inputs.namelen = sizeof(unix_addr->sun_path) - 1; - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "socket path exceeded the maximum allowed length of %ld bytes and was truncated", sizeof(unix_addr->sun_path)); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, + "socket path exceeded the maximum allowed length of %lu bytes " + "and was truncated", (unsigned long)sizeof(unix_addr->sun_path)); } memcpy(unix_addr->sun_path, xparam->inputs.name, xparam->inputs.namelen); Modified: php/php-src/trunk/main/streams/xp_socket.c === --- php/php-src/trunk/main/streams/xp_socket.c 2012-03-04 19:17:49 UTC (rev 323896) +++ php/php-src/trunk/main/streams/xp_socket.c 2012-03-04 19:30:01 UTC (rev 323897) @@ -510,7 +510,9 @@ * BUT, to get into this branch of code, the name is too long, * so we don't care. */ xparam->inputs.namelen = sizeof(unix_addr->sun_path) - 1; - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "socket path exceeded the maximum allowed length of %ld bytes and was truncated", sizeof(unix_addr->sun_path)); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, + "socket path exceeded the maximum allowed length of %lu bytes " + "and was truncated", (unsigned long)sizeof(unix_addr->sun_path)); } memcpy(unix_addr->sun_path, xparam->inputs.name, xparam->inputs.namelen); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ext/sockets/ multicast.h
cataphract Sun, 04 Mar 2012 19:17:49 + Revision: http://svn.php.net/viewvc?view=revision&revision=323896 Log: - Allow Windows builds targeting Vista and above have access to the RFC 3678 API for multicasting. Changed paths: U php/php-src/trunk/ext/sockets/multicast.h Modified: php/php-src/trunk/ext/sockets/multicast.h === --- php/php-src/trunk/ext/sockets/multicast.h 2012-03-04 19:08:18 UTC (rev 323895) +++ php/php-src/trunk/ext/sockets/multicast.h 2012-03-04 19:17:49 UTC (rev 323896) @@ -18,8 +18,7 @@ /* $Id$ */ -#if defined(MCAST_JOIN_GROUP) && \ - (!defined(PHP_WIN32) || (_WIN32_WINNT >= 0x600 && SOCKETS_ENABLE_VISTA_API)) +#if defined(MCAST_JOIN_GROUP) #define RFC3678_API 1 /* has block/unblock and source membership, in this case for both IPv4 and IPv6 */ #define HAS_MCAST_EXT 1 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/Zend/tests/traits/bug55524.phpt branches/PHP_5_4/Zend/zend_compile.c trunk/Zend/tests/traits/bug55524.phpt trunk/Zend/zend_compile.c
gron Sun, 04 Mar 2012 18:33:33 + Revision: http://svn.php.net/viewvc?view=revision&revision=323892 Log: Fixed Bug #60911 (Confusing error message when extending traits) Bug: https://bugs.php.net/60911 (Assigned) Confusing error message when extending traits Changed paths: U php/php-src/branches/PHP_5_4/NEWS U php/php-src/branches/PHP_5_4/Zend/tests/traits/bug55524.phpt U php/php-src/branches/PHP_5_4/Zend/zend_compile.c U php/php-src/trunk/Zend/tests/traits/bug55524.phpt U php/php-src/trunk/Zend/zend_compile.c Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2012-03-04 18:26:11 UTC (rev 323891) +++ php/php-src/branches/PHP_5_4/NEWS 2012-03-04 18:33:33 UTC (rev 323892) @@ -17,6 +17,7 @@ . Fixed bug #60717 (Order of traits in use statement can cause a fatal error). (Stefan) . Fixed bug #60801 (strpbrk() mishandles NUL byte). (Adam) + . Fixed bug #60911 (Confusing error message when extending traits). (Stefan) . Fixed bug #60978 (exit code incorrect). (Laruence) . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical vars). (Laruence) Modified: php/php-src/branches/PHP_5_4/Zend/tests/traits/bug55524.phpt === --- php/php-src/branches/PHP_5_4/Zend/tests/traits/bug55524.phpt 2012-03-04 18:26:11 UTC (rev 323891) +++ php/php-src/branches/PHP_5_4/Zend/tests/traits/bug55524.phpt 2012-03-04 18:33:33 UTC (rev 323892) @@ -12,4 +12,4 @@ echo 'DONE'; ?> --EXPECTF-- -Fatal error: A trait (Foo) cannot extend a class in %s on line %d +Fatal error: A trait (Foo) cannot extend a class. Traits can only be composed from other traits with the 'use' keyword. Error in %s on line %d Modified: php/php-src/branches/PHP_5_4/Zend/zend_compile.c === --- php/php-src/branches/PHP_5_4/Zend/zend_compile.c2012-03-04 18:26:11 UTC (rev 323891) +++ php/php-src/branches/PHP_5_4/Zend/zend_compile.c2012-03-04 18:33:33 UTC (rev 323892) @@ -4995,7 +4995,7 @@ if (doing_inheritance) { /* Make sure a trait does not try to extend a class */ if ((new_class_entry->ce_flags & ZEND_ACC_TRAIT) == ZEND_ACC_TRAIT) { - zend_error(E_COMPILE_ERROR, "A trait (%s) cannot extend a class", new_class_entry->name); + zend_error(E_COMPILE_ERROR, "A trait (%s) cannot extend a class. Traits can only be composed from other traits with the 'use' keyword. Error", new_class_entry->name); } opline->extended_value = parent_class_name->u.op.var; Modified: php/php-src/trunk/Zend/tests/traits/bug55524.phpt === --- php/php-src/trunk/Zend/tests/traits/bug55524.phpt 2012-03-04 18:26:11 UTC (rev 323891) +++ php/php-src/trunk/Zend/tests/traits/bug55524.phpt 2012-03-04 18:33:33 UTC (rev 323892) @@ -12,4 +12,4 @@ echo 'DONE'; ?> --EXPECTF-- -Fatal error: A trait (Foo) cannot extend a class in %s on line %d +Fatal error: A trait (Foo) cannot extend a class. Traits can only be composed from other traits with the 'use' keyword. Error in %s on line %d Modified: php/php-src/trunk/Zend/zend_compile.c === --- php/php-src/trunk/Zend/zend_compile.c 2012-03-04 18:26:11 UTC (rev 323891) +++ php/php-src/trunk/Zend/zend_compile.c 2012-03-04 18:33:33 UTC (rev 323892) @@ -4995,7 +4995,7 @@ if (doing_inheritance) { /* Make sure a trait does not try to extend a class */ if ((new_class_entry->ce_flags & ZEND_ACC_TRAIT) == ZEND_ACC_TRAIT) { - zend_error(E_COMPILE_ERROR, "A trait (%s) cannot extend a class", new_class_entry->name); + zend_error(E_COMPILE_ERROR, "A trait (%s) cannot extend a class. Traits can only be composed from other traits with the 'use' keyword. Error", new_class_entry->name); } opline->extended_value = parent_class_name->u.op.var; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/Zend/tests/traits/bug60717.phpt branches/PHP_5_4/Zend/tests/traits/bugs/abstract-methods06.phpt branches/PHP_5_4/Zend/zend_compile.c
gron Sun, 04 Mar 2012 18:26:11 + Revision: http://svn.php.net/viewvc?view=revision&revision=323891 Log: Fixed Bug #60717 (Order of traits in use statement can cause a fatal error) # Compatibility is now correctly checked in both directions. # Introduced helper method for the test. Bug: https://bugs.php.net/60717 (Assigned) Order of traits in use statement can cause a fatal error Changed paths: U php/php-src/branches/PHP_5_4/NEWS A php/php-src/branches/PHP_5_4/Zend/tests/traits/bug60717.phpt U php/php-src/branches/PHP_5_4/Zend/tests/traits/bugs/abstract-methods06.phpt U php/php-src/branches/PHP_5_4/Zend/zend_compile.c A php/php-src/trunk/Zend/tests/traits/bug60717.phpt U php/php-src/trunk/Zend/tests/traits/bugs/abstract-methods06.phpt U php/php-src/trunk/Zend/zend_compile.c Modified: php/php-src/branches/PHP_5_4/NEWS === --- php/php-src/branches/PHP_5_4/NEWS 2012-03-04 17:21:16 UTC (rev 323890) +++ php/php-src/branches/PHP_5_4/NEWS 2012-03-04 18:26:11 UTC (rev 323891) @@ -14,6 +14,8 @@ - Core: . Fixed bug #60573 (type hinting with "self" keyword causes weird errors). (Laruence) + . Fixed bug #60717 (Order of traits in use statement can cause a fatal +error). (Stefan) . Fixed bug #60801 (strpbrk() mishandles NUL byte). (Adam) . Fixed bug #60978 (exit code incorrect). (Laruence) . Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical Added: php/php-src/branches/PHP_5_4/Zend/tests/traits/bug60717.phpt === --- php/php-src/branches/PHP_5_4/Zend/tests/traits/bug60717.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/Zend/tests/traits/bug60717.phpt 2012-03-04 18:26:11 UTC (rev 323891) @@ -0,0 +1,73 @@ +--TEST-- +Bug #60717 (Order of traits in use statement can cause unexpected unresolved abstract method) +--FILE-- + --EXPECTF-- -Fatal error: Declaration of THelloB::hello() must be compatible with THelloA::hello($a) in %s on line %d \ No newline at end of file +Fatal error: Declaration of THelloA::hello($a) must be compatible with THelloB::hello() in %s on line %d \ No newline at end of file Modified: php/php-src/branches/PHP_5_4/Zend/zend_compile.c === --- php/php-src/branches/PHP_5_4/Zend/zend_compile.c 2012-03-04 17:21:16 UTC (rev 323890) +++ php/php-src/branches/PHP_5_4/Zend/zend_compile.c 2012-03-04 18:26:11 UTC (rev 323891) @@ -3623,6 +3623,18 @@ } /* }}} */ +static zend_bool zend_traits_method_compatibility_check(zend_function *fn, zend_function *other_fn TSRMLS_DC) /* {{{ */ +{ + zend_uintfn_flags = fn->common.scope->ce_flags; + zend_uint other_flags = other_fn->common.scope->ce_flags; + + return zend_do_perform_implementation_check(fn, other_fn TSRMLS_CC) + && zend_do_perform_implementation_check(other_fn, fn TSRMLS_CC) + && ((fn_flags & ZEND_ACC_FINAL) == (other_flags & ZEND_ACC_FINAL)) /* equal final qualifier */ + && ((fn_flags & ZEND_ACC_STATIC)== (other_flags & ZEND_ACC_STATIC)); /* equal static qualifier */ +} +/* }}} */ + static int zend_traits_merge_functions(zend_function *fn TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */ { size_t current; @@ -3645,22 +3657,16 @@ if (i == current) { continue; /* just skip this, cause its the table this function is applied on */ } - + if (zend_hash_quick_find(function_tables[i], hash_key->arKey, hash_key->nKeyLength, hash_key->h, (void **)&other_trait_fn) == SUCCESS) { /* if it is an abstract method, there is no collision */ if (other_trait_fn->common.fn_flags & ZEND_ACC_ABSTRACT) { /* Make sure they are compatible */ -if (fn->common.fn_flags & ZEND_ACC_ABSTRACT) { - /* In case both are abstract, just check prototype, but need to do that in both directions */ - if ( !zend_do_perform_implementation_check(fn, other_trait_fn TSRMLS_CC) - || !zend_do_perform_implementation_check(other_trait_fn, fn TSRMLS_CC)) { - zend_error(E_COMPILE_ERROR, "Declaration of %s must be compatible with %s", //ZEND_FN_SCOPE_NAME(fn), fn->common.function_name, //::%s() - zend_get_function_declaration(fn TSRMLS_CC), - zend_get_function_declaration(other_trait_fn TSRMLS_CC)); - } -} else { - /* otherwise, do the full check */ - do_inheritance_check_on_method(fn, other_trait_fn TSRMLS_CC); +/* In case both are abstract, just check prototype, but need to do that in both directions */ +if (!zend_traits_method_compatibility_check(fn, other_trait_fn TSRMLS_CC)) { + zend_error(E_COMPILE_ERROR, "Declaration of %s must be compatible with %s", +zend_get_function_declaration(fn TSRMLS_CC), +zend_get_function_declaration(other_trait_fn TSRMLS_CC)); } /* we can savely free and remove
[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING
pajoye Sun, 04 Mar 2012 17:02:55 + Revision: http://svn.php.net/viewvc?view=revision&revision=323886 Log: - notes about xp&2003 drop Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/UPGRADING Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2012-03-04 17:00:40 UTC (rev 323885) +++ php/php-src/trunk/NEWS 2012-03-04 17:02:55 UTC (rev 323886) @@ -3,6 +3,7 @@ ?? ??? 201?, PHP 5.5.0 - General improvements: + . Drop Windows XP and 2003 support. (Pierre) . World domination - cURL: Modified: php/php-src/trunk/UPGRADING === --- php/php-src/trunk/UPGRADING 2012-03-04 17:00:40 UTC (rev 323885) +++ php/php-src/trunk/UPGRADING 2012-03-04 17:02:55 UTC (rev 323886) @@ -137,7 +137,7 @@ 13. Windows support === -- +- Drop Windows XP and 2003 support. (Pierre) === 14. New in PHP X.Y: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ NEWS UPGRADING
nikicSun, 04 Mar 2012 16:32:01 + Revision: http://svn.php.net/viewvc?view=revision&revision=323881 Log: NEWS and UPGRADING for r323862 Changed paths: U php/php-src/trunk/NEWS U php/php-src/trunk/UPGRADING Modified: php/php-src/trunk/NEWS === --- php/php-src/trunk/NEWS 2012-03-04 16:20:55 UTC (rev 323880) +++ php/php-src/trunk/NEWS 2012-03-04 16:32:01 UTC (rev 323881) @@ -28,6 +28,10 @@ still exists for backward compatibility but is doing nothing). (Pierrick) . Fixed bug #54995 (Missing CURLINFO_RESPONSE_CODE support). (Pierrick) +- PCRE: + . Deprecated the /e modifier +(https://wiki.php.net/rfc/remove_preg_replace_eval_modifier). (Nikita Popov) + - pgsql . Added pg_escape_literal() and pg_escape_identifier() (Yasuo) Modified: php/php-src/trunk/UPGRADING === --- php/php-src/trunk/UPGRADING 2012-03-04 16:20:55 UTC (rev 323880) +++ php/php-src/trunk/UPGRADING 2012-03-04 16:32:01 UTC (rev 323881) @@ -72,7 +72,8 @@ 7. Deprecated = -- +- The preg_replace /e modifier is now deprecated. + You should use preg_replace_callback instead. == 8. Removed -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/trunk/ main/network.c win32/build/config.w32.h.in win32/inet.c win32/inet.h win32/sendmail.c
On Mar 4, 2012, at 7:08 AM, Pierre Joye wrote: > pajoye Sun, 04 Mar 2012 15:08:12 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=323865 > > Log: > - bump minimum version, no more XP/2003 Can you add this to UPGRADING and NEWS? Chris > > Changed paths: >U php/php-src/trunk/main/network.c >U php/php-src/trunk/win32/build/config.w32.h.in >U php/php-src/trunk/win32/inet.c >U php/php-src/trunk/win32/inet.h >U php/php-src/trunk/win32/sendmail.c > > Modified: php/php-src/trunk/main/network.c > === > --- php/php-src/trunk/main/network.c2012-03-04 14:57:07 UTC (rev 323864) > +++ php/php-src/trunk/main/network.c2012-03-04 15:08:12 UTC (rev 323865) > @@ -25,7 +25,10 @@ > > #include > > + > + > #ifdef PHP_WIN32 > +# include > # include "win32/inet.h" > # define O_RDONLY _O_RDONLY > # include "win32/param.h" > > Modified: php/php-src/trunk/win32/build/config.w32.h.in > === > --- php/php-src/trunk/win32/build/config.w32.h.in2012-03-04 14:57:07 UTC > (rev 323864) > +++ php/php-src/trunk/win32/build/config.w32.h.in2012-03-04 15:08:12 UTC > (rev 323865) > @@ -6,8 +6,8 @@ > /* Define the minimum supported version */ > #undef _WIN32_WINNT > #undef NTDDI_VERSION > -#define _WIN32_WINNT 0x502 > -#define NTDDI_VERSION _WIN32_WIN2K > +#define _WIN32_WINNT 0x0600 > +#define NTDDI_VERSION 0x06000100 > > /* Default PHP / PEAR directories */ > #define PHP_CONFIG_FILE_PATH (getenv("SystemRoot"))?getenv("SystemRoot"):"" > > Modified: php/php-src/trunk/win32/inet.c > === > --- php/php-src/trunk/win32/inet.c2012-03-04 14:57:07 UTC (rev 323864) > +++ php/php-src/trunk/win32/inet.c2012-03-04 15:08:12 UTC (rev 323865) > @@ -1,12 +1,13 @@ > #include "config.w32.h" > -#if (_WIN32_WINNT < 0x0600) /* Vista/2k8 have these functions */ > #include "php.h" > #include > #include > #include > > #include "inet.h" > +#if (_WIN32_WINNT < 0x0600) /* Vista/2k8 have these functions */ > > + > PHPAPI int inet_pton(int af, const char* src, void* dst) > { >int address_length; > @@ -76,6 +77,8 @@ >return NULL; > } > > +#endif > + > int inet_aton(const char *cp, struct in_addr *inp) { > inp->s_addr = inet_addr(cp); > > @@ -85,4 +88,3 @@ > > return 1; > } > -#endif > > Modified: php/php-src/trunk/win32/inet.h > === > --- php/php-src/trunk/win32/inet.h2012-03-04 14:57:07 UTC (rev 323864) > +++ php/php-src/trunk/win32/inet.h2012-03-04 15:08:12 UTC (rev 323865) > @@ -6,5 +6,6 @@ > #if (_WIN32_WINNT <= 0x502) > PHPAPI int inet_pton(int af, const char* src, void* dst); > PHPAPI const char* inet_ntop(int af, const void* src, char* dst, size_t size); > +#endif > + > PHPAPI int inet_aton(const char *cp, struct in_addr *inp); > -#endif > > Modified: php/php-src/trunk/win32/sendmail.c > === > --- php/php-src/trunk/win32/sendmail.c2012-03-04 14:57:07 UTC (rev 323864) > +++ php/php-src/trunk/win32/sendmail.c2012-03-04 15:08:12 UTC (rev 323865) > @@ -25,6 +25,7 @@ > #ifndef NETWARE > #include > #include "time.h" > +# include > #else/* NETWARE */ > #include > #endif/* NETWARE */ > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] svn: /php/php-src/trunk/ ext/pcre/php_pcre.c ext/pcre/tests/002.phpt ext/pcre/tests/004.phpt tests/lang/bug24403.phpt
On Mar 4, 2012, at 5:39 AM, Nikita Popov wrote: > nikicSun, 04 Mar 2012 13:39:12 + > > Revision: http://svn.php.net/viewvc?view=revision&revision=323862 > > Log: > Deprecate /e modifier > This needs to be in UPGRADING and NEWS. Chris > See https://wiki.php.net/rfc/remove_preg_replace_eval_modifier. > > Changed paths: >U php/php-src/trunk/ext/pcre/php_pcre.c >U php/php-src/trunk/ext/pcre/tests/002.phpt >U php/php-src/trunk/ext/pcre/tests/004.phpt >U php/php-src/trunk/tests/lang/bug24403.phpt > > Modified: php/php-src/trunk/ext/pcre/php_pcre.c > === > --- php/php-src/trunk/ext/pcre/php_pcre.c2012-03-04 13:31:04 UTC (rev > 323861) > +++ php/php-src/trunk/ext/pcre/php_pcre.c2012-03-04 13:39:12 UTC (rev > 323862) > @@ -1019,6 +1019,10 @@ >replace_end = replace + replace_len; >} > > +if (eval) { > +php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "The /e modifier is > deprecated, use preg_replace_callback instead"); > +} > + >/* Calculate the size of the offsets array, and allocate memory for it. */ >rc = pcre_fullinfo(pce->re, extra, PCRE_INFO_CAPTURECOUNT, &num_subpats); >if (rc < 0) { > > Modified: php/php-src/trunk/ext/pcre/tests/002.phpt > === > --- php/php-src/trunk/ext/pcre/tests/002.phpt2012-03-04 13:31:04 UTC (rev > 323861) > +++ php/php-src/trunk/ext/pcre/tests/002.phpt2012-03-04 13:39:12 UTC (rev > 323862) > @@ -34,6 +34,8 @@ > Warning: preg_replace(): Compilation failed: missing terminating ] for > character class at offset 8 in %s002.php on line 11 > NULL > > +Deprecated: preg_replace(): The /e modifier is deprecated, use > preg_replace_callback instead in %s on line 12 > + > Parse error: %s in %s002.php(12) : regexp code on line 1 > > Fatal error: preg_replace(): Failed evaluating code: > > Modified: php/php-src/trunk/ext/pcre/tests/004.phpt > === > --- php/php-src/trunk/ext/pcre/tests/004.phpt2012-03-04 13:31:04 UTC (rev > 323861) > +++ php/php-src/trunk/ext/pcre/tests/004.phpt2012-03-04 13:39:12 UTC (rev > 323862) > @@ -16,7 +16,7 @@ > > var_dump(preg_split('/PHP_(?:NAMED_)?(?:FUNCTION|METHOD)\s*\((\w+(?:,\s*\w+)?)\)/S', > "PHP_FUNCTION(s, preg_match)\n{\nlalala", -1, PREG_SPLIT_DELIM_CAPTURE | > PREG_SPLIT_OFFSET_CAPTURE)); > ?> > ---EXPECT-- > +--EXPECTF-- > int(2) > array(2) { > [0]=> > @@ -117,6 +117,8 @@ > } > } > } > + > +Deprecated: preg_replace(): The /e modifier is deprecated, use > preg_replace_callback instead in %s on line %d > string(9) "hello > > > > Modified: php/php-src/trunk/tests/lang/bug24403.phpt > === > --- php/php-src/trunk/tests/lang/bug24403.phpt2012-03-04 13:31:04 UTC > (rev 323861) > +++ php/php-src/trunk/tests/lang/bug24403.phpt2012-03-04 13:39:12 UTC > (rev 323862) > @@ -17,4 +17,5 @@ > } > new a(); > ?> > ---EXPECT-- > +--EXPECTF-- > +Deprecated: preg_replace(): The /e modifier is deprecated, use > preg_replace_callback instead in %s on line %d > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/ PHP_5_3/win32/build/config.w32.h.in PHP_5_4/win32/build/config.w32.h.in
pajoye Sun, 04 Mar 2012 15:23:24 + Revision: http://svn.php.net/viewvc?view=revision&revision=323866 Log: - fix bug #54407, Incorrectly defined NTDDI_VERSION macro Bug: https://bugs.php.net/54407 (Assigned) Incorrectly defined NTDDI_VERSION macro Changed paths: U php/php-src/branches/PHP_5_3/win32/build/config.w32.h.in U php/php-src/branches/PHP_5_4/win32/build/config.w32.h.in Modified: php/php-src/branches/PHP_5_3/win32/build/config.w32.h.in === --- php/php-src/branches/PHP_5_3/win32/build/config.w32.h.in2012-03-04 15:08:12 UTC (rev 323865) +++ php/php-src/branches/PHP_5_3/win32/build/config.w32.h.in2012-03-04 15:23:24 UTC (rev 323866) @@ -6,8 +6,8 @@ /* Define the minimum supported version */ #undef _WIN32_WINNT #undef NTDDI_VERSION -#define _WIN32_WINNT 0x500 -#define NTDDI_VERSION _WIN32_WIN2K +#define _WIN32_WINNT 0x502 +#define NTDDI_VERSION 0x05010200 /* Default PHP / PEAR directories */ #define PHP_CONFIG_FILE_PATH (getenv("SystemRoot"))?getenv("SystemRoot"):"" Modified: php/php-src/branches/PHP_5_4/win32/build/config.w32.h.in === --- php/php-src/branches/PHP_5_4/win32/build/config.w32.h.in2012-03-04 15:08:12 UTC (rev 323865) +++ php/php-src/branches/PHP_5_4/win32/build/config.w32.h.in2012-03-04 15:23:24 UTC (rev 323866) @@ -7,7 +7,7 @@ #undef _WIN32_WINNT #undef NTDDI_VERSION #define _WIN32_WINNT 0x502 -#define NTDDI_VERSION _WIN32_WIN2K +#define NTDDI_VERSION 0x05010200 /* Default PHP / PEAR directories */ #define PHP_CONFIG_FILE_PATH (getenv("SystemRoot"))?getenv("SystemRoot"):"" -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ main/network.c win32/build/config.w32.h.in win32/inet.c win32/inet.h win32/sendmail.c
pajoye Sun, 04 Mar 2012 15:08:12 + Revision: http://svn.php.net/viewvc?view=revision&revision=323865 Log: - bump minimum version, no more XP/2003 Changed paths: U php/php-src/trunk/main/network.c U php/php-src/trunk/win32/build/config.w32.h.in U php/php-src/trunk/win32/inet.c U php/php-src/trunk/win32/inet.h U php/php-src/trunk/win32/sendmail.c Modified: php/php-src/trunk/main/network.c === --- php/php-src/trunk/main/network.c2012-03-04 14:57:07 UTC (rev 323864) +++ php/php-src/trunk/main/network.c2012-03-04 15:08:12 UTC (rev 323865) @@ -25,7 +25,10 @@ #include + + #ifdef PHP_WIN32 +# include # include "win32/inet.h" # define O_RDONLY _O_RDONLY # include "win32/param.h" Modified: php/php-src/trunk/win32/build/config.w32.h.in === --- php/php-src/trunk/win32/build/config.w32.h.in 2012-03-04 14:57:07 UTC (rev 323864) +++ php/php-src/trunk/win32/build/config.w32.h.in 2012-03-04 15:08:12 UTC (rev 323865) @@ -6,8 +6,8 @@ /* Define the minimum supported version */ #undef _WIN32_WINNT #undef NTDDI_VERSION -#define _WIN32_WINNT 0x502 -#define NTDDI_VERSION _WIN32_WIN2K +#define _WIN32_WINNT 0x0600 +#define NTDDI_VERSION 0x06000100 /* Default PHP / PEAR directories */ #define PHP_CONFIG_FILE_PATH (getenv("SystemRoot"))?getenv("SystemRoot"):"" Modified: php/php-src/trunk/win32/inet.c === --- php/php-src/trunk/win32/inet.c 2012-03-04 14:57:07 UTC (rev 323864) +++ php/php-src/trunk/win32/inet.c 2012-03-04 15:08:12 UTC (rev 323865) @@ -1,12 +1,13 @@ #include "config.w32.h" -#if (_WIN32_WINNT < 0x0600) /* Vista/2k8 have these functions */ #include "php.h" #include #include #include #include "inet.h" +#if (_WIN32_WINNT < 0x0600) /* Vista/2k8 have these functions */ + PHPAPI int inet_pton(int af, const char* src, void* dst) { int address_length; @@ -76,6 +77,8 @@ return NULL; } +#endif + int inet_aton(const char *cp, struct in_addr *inp) { inp->s_addr = inet_addr(cp); @@ -85,4 +88,3 @@ return 1; } -#endif Modified: php/php-src/trunk/win32/inet.h === --- php/php-src/trunk/win32/inet.h 2012-03-04 14:57:07 UTC (rev 323864) +++ php/php-src/trunk/win32/inet.h 2012-03-04 15:08:12 UTC (rev 323865) @@ -6,5 +6,6 @@ #if (_WIN32_WINNT <= 0x502) PHPAPI int inet_pton(int af, const char* src, void* dst); PHPAPI const char* inet_ntop(int af, const void* src, char* dst, size_t size); +#endif + PHPAPI int inet_aton(const char *cp, struct in_addr *inp); -#endif Modified: php/php-src/trunk/win32/sendmail.c === --- php/php-src/trunk/win32/sendmail.c 2012-03-04 14:57:07 UTC (rev 323864) +++ php/php-src/trunk/win32/sendmail.c 2012-03-04 15:08:12 UTC (rev 323865) @@ -25,6 +25,7 @@ #ifndef NETWARE #include #include "time.h" +# include #else /* NETWARE */ #include #endif /* NETWARE */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/spl/spl_engine.c branches/PHP_5_4/ext/spl/spl_engine.c trunk/ext/spl/spl_engine.c
nikicSun, 04 Mar 2012 13:52:48 + Revision: http://svn.php.net/viewvc?view=revision&revision=323863 Log: Fix bug #60596: Code Cleanup Removing Superfluous If Statement Cleanup only, no function change. Patch by ircmaxell. Bug: https://bugs.php.net/60596 (Open) Code Cleanup Removing Superfluous If Statement Changed paths: U php/php-src/branches/PHP_5_3/ext/spl/spl_engine.c U php/php-src/branches/PHP_5_4/ext/spl/spl_engine.c U php/php-src/trunk/ext/spl/spl_engine.c Modified: php/php-src/branches/PHP_5_3/ext/spl/spl_engine.c === --- php/php-src/branches/PHP_5_3/ext/spl/spl_engine.c 2012-03-04 13:39:12 UTC (rev 323862) +++ php/php-src/branches/PHP_5_3/ext/spl/spl_engine.c 2012-03-04 13:52:48 UTC (rev 323863) @@ -45,19 +45,16 @@ PHPAPI long spl_offset_convert_to_long(zval *offset TSRMLS_DC) /* {{{ */ { - switch(Z_TYPE_P(offset)) { + switch (Z_TYPE_P(offset)) { case IS_STRING: ZEND_HANDLE_NUMERIC(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, idx); break; case IS_DOUBLE: + return (long)Z_DVAL_P(offset); case IS_RESOURCE: case IS_BOOL: case IS_LONG: - if (Z_TYPE_P(offset) == IS_DOUBLE) { - return (long)Z_DVAL_P(offset); - } else { - return Z_LVAL_P(offset); - } + return Z_LVAL_P(offset); } return -1; } Modified: php/php-src/branches/PHP_5_4/ext/spl/spl_engine.c === --- php/php-src/branches/PHP_5_4/ext/spl/spl_engine.c 2012-03-04 13:39:12 UTC (rev 323862) +++ php/php-src/branches/PHP_5_4/ext/spl/spl_engine.c 2012-03-04 13:52:48 UTC (rev 323863) @@ -45,19 +45,16 @@ PHPAPI long spl_offset_convert_to_long(zval *offset TSRMLS_DC) /* {{{ */ { - switch(Z_TYPE_P(offset)) { + switch (Z_TYPE_P(offset)) { case IS_STRING: ZEND_HANDLE_NUMERIC(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, idx); break; case IS_DOUBLE: + return (long)Z_DVAL_P(offset); case IS_RESOURCE: case IS_BOOL: case IS_LONG: - if (Z_TYPE_P(offset) == IS_DOUBLE) { - return (long)Z_DVAL_P(offset); - } else { - return Z_LVAL_P(offset); - } + return Z_LVAL_P(offset); } return -1; } Modified: php/php-src/trunk/ext/spl/spl_engine.c === --- php/php-src/trunk/ext/spl/spl_engine.c 2012-03-04 13:39:12 UTC (rev 323862) +++ php/php-src/trunk/ext/spl/spl_engine.c 2012-03-04 13:52:48 UTC (rev 323863) @@ -45,19 +45,16 @@ PHPAPI long spl_offset_convert_to_long(zval *offset TSRMLS_DC) /* {{{ */ { - switch(Z_TYPE_P(offset)) { + switch (Z_TYPE_P(offset)) { case IS_STRING: ZEND_HANDLE_NUMERIC(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, idx); break; case IS_DOUBLE: + return (long)Z_DVAL_P(offset); case IS_RESOURCE: case IS_BOOL: case IS_LONG: - if (Z_TYPE_P(offset) == IS_DOUBLE) { - return (long)Z_DVAL_P(offset); - } else { - return Z_LVAL_P(offset); - } + return Z_LVAL_P(offset); } return -1; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/trunk/ ext/pcre/php_pcre.c ext/pcre/tests/002.phpt ext/pcre/tests/004.phpt tests/lang/bug24403.phpt
nikicSun, 04 Mar 2012 13:39:12 + Revision: http://svn.php.net/viewvc?view=revision&revision=323862 Log: Deprecate /e modifier See https://wiki.php.net/rfc/remove_preg_replace_eval_modifier. Changed paths: U php/php-src/trunk/ext/pcre/php_pcre.c U php/php-src/trunk/ext/pcre/tests/002.phpt U php/php-src/trunk/ext/pcre/tests/004.phpt U php/php-src/trunk/tests/lang/bug24403.phpt Modified: php/php-src/trunk/ext/pcre/php_pcre.c === --- php/php-src/trunk/ext/pcre/php_pcre.c 2012-03-04 13:31:04 UTC (rev 323861) +++ php/php-src/trunk/ext/pcre/php_pcre.c 2012-03-04 13:39:12 UTC (rev 323862) @@ -1019,6 +1019,10 @@ replace_end = replace + replace_len; } + if (eval) { + php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "The /e modifier is deprecated, use preg_replace_callback instead"); + } + /* Calculate the size of the offsets array, and allocate memory for it. */ rc = pcre_fullinfo(pce->re, extra, PCRE_INFO_CAPTURECOUNT, &num_subpats); if (rc < 0) { Modified: php/php-src/trunk/ext/pcre/tests/002.phpt === --- php/php-src/trunk/ext/pcre/tests/002.phpt 2012-03-04 13:31:04 UTC (rev 323861) +++ php/php-src/trunk/ext/pcre/tests/002.phpt 2012-03-04 13:39:12 UTC (rev 323862) @@ -34,6 +34,8 @@ Warning: preg_replace(): Compilation failed: missing terminating ] for character class at offset 8 in %s002.php on line 11 NULL +Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in %s on line 12 + Parse error: %s in %s002.php(12) : regexp code on line 1 Fatal error: preg_replace(): Failed evaluating code: Modified: php/php-src/trunk/ext/pcre/tests/004.phpt === --- php/php-src/trunk/ext/pcre/tests/004.phpt 2012-03-04 13:31:04 UTC (rev 323861) +++ php/php-src/trunk/ext/pcre/tests/004.phpt 2012-03-04 13:39:12 UTC (rev 323862) @@ -16,7 +16,7 @@ var_dump(preg_split('/PHP_(?:NAMED_)?(?:FUNCTION|METHOD)\s*\((\w+(?:,\s*\w+)?)\)/S', "PHP_FUNCTION(s, preg_match)\n{\nlalala", -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE)); ?> ---EXPECT-- +--EXPECTF-- int(2) array(2) { [0]=> @@ -117,6 +117,8 @@ } } } + +Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in %s on line %d string(9) "hello Modified: php/php-src/trunk/tests/lang/bug24403.phpt === --- php/php-src/trunk/tests/lang/bug24403.phpt 2012-03-04 13:31:04 UTC (rev 323861) +++ php/php-src/trunk/tests/lang/bug24403.phpt 2012-03-04 13:39:12 UTC (rev 323862) @@ -17,4 +17,5 @@ } new a(); ?> ---EXPECT-- +--EXPECTF-- +Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in %s on line %d -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php