Commit graph

109417 commits

Author SHA1 Message Date
Dmitry Stogov
359f19edc9 Optimize substr() edge-case conditions 2018-10-29 13:11:41 +03:00
Christoph M. Becker
52d91260df Merge branch 'PHP-7.3'
* PHP-7.3:
  [ci skip] Update UPGRADING
2018-10-28 12:48:49 +01:00
Christoph M. Becker
eca3b9629f [ci skip] Update UPGRADING
PR #3317[1] is relevant for the migration guide, so we add a respective
note in UPGRADING.

[1] <https://github.com/php/php-src/pull/3317>
2018-10-28 12:48:07 +01:00
Christoph M. Becker
c37beb7eb5 Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix #71592: External entity processing never fails
2018-10-27 17:31:29 +02:00
Christoph M. Becker
829b0df77b Fix #71592: External entity processing never fails
If the callback set via `xml_set_external_entity_ref_handler()` returns
a falsy value, parsing is supposed to stop and the error number set to
`XML_ERROR_EXTERNAL_ENTITY_HANDLING`.  This is already correctly done
by the libexpat binding, but the libxml2 binding ignores the return
value.  We fix this by calling `xmlStopParser()` which is available as
of libxml 2.1.0[1] (PHP-7.1 requires at least libxml 2.6.11 anyway),
and setting the desired `errNo` ourselves.

[1] <http://xmlsoft.org/news.html>
2018-10-27 17:30:13 +02:00
Christoph M. Becker
0d6490598d Add TIDY_TAG_* constants supported by libtidy 5
Cf. <http://api.html-tidy.org/tidy/tidylib_api_5.0.0/tidyenum_8h.html#ae5b597c0999422ff383f08ab595ef5e8a16d20becf3c3cb022ddabccc83d8c314>.
2018-10-27 16:17:09 +02:00
Gabriel Caruso
388c21e764
Add is_iterable to opcache Optimizer 2018-10-26 08:14:45 -03:00
Dmitry Stogov
68694c9997 Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src:
  [ci skip] Fix indentation in UPGRADING.
2018-10-25 23:42:58 +03:00
Dmitry Stogov
10abc1f010 Don't wrap php_module_shutdown() with zend_try. executor_globals are released in ZTS build, and this leads to crash. 2018-10-25 23:41:26 +03:00
Adam Harvey
1eb5bc021b Merge branch 'PHP-7.3'
* PHP-7.3:
  [ci skip] Fix indentation in UPGRADING.
2018-10-25 11:59:23 -07:00
Adam Harvey
bca0a7e285 [ci skip] Fix indentation in UPGRADING. 2018-10-25 11:59:10 -07:00
Dmitry Stogov
33e777acbf Improved shared interned strings handling. The previous implementation worked incorrectly in ZTS build. It changed strings only in function/class tables of one thread. Now all threads gets the same shared interned strings. Also, on shutdown, we don't try to replace SHM interned strings back to process strings, but delay dettachment of SHM instead. 2018-10-25 20:30:51 +03:00
Dmitry Stogov
f33da6f338 Don't use request heap at shutdown 2018-10-25 19:24:39 +03:00
Nikita Popov
3d415644f7 Merge branch 'PHP-7.3' 2018-10-25 16:44:54 +02:00
Nikita Popov
b9431ef4d5 Don't optimize function if inference failed
This was respected only for the single-function optimizations, not
in func-info mode.
2018-10-25 16:44:24 +02:00
Nikita Popov
78c2e0e342 Merge branch 'PHP-7.2' into PHP-7.3 2018-10-25 16:44:19 +02:00
Nikita Popov
902ec36710 Merge branch 'PHP-7.1' into PHP-7.2 2018-10-25 16:43:36 +02:00
Nikita Popov
f1ceec5533 Fixed bug #77058
Account for the fact that undef must be interpreted as null for
the purposes of INC/DEC inference.
2018-10-25 16:37:41 +02:00
Nikita Popov
e7153e8a2f Improve "narrowing" error message
By including the opcode name.
2018-10-25 16:36:23 +02:00
Anatol Belski
40808ac41e Remove unused var 2018-10-24 23:37:32 +02:00
Peter Kokot
22c249347e Remove ext/json parser files generated by bison
The parser files for ext/json are generated by bison from the *.y file.
Parser files in Zend and sapi/phpdbg already follow such approach of
these files being ignored from tracking in the Git repository and they
are shipped via the release packages later on. This way the end users
still don't need to have bison dependency installed to install PHP.

The genfiles script was refactored to generate the ext/json parser and
lexer files.
2018-10-24 20:13:04 +02:00
Peter Kokot
220a2239a6 Fix run-tests.php for running phpdbg and certain test sections
Certain sections, such as --EXTENSIONS--, --SKIPIF--, and --CLEAN--
require to be executed using only PHP CLI or PHP CGI SAPIs and cannot be
processed with the phpdbg.
2018-10-24 16:21:57 +02:00
Peter Kokot
0b63544f25 Normalize .gitignore
Changes:
- Added introductory paragraph to explain the file for newcomers and
  where to ignore local editor configurations as a common practice
  when using Git.
