Skip to content

Commit f9927a6

Browse files
committed
Merge mainstream 'master' branch into refactoring
During merge I had to revert: Nikita's patch for php_splice() (it probably needs to be applyed again) Bob Weinand's patches related to constant expression handling (we need to review them carefully) I also reverted all our attempts to support sapi/phpdbg (we didn't test it anyway) Conflicts: Zend/zend.h Zend/zend_API.c Zend/zend_ast.c Zend/zend_compile.c Zend/zend_compile.h Zend/zend_constants.c Zend/zend_exceptions.c Zend/zend_execute.c Zend/zend_execute.h Zend/zend_execute_API.c Zend/zend_hash.c Zend/zend_highlight.c Zend/zend_language_parser.y Zend/zend_language_scanner.c Zend/zend_language_scanner_defs.h Zend/zend_variables.c Zend/zend_vm_def.h Zend/zend_vm_execute.h ext/date/php_date.c ext/dom/documenttype.c ext/hash/hash.c ext/iconv/iconv.c ext/mbstring/tests/zend_multibyte-10.phpt ext/mbstring/tests/zend_multibyte-11.phpt ext/mbstring/tests/zend_multibyte-12.phpt ext/mysql/php_mysql.c ext/mysqli/mysqli.c ext/mysqlnd/mysqlnd_reverse_api.c ext/mysqlnd/php_mysqlnd.c ext/opcache/ZendAccelerator.c ext/opcache/zend_accelerator_util_funcs.c ext/opcache/zend_persist.c ext/opcache/zend_persist_calc.c ext/pcre/php_pcre.c ext/pdo/pdo_dbh.c ext/pdo/pdo_stmt.c ext/pdo_pgsql/pgsql_driver.c ext/pgsql/pgsql.c ext/reflection/php_reflection.c ext/session/session.c ext/spl/spl_array.c ext/spl/spl_observer.c ext/standard/array.c ext/standard/basic_functions.c ext/standard/html.c ext/standard/mail.c ext/standard/php_array.h ext/standard/proc_open.c ext/standard/streamsfuncs.c ext/standard/user_filters.c ext/standard/var_unserializer.c ext/standard/var_unserializer.re main/php_variables.c sapi/phpdbg/phpdbg.c sapi/phpdbg/phpdbg_bp.c sapi/phpdbg/phpdbg_frame.c sapi/phpdbg/phpdbg_help.c sapi/phpdbg/phpdbg_list.c sapi/phpdbg/phpdbg_print.c sapi/phpdbg/phpdbg_prompt.c
2 parents 4e7cbf3 + b82d077 commit f9927a6

File tree

777 files changed

+221569
-153503
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

777 files changed

+221569
-153503
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,8 @@ ext/pdo_sqlite/sqlite3.h
206206
ext/pdo_sqlite/tests/*.db
207207
ext/pdo_sqlite/tests/*.tmp
208208
ext/phar/phar.phar
209+
ext/phar/phar.1
210+
ext/phar/phar.phar.1
209211
ext/pspell/tests/*.tmp
210212
ext/reflection/xml
211213
ext/reflection/html
@@ -237,12 +239,16 @@ sapi/apache/libphp5.module
237239
sapi/apache2handler/libphp5.module
238240
sapi/apache_hooks/libphp5.module
239241
sapi/cgi/php-cgi
242+
sapi/cgi/php-cgi.1
240243
sapi/cli/php.1
241244
sapi/fpm/php-fpm
242245
sapi/fpm/php-fpm.1
243246
sapi/fpm/init.d.php-fpm
244247
sapi/fpm/php-fpm.conf
245248
sapi/fpm/fpm/php-cgi
249+
sapi/phpdbg/phpdbg_parser.c
250+
sapi/phpdbg/phpdbg_parser.h
251+
sapi/phpdbg/phpdbg
246252
scripts/php-config
247253
scripts/phpize
248254
scripts/man1/*.1

CODING_STANDARDS

+23-3
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Exceptions:
8282
library may need to control or free the memory, or when the memory in
8383
question needs to survive between multiple requests.
8484

85-
Naming Conventions
85+
User Functions/Methods Naming Conventions
8686
------------------
8787

8888
1. Function names for user-level functions should be enclosed with in
@@ -163,6 +163,26 @@ Naming Conventions
163163
'foobar'
164164
'foo_bar'
165165

166+
Internal Function Naming Convensions
167+
----------------------
168+
169+
1. Functions that are part of the external API should be named
170+
'php_modulename_function()' to avoid symbol collision. They should be in
171+
lowercase, with words underscore delimited. Exposed API must be defined
172+
in 'php_modulename.h'.
173+
174+
PHPAPI char *php_session_create_id(PS_CREATE_SID_ARGS);
175+
176+
Unexposed module function should be static and should not be defined in
177+
'php_modulename.h'.
178+
179+
static int php_session_destroy(TSRMLS_D)
180+
181+
2. Main module source file must be named 'modulename.c'.
182+
183+
3. Header file that is used by other sources must be named 'php_modulename.h'.
184+
185+
166186
Syntax and indentation
167187
----------------------
168188

@@ -181,9 +201,9 @@ Syntax and indentation
181201
of PHP or one of its standard modules, please maintain the K&R
182202
style. This applies to just about everything, starting with
183203
indentation and comment styles and up to function declaration
184-
syntax. Also see Indentstyle_.
204+
syntax. Also see Indentstyle.
185205

186-
.. _Indentstyle: http://www.catb.org/~esr/jargon/html/I/indent-style.html
206+
Indentstyle: http://www.catb.org/~esr/jargon/html/I/indent-style.html
187207

188208
3. Be generous with whitespace and braces. Keep one empty line between the
189209
variable declaration section and the statements in a block, as well as

NEWS

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ PHP NEWS
55
- DBA:
66
. Fixed bug #62490 (dba_delete returns true on missing item (inifile)). (Mike)
77

8+
- Standard:
9+
. Removed call_user_method() and call_user_method_array() functions. (Kalle)
10+
811
- XSL:
912
. Fixed bug #64776 (The XSLT extension is not thread safe). (Mike)
1013

README.EXT_SKEL

+24-6
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,29 @@ HOW TO USE IT
4545

4646
--proto=filename.
4747

48+
SOURCE AND HEADER FILE NAME
49+
50+
./ext_skel generates 'module_name.c' and 'php_module_name.h' as main source
51+
and header files. Keep these names.
52+
53+
Module functions (User functions) must be named
54+
55+
module_name_function()
56+
57+
When you need to expose module functions to other modules, expose functions
58+
strictly needed by others. Exposed internal function must be named
59+
60+
php_module_name_function()
61+
62+
See also CODING_STANDARDS.
63+
64+
4865
FORMAT OF FUNCTION DEFINITIONS FILE
4966

5067
All the definitions must be on one line. In it's simplest form, it's just
5168
the function name, e.g.
5269

53-
my_function
70+
module_name_function
5471

5572
but then you'll be left with an almost empty function body without any
5673
argument handling.
@@ -72,8 +89,9 @@ FORMAT OF FUNCTION DEFINITIONS FILE
7289

7390
An example:
7491

75-
my_function(int arg1, int arg2 [, int arg3 [, int arg4]]) this is my 1st
92+
module_name_function(int arg1, int arg2 [, int arg3 [, int arg4]])
7693

94+
Arguments arg1 and arg2 are required.
7795
Arguments arg3 and arg4 are optional.
7896

7997
If possible, the function definition should also contain it's return type
@@ -133,15 +151,15 @@ EXAMPLE
133151

134152
The following _one_ line
135153

136-
bool my_drawtext(resource image, string text, resource font, int x, int y [, int color])
154+
bool module_name_drawtext(resource image, string text, resource font, int x, int y [, int color])
137155

138156
will create this function definition for you (note that there are a few
139157
question marks to be replaced by you, and you must of course add your own
140158
value definitions too):
141159

142-
/* {{{ proto bool my_drawtext(resource image, string text, resource font, int x, int y [, int color])
160+
/* {{{ proto bool module_name_drawtext(resource image, string text, resource font, int x, int y [, int color])
143161
*/
144-
PHP_FUNCTION(my_drawtext)
162+
PHP_FUNCTION(module_name_drawtext)
145163
{
146164
char *text = NULL;
147165
int argc = ZEND_NUM_ARGS();
@@ -164,7 +182,7 @@ PHP_FUNCTION(my_drawtext)
164182
ZEND_FETCH_RESOURCE(???, ???, font, font_id, "???", ???_rsrc_id);
165183
}
166184

167-
php_error(E_WARNING, "my_drawtext: not yet implemented");
185+
php_error(E_WARNING, "module_name_drawtext: not yet implemented");
168186
}
169187
/* }}} */
170188

