Commit Graph

841 Commits

Author SHA1 Message Date
Benjamin Eberlei
e9b991d6a0 Fix ext/dom test helper method causing trailing whitespaces. 2020-02-06 22:24:37 +01:00
Nikita Popov
f8d795820e Reindent phpt files 2020-02-03 22:52:20 +01:00
Máté Kocsis
2015c7a48e
Fix another batch of indentation in tests 2020-02-02 23:33:40 +01:00
Máté Kocsis
99db00b1f2
Fix #78880 Another round 2020-01-19 18:28:43 +01:00
Máté Kocsis
afdaa91170
Fix #78880: Final spelling fixes 2020-01-16 19:14:31 +01:00
Máté Kocsis
0b4778c377
Fix #78880: Another bunch of spelling errors 2020-01-16 09:46:47 +01:00
Máté Kocsis
349a286461
Use RETURN_THROWS() after zend_throw_error() 2020-01-01 16:42:30 +01:00
Máté Kocsis
2f7309b1e9
Use RETURN_THROWS() during ZPP in the date, dba and dom extensions 2019-12-31 00:21:37 +01:00
Benjamin Eberlei
f905a81979 ext/dom: Replace usages of PHP_FUNCTION and aliases with PHP_METHOD. 2019-11-09 21:29:42 +01:00
Benjamin Eberlei
4253ca486d Convert ext/dom to use arginfo stub. 2019-11-08 15:05:35 +01:00
Fabien Villepinte
a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00
Christoph M. Becker
4008704f62 zend_parse_parameters_throw() is obsolete
Since `zend_parse_parameters()` throws now, there is no reason to
explicitly call `zend_parse_parameters_throw()` anymore, and since both
have actually the same implementation, we redefine the latter as macro.
2019-11-01 16:47:15 +01:00
Máté Kocsis
2204dbde3b Add missing ZPP checks
Closes GH-4878.
2019-11-01 15:26:52 +01:00
Christoph M. Becker
32d3dbf789 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix test cases for libxml2 2.9.10
2019-10-31 16:10:18 +01:00
Christoph M. Becker
db14b78099 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix test cases for libxml2 2.9.10
2019-10-31 16:09:38 +01:00
Christoph M. Becker
e175a0a1c8 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix test cases for libxml2 2.9.10
2019-10-31 16:08:38 +01:00
Christoph M. Becker
e29922f054 Fix test cases for libxml2 2.9.10
Since the error reporting has been slightly changed, we have to adapt
the two affected test cases.
2019-10-31 16:07:34 +01:00
Nikita Popov
504f7ffdd6 Small ext/dom cleanups 2019-10-29 11:16:23 +01:00
Fabien Villepinte
8a88f72beb Merge branch 'PHP-7.4' 2019-10-26 16:08:00 +02:00
Fabien Villepinte
601aef3468 Replace EXPECTF by EXPECT
In ext/dom all the tests with a EXPECTF section
starting by "Fatal error: Uncaught" have been updated
to use the faster EXPECT
2019-10-26 16:05:02 +02:00
Fabien Villepinte
23f3b54906 Merge branch 'PHP-7.4' 2019-10-19 15:44:57 +02:00
Fabien Villepinte
550a2df043 Add tests for DOMEntityReference 2019-10-19 15:42:16 +02:00
Fabien Villepinte
3d22c80fc2 Test an error case with DOMDocument::createEntityReference 2019-10-15 21:56:44 +02:00
Nikita Popov
c9d4696f76 Merge branch 'PHP-7.4' 2019-10-07 16:32:42 +02:00
Nikita Popov
f085bddb51 Fix number of required arguments in arginfo
* pack() only requires one argument
* stream_context_set_option() only requires two arguments
* ReflectionMethod::getClosure() accepts no args for static methods
* DOMDocument::createProcessingInstruction() only requires one arg
* DOMImplementation::createDocument() only requires two arguments
* DOMDocument::importNode() only requires one arg
* mysql_get_client_version() doesn't accept any args,
  despite what the docs say...
2019-10-07 16:32:11 +02:00
Benjamin Eberlei
6c963694b1 ext/dom: Add global registerNodeNS flag on DOMXPath ctor and property. 2019-10-05 18:56:58 +02:00
Nikita Popov
2f92957fd3 Convert some notices to warnings
Part of https://wiki.php.net/rfc/engine_warnings.
2019-10-02 10:34:08 +02:00
Nikita Popov
01fc1a3057 Remove most uses of the ERROR type
It is now only used to signal exceptions for property reads. ERROR
zvals are never returned back to the VM anymore, so there's no
need to check for them when receiving a VAR.