- Patterns organized into several main context sections for a better
  overview of the php-src directory structure and which files get
  generated where.
- Added comments describing reasons for ignoring particular file(s).
- Patterns normalized according to Git ignore blob patterns. Absolute
  paths are different than relative paths and similar fixes.
- Folders patterns have appended ending slash for readability to
  distinguish them from files.

Removed ignore patterns:
- Removed `sapi/phpdbg/build` pattern since it doesn't seem to be
  relevant anymore in the php-src repository.
- The `acconfig.h` pattern removed in favor of the more recent Autoconf
  versions.
- Removed patterns for `.FBCIndex` `.FBCLockFolder` folders. These were
  generated on old Mac OS systems [1] using the Sherlock [2] software
  and can be today ignored using a global gitignore file if needed.
  Newer macOS systems don't generate these anymore.
- Removed `php_version.h` pattern since the `main/php_version.h` file is
  tracked by Git.
- Removed `*.mk` pattern since few *.mk files are tracked by Git and new
  ones aren't generated during build process.
- Removed `**/tests/**/*.txt` pattern. This has been refactored via
  595a395cb9 and current tests also clean
  the generated `*.txt` files as soon as they are executed. Since there
  are several `*.txt` files in the repository tracked by Git already and
  renaming them would be counter productive so the pattern is now removed.
  In case there will be a need to adjust it, we can rename the generated
  `*.txt` into something else instead (ideally into `*.tmp`) to not
  conflict with already tracked `*.txt` files in tests.
- Removed `ext/*/scan_makefile_in.awk` and `scan_makefile_in.awk` patterns
  since these are already included in the `/ext/*/build/` pattern.
- Removed the `/ext/*/libs.mk` pattern since these auxilary Makefiles
  have been used in previous build system and made obsolete via the commit
  9d9d39a0de.
- Removed pattern for configuration header `ext/pdo_sqlite/sqlite3.h` since
  it is not generated anymore in the current code.
- Removed `main/streams/build-defs.h` pattern since this file is not
  generated.
- Removed `test.php3` pattern. These don't seem to be present in the current
  PHP source code nor used since PHP 3.
- Removed `/ext/oci8/tests/*.vglog` pattern since the tests don't seem to
  produce these files.
- Removed pattern for Visual Studio's `*.ncb` files. Since the Visual
  Studio 2010 they are no longer used.
- Removed `ext/sqlite3/tests/phpsql*` pattern. It was part of the `ext/sqlite/tests`.
- Removed `shlibtool` pattern since the shlibtool file is not generated
  anymore. It was once part of the libtool usage and customized naming
  used in the previous build system in Makefiles. Such naming was later
  removed and only libtool was used.
- Removed `meta_ccld` pattern since it is no longer relevant via
  a5b55416f4
- Pattern `meta_cc` has been removed via e5176fe60a.
- Pattern `dynlib.m4` removed since the file is no longer generated via
  9d9d39a0de
- Pattern `debug.log` removed since the Autoconf Macro PHP_DEBUG_MACRO
  is not called anymore and this file not generated anymore.
- Pattern `results.txt` removed. It was once part of the logging results
  of test files by Netware and previous Windows builds.
- Removed `_libs` pattern in favor of only `.libs`. These directories
  were once generated by Automake and Libtool on systems that didn't
  support the dot folder `.libs` (MS-DOS).
- Removed `*.opt` pattern since it was used by Visual Studio 6. Later
  versions of Visual Studio don't use these anymore.
- Removed `*.plg` pattern. It was build log generated by Visual Studio 6.
- Removed `core` pattern since it was probably related to commit
  fd7153b0f3 and is today not used.
- Removed ˙*.˙, ˙diff`, and ˙*.tgz` patterns since they don't seem to be
  generated in the current code on the first glance. In case these will be
  one day required to ignore again, they can be simply added back again.
- Removed Emacs specific interlock files pattern `.#*`. The number of
  editors and IDEs specific files is very big. Emacs editors also produce
  some other files such as `#*#` for autosave feature, which were previously
  not ignored. To fully and properly support all additional patterns these
  could be added to .gitignore files. A much more sustainable and better
  practice is to use a global gitignore file on the local system or the
  `.git/info/exclude` per repository basis for these in particular.

Added patterns:
- Added new pattern for `*.obj` standard object files in the Windows
  section. These are generated by Visual Studio.
- Added `/ext/*/run-tests.php` patterns for extensions.
- Reversed patterns for particular tracked `/win32/build/Makefile`, `config.h`
  files and `.patch` files.
- Added patterns for generated dtrace files `/ext/oci8/oci8_dtrace_gen.h`

