#
dbde99d8 |
| 06-Dec-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Backport e2d97314: 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)
Backport e2d97314: 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
show more ...
|
#
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)
|
#
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 ...
|
#
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 ...
|
#
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 ...
|