Skip to content

Add new 'use function' sequence for importing namespaced functions #388

Closed
wants to merge 1,705 commits into from
@igorw
igorw commented Jul 19, 2013

This is specified as the use_function RFC:

@jippi
jippi commented Aug 17, 2013

:heart:

@weltling

The functionality looks good so far and the tests on windows and linux pass. Prosit!

@nikic nikic commented on an outdated diff Aug 25, 2013
Zend/tests/use_const/conflicting_use_alias.phpt
@@ -0,0 +1,18 @@
+--TEST--
+use and use function with the same alias
@nikic
nikic added a note Aug 25, 2013

nit s/use function/use const

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@nikic nikic commented on an outdated diff Aug 25, 2013
Zend/tests/use_const/shadow_core_null.phpt
@@ -0,0 +1,12 @@
+--TEST--
+shadowing null with a local version
+--FILE--
+<?php
+
+namespace foo {
+ const null = 42;
+}
+
+?>
+--EXPECTF--
+Fatal error: Cannot redeclare constant 'null' in %s on line %d
@nikic
nikic added a note Aug 25, 2013

This test doesn't seem related to the patch and the behavior is already tested here: https://github.com/php/php-src/blob/master/Zend/tests/ns_075.phpt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@nikic nikic commented on an outdated diff Aug 25, 2013
Zend/tests/use_function/conflicting_use_const_alias.phpt
@@ -0,0 +1,23 @@
+--TEST--
+use and use function with the same alias
@nikic
nikic added a note Aug 25, 2013

nit: use const and use function

Also this seems basically the same as Zend/tests/use_const/function_and_cons.phpt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@nikic nikic commented on the diff Aug 25, 2013
Zend/tests/use_const/no_global_fallback.phpt
@@ -0,0 +1,14 @@
+--TEST--
+non-existent imported constants should not be looked up in the global table
+--FILE--
+<?php
+
+require 'includes/global_baz.php';
@nikic
nikic added a note Aug 25, 2013

This and a bunch of other tests make use of separate includes. Why? Seems like putting them directly in the file wouldn't change anything, but would make sure the tests are self-contained (easy to read).

@igorw
igorw added a note Aug 25, 2013

I wish. PHP manages the conflict between use statements and class definitions per-file. Example. I did the same thing for functions and consts. A conflicting define and use in the same file will fail.

@igorw
igorw added a note Aug 25, 2013

Note: Ideally there would be an easy way to do this per namespace {} block, and implicitly create such a block for files that don't have one. That way it could also be fixed for classes and my example above would no longer fail. But I fear it would be quite a big change, and I'm not sure how exactly to do it.

@nikic
nikic added a note Aug 25, 2013

Okay, that makes (at least some) sense, my bad :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@nikic nikic commented on an outdated diff Aug 25, 2013
Zend/zend_compile.c
+ ZVAL_STRING(name, p+1, 1);
+ } else {
+ *name = *ns;
+ zval_copy_ctor(name);
+ warn = !is_global && !CG(current_namespace);
+ }
+ }
+
+ lcname = zend_str_tolower_dup(Z_STRVAL_P(name), Z_STRLEN_P(name));
+
+ if (((Z_STRLEN_P(name) == sizeof("self")-1) &&
+ !memcmp(lcname, "self", sizeof("self")-1)) ||
+ ((Z_STRLEN_P(name) == sizeof("parent")-1) &&
+ !memcmp(lcname, "parent", sizeof("parent")-1))) {
+ zend_error(E_COMPILE_ERROR, "Cannot use %s as %s because '%s' is a special class name", Z_STRVAL_P(ns), Z_STRVAL_P(name), Z_STRVAL_P(name));
+ }
@nikic
nikic added a note Aug 25, 2013