README.RELEASE_PROCESS

+3-3
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ pointing out "the location of the release" and "the possible release date of
101101
either the next RC, or the final release".
102102

103103
2. Send an email (see example here http://news.php.net/php.pear.qa/5201) **To**
104-
``php-qa@lists.php.net`` and ``primary-qa-tests@lists.php.net``.
104+
``php-qa@lists.php.net`` and ``primary-qa-tester@lists.php.net``.
105105
This email is to notify the selected projects about a new release so that they
106106
can make sure their projects keep working. Make sure that you have been setup
107-
as a moderator for ``primary-qa-tests@lists.php.net`` by having someone (Wez,
107+
as a moderator for ``primary-qa-tester@lists.php.net`` by having someone (Hannes, Dan,
108108
Derick) run the following commands for you:
109109

110110
``ssh lists.php.net``
@@ -139,7 +139,7 @@ Rolling a stable release
139139
1. Checkout your release branch, you should have created when releasing previous RC
140140
and bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``.
141141

142-
2. If a CVE commit needs to be merged to the release, then have it commited to
142+
2. If a CVE commit needs to be merged to the release, then have it committed to
143143
the base branches and merged upwards as usual (f.e commit the CVE fix to 5.3,
144144
merge to 5.4, 5.5 etc...). Then you can cherry-pick it in your release branch.
145145
Don't forget to update NEWS manually in an extra commit then.

README.SUBMITTING_PATCH

+11
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,17 @@ Please make the mail subject prefix "[PATCH]". If attaching a patch,
5050
ensure it has a file extension of ".txt". This is because only MIME
5151
attachments of type 'text/*' are accepted.
5252

53+
The preferred way to propose PHP patch is sending pull request from
54+
github.
55+
56+
https://github.com/php/php-src
57+
58+
Fork the official PHP repository and send a pull request. A
59+
notification will be sent to the pull request mailing list. Sending a
60+
note to PHP Internals list (internals@lists.php.net) may help getting
61+
more feedback and quicker turnaround. You can also add pull requests
62+
to bug reports at http://bugs.php.net/.
63+
5364

5465
PHP Documentation Patches
5566
-------------------------

README.TESTING

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
------------------
33
Failed tests usually indicate a problem with your local system setup
44
and not within PHP itself (at least for official PHP release versions).
5-
You may decide to automaticaly submit a test summary to our QA workflow
5+
You may decide to automatically submit a test summary to our QA workflow
66
at the end of a test run.
77
Please do *not* submit a failed test as a bug or ask for help on why
88
it failed on your system without providing substantial backup information

TSRM/TSRM.dsp

-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

TSRM/tsrm_config_common.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define TSRM_CONFIG_COMMON_H
33

44
#ifndef __CYGWIN__
5-
# if WINNT|WIN32
5+
# ifdef _WIN32
66
# define TSRM_WIN32
77
# endif
88
#endif

UPGRADING

+2
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,5 @@ PHP X.Y UPGRADE NOTES
7878
11. Other Changes
7979
========================================
8080

81+
- Standard
82+
. call_user_method() and call_user_method_array() no longer exists.

Zend/Zend.dsp

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Zend/tests/arg_unpack/basic.phpt

+5-9
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ test(...getArray([1, 2, 3]));
3030
test(...arrayGen([]));
3131
test(...arrayGen([1, 2, 3]));
3232

33-
test(1, ...[2, 3], ...[4, 5], 6);
34-
test(1, ...getArray([2, 3]), ...arrayGen([4, 5]), 6);
33+
test(1, ...[2, 3], ...[4, 5]);
34+
test(1, ...getArray([2, 3]), ...arrayGen([4, 5]));
3535

3636
test2(...[1, 2]);
3737
test2(...[1, 2, 3]);
38-
test2(...[1], ...[], ...[], ...[2, 3], 4, ...[5, 6]);
38+
test2(...[1], ...[], ...[], ...[2, 3], ...[4, 5]);
3939

4040
?>
4141
--EXPECT--
@@ -75,7 +75,7 @@ array(3) {
7575
[2]=>
7676
int(3)
7777
}
78-
array(6) {
78+
array(5) {
7979
[0]=>
8080
int(1)
8181
[1]=>
@@ -86,10 +86,8 @@ array(6) {
8686
int(4)
8787
[4]=>
8888
int(5)
89-
[5]=>
90-
int(6)
9189
}
92-
array(6) {
90+
array(5) {
9391
[0]=>
9492
int(1)
9593
[1]=>
@@ -100,8 +98,6 @@ array(6) {
10098
int(4)
10199
[4]=>
102100
int(5)
103-
[5]=>
104-
int(6)
105101
}
106102
int(1)
107103
int(2)

0 commit comments

Comments
 (0)