Commit Graph

75804 Commits

Author SHA1 Message Date
Igor Wiedler
115c5ec726 Compile error on const definition conflicting with import 2013-08-25 00:05:55 +02:00
Igor Wiedler
85d4cfb00d Disallow using functions/consts defined in the same file
* Keep track of defined function and const filenames
* Prohibit use function foo if function foo exists
* Prohibit use const foo if const foo exists
2013-08-25 00:02:46 +02:00
Igor Wiedler
30f16c3540 Compile error on function definition conflicting with import 2013-08-23 23:39:42 +02:00
Igor Wiedler
5b18530e8c Add test cases for conflicting use and definition in same ns (stas) 2013-08-23 23:31:17 +02:00
Igor Wiedler
31d77053a1 More test cases for conflicting aliases 2013-08-22 15:51:26 +02:00
Danack
6b385ebc85 Removed assumption that \\ will be present
The function zend_add_ns_func_name_literal is called if the parser finds a function that is not in the global or current namespace. It assumes such a function will have a \\ in it, which is no longer true with the use function patch. The code change above removes that assumption and makes the test work:
PASS use and use function with the same alias [Zend/tests/use_function/conflicting_use_alias.phpt]
2013-08-22 15:51:26 +02:00
Igor Wiedler
2dbbb8ae4b Add test case for conflicting use and use function alias (stas) 2013-08-22 15:51:26 +02:00
Igor Wiedler
4adf49eeaf Import namespaced constants via new 'use const' sequence 2013-08-22 15:51:26 +02:00
Igor Wiedler
e1125a6a89 Correctly distinguish between functions and constants
So far 'use function' applied to both constants and functions. This
patch correctly separates the two.
2013-08-22 15:51:26 +02:00
Igor Wiedler
5dd41627be Add new 'use function' sequence for importing namespaced functions
This is specified as the use_function RFC:

* https://wiki.php.net/rfc/use_function
2013-08-22 15:51:25 +02:00
Nikita Popov
1a88fcc2d8 Remove trailing whitespace in test
Third try to make this work...
2013-08-22 13:09:53 +02:00
Nikita Popov
96045e1b33 Forgot newline in test 2013-08-22 12:26:34 +02:00
Nikita Popov
647059abc7 Merge branch 'PHP-5.5' 2013-08-22 11:47:55 +02:00
Nikita Popov
592677d810 Fix intl build
Turns out that you can't use implicit void pointer casts if intl
is compiled.
2013-08-22 11:46:51 +02:00
Nikita Popov
b668a26c2f Fix pgsql notice test failure 2013-08-22 11:31:56 +02:00
Christopher Jones
e212320a0c Remove duplicate calls to set filename & lineno for the DTRACE_FUNCTION_ENTRY/RETURN cases 2013-08-22 11:23:07 +02:00
Nikita Popov
4db494a3ab Merge branch 'PHP-5.5' 2013-08-22 11:01:19 +02:00
Nikita Popov
fc16b92313 Fix bug #46311: Pointer aliasing issue results in miscompile on gcc4.4
The code violated the strict aliasing restriction, because it
dereferenced the same pointer as zval** once and as void**
afterwards. Now both occurances dereference void** and cast to
zval* in the former case.
2013-08-22 10:56:50 +02:00
Christopher Jones
9507fcfdc5 Merge branch 'PHP-5.5'
* PHP-5.5:
  Suppress compiler warning "warning: variable ‘length’ set but not used [-Wunused-but-set-variable]"
  Suppress compiler warning "warning: variable ‘retcount’ set but not used [-Wunused-but-set-variable]"
2013-08-21 15:43:33 -07:00
Christopher Jones
11087eece7 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Suppress compiler warning "warning: variable ‘length’ set but not used [-Wunused-but-set-variable]"
  Suppress compiler warning "warning: variable ‘retcount’ set but not used [-Wunused-but-set-variable]"