self/parent are not special for fns/consts. function self() {} compiles fine ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@nikic nikic commented on an outdated diff Aug 25, 2013
Zend/zend_compile.c
+ zval_copy_ctor(name);
+ warn = !is_global && !CG(current_namespace);
+ }
+ }
+
+ lcname = zend_str_tolower_dup(Z_STRVAL_P(name), Z_STRLEN_P(name));
+
+ if (((Z_STRLEN_P(name) == sizeof("self")-1) &&
+ !memcmp(lcname, "self", sizeof("self")-1)) ||
+ ((Z_STRLEN_P(name) == sizeof("parent")-1) &&
+ !memcmp(lcname, "parent", sizeof("parent")-1))) {
+ zend_error(E_COMPILE_ERROR, "Cannot use %s as %s because '%s' is a special class name", Z_STRVAL_P(ns), Z_STRVAL_P(name), Z_STRVAL_P(name));
+ }
+
+ if (CG(current_namespace)) {
+ /* Prefix import name with current namespace name to avoid conflicts with classes */
@nikic
nikic added a note Aug 25, 2013

nit "classes"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@nikic
nikic commented Aug 25, 2013

Patch looks pretty good. Some comments:

  • Constants are not always case-insensitive (actually they are case-sensitive by default), so just doing lcs without checking CONST_CS will not work correctly. Maybe use zend_get_constant to do the lookups? It also handles special const names, but I don't think those are important in this context.
  • The filename for functions is stored in their op_array, so there is no need to track it in an additional HT.
  • Because the function filenames are tracked in a separate HT and not via the op_array they will be always added, even if registration of the function is delayed to runtime. E.g. the following code throws an error, whereas the same code using classes does not:
<?php

if (0) {
    function foo() {

    }
}

use function bar\foo;

// Fatal error: Cannot use function bar\foo as foo because the name is already in use in /home/nikic/dev/php-src/t59.php on line 9

Edit: Don't know whether the last point is actually important, just noticed that it behaves differently from class uses ;)

@igorw
igorw commented Aug 29, 2013

TODOs:

  • Replace the function_filenames hash-table with a lookup to the op_array. Zend/tests/use_function/conditional_function_declaration.phpt should pass after that.
  • Figure out why Zend/tests/use_function/define_imported_before.phpt is failing on travis. It works locally.

Help on either of those would be appreciated.

datibbaw and others added some commits Sep 23, 2013
@datibbaw datibbaw who put that stupid newline there? 69bdc5a
@LawnGnome LawnGnome Fix typo: HTTP_ROW_POST_DATA → HTTP_RAW_POST_DATA.
Fixes bug #65745 (Typo in commit 4a3936e).
8d087dc
Christopher Jones Merge branch 'master' of https://git.php.net/repository/php-src
* 'master' of https://git.php.net/repository/php-src:
  Fix typo: HTTP_ROW_POST_DATA → HTTP_RAW_POST_DATA.
f4ce018
@dstogov dstogov Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed issue #135 (segfault in interned strings if initial memory is too low)

Conflicts:
	NEWS
4e249c8
@dstogov dstogov Merge branch 'PHP-5.5'
* PHP-5.5:
  Added function opcache_compile_file() to load PHP scripts into cache without execution.

Conflicts:
	NEWS
6daa04a
@smalyshev

Shouldn't we here use the same checks as persistent_compile_file() does? Or at least tell it no need to compile it if it's not cacheable?

zend_persistent_compile_file() will perform the same checks anyway.

Yes, but it will then compile the file, which is not really needed.

I didn't get. Users are going to call opcache_compile_file() for cache warm-up (to load files into cache without their execution).
It's implemented through the same zend_persistent_compile_file() function that is going to use the same checks (e.g. blacklist file) and compile only the same files that would be cached during normal execution. What is wrong?

@smalyshev

persistent_compile_file() seems to add file to included_files list (line 1642) if it is already cached. Is it intended effect here?

It's not intended, but it must not be a big problem.

It may break some require_once code if it is done in the same request.

Yeah, but must not be a big deal for warm-up scripts. anyway, it may be fixed.

Christopher ... and others added some commits Sep 25, 2013
Christopher Jones Merge branch 'master' of https://git.php.net/repository/php-src
* 'master' of https://git.php.net/repository/php-src:
  Added function opcache_compile_file() to load PHP scripts into cache without execution.
  Fixed issue #135 (segfault in interned strings if initial memory is too low)
c02ff01
@ptarjan ptarjan fix many parallel test issues
While running these on HHVM I've run into a lot of parallelism issues.
I'm backporting all the fixes I had to do in
https://github.com/facebook/hiphop-php/blob/master/hphp/tools/import_zend_test.py#L650
to php core.

Most of these changes were just filenames that were shared between
tests, but I did more surgery on the fixed ports. I can apreciate port
31337 as much as the next nerd, but random ports are better for tests.
ecbe4af
@ptarjan ptarjan fix missing change from 'tcp_socket' to the more common 'server' 361e984
@nikic nikic Implement variadic function syntax 0d7a638
Christopher Jones Merge branch 'master' of https://git.php.net/repository/php-src
# By Adam Harvey (2) and others
# Via Adam Harvey (2) and others
* 'master' of https://git.php.net/repository/php-src:
  Implement variadic function syntax
  Added function opcache_compile_file() to load PHP scripts into cache without execution.
  Fixed issue #135 (segfault in interned strings if initial memory is too low)
  Fix typo: HTTP_ROW_POST_DATA → HTTP_RAW_POST_DATA.
  Make message and format arguments const char * to avoid build warning about invalid cast.
  Copy dba_*() keys before converting to string.
a3b0fa0
Christopher Jones Merge branch 'master' of https://git.php.net/repository/php-src
* 'master' of https://git.php.net/repository/php-src:
  Implement variadic function syntax
eb8e63b
@nikic nikic Don't track parameter number in separate znode
We already track it in the op array already.
0ceea8a
@sgolemon sgolemon Merge branch 'pull-request/473' 92fe33c
Christopher Jones Merge branch 'master' of https://git.php.net/repository/php-src
* 'master' of https://git.php.net/repository/php-src:
  Don't track parameter number in separate znode
  fix missing change from 'tcp_socket' to the more common 'server'
  fix many parallel test issues
8554800
Christopher Jones More OCI8 DTrace probe updates.
Change php.ini-* doc to match an earlier change to config.w32
5ac7c53
@datibbaw datibbaw Support string and array for peer fingerprint matching edd93f3
@derickr derickr Merge branch 'PHP-5.5' 9ef4e5d
@dstogov dstogov Merge branch 'PHP-5.5'
* PHP-5.5:
  Added support for GNU Hurd. (Svante Signell)

Conflicts:
	NEWS
3eba8cf
@dstogov dstogov Merge branch 'PHP-5.5'
* PHP-5.5:
  Removed references to "Zend Support"
56eee05
@datibbaw datibbaw added use_keys argument to array_filter() a88c7be
@datibbaw datibbaw forgot introspection changes 6442e49
Tjerk Anne Meesters fixed test case to pass on other systems than my own b8653d3
@datibbaw datibbaw added bitmask variation 0492145
@datibbaw datibbaw Using only two constants to signal use type intent. 75ba75e
Christopher Jones Merge branch 'master' of https://git.php.net/repository/php-src
# By Dmitry Stogov (2) and others
# Via Christopher Jones (22) and others
* 'master' of https://git.php.net/repository/php-src:
  Removed references to "Zend Support"
  Added support for GNU Hurd. (Svante Signell)
  - Updated to version 2013.6 (2013f)
  More OCI8 DTrace probe updates. Change php.ini-* doc to match an earlier change to config.w32
  FIX BUG #48539 - Disable TEXTLIMIT for FreeTDS driver
  Don't track parameter number in separate znode
  fix missing change from 'tcp_socket' to the more common 'server'
  fix many parallel test issues
aba30ce
Christopher Jones OCI8: Fix alloc function and DLL generation 9b9eaba
Christopher Jones Prepare for next release 0a3ee7b
@smalyshev smalyshev Merge branch 'PHP-5.5'
* PHP-5.5:
  5.5.4 release date
  5.4.20 release date
  Add information about which INI file is which inside respective files
7a95306
@nikic nikic Merge branch 'PHP-5.5' 9529b8f
@nikic nikic Merge branch 'PHP-5.5' cbf0683
@m6w6 m6w6 Merge branch 'PHP-5.5'
* PHP-5.5:
  fix test
  fix memleak on resetting rebind_proc
6757033
@datibbaw datibbaw show method in error message e45eacd
Christopher Jones Merge branch 'PHP-5.5'
* PHP-5.5:
  Make 'make distclean' remove the downloaded pear PHAR
86c3378
Christopher Jones Merge branch 'master' of https://git.php.net/repository/php-src
# By Michael Wallner (2) and others
# Via Christopher Jones (8) and others
* 'master' of https://git.php.net/repository/php-src:
  Make 'make distclean' remove the downloaded pear PHAR
  fix test
  fix memleak on resetting rebind_proc
  Fix bug #64979: Wrong behavior of static variables in closure generators
  Fix bug #65322: compile time errors won't trigger auto loading
  5.5.4 release date
  5.4.20 release date
  Add information about which INI file is which inside respective files
ca6a259
Christopher Jones OCI8 2.0: Added a new oci_set_db_operation() user space function for …
…the "DB Operation" tracing feature of Oracle DB 12c.

Currently this code is #ifdef'd out, since I can't consider the feature stable until an Oracle-side fix for Oracle bug 16695981 is available.  Having the code available in PHP OCI8 facilitates testing of any fix.
954a0f8
@dstogov dstogov Merge branch 'PHP-5.5'
* PHP-5.5:
  Reverted patch (it was used for internal testing and was committed by accident)
66cd9ef
@m6w6 m6w6 Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed bug #61548

Conflicts:
	ext/standard/http_fopen_wrapper.c
d29a01d
Christopher Jones Merge branch 'master' of https://git.php.net/repository/php-src
* 'master' of https://git.php.net/repository/php-src:
  Fixed bug #61548
  Reverted patch (it was used for internal testing and was committed by accident)
  OCI8 2.0: Added a new oci_set_db_operation() user space function for the "DB Operation" tracing feature of Oracle DB 12c.
1d65ace
@m6w6 m6w6 Merge branch 'PHP-5.5'
* PHP-5.5:
  fix bug #62396 'make test' crashes starting with 5.3.14 (missing gzencode())
54c08e3
Christopher Jones Merge branch 'master' of https://git.php.net/repository/php-src
# By Michael Wallner (2) and Dmitry Stogov (1)
# Via Michael Wallner (5) and others
* 'master' of https://git.php.net/repository/php-src:
  fix bug #62396 'make test' crashes starting with 5.3.14 (missing gzencode())
  Fixed bug #61548
  Reverted patch (it was used for internal testing and was committed by accident)
471413a
Christopher Jones Merge branch 'PHP-5.5'
* PHP-5.5:
  Revert "Make 'make distclean' remove the downloaded pear PHAR"
67df40f
Christopher Jones Merge branch 'master' of https://git.php.net/repository/php-src
* 'master' of https://git.php.net/repository/php-src:
  Revert "Make 'make distclean' remove the downloaded pear PHAR"
  fix bug #62396 'make test' crashes starting with 5.3.14 (missing gzencode())
83955de
@m6w6 m6w6 Merge branch 'PHP-5.5'
* PHP-5.5:
  fix bug #65808 	the socket_connect() won't work with IPv6 address
  5.4.22-dev now
bc16dfd
@remicollet remicollet Merge branch 'PHP-5.5'
* PHP-5.5:
  Fix Bug #60633 build warning in bcmath
99598fd
@m6w6 m6w6 Merge branch 'PHP-5.5'
* PHP-5.5:
  fix bug #59613 (Crash with clone XMLReader)
95fd508
@m6w6 m6w6 Merge branch 'PHP-5.5'
* PHP-5.5:
  typo: really fix bug #51936 	Crash with clone xmlreader
2a1bd12
Christopher Jones Merge branch 'master' of https://git.php.net/repository/php-src
* 'master' of https://git.php.net/repository/php-src:
  typo: really fix bug #51936 	Crash with clone xmlreader
  fix bug #59613 (Crash with clone XMLReader)
  Fix Bug #60633 build warning in bcmath
  fix bug #65808 	the socket_connect() won't work with IPv6 address
  5.4.22-dev now
333539b
@m6w6 m6w6 fix bug #55285 XMLReader::getAttribute/No/Ns methods inconsistency c7b1d76
@m6w6 m6w6 Merge PR #430 gost-crypto
Merge branch 'master' of github.com:manuelm/php-src

* 'master' of github.com:manuelm/php-src:
  fix failing tests
  fix indention
  Add support for CryptoPro S-box for GOST
05f847d
@m6w6 m6w6 add NEWS and UPGRADING about gost-crypto 099b295
Christopher Jones Merge branch 'master' of https://git.php.net/repository/php-src
* 'master' of https://git.php.net/repository/php-src:
  add NEWS and UPGRADING about gost-crypto
  fix bug #55285 XMLReader::getAttribute/No/Ns methods inconsistency
  fix failing tests
  fix indention
  Add support for CryptoPro S-box for GOST
5d60874
@m6w6 m6w6 Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed bug #64230 (XMLReader does not suppress errors)
e13e5b1
@nikic nikic Merge branch 'PHP-5.5' ff46b6f
Christopher Jones Merge branch 'master' of https://git.php.net/repository/php-src
* 'master' of https://git.php.net/repository/php-src:
  Fix bug #65821: By-ref foreach on property access of string offset segfaults
  Fixed bug #64230 (XMLReader does not suppress errors)
27d46a4
@m6w6 m6w6 Merge branch 'PHP-5.5'
* PHP-5.5:
  such a weird hack probably helps in finding regressions in the future
39022ba
@m6w6 m6w6 Merge branch 'PHP-5.5'
* PHP-5.5:
  fix bug #64146 (serialize incorrectly saving objects when they are cloned)
f72ed22
@nikic nikic Merge branch 'PHP-5.5' 44a2ae0
Christopher Jones Merge branch 'master' of https://git.php.net/repository/php-src
* 'master' of https://git.php.net/repository/php-src:
  Fix bug #65667: ftp_nb_continue produces segfault
  fix bug #64146 (serialize incorrectly saving objects when they are cloned)
  such a weird hack probably helps in finding regressions in the future
1fee78e
@mj mj Add unit test that covers setting the crypto method. 047877e
Christopher Jones Merge branch 'PHP-5.5'
* PHP-5.5:
  Allow the ldap extension to be compiled with Oracle's LDAP implementation, if desired.  Note the implementations differ so you will see different ldap behavior.
3261eb3
@felipensp felipensp Merge branch 'PHP-5.5'
* PHP-5.5:
  - Fixed bug #65818 (Segfault with built-in webserver and chunked transfer encoding)
  - BFN
  Allow the ldap extension to be compiled with Oracle's LDAP implementation, if desired.  Note the implementations differ so you will see different ldap behavior.
8153dd2
@felipensp felipensp Merge branch 'master' of git.php.net:/php-src 606a97f
Stanley Sufficool Merge branch 'master' of https://git.php.net/push/php-src
* 'master' of https://git.php.net/push/php-src: (705 commits)
  Allow the ldap extension to be compiled with Oracle's LDAP implementation, if desired.  Note the implementations differ so you will see different ldap behavior.
  Fix bug #65667: ftp_nb_continue produces segfault
  fix bug #64146 (serialize incorrectly saving objects when they are cloned)
  such a weird hack probably helps in finding regressions in the future
  Fix bug #65821: By-ref foreach on property access of string offset segfaults
  Fixed bug #64230 (XMLReader does not suppress errors)
  add NEWS and UPGRADING about gost-crypto
  fix bug #55285 XMLReader::getAttribute/No/Ns methods inconsistency
  typo: really fix bug #51936 	Crash with clone xmlreader
  fix bug #59613 (Crash with clone XMLReader)
  Fix Bug #60633 build warning in bcmath
  fix bug #65808 	the socket_connect() won't work with IPv6 address
  5.4.22-dev now
  Revert "Make 'make distclean' remove the downloaded pear PHAR"
  fix bug #62396 'make test' crashes starting with 5.3.14 (missing gzencode())
  Fixed bug #61548
  Reverted patch (it was used for internal testing and was committed by accident)
  OCI8 2.0: Added a new oci_set_db_operation() user space function for the "DB Operation" tracing feature of Oracle DB 12c.
  Make 'make distclean' remove the downloaded pear PHAR
  fix test
  ...
3e023c3
Stanley Sufficool Fix bug #64338 pdo_dblib can't connect to Azure SQL 9c7dbb0
@datibbaw datibbaw Using SUCCESS and FAILURE for return values
Using zend_bool for boolean arguments and return values
Reduced one level of zval indirection where possible
955bc1d
@weltling weltling Merge branch 'PHP-5.5'
* PHP-5.5:
  added fixed tests for ICU >= 51.2
  fixed failing tests for ICU >= 51.2
  FIX BUG #65219 - Typo correction
  FIX BUG #65219 - USE DB not being sent for FreeTDS version < 0.92 FreeTDS <0.92 does not support DBSETLDBNAME option and therefore will not work with SQL Azure. Fallback to dbuse command in letter versions.
  - Fixed bug #65818 (Segfault with built-in webserver and chunked transfer encoding)
  - BFN
4fe7ec3
@datibbaw datibbaw Added two more test cases for CN matching. 674dd73
@datibbaw datibbaw Use zend_bool as return value for _match() 39c0dae
Christopher Jones Bump mininum requirements for PHP OCI8 2.0 to PHP 5.2 and Oracle
client library 10.2 (Note this will connect to Oracle Database 8.1.7
onwards). Use the older OCI8 1.4 from PECL if using an earlier PHP
version or older Oracle client library support is necessary.
12f9939
Christopher Jones Add new tests 1675fd2
Christopher Jones Add new tests to package.xml f0863fa
@datibbaw datibbaw DNS name comparison is now case insensitive. 6106896
@m6w6 m6w6 Merge branch 'PHP-5.5'
* PHP-5.5:
  fix bug #51076 (race condition in shtool's mkdir -p)
b157654
@m6w6 m6w6 fix bad cast 5d430ad
@m6w6 m6w6 Merge branch 'openssl-x509-digest' of https://github.com/datibbaw/php…
…-src

* 'openssl-x509-digest' of https://github.com/datibbaw/php-src:
  Using SUCCESS and FAILURE for return values Using zend_bool for boolean arguments and return values Reduced one level of zval indirection where possible
  show method in error message
  Support string and array for peer fingerprint matching
  who put that stupid newline there?
  add md5 and sha1 fingerprint tests
  Renamed to be more descriptive of what it does
  don't leak cert on errors, return null on zpp failure
  Added test case for openssl_x509_digest()
  removed the byref result
  indentation fail
  added option for hash function
  added option for raw output
  added openssl_x509_digest(), output is binary sha1
0d8c83a
@m6w6 m6w6 Merge branch 'bug65729' of https://github.com/datibbaw/php-src
* 'bug65729' of https://github.com/datibbaw/php-src:
  DNS name comparison is now case insensitive.
  Use zend_bool as return value for _match()
  Added two more test cases for CN matching.
  yay, reduced one variable
  Fixed bug that would lead to out of bounds memory access
  added better wildcard matching for CN
8300ced
@m6w6 m6w6 Merge branch 'ssl-streams-crypto-method' of https://github.com/mj/php…
…-src

* 'ssl-streams-crypto-method' of https://github.com/mj/php-src:
  Add unit test that covers setting the crypto method.
  Streams for ssl:// transports can now be configured to use a specific crypto method (SSLv3, SSLv2 etc.) by calling
ea0578e
@m6w6 m6w6 openssl NEWS,UPGRADING cf6413a
@rdlowrey rdlowrey Added SAN matching during peer verification 1970b96
@rdlowrey

@m6w6 I don't think these constants are actually new? See the 5.3 source tree. Am I missing something here?

m6w6 replied Oct 8, 2013

Oh well... :) blindly working along... Thanks!

