Christoph M. Becker
44ccccdfb8
tidy::repairFile() and ::repairString() return string|false
2020-11-30 00:29:10 +01:00
Christoph M. Becker
9b1c02c2df
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #77594 : ob_tidyhandler is never reset
2020-11-22 14:04:59 +01:00
Christoph M. Becker
221345a013
Fix #77594 : ob_tidyhandler is never reset
...
We reset to original INI value on request shutdown.
Closes GH-6425.
2020-11-22 14:02:29 +01:00
Nikita Popov
6de6f2a4e9
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Don't crash on uninitialized tidy object
2020-10-22 16:05:57 +02:00
Nikita Popov
85d9a1ca6e
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Don't crash on uninitialized tidy object
2020-10-22 16:05:34 +02:00
Nikita Popov
d4bf0799b8
Don't crash on uninitialized tidy object
...
"Uninitialized" here means that the object was created ordinarily
-- no constructor skipping involved. Most tidy methods seem to
handle this fine, but these three need to be guarded.
2020-10-22 16:04:22 +02:00
Máté Kocsis
d6264b0966
Verify parameter names of function aliases
...
Closes GH-6335
2020-10-16 10:56:33 +02:00
Christoph M. Becker
c774619118
Merge branch 'PHP-7.4' into master
...
* PHP-7.4:
Fix #77040 : tidyNode::isHtml() is completely broken
2020-10-07 17:50:24 +02:00
Christoph M. Becker
ff3878adeb
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #77040 : tidyNode::isHtml() is completely broken
2020-10-07 17:48:12 +02:00
Christoph M. Becker
e68acd031d
Fix #77040 : tidyNode::isHtml() is completely broken
...
The documentation of `tidyNode::isHtml()` states that this method
"checks if a node is part of a HTML document". That is, of course,
nonsense, since a tidyNode is "an HTML node in an HTML file, as
detected by tidy."
What this method is actually supposed to do is to check whether a node
is an element (unless it is the root element). This has been broken by
commit d8eeb8e[1], which assumed that `enum TidyNodeType` would
represent flags of a bitmask, what it does not.
[1] <http://git.php.net/?p=php-src.git;a=commit;h=d8eeb8e28673236bca3f066ded75037a5bdf6378 >
Closes GH-6290.
2020-10-07 17:43:56 +02:00
Nikita Popov
c11191e794
Update ext/tidy parameter names
...
Closes GH-6283.
2020-10-07 10:21:26 +02:00
Máté Kocsis
c98d47696f
Consolidate new union type ZPP macro names
...
They will now follow the canonical order of types. Older macros are
left intact due to maintaining BC.
Closes GH-6112
2020-09-11 11:00:18 +02:00
Máté Kocsis
628db3f3b5
Fix UNKNOWN default values in various extensions
...
Closes GH-6075
2020-09-07 19:02:02 +02:00
Máté Kocsis
f7fbc6333f
Add more precise type info for stubs
...
Closes GH-6005
2020-09-01 16:35:56 +02:00
Máté Kocsis
7476d2c188
Promote warnings to exceptions in ext/tidy
...
Closes GH-6051
2020-09-01 14:18:02 +02:00
George Peter Banyard
c3105a1f8d
ValueError for empty path in stream code
...
Closes GH-5902
2020-07-31 13:39:58 +01:00
Máté Kocsis
d30cd7d7e7
Review the usage of apostrophes in error messages
...
Closes GH-5590
2020-07-10 21:05:28 +02:00
Max Semenik
2b5de6f839
Remove proto comments from C files
...
Closes GH-5758
2020-07-06 21:13:34 +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
George Peter Banyard
bc9497695e
Fix [-Wundef] warning in Tidy extension
2020-05-18 00:37:18 +02:00
George Peter Banyard
3b9d33dc20
[skip ci] Fix comment in Tidy autoconf file
2020-04-19 15:53:06 +02:00
George Peter Banyard
13938342f8
Add -Wno-ignored-qualifiers compiler flag to Tidy extension.
...
This is an issue in the provided library and needs to be fixed upstream.
2020-04-14 22:22:33 +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
Máté Kocsis
3709e74b5e
Store default parameter values of internal functions in arg info
...
Closes GH-5353. From now on, PHP will have reflection information
about default values of parameters of internal functions.
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
2020-04-08 18:37:51 +02:00
Christoph M. Becker
7d0102dfa7
Revert "Replace @param annotations with type declarations"
...
This reverts commit c31029f335
.
2020-02-17 08:55:18 +01:00
Christoph M. Becker
c31029f335
Replace @param annotations with type declarations
2020-02-16 23:43:38 +01:00
Nikita Popov
f8d795820e
Reindent phpt files
2020-02-03 22:52:20 +01:00
Máté Kocsis
1b93cfee0c
Use RETURN_THROWS() after zend_parse_method_parameters()
2020-01-02 23:01:37 +01:00
Máté Kocsis
345703724c
Use RETURN_THROWS() during ZPP in most of the extensions
...
Except for some bigger ones: reflection, sodium, spl
2019-12-31 11:46:11 +01:00
Máté Kocsis
c58b12334d
Add union return types with one class
2019-11-18 12:44:38 +01:00
Máté Kocsis
27e83d0fb8
Add union return types for function stubs
2019-11-11 14:54:55 +01:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
...
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Christoph M. Becker
3213e1e776
Just return on ZPP exception
...
No need to return FALSE.
2019-09-22 16:39:02 +02:00
Christoph M. Becker
610b7a74fc
Fix arginfo of tidy_repair_string()
...
Cf. 5356bad8c6
.
2019-09-22 16:31:48 +02:00
Christoph M. Becker
5356bad8c6
Remove unused parameter
...
The `$use_include_path` parameter doesn't make sense for
`tidy_repair_string()`, and actually unused, so we remove it.
2019-09-22 16:28:42 +02:00
Christoph M. Becker
7f36328bf0
Add ext/tidy stubs
2019-09-22 16:18:33 +02:00
Christoph M. Becker
6072fe4342
Properly use zend_parse_method_parameters()
...
`zend_parse_method_parameters()` is meant for dual (procedural and OO)
APIs; there is no need to attempt to get "this" first, and to dispatch
to `zend_parse_parameters()` and `zend_parse_method_parameters()`,
respectively.
2019-09-22 16:18:33 +02:00
Nikita Popov
452076de44
Merge branch 'PHP-7.4'
2019-06-19 17:27:29 +02:00
Nikita Popov
608097a901
Fix various instances of memcpy null ub
2019-06-19 17:27:09 +02:00
Peter Kokot
2cf90bb2f0
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Normalize comments in *nix build system m4 files
2019-05-12 18:51:50 +02:00
Peter Kokot
75fb74860d
Normalize comments in *nix build system m4 files
...
Normalization include:
- Use dnl for everything that can be ommitted when configure is built in
favor of the shell comment character # which is visible in the output.
- Line length normalized to 80 columns
- Dots for most of the one line sentences
- Macro definitions include similar pattern header comments now
2019-05-12 18:43:03 +02:00
Peter Kokot
6426420f61
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Replace dirname(__FILE__) by __DIR__ in tests
2019-03-15 23:36:47 +01:00
Fabien Villepinte
26dfce7f36
Replace dirname(__FILE__) by __DIR__ in tests
2019-03-15 22:55:30 +01:00
Nikita Popov
852485d8ec
Adjust tests for zpp TypeError change
2019-03-11 11:32:20 +01:00
Peter Kokot
d0fd9fe977
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Add AS_HELP_STRING to *nix build configure options
2019-03-07 20:38:04 +01:00
Peter Kokot
9df6a1e4dd
Add AS_HELP_STRING to *nix build configure options
...
The Autoconf's default AS_HELP_STRING macro can properly format help
strings [1] so watching out if columns are aligned manually is not
anymore.
[1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Pretty-Help-Strings
2019-03-07 20:36:59 +01:00
Tyson Andre
c7d339a9d0
Indicate that tidy's object methods expect 0 args
...
This prevents subclasses from being written with incompatible
implementations, e.g. expecting more required args.
2019-02-19 09:41:47 +01:00
Nikita Popov
879cd04913
Merge branch 'PHP-7.4'
2019-02-18 17:51:41 +01:00
Tyson Andre
8588a45851
Fix arginfo for tidy's global functions
...
See https://secure.php.net/tidy_getopt , etc.
I can't find any other obvious incorrect reflection.
2019-02-18 17:49:02 +01:00
Dmitry Stogov
91ef4124e5
Refactor zend_object_handlers API to pass zend_object* and zend_string* insted of zval(s).
2019-02-04 13:20:25 +03:00