2013-08-21 15:43:19 -07:00
Christopher Jones
54d4a28003 Suppress compiler warning "warning: variable ‘length’ set but not used [-Wunused-but-set-variable]" 2013-08-21 15:39:14 -07:00
Christopher Jones
1af111dd68 Suppress compiler warning "warning: variable ‘retcount’ set but not used [-Wunused-but-set-variable]" 2013-08-21 15:37:02 -07:00
Christopher Jones
0b60f32247 Merge branch 'master' of https://git.php.net/repository/php-src
* 'master' of https://git.php.net/repository/php-src:
  Suppress compliation warning "warning: passing argument 1 of ‘_efree’ discards qualifiers from pointer target type"
2013-08-21 15:23:50 -07:00
Christopher Jones
d2a2e949fe Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/repository/php-src:
  Suppress compliation warning "warning: passing argument 1 of ‘_efree’ discards qualifiers from pointer target type"
2013-08-21 15:23:48 -07:00
Christopher Jones
d0bede2efa Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  Suppress compliation warning "warning: passing argument 1 of ‘_efree’ discards qualifiers from pointer target type"
2013-08-21 15:23:48 -07:00
Christopher Jones
71ba571e53 Merge branch 'PHP-5.5'
* PHP-5.5:
  Suppress compliation warning "warning: passing argument 1 of ‘_efree’ discards qualifiers from pointer target type"
2013-08-21 15:07:13 -07:00
Christopher Jones
9895e8bbe6 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Suppress compliation warning "warning: passing argument 1 of ‘_efree’ discards qualifiers from pointer target type"
2013-08-21 15:07:03 -07:00
Christopher Jones
f38bd22ed2 Suppress compliation warning "warning: passing argument 1 of ‘_efree’ discards qualifiers from pointer target type" 2013-08-21 15:06:23 -07:00
Christopher Jones
d9bfe06194 Merge branch 'PHP-5.5'
* PHP-5.5:
  Reduce compilation noise during normal compilation:     php-5.5/ext/session/session.c:836: warning: unused variable ‘struc’     php-5.5/ext/session/session.c:836: warning: unused variable ‘num_key’     php-5.5/ext/session/session.c:836: warning: unused variable ‘key_length’     php-5.5/ext/session/session.c:836: warning: unused variable ‘key’     php-5.5/ext/session/session.c:835: warning: unused variable ‘key_type’     php-5.5/ext/session/session.c:834: warning: unused variable ‘_ht’     php-5.5/ext/session/session.c:857: warning: unused variable ‘has_value’     php-5.5/ext/session/session.c:856: warning: unused variable ‘namelen’     php-5.5/ext/session/session.c:853: warning: unused variable ‘name’     php-5.5/ext/session/session.c:852: warning: unused variable ‘p’
2013-08-21 10:35:07 -07:00
Christopher Jones
d85827fb7f Reduce compilation noise during normal compilation:
php-5.5/ext/session/session.c:836: warning: unused variable ‘struc’
    php-5.5/ext/session/session.c:836: warning: unused variable ‘num_key’
    php-5.5/ext/session/session.c:836: warning: unused variable ‘key_length’
    php-5.5/ext/session/session.c:836: warning: unused variable ‘key’
    php-5.5/ext/session/session.c:835: warning: unused variable ‘key_type’
    php-5.5/ext/session/session.c:834: warning: unused variable ‘_ht’
    php-5.5/ext/session/session.c:857: warning: unused variable ‘has_value’
    php-5.5/ext/session/session.c:856: warning: unused variable ‘namelen’
    php-5.5/ext/session/session.c:853: warning: unused variable ‘name’
    php-5.5/ext/session/session.c:852: warning: unused variable ‘p’

    php-5.5/ext/session/mod_user.c:191: warning: unused variable ‘ret’
2013-08-21 10:34:09 -07:00
Michael Wallner
4abee3730f Merge branch 'PHP-5.5'
* PHP-5.5:
  Fix pointer sign warning showing up in EVERY build