Christopher ... and others added some commits Oct 8, 2013
Christopher Jones Merge branch 'master' of https://git.php.net/repository/php-src
# By Tjerk Meesters (12) and others
# Via Michael Wallner
* 'master' of https://git.php.net/repository/php-src: (24 commits)
  openssl NEWS,UPGRADING
  fix bad cast
  fix bug #51076 (race condition in shtool's mkdir -p)
  DNS name comparison is now case insensitive.
  Use zend_bool as return value for _match()
  Added two more test cases for CN matching.
  Using SUCCESS and FAILURE for return values Using zend_bool for boolean arguments and return values Reduced one level of zval indirection where possible
  Add unit test that covers setting the crypto method.
  show method in error message
  Support string and array for peer fingerprint matching
  who put that stupid newline there?
  add md5 and sha1 fingerprint tests
  Renamed to be more descriptive of what it does
  Streams for ssl:// transports can now be configured to use a specific crypto method (SSLv3, SSLv2 etc.) by calling
  yay, reduced one variable
  Fixed bug that would lead to out of bounds memory access
  don't leak cert on errors, return null on zpp failure
  added better wildcard matching for CN
  Added test case for openssl_x509_digest()
  removed the byref result
  ...
c0bceda
@rdlowrey rdlowrey Added support for TLSv1.1 and TLSv1.2 2ddefbd
@m6w6 m6w6 Merge branch 'PHP-5.5'
* PHP-5.5:
  consolidate NEWS with 5.4
