Commit Graph

963 Commits

Author SHA1 Message Date
Nikita Popov
6c48da9a50 Fixed bug #79062
Back up the doc comment when performing heredoc scanahead.
2020-02-28 17:06:05 +01:00
Nikita Popov
07bda97e76 Fixed bug #79115 2020-01-17 11:37:35 +01:00
Joe Watkins
1c9b62fbd4
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #78697: inaccurate error message
2019-10-21 09:23:26 +02:00
Fabien Villepinte
bea2ff88c9
Fix bug #78697: inaccurate error message 2019-10-21 09:22:09 +02:00
Nikita Popov
90318fbcbe Merge branch 'PHP-7.2' into PHP-7.3 2019-05-09 12:35:11 +02:00
Nikita Popov
35c80583f0 Fixed bug #75186 2019-05-09 12:33:53 +02:00
Nikita Popov
14047b50b4 Merge branch 'PHP-7.2' into PHP-7.3 2019-04-15 10:25:11 +02:00
Nikita Popov
e9c0367fdc Fixed bug #77882 2019-04-15 10:22:40 +02:00
Nikita Popov
620a753185 Merge branch 'PHP-7.2' into PHP-7.3 2019-03-22 12:41:02 +01:00
Nikita Popov
da35fa2cb8 Fixed bug #77772 2019-03-22 12:39:27 +01:00
Peter Kokot
b746e69887 Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:32:30 +02:00
Peter Kokot
f1d7e3ca0b Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:31:31 +02:00
Peter Kokot
782352c54a Trim trailing whitespace in *.phpt 2018-10-14 19:45:12 +02:00
Peter Kokot
17ccbeec32 Trim trailing whitespace in *.phpt 2018-10-14 19:44:14 +02:00
Peter Kokot
1c850bfcca Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:55:24 +02:00
Peter Kokot
60a69daec6 Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:54:08 +02:00
Peter Kokot
902d39a3a7 Trim trailing whitespace in source code files 2018-10-13 14:14:50 +02:00
Nikita Popov
9f3ea20320 Merge branch 'PHP-7.2' into PHP-7.3 2018-10-03 10:50:27 +02:00
Nikita Popov
54aa76167b Merge branch 'PHP-7.1' into PHP-7.2 2018-10-03 10:50:16 +02:00
Nikita Popov
945f315506 Reflection: Copy invoke function also in the variadic case
It doesn't matter how the parameters are provided, we always have
to copy the trampoline invoke function.
2018-10-03 10:48:42 +02:00
Nikita Popov
a42801abe3 Merge branch 'PHP-7.2' into PHP-7.3 2018-10-02 18:20:25 +02:00
Nikita Popov
f0647edd88 Fixed bug #66430 2018-10-02 18:19:53 +02:00
Nikita Popov
b8392803f9 Merge branch 'PHP-7.2' into PHP-7.3 2018-10-02 17:48:56 +02:00
Nikita Popov
d2477b284b Fixed bug #76936 2018-10-02 17:47:07 +02:00
Christoph M. Becker
21cd552e1e Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #74454: Wrong exception being thrown when using ReflectionMethod
2018-09-05 15:10:27 +02:00
Christoph M. Becker
7a2c9585c4 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #74454: Wrong exception being thrown when using ReflectionMethod
2018-09-05 15:07:59 +02:00
Christoph M. Becker
c0a389a927 Fix #74454: Wrong exception being thrown when using ReflectionMethod
If zend_throw_exception_ex() already threw an exception, we should not
throw again.
2018-09-05 15:05:19 +02:00
Dmitry Stogov
ab8094c666 Pack zend_constant.flags and zend_constant.module_number into reserved space inside zend_constant.value. 2018-07-26 12:58:07 +03:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Dmitry Stogov
85ee47eda0 Changed structure of zend_class_entry.trait_aliases and zend_class_entry.trait_precedences to avoid keeping "intermediate" trait references, that are used only during inheritance. 2018-07-11 18:56:10 +03:00
Dmitry Stogov
67b4c3379a Uze ZVAL_COPY_DEREF() instead of ZVAL_DEREF() and ZVAL_COPY() 2018-07-09 12:46:46 +03:00
Dmitry Stogov
3780b027dd Use zval_ptr_dtor() instead of zval_dtor() in internal functions that destroy new created object (This is safer and produces less code) 2018-07-05 14:25:17 +03:00
Dmitry Stogov
b6cc4d2009 Use zval_ptr_dtor() instead of zval_dtor() in internal functions that destroy new created object (This is safer and produces less code) 2018-07-05 11:54:26 +03:00
Dmitry Stogov
4a475a4976 Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized destructors.
zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places.
Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
2018-07-04 19:22:24 +03:00
Nikita Popov
23ae6ca405 Fix check for invoking abstract method 2018-07-02 21:33:09 +02:00
Nikita Popov
826e403d2c Add $ before property name in error message 2018-07-02 21:24:38 +02:00
Nikita Popov
04824aa263 Merge branch 'PHP-7.2' 2018-07-02 18:58:01 +02:00
Nikita Popov
9bbb9e537c Merge branch 'PHP-7.1' into PHP-7.2 2018-07-02 18:57:25 +02:00
Nikita Popov
c97b8bbf82 Fixed bug #75231
The behavior is now consistent with ReflectionMethod.
2018-07-02 18:56:27 +02:00
Nikita Popov
1b66ba17ad Remove unnecessary explicit argc check
Instead specify a default value for the argument, which is more
idiomatic.
2018-07-02 18:29:30 +02:00
Nikita Popov
76f1d98a0c Remove METHOD_NOTSTATIC checks in reflection
PHP does not allow static calls to non-static internal methods
anyway, so these checks are redundant.
2018-07-02 18:26:48 +02:00
Nikita Popov
7ac06d66d4 Add zend_update_static_property_ex API
And cleanup the implementation to perform a normal by-value
assignment.
2018-06-29 22:56:59 +02:00
Nikita Popov
813b6fc950 Add zend_read_static_property_ex API
For symmetry with zend_read_property_ex.
2018-06-29 22:49:15 +02:00
Nikita Popov
db7ead0768 Fix ReflectionProperty::get/setValue() on internal static property
This was broken by 6dc0cd868d, which
moved static property initialization outside of constant updating.

