#
daa94cf2 |
| 29-Sep-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Implement request #30622: make $namespace parameter functional This parameter never actually did anything and was forgotten about. We solve this by detecting when we have a $namespace ar
Implement request #30622: make $namespace parameter functional This parameter never actually did anything and was forgotten about. We solve this by detecting when we have a $namespace argument (that won't conflict with the name argument) and creating a Clark notation name out of it. Closes GH-16123.
show more ...
|
#
2d029efd |
| 18-Jul-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Avoid duplicating the filename string when profiling in XSL (#15010)
|
#
a59103fe |
| 18-Jul-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix trampoline leak in xpath callables Closes GH-15009.
|
#
c6d0181c |
| 06-Jul-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix narrowing warning
|
#
11accb5c |
| 25-Jun-2024 |
Arnaud Le Blanc |
Preferably include from build dir (#13516) * Include from build dir first This fixes out of tree builds by ensuring that configure artifacts are included from the build dir.
Preferably include from build dir (#13516) * Include from build dir first This fixes out of tree builds by ensuring that configure artifacts are included from the build dir. Before, out of tree builds would preferably include files from the src dir, as the include path was defined as follows (ignoring includes from ext/ and sapi/) : -I$(top_builddir)/main -I$(top_srcdir) -I$(top_builddir)/TSRM -I$(top_builddir)/Zend -I$(top_srcdir)/main -I$(top_srcdir)/Zend -I$(top_srcdir)/TSRM -I$(top_builddir)/ As a result, an out of tree build would include configure artifacts such as `main/php_config.h` from the src dir. After this change, the include path is defined as follows: -I$(top_builddir)/main -I$(top_builddir) -I$(top_srcdir)/main -I$(top_srcdir) -I$(top_builddir)/TSRM -I$(top_builddir)/Zend -I$(top_srcdir)/Zend -I$(top_srcdir)/TSRM * Fix extension include path for out of tree builds * Include config.h with the brackets form `#include "config.h"` searches in the directory containing the including-file before any other include path. This can include the wrong config.h when building out of tree and a config.h exists in the source tree. Using `#include <config.h>` uses exclusively the include path, and gives priority to the build dir.
show more ...
|
#
5db05955 |
| 29-May-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Move more common code into php_dom_next_in_tree_order() (#14363)
|
#
c461b600 |
| 24-May-2024 |
Levi Morrison |
refactor: change `zend_is_true` to return `bool` (#14301) Previously this returned `int`. Many functions actually take advantage of the fact this returns exactly 0 or 1. For instance,
refactor: change `zend_is_true` to return `bool` (#14301) Previously this returned `int`. Many functions actually take advantage of the fact this returns exactly 0 or 1. For instance, `main/streams/xp_socket.c` does: sockopts |= STREAM_SOCKOP_IPV6_V6ONLY_ENABLED * zend_is_true(tmpzval); And `Zend/zend_compile.c` does: child = &ast->child[2 - zend_is_true(zend_ast_get_zval(ast->child[0]))]; I changed a few places trivially from `int` to `bool`, but there are still many places such as the object handlers which return `int` that should eventually be `bool`.
show more ...
|
#
30885f3b |
| 31-Mar-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Implement request #71571: XSLT processor should provide option to change maxDepth (#13731) There are two depth limiting parameters for XSLT templates. 1) maxTemplateDepth This cor
Implement request #71571: XSLT processor should provide option to change maxDepth (#13731) There are two depth limiting parameters for XSLT templates. 1) maxTemplateDepth This corresponds to the recursion depth of a template. For very complicated templates this can be hit. 2) maxTemplateVars This is the total number of live variables. When using recursive templates with lots of parameters you can hit this limit. This patch introduces two new properties to XSLTProcessor that corresponds to the above variables.
show more ...
|
#
e1630381 |
| 20-Mar-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-13764: xsl cannot build on PHP 8.4 (#13770) Move some of the DOM APIs from the non-public php_dom.h header to the public header xml_common.h.
|
#
14b6c981 |
| 09-Mar-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
[RFC] Add a way to opt-in ext/dom spec compliance (#13031) RFC: https://wiki.php.net/rfc/opt_in_dom_spec_compliance
|
#
ad29afd4 |
| 24-Feb-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Document xsl:keys handling better in ext/xsl
|
#
4bd63568 |
| 18-Jan-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix argument type of simplexml_import_dom (#13170) It needs to be "object". This is because first- and third-party extension can register custom node types using `php_libxml_register
Fix argument type of simplexml_import_dom (#13170) It needs to be "object". This is because first- and third-party extension can register custom node types using `php_libxml_register_export`. So we don't know upfront what types can be expected. This also changes the error to a TypeError everywhere.
show more ...
|
#
76a3eddf |
| 17-Jan-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Field cleanups in xsl_object (#13182)
|
#
90785dd8 |
| 12-Jan-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
[RFC] Improve callbacks in ext/dom and ext/xsl (#12627)
|
#
e2d97314 |
| 06-Dec-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Backport deprecation warning ignores to unbreak CI In master I use ZEND_DIAGNOSTIC_IGNORED_START, but that doesn't exist on 8.2 or 8.3 (8.3 has a similar macro though). So to unbreak
Backport deprecation warning ignores to unbreak CI In master I use ZEND_DIAGNOSTIC_IGNORED_START, but that doesn't exist on 8.2 or 8.3 (8.3 has a similar macro though). So to unbreak CI I just made a variation of this directly in the php_libxml.h header. See https://github.com/php/php-src/commit/683e78786070ab77d33f7787598ac1b90d68390a#commitcomment-134301083 Closes GH-12887.
show more ...
|
#
20c9c4a3 |
| 02-Nov-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix validation logic of php:function() callbacks in dom and xsl Two issues: - Assumed that at least 1 argument (function name) was provided. - Incorrect error path for the non-callab
Fix validation logic of php:function() callbacks in dom and xsl Two issues: - Assumed that at least 1 argument (function name) was provided. - Incorrect error path for the non-callable case. Closes GH-12593.
show more ...
|
#
3bb56ae4 |
| 06-Oct-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Add missing properties to xsl stub (#12334) * Define doXInclude for XSLTProcessor, and test the property This was added in 8d1427dd98, but never defined on the stub. It was more
Add missing properties to xsl stub (#12334) * Define doXInclude for XSLTProcessor, and test the property This was added in 8d1427dd98, but never defined on the stub. It was more or less fine when dynamic properties were not deprecated, but now they throw a deprecation warning. To fix it, define on the stub. This should also help discoverability of the functionality. * Define cloneDocument for XSLTProcessor, and test the property This was introduced in 5c039bbad9, but never defined on the stub. It was more or less fine when dynamic properties were not deprecated, but now they throw a deprecation warning. To fix it, define on the stub. This should also help discoverability of the functionality.
show more ...
|
#
f88368cf |
| 02-Oct-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Improve error messages for XSLTProcessor::transformToDoc() (#12332) * Improve error messages for XSLTProcessor::transformToDoc() Also adds a relevant test file, as these branches we
Improve error messages for XSLTProcessor::transformToDoc() (#12332) * Improve error messages for XSLTProcessor::transformToDoc() Also adds a relevant test file, as these branches were untested before.
show more ...
|
#
f10e1b8f |
| 30-Sep-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Use RETURN_STR_COPY() in xsl Everything in intern->parameter is already a string.
|
#
5c749ad4 |
| 30-Sep-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Implement request #64137 (XSLTProcessor::setParameter() should allow both quotes to be used) This reimplements the parameter handling. Instead of quoting the strings manually, adding the
Implement request #64137 (XSLTProcessor::setParameter() should allow both quotes to be used) This reimplements the parameter handling. Instead of quoting the strings manually, adding them to an array, and passing that as input; use the libxslt API to pass data verbatim to the processor. This also simplifies the code a lot. Closes GH-12331.
show more ...
|
#
c283c3ab |
| 15-Jul-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Sanitize libxml2 globals before parsing Fixes GHSA-3qrf-m4j2-pcrr. To parse a document with libxml2, you first need to create a parsing context. The parsing context contains par
Sanitize libxml2 globals before parsing Fixes GHSA-3qrf-m4j2-pcrr. To parse a document with libxml2, you first need to create a parsing context. The parsing context contains parsing options (e.g. XML_NOENT to substitute entities) that the application (in this case PHP) can set. Unfortunately, libxml2 also supports providing default set options. For example, if you call xmlSubstituteEntitiesDefault(1) then the XML_NOENT option will be added to the parsing options every time you create a parsing context **even if the application never requested XML_NOENT**. Third party extensions can override these globals, in particular the substitute entity global. This causes entity substitution to be unexpectedly active. Fix it by setting the parsing options to a sane known value. For API calls that depend on global state we introduce PHP_LIBXML_SANITIZE_GLOBALS() and PHP_LIBXML_RESTORE_GLOBALS(). For other APIs that work directly with a context we introduce php_libxml_sanitize_parse_ctxt_options().
show more ...
|
#
f8faa8b2 |
| 02-Jun-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Use zval_ptr_dtor_nogc() for callable in ext/xslt (#11356) It cannot contain cycles because it's either a string or an array with 2 strings.
|
#
9d5f2f13 |
| 20-Mar-2023 |
Ilija Tovilo |
Use new ZSTR_INIT_LITERAL macro (#10879)
|
#
1925855c |
| 14-Jan-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix bug 69168: DomNode::getNodePath() returns invalid path Upon freeing libxslt's context, every document which is not the *main* document will be freed by libxslt. If a node of a docume
Fix bug 69168: DomNode::getNodePath() returns invalid path Upon freeing libxslt's context, every document which is not the *main* document will be freed by libxslt. If a node of a document which is not the main document gets returned to userland, we'd free the node twice: - first by the cleanup of the xslt context - and then by our own refcounting mechanism. This was reported in bug 49634, and was fixed by always copying the node (and later re-fixed in bug 70078). The original fix is not entirely correct unfortunately because of the following two main reasons: - modifications to the node will only modify the copy, and not the original - accesses to the parent, path, ... will not work This patch fixes it properly by only copying the node if it origins from a document other than the main document. Co-authored-by: juha.ikavalko@agentit.fi Closes GH-10318.
show more ...
|
Revision tags: php-8.2.0RC1, php-8.1.10, php-8.0.23, php-8.0.23RC1, php-8.1.10RC1, php-8.2.0beta3, php-8.2.0beta2, php-8.1.9, php-8.0.22, php-8.1.9RC1, php-8.2.0beta1, php-8.0.22RC1, php-8.0.21, php-8.1.8, php-8.2.0alpha3, php-8.1.8RC1, php-8.2.0alpha2, php-8.0.21RC1, php-8.0.20, php-8.1.7, php-8.2.0alpha1, php-7.4.30, php-8.1.7RC1, php-8.0.20RC1, php-8.1.6, php-8.0.19, php-8.1.6RC1, php-8.0.19RC1, php-8.0.18, php-8.1.5, php-7.4.29, php-8.1.5RC1, php-8.0.18RC1, php-8.1.4, php-8.0.17, php-8.1.4RC1, php-8.0.17RC1, php-8.1.3, php-8.0.16, php-7.4.28, php-8.1.3RC1, php-8.0.16RC1, php-8.1.2, php-8.0.15, php-8.1.2RC1, php-8.0.15RC1, php-8.0.14, php-8.1.1, php-7.4.27, php-8.1.1RC1, php-8.0.14RC1, php-7.4.27RC1, php-8.1.0, php-8.0.13, php-7.4.26, php-7.3.33, php-8.1.0RC6 |
|
#
90b7bde6 |
| 03-Nov-2021 |
Dmitry Stogov |
Use more compact representation for packed arrays. - for packed arrays we store just an array of zvals without keys. - the elements of packed array are accessible throuf as ht->arPacked[
Use more compact representation for packed arrays. - for packed arrays we store just an array of zvals without keys. - the elements of packed array are accessible throuf as ht->arPacked[i] instead of ht->arData[i] - in addition to general ZEND_HASH_FOREACH_* macros, we introduced similar familied for packed (ZEND_HASH_PACKED_FORECH_*) and real hashes (ZEND_HASH_MAP_FOREACH_*) - introduced an additional family of macros to access elements of array (packed or real hashes) ZEND_ARRAY_ELEMET_SIZE, ZEND_ARRAY_ELEMET_EX, ZEND_ARRAY_ELEMET, ZEND_ARRAY_NEXT_ELEMENT, ZEND_ARRAY_PREV_ELEMENT - zend_hash_minmax() prototype was changed to compare only values Because of smaller data set, this patch may show performance improvement on some apps and benchmarks that use packed arrays. (~1% on PHP-Parser) TODO: - sapi/phpdbg needs special support for packed arrays (WATCH_ON_BUCKET). - zend_hash_sort_ex() may require converting packed arrays to hash.
show more ...
|