cfa4ece
@m6w6 m6w6 Thanks Daniel, I didn't think long enough 1815942
@m6w6 m6w6 Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed segfault when built with OpenSSL >= 1.0.1
  fixing a minor typo in CODING_STANDARDS document
  FIX BUG #65219 - Typo correction
  FIX BUG #65219 - USE DB not being sent for FreeTDS version < 0.92 FreeTDS <0.92 does not support DBSETLDBNAME option and therefore will not work with SQL Azure. Fallback to dbuse command in letter versions.
29d5ff7
@m6w6 m6w6 Merge branch 'issue-55736' of https://github.com/tistre/php-src
implements FR #55736

* 'issue-55736' of https://github.com/tistre/php-src:
  run-tests.php: Adding support for sections EXPECT_EXTERNAL, EXPECTF_EXTERNAL and EXPECTREGEX_EXTERNAL. (Issue 55736)
5f41cb1
@m6w6 m6w6 Merge branch 'PHP-5.5'
* PHP-5.5:
  C89 compatibility
302b9d4
@rdlowrey rdlowrey Changed return types to zend_bool, renamed test a40dd6e
felipensp and others added some commits Oct 20, 2013
@felipensp felipensp Merge branch 'PHP-5.5'
* PHP-5.5:
  - Fixed possible uninitialized scalar variable usage (spotted by Coverity)
