1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 23:48:14 +02:00
Commit Graph

23 Commits

Author SHA1 Message Date
Niels Dossche 6c63c48a7e Use virtual annotation in XMLReader
All properties of XMLReader are virtual and therefore don't need backing
storage.
2024-08-26 21:17:49 +02:00
Máté Kocsis 8d12f666ae Fix registration of internal readonly child classes (#15459)
Currently, internal classes are registered with the following code:

INIT_CLASS_ENTRY(ce, "InternalClass", class_InternalClass_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
class_entry->ce_flags |= ...;

This has worked well so far, except if InternalClass is readonly. It is because some inheritance checks are run by zend_register_internal_class_ex before ZEND_ACC_READONLY_CLASS is added to ce_flags.

The issue is fixed by adding a zend_register_internal_class_with_flags() zend API function that stubs can use from now on. This function makes sure to add the flags before running any checks. Since the new API is not available in lower PHP versions, gen_stub.php has to keep support for the existing API for PHP 8.3 and below.
2024-08-24 12:36:54 +02:00
Niels Dossche 4cab7f90a1 [RFC] Implement XMLReader::fromUri() and XMLReader::fromString() 2024-06-29 09:04:35 -07:00
Niels Dossche acf2762857 [RFC] Add stream open functions to XML{Reader,Writer}
RFC: https://wiki.php.net/rfc/xmlreader_writer_streams
2024-06-29 09:04:35 -07:00
Máté Kocsis b06c95b631 Declare the missing true return types (#13709) 2024-03-16 07:26:37 +01:00
Ayesh Karunaratne 353d4ce075 ext/xmlreader: Add class constant types to stub (#13596)
Declares class constant types for the `XMLReader` class.
2024-03-05 20:50:54 +01:00
Máté Kocsis 10957e498c Do not generate frameless info items when func info generation is disabled
While here, I fixed newlines around arginfo and function entry generation. Previously, newlines were repeated.
2024-02-18 11:39:00 +01:00
Ilija Tovilo 7b355e8d34 Revert "Merge branch 'PHP-8.2'"
This reverts commit 45a3f178dc, reversing
changes made to b2a54bc6af.
2023-07-04 09:18:49 +02:00
Máté Kocsis 45a3f178dc Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-9967 Add support for generating custom function, class const, and property attributes in stubs

Closes GH-10170
2023-07-03 11:17:08 +02:00
kocsismate 09dd3e3daf Narrow some more return types to true 2023-05-10 19:08:15 +02:00
Máté Kocsis 60cae26be7 Declare ext/xmlreader constants in stubs (#9133) 2022-07-26 05:57:11 +02:00
Máté Kocsis a902622ad6 Declare tentative return types for ext/xmlreader
Relates to GH-6995
2021-05-25 19:14:48 +02:00
Máté Kocsis 1cb823c82e Declare XMLReader properties
Closes GH-6741
2021-03-01 16:58:23 +01:00
Máté Kocsis 4c6533c257 Generate class entries from stubs for com, standard, xmlreader, xmlwriter, xsl, zip, Zend
Closes GH-6706
2021-02-22 15:24:03 +01:00
Nikita Popov 1fba220725 Update ext/xsl parameter names
Additionally normalize to using $namespace rather than $uri for
namespace parameters, including in XMLReader and XMLWriter. I went
with that one as it is currently used by DOM, SimpleXML and XSL --
and our DOM parameter names follow the DOM specification.

Closes GH-6295.
2020-10-08 10:28:50 +02:00
Dik Takken a7856c1bae Review parameter names in ext/xmlreader
Closes GH-6255.
2020-10-06 09:47:13 +02:00
Nikita Popov faea5ab837 Throw from XmlReader::expand() if DOM extension missing
Otherwise it is hard to uphold the arginfo contract for this
function -- we cannot simply mirror the zpp call, as the class
entry it is based on does not exist.
2020-10-05 12:31:48 +02:00
Máté Kocsis e7e3099299 Update xmlreader arginfo hash
My git client (GitHub Desktop) decided to commit and push my staged changes, so arginfo generation was not done with the previous commit.
2020-09-16 13:51:36 +02:00
Máté Kocsis 7a48381e22 XMLReader::getAttributeNs() can no longer return false 2020-09-16 13:45:13 +02:00
Máté Kocsis f068fbcf1f Promote warnings to exceptions in ext/xmlreader
Closes GH-6021
2020-08-25 11:54:45 +02:00
Nikita Popov c9b9f525a9 Include stub hash in generated arginfo files
The hash is used to check whether the arginfo file needs to be
regenerated. PHP-Parser will only be downloaded if this is actually
necessary.

This ensures that release artifacts will never try to regenerate
stubs and thus fetch PHP-Parser, as long as you do not modify any
files.

Closes GH-5739.
2020-06-24 09:55:19 +02:00
Máté Kocsis 60412c37ae Fix UNKNOWN default values in ext/xml 2020-05-06 19:15:39 +02:00
Máté Kocsis c5fb4f0794 Generate function entries from stubs for a couple of extensions
Migrates ext/standard, ext/tidy, ext/tokenizer,
ext/xml, ext/xml_reader, and ext/xml_writer. Closes GH-5381.
2020-04-14 11:49:02 +02:00