2013-08-21 19:18:29 +02:00
Michael Wallner
6181948592 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix pointer sign warning showing up in EVERY build
2013-08-21 19:18:11 +02:00
Michael Wallner
d8023d13eb Fix pointer sign warning showing up in EVERY build 2013-08-21 19:17:22 +02:00
Anthony Ferrara
90b489f826 Merge branch 'PHP-5.5'
* PHP-5.5:
  Fix return types of password API helper functions.
2013-08-21 12:11:10 -04:00
Anthony Ferrara
83e3466898 Fix return types of password API helper functions.
This fixes issues that were found during static analysis by cjones where failure was impossible to detect due to return type mangling (casting an int to a char, then comparing to an int).
2013-08-21 12:10:40 -04:00
Matteo Beccati
3ec28b1d1f Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed compiler warnings in ext/pgsql
  Fixed other compiler warnings in PDO_PGSQL
  Fixed compiler warning
  Update NEWS

Conflicts:
	ext/pdo_pgsql/pgsql_driver.c
2013-08-21 11:26:41 +02:00
Matteo Beccati
4283f75c34 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed compiler warnings in ext/pgsql
  Fixed other compiler warnings in PDO_PGSQL
  Fixed compiler warning
2013-08-21 11:24:27 +02:00
Matteo Beccati
540f325664 Fixed compiler warnings in ext/pgsql 2013-08-21 11:24:12 +02:00
Matteo Beccati
696852f2bd Fixed other compiler warnings in PDO_PGSQL 2013-08-21 11:22:33 +02:00
Matteo Beccati
5c06e5c2e0 Fixed compiler warning
I moved the constant to the enum in order to avoid this:
ext/pgsql/pgsql.c:3491: warning: comparison is always false due to limited range of data type

Works in gcc 4.6, but I'm not sure about other compilers.
2013-08-21 11:22:32 +02:00
Yasuo Ohgaki
7be3c74339 Update NEWS 2013-08-21 11:19:06 +09:00
Yasuo Ohgaki
aaf95aa1b6 Merge branch 'PHP-5.5'
* PHP-5.5:
  Add php_serialize session.serialize_handler. This patch closes
2013-08-21 11:06:11 +09:00
Yasuo Ohgaki
c51f77fe83 Add php_serialize session.serialize_handler. This patch closes
Request #25630
  Request #43980
  Request #54383
  Bug #65359

and many others similar to these that are closed as "wont fix" or
"not a bug".

Current serializers have limitations due to register_globals support
that are no longer supported. Changing existing serializer may cause
compatibility issue. Therefore, new handler is needed to remove
needless limitations.

php_serialize does not have special characters and allow numerical
index in $_SESSION. $_SESSION can be used as ordinary array.
2013-08-21 10:51:51 +09:00
Yasuo Ohgaki
7318b857aa Update NEWS 2013-08-21 10:38:59 +09:00
Yasuo Ohgaki
d2a99a7c31 Fixed Bug #65475 2013-08-21 08:12:11 +09:00
Yasuo Ohgaki
1641158644 Fixed Bug #65475 2013-08-21 08:11:59 +09:00
Christopher Jones
89c4abab2b Merge branch 'PHP-5.5'
* PHP-5.5:
  Quash compile warning "warning: 'flags' may be used uninitialized in this function"
2013-08-20 13:37:22 -07:00
Christopher Jones
268c2884fa Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Quash compile warning "warning: 'flags' may be used uninitialized in this function"
2013-08-20 13:37:02 -07:00
Christopher Jones
e9b12bedc3 Quash compile warning "warning: 'flags' may be used uninitialized in this function" 2013-08-20 13:36:18 -07:00
Christopher Jones
92b946bb9e Merge branch 'master' of https://git.php.net/repository/php-src
* 'master' of https://git.php.net/repository/php-src:
  Fix bug #64953 (Postgres prepared statement positional parameter casting)
2013-08-20 11:27:01 -07:00