b7c6468
@felipensp felipensp Merge branch 'PHP-5.5'
* PHP-5.5:
  - Fixed possible NULL ptr dereference
d23f089
@felipensp felipensp Merge branch 'PHP-5.5'
* PHP-5.5:
  - Moved NULL check before dereferencing
048923b
@rlerdorf rlerdorf Merge branch 'PHP-5.5'
* PHP-5.5:
  Minor Coverity tweaks
32a729a
@rlerdorf rlerdorf Merge branch 'PHP-5.5'
* PHP-5.5:
  Clean up this weird safe_emalloc() call
7b2a4c1
@rlerdorf rlerdorf Merge branch 'PHP-5.5'
* PHP-5.5:
  These getpwnam('') tests are silly and not portable
73e65ea
@rlerdorf rlerdorf Merge branch 'PHP-5.5'
* PHP-5.5:
  Fix typo
7ccffee
@rlerdorf rlerdorf Merge branch 'PHP-5.5'
* PHP-5.5:
  When src->src is null this doesn't get initialized but it is still used, so the passed in *ze will point to unitialized memory. Hopefully src->src is never null, but just in case this initialization doesn't hurt.
ec2e695
@smalyshev smalyshev fix possibility of access to *storedType without initialization 219a682
@smalyshev smalyshev Fix coverity issue with -1 returned by findOffset not being handled b…
…y getPreferredTag
444612c
@smalyshev smalyshev fix const warnings in intl methods 06954d1
@smalyshev smalyshev fix argument type & remove warning 3900ce9
@smalyshev smalyshev Merge branch 'PHP-5.5'
* PHP-5.5:
  Fix coverity issue with -1 returned by findOffset not being handled by getPreferredTag
  5.4.21 release date
  fix argument type & remove warning
  fix const warnings in intl methods
  Fix coverity issue with -1 returned by findOffset not being handled by getPreferredTag
  fix possibility of access to *storedType without initialization
  5.4.21 release date