Instead of replicating logic, use zend_get_static_property() API
in the reflection implementation, just like we're using
read_property for non-static proprety access.
2018-06-28 22:45:26 +02:00
Xinchen Hui
8e940654e1 Merge branch 'PHP-7.2'
* PHP-7.2:
  Update NEWS
  Fixed bug #76536 (PHP crashes with core dump when throwing exception in error handler). (Laruence)
2018-06-28 12:38:26 +08:00
Xinchen Hui
5d7f9dcca7 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76536 (PHP crashes with core dump when throwing exception in error handler). (Laruence)
2018-06-28 12:37:58 +08:00
Xinchen Hui
1f6b842af4 Fixed bug #76536 (PHP crashes with core dump when throwing exception in error handler). (Laruence) 2018-06-28 12:37:33 +08:00
Nikita Popov
bddb085a68 Store unmangled name in ReflectionProperty
Avoid redundant unmangles and string copies, where possible.
2018-06-27 23:52:21 +02:00
Nikita Popov
78f2a1b81d Optimize ReflectionProperty constructor
Perform HT lookups using a zend_string. Don't copy the name for
the "name" property. We can always use the original name directly,
as properties case case-sensitive, so the original name should
always match the unmangled name of the fetched property info.
2018-06-27 23:21:06 +02:00
Dmitry Stogov
7f67513ca3 Lazy function copying from op_cache SHM into process memory 2018-06-25 19:53:58 +03:00