Other changes:
- All `conftest*` patterns merged into a single one.
- Pattern `*.mem` made more specific where the memory check files get
  generated by `run-tests.php -m`, i.e. `**/tests/**/*.mem`.
- Fixed `/Zend/zend_dtrace_gen.h.bak` `hbak` typo.

[1] http://www.westwind.com/reference/OS-X/invisibles.html
[2] https://en.wikipedia.org/wiki/Sherlock_(software)
2018-10-24 16:20:52 +02:00
Dmitry Stogov
b6ef8998d5 Merge branch 'PHP-7.3'
* PHP-7.3:
  Fixed reseting of interned strings buffer.
2018-10-24 15:46:22 +03:00
Dmitry Stogov
335fb94d54 Fixed reseting of interned strings buffer. 2018-10-24 15:45:34 +03:00
Dmitry Stogov
a404383118 Fixed build in directory different from source 2018-10-24 12:45:04 +03:00
Dmitry Stogov
d1e14e2cc0 Merge branch 'PHP-7.3'
* PHP-7.3:
  Make php_plain_files_wrapper to be writable (workaround for swoole)
2018-10-24 11:50:18 +03:00
Dmitry Stogov
770fe51bfd Make php_plain_files_wrapper to be writable (workaround for swoole) 2018-10-24 11:49:44 +03:00
Joe Watkins
33fa02ea38
bump versions 2018-10-24 08:43:27 +02:00
Peter Kokot
c0446d55a2 Remove phpdbg parser files generated by bison
The parser files for phpdbg are generated by bison from the *.y file.
Parser files in Zend already follows such approach of these files being
ignored from tracking in the Git repository and they are shipped via
the release packages. This way the end user still don't need to have
bison dependency installed to install PHP.

The genfiles script was refactored to generate the phpdbg parser and lexer
files.

Empty comment in phpdbg parser y template file has been changed to the
YACC compliant /* empty */ instead of custom one.
2018-10-23 19:04:13 +02:00
Nikita Popov
1362d8e103 Fix conflicts in phpdbg parser 2018-10-23 16:22:16 +02:00
Dmitry Stogov
e3688c2180 Refetetch function name on exceptional path to allow better code on fast code path. 2018-10-23 17:12:49 +03:00
Nikita Popov
f844a2b29d Merge branch 'PHP-7.3' 2018-10-23 14:57:21 +02:00
Υоаnn B
5df17425d3 fix typo in sysvsem.c 2018-10-23 14:57:03 +02:00
Nikita Popov
ed7d98ce13 Merge branch 'PHP-7.3' 2018-10-23 14:25:22 +02:00
Nikita Popov
3fb0f34059 Merge branch 'PHP-7.2' into PHP-7.3 2018-10-23 14:24:55 +02:00
Cameron Porter
db47e35373 Fixed bug #50675
SOAP: Stop overwriting the node name when creating an XML node
for an object reference.
2018-10-23 14:20:19 +02:00
Remi Collet
9271f9482b Merge branch 'PHP-7.3'
* PHP-7.3:
  bump to 7.2.13-dev
2018-10-23 12:16:49 +02:00
Remi Collet
0d273cf95d Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  bump to 7.2.13-dev
  Updated to version 2018.6 (2018f)
  Updated to version 2018.6 (2018f)
2018-10-23 12:16:31 +02:00
Remi Collet
1d5baf167a bump to 7.2.13-dev 2018-10-23 12:15:30 +02:00
Christoph M. Becker
46493044f1 Merge branch 'PHP-7.3'
* PHP-7.3:
  [ci skip] Update NEWS wrt. php-7.3.0RC4 tagging
2018-10-23 12:11:15 +02:00
Christoph M. Becker
4ffa415500 [ci skip] Update NEWS wrt. php-7.3.0RC4 tagging 2018-10-23 12:10:09 +02:00
Dmitry Stogov
6f91090f6a Inlining in the most frequently used code paths 2018-10-23 12:46:44 +03:00
Dmitry Stogov
fd080a06d8 Fixed test failurs introduced by 9c144e0d82 2018-10-23 12:46:12 +03:00
Dmitry Stogov
0459640fcd Use persistent strings only for persistent connections 2018-10-23 10:43:58 +03:00
Nikita Popov
149e6aaa99 Fix accessibility checks for dynamic properties
A dynamic property may be shadowed by a private/protected property.
Make sure we check property accessibility for non-indirect
properties as well.

Closes #3626.
2018-10-22 16:46:33 +02:00
Derick Rethans
fd3d2755dc Updated to version 2018.6 (2018f) 2018-10-22 12:05:42 +01:00
Derick Rethans
2a0d7036c3 Empty merge 2018-10-22 12:05:42 +01:00
Derick Rethans
c3a8313136 Updated to version 2018.6 (2018f) 2018-10-22 12:05:40 +01:00
Derick Rethans
c22b9e0115 Empty merge 2018-10-22 12:05:40 +01:00