ae31a68
@smalyshev smalyshev Merge branch 'PHP-5.5'
* PHP-5.5:
  fix memory leak on error (from Coverity scan)
19e8052
@laruence laruence Merge branch 'PHP-5.5' aed56fc
@m6w6 m6w6 Merge branch 'master' of https://github.com/DylanArnold/php-src
* 'master' of https://github.com/DylanArnold/php-src:
  Call php_module_shutdown() for php-fpm child processes
41da537
@m6w6 m6w6 Merge branch 'master' of https://github.com/guggemand/php-src
* 'master' of https://github.com/guggemand/php-src:
  Dont reset other counters when incrementing slow_rq
454a9fc
@dstogov dstogov Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed compilation warning
02214e7
@m6w6 m6w6 Merge branch 'PHP-5.5'
* PHP-5.5:
  remove TRAVIS check in test source
  Just SKIP that test on travis
6764993
@m6w6 m6w6 Merge remote-tracking branch 'refs/remotes/origin/master'
* refs/remotes/origin/master:
  Fixed compilation warning
4ddbb7d
@tony2001 tony2001 Merge branch 'PHP-5.5'
* PHP-5.5:
  fix bug #65936 (dangling context pointer causes crash)
605b3c2
@weltling weltling fixed invalid free 8591a52
@m6w6 m6w6 Merge branch 'PHP-5.5'
* PHP-5.5:
  add tests for bug #62523
  Merged PR #293 (Exif crash on unknown encoding was fixed) By: 	Draal Conflicts: 	configure.in 	main/php_version.h
cfd9114
@m6w6 m6w6 Merge branch 'PHP-5.5'
* PHP-5.5:
  exif NEWS
d15cedf
Christopher Jones Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed bug #65939 (Space before ";" breaks php.ini parsing). (brainstorm at nopcode dot org)
b3a2b44
Yasuo Ohgaki Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src: (270 commits)
  Fixed bug #65939 (Space before ";" breaks php.ini parsing). (brainstorm at nopcode dot org)
  exif NEWS
  add tests for bug #62523
  Merged PR #293 (Exif crash on unknown encoding was fixed) By: 	Draal Conflicts: 	configure.in 	main/php_version.h
  fix bug #65936 (dangling context pointer causes crash)
  remove TRAVIS check in test source
  Fixed compilation warning
  Just SKIP that test on travis
  Fixed issue #115 (path issue when using phar).
  fix memory leak on error (from Coverity scan)
  fix argument type & remove warning
  fix const warnings in intl methods
  Fix coverity issue with -1 returned by findOffset not being handled by getPreferredTag
  fix possibility of access to *storedType without initialization
  Fix coverity issue with -1 returned by findOffset not being handled by getPreferredTag
  5.4.21 release date
  fix argument type & remove warning
  fix const warnings in intl methods
  When src->src is null this doesn't get initialized but it is still used, so the passed in *ze will point to unitialized memory. Hopefully src->src is never null, but just in case this initialization doesn't hurt.
  Fix coverity issue with -1 returned by findOffset not being handled by getPreferredTag
  ...
fa11c7c
Yasuo Ohgaki Merge branch 'PHP-5.5'
* PHP-5.5:
  Fix Coverity issue reporting wrong sizeof()
29e5a96
Christopher Jones Added a LICENSE file to make it easier for PECL binary distributions …
…to conform with the license.
e68c1ef
@laruence laruence Merge branch 'PHP-5.5' 5241cf7
@LawnGnome LawnGnome Merge branch 'PHP-5.5'
* PHP-5.5:
  Increment version number, since this will be 5.5.6.

Conflicts:
	configure.in
	main/php_version.h
96b6d4b
@derickr derickr Merge branch 'PHP-5.5' 20f7fce
@m6w6 m6w6 ldap_escape() notes dfe4b15
@weltling weltling moved to do_alloca() usage where appropriate 08f6a76
@weltling weltling enabled windows to use stack in both ts/nts mode, some more fixes 25dc4af
@schumann schumann - test commit1 e53afaa
@schumann schumann - test commit 2 bf087d8
@schumann schumann - test3 8cef677
Yasuo Ohgaki Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed bug #65950 Field name truncation if the field name is bigger than 32 characters
37fb8e0
@derickr derickr Merge branch 'master' of git.php.net:/php-src 59f4c35
@laruence laruence Merge branch 'PHP-5.5' 7fe370f
@tony2001 tony2001 Merge branch 'PHP-5.5'
* PHP-5.5:
  increase backlog to the highest value everywhere