Also return MAY_BE_ERROR, as ERROR is now no longer relevant for
inference.
2019-09-30 11:35:07 +02:00
Nikita Popov
a66c60cce3 Throw Error when writing property of non-object
This removes object auto-vivification support.

This also means that we can remove the corresponding special
handling for typed properites: We no longer need to check that a
property is convertible to stdClass if such a conversion might
take place indirectly due to a nested property write.

Additionally OBJ_W style operations now no longer modify the
object operand, and as such we no longer need to treat op1 as a
def in SSA form.

The next step would be to actually compile the whole LHS of OBJ_W
operations in R rather than W mode, but that causes issues with
SimpleXML, whose object handlers depend on the current compilation
structure.

Part of https://wiki.php.net/rfc/engine_warnings.
2019-09-27 10:11:47 +02:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Benjamin Eberlei
cece939526 Cleanup ext/dom: Additional unimplemented code following 25bfac4 2019-09-23 19:28:55 +02:00
Benjamin Eberlei
25bfac44b0 Cleanup ext/dom: Removal of unimplemented dummy classes.
The following classes were registered in ext/dom but
neither documented nor had any behavior (only test data).
These classes are now removed:

- DOMNameList
- DomImplementationList
- DOMConfiguration
- DomError
- DomErrorHandler
- DOMImplementationSource
- DOMLocator
- DOMUserDataHandler
- DOMTypeInfo
2019-09-17 23:45:06 +02:00
Christoph M. Becker
aa7308e0a8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Add missing SKIPIF
2019-09-04 08:36:39 +02:00
Fabien Villepinte
c0c1f9d38c Add missing SKIPIF 2019-09-04 08:36:11 +02:00
twosee
63171d88f2 Add do...while(0) for RETURN_* and ZVAL_* APIs
Closes GH-4255.
2019-06-12 16:17:16 +02:00
Dmitry Stogov
e029cc4dd4 Merge branch 'PHP-7.4'
* PHP-7.4:
  Cheaper checks for exceptions thrown from __toString()
2019-06-06 02:23:17 +03:00
Dmitry Stogov
457392fa64 Cheaper checks for exceptions thrown from __toString() 2019-06-06 01:47:22 +03:00
Nikita Popov
7686b0b889 Merge branch 'PHP-7.4' 2019-06-05 14:53:50 +02:00
Nikita Popov
a31f46421d Allow exceptions in __toString()
RFC: https://wiki.php.net/rfc/tostring_exceptions

And convert some object to string conversion related recoverable
fatal errors into Error exceptions.

Improve exception safety of internal code performing string
conversions.
2019-06-05 14:25:07 +02:00
Dmitry Stogov
b2cdde0826 Merge branch 'PHP-7.4'
* PHP-7.4:
  Replace ZVAL_COPY() and ZVAL_COPY_VALUE() for IS_OBJECT by cheaper macros
2019-05-28 20:19:15 +03:00
Dmitry Stogov
83804519df Replace ZVAL_COPY() and ZVAL_COPY_VALUE() for IS_OBJECT by cheaper macros 2019-05-28 20:10:02 +03:00
Christoph M. Becker
4b7c2de141 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78025: segfault when accessing properties of DOMDocumentType
2019-05-17 13:33:23 +02:00
Christoph M. Becker
d3c95db18c Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78025: segfault when accessing properties of DOMDocumentType
2019-05-17 13:32:53 +02:00
Christoph M. Becker
fd607635a4 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78025: segfault when accessing properties of DOMDocumentType
2019-05-17 13:32:13 +02:00
Christoph M. Becker
e246dea9fe Fix #78025: segfault when accessing properties of DOMDocumentType
Instead of following the NULL pointer, we return an empty string.
2019-05-17 13:31:18 +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
Nikita Popov
d9ec9a919c Merge branch 'PHP-7.4' 2019-04-18 13:08:27 +02:00
Hugh McMaster
9f0c9b7ad6 Rename --enable-libxml to --with-libxml to meet naming guidelines 2019-04-18 13:08:02 +02:00
Hugh McMaster
cc930cdd75 Use PKG_CHECK_MODULES to detect libxml2 2019-04-18 13:04:54 +02:00