[PHP-CVS] com php-src: Fix test after f8b91d9acff10ede7bd3f2bc631794a3abef8ff7: ext/date/tests/bug55397.phpt
Commit:08624ea90d9178679cdbb553de0170f2fd7ac09c Author:Xinchen Hui larue...@php.net Sat, 16 Mar 2013 23:14:06 +0800 Parents: 0fd3572f4edbe7b3d9efdd212e214a9052dcfd01 Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=08624ea90d9178679cdbb553de0170f2fd7ac09c Log: Fix test after f8b91d9acff10ede7bd3f2bc631794a3abef8ff7 Changed paths: M ext/date/tests/bug55397.phpt Diff: diff --git a/ext/date/tests/bug55397.phpt b/ext/date/tests/bug55397.phpt index efc09b5..13778a0 100644 --- a/ext/date/tests/bug55397.phpt +++ b/ext/date/tests/bug55397.phpt @@ -7,5 +7,4 @@ date_default_timezone_set('Europe/Prague'); var_dump(unserialize('O:8:DateTime:0:{}') == new DateTime); ? --EXPECTF-- -Warning: %s: Trying to compare an incomplete DateTime object in %s on line %d -bool(false) +Fatal error: Invalid serialization data for DateTime object in %sbug55397.php on line %d -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fixed bug #64239 (Debug backtrace changed behavior since 5.4.10 or 5.4.11): NEWS Zend/tests/bug64239_1.phpt Zend/tests/bug64239_2.phpt Zend/tests/bug64239_3.phpt Zend/tests/bug6
Commit:7dce0194c815cdc75a780b6471660042aed7bd7a Author:Xinchen Hui larue...@php.net Thu, 21 Mar 2013 21:09:30 +0800 Parents: 08624ea90d9178679cdbb553de0170f2fd7ac09c Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7dce0194c815cdc75a780b6471660042aed7bd7a Log: Fixed bug #64239 (Debug backtrace changed behavior since 5.4.10 or 5.4.11) Bugs: https://bugs.php.net/64239 Changed paths: M NEWS M Zend/tests/bug64239_1.phpt A Zend/tests/bug64239_2.phpt A Zend/tests/bug64239_3.phpt A Zend/tests/bug64239_4.phpt M Zend/zend_API.c M Zend/zend_API.h M Zend/zend_builtin_functions.c diff --git a/NEWS b/NEWS index d60fcb3..bc132d4 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,8 @@ PHP NEWS (Dmitry) . Fixed bug #64370 (microtime(true) less than $_SERVER['REQUEST_TIME_FLOAT']). (Anatol) + . Fixed bug #64239 (Debug backtrace changed behavior since 5.4.10 or 5.4.11). +(Dmitry, Laruence) . Fixed bug #63976 (Parent class incorrectly using child constant in class property). (Dmitry) . Fixed bug #62343 (Show class_alias In get_declared_classes()) (Dmitry) diff --git a/Zend/tests/bug64239_1.phpt b/Zend/tests/bug64239_1.phpt index fe58cbd..10d44c1 100644 --- a/Zend/tests/bug64239_1.phpt +++ b/Zend/tests/bug64239_1.phpt @@ -3,20 +3,26 @@ Bug #64239 (get_class_methods() changed behavior) --FILE-- ?php class A { - public function test() { $this-backtrace(); } -} -class B { use T2 { t2method as Bmethod; } } + +class B extends A { +} + trait T2 { public function t2method() { } } -var_dump(get_class_methods(B)); +print_r(get_class_methods(A)); +print_r(get_class_methods(B)); --EXPECT-- -array(2) { - [0]= - string(7) bmethod - [1]= - string(8) t2method -} +Array +( +[0] = Bmethod +[1] = t2method +) +Array +( +[0] = Bmethod +[1] = t2method +) diff --git a/Zend/tests/bug64239_2.phpt b/Zend/tests/bug64239_2.phpt new file mode 100644 index 000..26cf8ee --- /dev/null +++ b/Zend/tests/bug64239_2.phpt @@ -0,0 +1,58 @@ +--TEST-- +Bug #64239 (debug_backtrace() changed behavior) +--FILE-- +?php +class A { + use T1; + public function test() { $this-backtrace(); } +} + +class B { + use T2 { t2method as Bmethod; } +} + +class C extends A { +} + +trait T1 { + protected function backtrace() { + $b = new B(); + $b-Bmethod(); + } +} +trait T2 { + public function t2method() { + print_r(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1)); + } +} +$a = new A(); +$a-test(); + +$c = new C(); +$c-test(); +? +--EXPECTF-- +Array +( +[0] = Array +( +[file] = %sbug64239_2.php +[line] = %d +[function] = Bmethod +[class] = B +[type] = - +) + +) +Array +( +[0] = Array +( +[file] = %sbug64239_2.php +[line] = %d +[function] = Bmethod +[class] = B +[type] = - +) + +) diff --git a/Zend/tests/bug64239_3.phpt b/Zend/tests/bug64239_3.phpt new file mode 100644 index 000..15faeb9 --- /dev/null +++ b/Zend/tests/bug64239_3.phpt @@ -0,0 +1,33 @@ +--TEST-- +Bug #64239 (debug_print_backtrace() changed behavior) +--FILE-- +?php +class A { + use T2 { t2method as Bmethod; } +} + +class C extends A { + public function Bmethod() { + debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); +} +} + +trait T2 { + public function t2method() { + debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); + } +} + +$a = new A(); +$a-Bmethod(); +$a-t2method(); + +$c = new C(); +$c-Bmethod(); +$c-t2method(); +? +--EXPECTF-- +#0 A-Bmethod() called at [%sbug64239_3.php:%d] +#0 A-t2method() called at [%sbug64239_3.php:%d] +#0 C-Bmethod() called at [%sbug64239_3.php:%d] +#0 A-t2method() called at [%sbug64239_3.php:%d] diff --git a/Zend/tests/bug64239_4.phpt b/Zend/tests/bug64239_4.phpt new file mode 100644 index 000..7ab761e --- /dev/null +++ b/Zend/tests/bug64239_4.phpt @@ -0,0 +1,31 @@ +--TEST-- +Bug #64239 (debug_print_backtrace() changed behavior) +--FILE-- +?php +class A { + use T2 { t2method as Bmethod; } +} + +class C extends A { + public static function Bmethod() { + debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); +} +} + +trait T2 { + public static function t2method() { + debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); + } +} + +A::Bmethod(); +A::t2method(); + +C::Bmethod(); +C::t2method(); +? +--EXPECTF-- +#0 A::Bmethod() called at [%sbug64239_4.php:%d] +#0 A::t2method() called at [%sbug64239_4.php:%d] +#0 C::Bmethod() called at [%sbug64239_4.php:%d] +#0 A::t2method() called at [%sbug64239_4.php:%d] diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 668ddff..529092a 100644 ---
[PHP-CVS] com php-src: Update NEWS: NEWS
Commit:9d31c0de0c73280f8f8e86c179875072d185c2d7 Author:Xinchen Hui larue...@php.net Thu, 21 Mar 2013 21:11:15 +0800 Parents: 79925094c40a46a270fc079ddd6c2c92ff62c10f Branches: PHP-5.5 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9d31c0de0c73280f8f8e86c179875072d185c2d7 Log: Update NEWS Changed paths: M NEWS Diff: diff --git a/NEWS b/NEWS index 36a98ab..ae68898 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||| ?? ??? 20??, PHP 5.5.0 Beta 2 +- Core: + . Fixed bug #64239 (Debug backtrace changed behavior since 5.4.10 or 5.4.11). +(Dmitry, Laruence) 21 Mar 2013, PHP 5.5.0 Beta 1 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: Zend/zend_API.c Zend/zend_API.h Zend/zend_builtin_functions.c
Commit:79925094c40a46a270fc079ddd6c2c92ff62c10f Author:Xinchen Hui larue...@php.net Thu, 21 Mar 2013 21:10:32 +0800 Parents: f2383dead69d59143fee1d54de98f154d6833714 7dce0194c815cdc75a780b6471660042aed7bd7a Branches: PHP-5.5 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=79925094c40a46a270fc079ddd6c2c92ff62c10f Log: Merge branch 'PHP-5.4' into PHP-5.5 Changed paths: MM Zend/zend_API.c MM Zend/zend_API.h MM Zend/zend_builtin_functions.c Diff: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Fix bug in reflectionClass relate to #64239: ext/reflection/php_reflection.c ext/reflection/tests/bug64239.phpt
Commit:39a173b79bcb5b77ef28c83c7da65621e78e717a Author:Xinchen Hui larue...@php.net Thu, 21 Mar 2013 21:29:02 +0800 Parents: 7dce0194c815cdc75a780b6471660042aed7bd7a Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=39a173b79bcb5b77ef28c83c7da65621e78e717a Log: Fix bug in reflectionClass relate to #64239 Bugs: https://bugs.php.net/64239 Changed paths: M ext/reflection/php_reflection.c A ext/reflection/tests/bug64239.phpt Diff: diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 25ecbad..6c4d806 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -1298,7 +1298,8 @@ static void reflection_method_factory(zend_class_entry *ce, zend_function *metho } MAKE_STD_ZVAL(name); MAKE_STD_ZVAL(classname); - ZVAL_STRING(name, method-common.function_name, 1); + ZVAL_STRING(name, (method-common.scope method-common.scope-trait_aliases)? + zend_resolve_method_name(ce, method) : method-common.function_name, 1); ZVAL_STRINGL(classname, method-common.scope-name, method-common.scope-name_length, 1); reflection_instantiate(reflection_method_ptr, object TSRMLS_CC); intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC); diff --git a/ext/reflection/tests/bug64239.phpt b/ext/reflection/tests/bug64239.phpt new file mode 100644 index 000..9acdc19 --- /dev/null +++ b/ext/reflection/tests/bug64239.phpt @@ -0,0 +1,44 @@ +--TEST-- +Bug #64239 (ReflectionClass::getMethods() changed behavior) +--FILE-- +?php +class A { + use T2 { t2method as Bmethod; } +} +trait T2 { + public function t2method() { + } +} + +class B extends A{ +} + +$obj = new ReflectionClass(B); +print_r($obj-getMethods()); +print_r(($method = $obj-getMethod(Bmethod))); +var_dump($method-getName()); +var_dump($method-getShortName()); +? +--EXPECT-- +Array +( +[0] = ReflectionMethod Object +( +[name] = Bmethod +[class] = A +) + +[1] = ReflectionMethod Object +( +[name] = t2method +[class] = A +) + +) +ReflectionMethod Object +( +[name] = Bmethod +[class] = A +) +string(7) Bmethod +string(7) Bmethod -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: ext/reflection/php_reflection.c
Commit:534aec8a52955b841e30428b5efd1eff975b5e0d Author:Xinchen Hui larue...@php.net Thu, 21 Mar 2013 21:32:32 +0800 Parents: 9d31c0de0c73280f8f8e86c179875072d185c2d7 39a173b79bcb5b77ef28c83c7da65621e78e717a Branches: PHP-5.5 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=534aec8a52955b841e30428b5efd1eff975b5e0d Log: Merge branch 'PHP-5.4' into PHP-5.5 Changed paths: MM ext/reflection/php_reflection.c Diff: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Add OPCache ini settings to php.ini: php.ini-development php.ini-production
Commit:293d5defb4eb3962ac6b1ed6620ebc38836e5581 Author:David Soria Parra d...@php.net Thu, 21 Mar 2013 15:50:21 +0100 Parents: 534aec8a52955b841e30428b5efd1eff975b5e0d Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=293d5defb4eb3962ac6b1ed6620ebc38836e5581 Log: Add OPCache ini settings to php.ini Changed paths: M php.ini-development M php.ini-production Diff: diff --git a/php.ini-development b/php.ini-development index 93a4b7d..e79a3e0 100644 --- a/php.ini-development +++ b/php.ini-development @@ -1860,6 +1860,99 @@ ldap.max_links = -1 [dba] ;dba.default_handler= +[opcache] +; Determines if Zend OPCache is enabled +;opcache.enable=0 + +; The OPcache shared memory storage size. +;opcache.memory_consumption=64 + +; The amount of memory for interned strings in Mbytes. +;opcache.interned_strings_buffer=4 + +; The maximum number of keys (scripts) in the OPcache hash table. +; Only numbers between 200 and 10 are allowed. +;opcache.max_accelerated_files=2000 + +; The maximum percentage of wasted memory until a restart is scheduled. +;opcache.max_wasted_percentage=5 + +; When this directive is enabled, the OPcache appends the current working +; directory to the script key, thus eliminating possible collisions between +; files with the same name (basename). Disabling the directive improves +; performance, but may break existing applications. +;opcache.use_cwd=1 + +; When disabled, you must reset the OPcache manually or restart the +; webserver for changes to the filesystem to take effect. +;opcache.validate_timestamps=1 + +; How often (in seconds) to check file timestamps for changes to the shared +; memory storage allocation. (1 means validate once per second, but only +; once per request. 0 means always validate) +;opcache.revalidate_freq=2 + +; Enables or disables file search in include_path optimization +;opcache.revalidate_path=0 + +; If disabled, all PHPDoc comments are dropped from the code to reduce the + ;size of the optimized code. +;opcache.save_comments=1 + +; If disabled, PHPDoc comments are not loaded from SHM, so Doc Comments +; may be always stored (save_comments=1), but not loaded by applications +; that don't need them anyway. +;opcache.load_comments=1 + +; If enabled, a fast shutdown sequence is used for the accelerated code +;opcache.fast_shutdown=0 + +; Allow file existence override (file_exists, etc.) performance feature. +;opcache.enable_file_override=0 + +; A bitmask, where each bit enables or disables the appropriate OPcache +; passes +;opcache.optimization_level=0x + +;opcache.inherited_hack=1 +;opcache.dups_fix=0 + +; The location of the OPcache blacklist file. +; The OPcache blacklist file is a text file that holds the names of files +; that should not be accelerated. The file format is to add each filename +; to a new line. The filename may be a full path or just a file prefix +; (i.e., /var/www/x blacklists all the files and directories in /var/www +; that start with 'x'). +;opcache.blacklist_filename= + +; Allows exclusion of large files from being cached. By default all files +; are cached. +;opcache.max_file_size=0 + +; Check the cache checksum each N requests. +; The default value of 0 means that the checks are disabled. +;opcache.consistency_checks=0 + +; How long to wait (in seconds) for a scheduled restart to begin if the cache +; is not being accessed. +;opcache.force_restart_timeout=180 + +; OPcache error_log file name. Empty string assumes stderr. +;opcache.error_log= + +; All OPcache errors go to the Web server log. +; By default, only fatal errors (level 0) or errors (level 1) are logged. +; You can also enable warnings (level 2), info messages (level 3) or +; debug messages (level 4). +;opcache.log_verbosity_level=1 + +; Preferred Shared Memory back-end. Leave empty and let the system decide. +;opcache.preferred_memory_model= + +; Protect the shared memory from unexpected writing during script execution. +; Useful for internal debugging only. +;opcache.protect_memory=0 + ; Local Variables: ; tab-width: 4 ; End: diff --git a/php.ini-production b/php.ini-production index 7d84c9b..33fcd3a 100644 --- a/php.ini-production +++ b/php.ini-production @@ -1860,6 +1860,99 @@ ldap.max_links = -1 [dba] ;dba.default_handler= +[opcache] +; Determines if Zend OPCache is enabled +;opcache.enable=0 + +; The OPcache shared memory storage size. +;opcache.memory_consumption=64 + +; The amount of memory for interned strings in Mbytes. +;opcache.interned_strings_buffer=4 + +; The maximum number of keys (scripts) in the OPcache hash table. +; Only numbers between 200 and 10 are allowed. +;opcache.max_accelerated_files=2000 + +; The maximum percentage of wasted memory until a restart is scheduled. +;opcache.max_wasted_percentage=5 + +; When this directive is enabled, the OPcache appends the current working +; directory to the script key, thus eliminating possible collisions between +; files with the
[PHP-CVS] com php-src: Merge branch 'PHP-5.5': php.ini-development php.ini-production
Commit:95c3b9ab397339978d7a2f2a196d2fa761410eb2 Author:David Soria Parra d...@php.net Thu, 21 Mar 2013 15:52:12 +0100 Parents: 9d2897a9d1bacc770d68268407c96f5907860ce1 293d5defb4eb3962ac6b1ed6620ebc38836e5581 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=95c3b9ab397339978d7a2f2a196d2fa761410eb2 Log: Merge branch 'PHP-5.5' * PHP-5.5: Add OPCache ini settings to php.ini Changed paths: MM php.ini-development MM php.ini-production Diff: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php