73788d1
@rlerdorf rlerdorf test commit 8da5734
@bjori bjori Merge branch 'PHP-5.5'
* PHP-5.5:
  Link to more readmes
d1727d8
@m6w6 m6w6 fix limitation of upload size == (U)INT_MAX in CGI 8962f3f
@dstogov dstogov Merge branch 'PHP-5.5'
* PHP-5.5:
  Improved performance of func_get_args() by eliminating useless copying

Conflicts:
	NEWS
9bbdc90
Yasuo Ohgaki Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src:
  Improved performance of func_get_args() by eliminating useless copying
  fix limitation of upload size == (U)INT_MAX in CGI
  Link to more readmes
  test commit
  - test3
  - test commit 2
  - test commit1
4bdac86
@tony2001 tony2001 Merge branch 'master' of https://git.php.net/repository/php-src
* 'master' of https://git.php.net/repository/php-src:
  Improved performance of func_get_args() by eliminating useless copying
  fix limitation of upload size == (U)INT_MAX in CGI
  Link to more readmes
  test commit
  Update NEWS
  Fixed bug #65950 Field name truncation if the field name is bigger than 32 characters
09ad5fb
@dstogov dstogov Merge branch 'PHP-5.5'
* PHP-5.5:
  Improved performance of array_merge() by eliminating useless copying

Conflicts:
	NEWS
b0f9768
@dstogov dstogov Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src:
  increase backlog to the highest value everywhere
  Update NEWS
  Fixed bug #65950 Field name truncation if the field name is bigger than 32 characters
c6fb00e
@dstogov dstogov Merge branch 'PHP-5.5'
* PHP-5.5:
  Increased limit for opcache.max_accelerated_files to 1,000,000. (Chris)

Conflicts:
	NEWS
ace2ee9
@dstogov dstogov Merge branch 'PHP-5.5'
* PHP-5.5:
  Use zval* instead of zval**

Conflicts:
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
592be91
@derickr derickr Merge branch 'master' of git.php.net:/php-src 8d8e8a4
@derickr derickr Merge branch 'PHP-5.5' f626db1
@nikic nikic Avoid copy in func_get_arg()
Complements dmitry's change to func_get_args()
d86b5f0
@remicollet remicollet Merge branch 'PHP-5.5'
* PHP-5.5:
  add bundled libzip LICENSE, as required by BSD License terms
141b77d
Yasuo Ohgaki Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src: (22 commits)
  add bundled libzip LICENSE, as required by BSD License terms
  Avoid copy in func_get_arg()
  - Updated to version 2013.8 (2013h)
  Use zval* instead of zval**
  Increased limit for opcache.max_accelerated_files to 1,000,000. (Chris)
  Improved performance of array_merge() by eliminating useless copying
  Improved performance of func_get_args() by eliminating useless copying
  fix limitation of upload size == (U)INT_MAX in CGI
  Link to more readmes
  test commit
  increase backlog to the highest value everywhere
  Update NEWS
  Fixed bug #65950 Field name truncation if the field name is bigger than 32 characters
  - test3
  - test commit 2
  - test commit1
  ldap_escape() notes
  - Updated to version 2013.7 (2013g)
  Increment version number, since this will be 5.5.6.
  Added Zend Debugger to the note about the load order (by trash4you at online dot de)
  ...
5c89d5a
Yasuo Ohgaki Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed Bug 64760 var_export() does not use full precision for floating-point numbers
3cf2682
Yasuo Ohgaki Implemented Change crypt() behavior w/o salt RFC 416f8fc
@weltling weltling Merge branch 'PHP-5.5'
* PHP-5.5:
  updated libs_versions.txt
4295bfe
@weltling weltling Merge branch 'bug50333' of github.com:weltling/php-src into bug50333 e17de5e
@nikic nikic Fix ZTS build 82eca38
@nikic nikic Fix compile warning in GMP 647e0be
@nikic nikic Fix bug #65997 by switching to Serializable for GMP
Rather than using get_properties and __wakeup for serialization
the code now uses Serializable::serialize() and
Serializable::unserialize(). The get_properties handler is switched
to a get_debug_info handler. Thus get_gc will now return only
the normal properties and not do any modifications, thus fixing
the leak. This also avoids a $num property from being publicly
visible after the object was dumped or serialized, so that's an
extra plus.
4218e89
@srgoogleguy srgoogleguy Merge branch 'pull-request/287'
Add ability to use array keys with array_filter().
This adds a third (optional) argument to array_filter() that will determine
what gets passed to the callback, the array key, value or both.
The third argument can be one of two constants: ARRAY_FILTER_USE_BOTH or,
ARRAY_FILTER_USE_KEY.
98c9e56
@weltling weltling back to do_alloca(), reverted the wrong replacement fc707a2
@weltling weltling compact the code to preserve the error info after state freeing abb962d
Yasuo Ohgaki Add crypt() change in UPGRADING 832c826
@dstogov dstogov Removed unnecessary GC checks 3b2ca39
@rlerdorf rlerdorf Merge branch 'PHP-5.5'
* PHP-5.5:
  Fix bug #66008
a0244a6
@weltling weltling simplify the state free macros 4d430ec
@weltling weltling removed unnecessary call f1c2f8f
@weltling weltling back to do_alloca() 39e7dcc
@weltling weltling virtual_cwd_activate() should be called only in one place 6aedfac
@weltling weltling reverted the previous commit, both calls are needed in TS mode 9df78bf
@weltling weltling limit virtual_cwd_activate() duplicated call to ZTS only 699f07b
@rlerdorf rlerdorf Fix English here e5e25c4
@laruence laruence Merge branch 'PHP-5.5' 15eabbb
@laruence laruence Merge branch 'master' of git.php.net:php-src 2f555b8
@remicollet remicollet Sync ext/zip with pecl/zip version 1.3.2
- update libzip to version 1.11.1. We don't use any private symbol anymore
- new method ZipArchive::setPassword($password)
- add --with-libzip option to build with system libzip
5dc37b3
@remicollet remicollet NEWS + UPGRADING 5b8ae01
@pierrejoye pierrejoye Merge branch 'master' of git.php.net:php-src
# By Remi Collet (2) and Xinchen Hui (2)
# Via Xinchen Hui (5) and Remi Collet (1)
* 'master' of git.php.net:php-src:
  NEWS + UPGRADING
  Sync ext/zip with pecl/zip version 1.3.2 - update libzip to version 1.11.1. We don't use any private symbol anymore - new method ZipArchive::setPassword($password) - add --with-libzip option to build with system libzip
  Fixed coredump due to abnormal implemention of phar
  remove "PHP 6" staff
bf875e2
@laruence laruence Merge branch 'PHP-5.5' 2a94494
@laruence laruence Merge branch 'PHP-5.5'
Conflicts:
	ext/phar/phar_internal.h
	ext/phar/stream.c
	ext/phar/util.c
6c8ff00
@weltling weltling Merge branch 'pull-request/500'
* pull-request/500:
  limit virtual_cwd_activate() duplicated call to ZTS only
  reverted the previous commit, both calls are needed in TS mode
  virtual_cwd_activate() should be called only in one place
  back to do_alloca()
  removed unnecessary call
  simplify the state free macros
  compact the code to preserve the error info after state freeing
  back to do_alloca(), reverted the wrong replacement
  enabled windows to use stack in both ts/nts mode, some more fixes
  moved to do_alloca() usage where appropriate
  fixed invalid free
  fixed virtual cwd header in phar
  updated NEWS
  fixed all the places where last error could be lost
  preserve the error code
  applied and fixed the original patch
  initial move on renaming files and fixing includes

Conflicts:
	ext/opcache/ZendAccelerator.c
c675980
@weltling weltling updated NEWS c4cfdfa
George Wang Fixed typo in Makefile.frag 3720fd7
George Wang Update LiteSpeed SAPI code to V6.4 01bc132
@laruence
php.net member

2007?

@nikic
nikic commented on 01bc132 Nov 6, 2013

This commit seems to break indentation (tabs->spaces).

laruence and others added some commits Nov 6, 2013
@laruence laruence Merge branch 'PHP-5.5'
Conflicts:
	ext/opcache/ZendAccelerator.c
c76be56
@Tyrael Tyrael Merge branch 'PHP-5.5' d87388b
@Tyrael Tyrael bump API versions 929bf11
@rlerdorf rlerdorf Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix bug #65946 - pdo_sql_parser.c permanently converts values bound to strings
756dc19
@dstogov dstogov Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Added tests for PHAR/OPCahce incompatibilities
  Update NEWS
  Fixed bug #65947 (basename is no more working after fgetcsv in certain situation)
  Update NEWS
  Fixed Bug #66043 (Segfault calling bind_param() on mysqli)
  NEWS entry
  NEWS entry

Conflicts:
	NEWS
4e6a0bd
@dstogov dstogov Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed issue #115 (path issue when using phar). Fixed issue #149 (Phar mount points not working with OPcache enabled).

Conflicts:
	NEWS
0e5c507
@igorw igorw Merge remote-tracking branch 'upstream/PHP-5.6' into use-function
* upstream/PHP-5.6: (399 commits)
  Fixed issue #115 (path issue when using phar). Fixed issue #149 (Phar mount points not working with OPcache enabled).
  Added tests for PHAR/OPCahce incompatibilities
  Update NEWS
  Fixed bug #65947 (basename is no more working after fgetcsv in certain situation)
  Update NEWS
  Fixed Bug #66043 (Segfault calling bind_param() on mysqli)
  NEWS entry
  NEWS entry
  Fix bug #65946 - pdo_sql_parser.c permanently converts values bound to strings
  bump API versions
  Add a couple more test cases to parse_url() tests
  fix missing change from 'tcp_socket' to the more common 'server'
  fix many parallel test issues
  Cleanup temp test file
  Revert "Fixed issue #115 (path issue when using phar)."
  Update LiteSpeed SAPI code to V6.4
  Fixed typo in Makefile.frag
  updated NEWS
  Remove outdate codes, make it clearer, although just a bit..
  Update NEWS
  ...

Conflicts:
	Zend/zend_compile.h
24e0b99
@igorw
igorw commented Nov 9, 2013

Re-opening against PHP-5.6.

@igorw igorw closed this Nov 9, 2013
@odoucet
odoucet commented on 8962f3f Jan 9, 2014

Why is this patch from 3 months ago, and not commited in any PHP version released on december ? This patch seems fine to me, and mandatory to handle large file uploads.

igorw replied Jan 9, 2014

I believe this might be for the upcoming PHP-5.6.

Any particular reason why it is not merged with 5.3 / 5.4 or 5.5 version ?

igorw replied Jan 9, 2014

You're asking the wrong person, I had nothing to do with this change. :)

m6w6 replied Jan 10, 2014

Because it only fixes an issue in PHP-5.6+ which comes with +2G-upload support..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.