Commit graph

244 commits

Author SHA1 Message Date
Peter Kokot
d679f02295 Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:33:09 +02:00
Peter Kokot
d7a3edd45d Trim trailing whitespace in *.phpt 2018-10-14 19:46:15 +02:00
Gabriel Caruso
9c144e0d82
Trim trailing whitespace in tests 2018-10-14 12:07:20 -03:00
Peter Kokot
1ad08256f3 Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:56:38 +02:00
Peter Kokot
37c329d715 Trim trailing whitespace in source code files 2018-10-13 14:17:28 +02:00
Peter Kokot
f116484cf1 Rename *.php files in ext/dom tests to *.inc
*.php files are ignored by Git and a better practice might be to rename
PHP included files for tests.
2018-09-23 17:22:55 +02:00
Nikita Popov
74235ca5f3 Bump minimum libxml version to 2.7.6
Released Oct 2009, part of RHEL 6.
2018-09-23 15:51:09 +02:00
Peter Kokot
bfa2c7158f Fix permissions
Certain files don't need to be executables.
2018-09-21 14:12:25 +02:00
Christoph M. Becker
95178b19b2 Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix SKIPIF conditions
2018-08-28 14:02:44 +02:00
Christoph M. Becker
441b6a6f5e Fix SKIPIF conditions
The test calls `mb_convert_encoding()` and as such requires the
mbstring extension.
2018-08-28 14:02:11 +02:00
Anatol Belski
3cb4db913d Merge branch 'PHP-7.3'
* PHP-7.3:
  Add test for bug #76738
2018-08-17 18:38:07 +02:00
Anatol Belski
990a404c2d Add test for bug #76738
Original repro. It's unwieldy, but it's otherwise hard to trigger
the wrong buffer handling behavior.
2018-08-17 18:31:58 +02:00
Andrew Nester
2072d377d3 DOMDocument::formatOutput attribute sometimes ignored
(cherry picked from commit ef9ed19ec7)
2018-08-17 13:01:55 +02:00
Christoph M. Becker
819cf5283b Revert "DOMDocument::formatOutput attribute sometimes ignored"
This reverts commit ef9ed19ec7 and its
follow-up 36f05a80d7, since these caused
a serious regression (see bug #76738).
2018-08-14 12:14:33 +02:00
Xinchen Hui
a6467af8a5 Fixed test skip 2018-07-04 11:20:28 +08:00
Andrew Nester
ef9ed19ec7 DOMDocument::formatOutput attribute sometimes ignored 2018-06-28 10:38:20 +02:00
Gabriel Caruso
ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00
Gabriel Caruso
b0d3c1bf83 Add and fix SKIPIF sections 2018-02-04 17:26:37 +01:00
Gabriel Caruso
84488d921b Remove superfluous SKIPIF sections in more tests 2018-02-04 16:57:08 +01:00
Xinchen Hui
1a9e64362c Fixed bug #75451 (Assertion fails while foreach on empty xpath query) 2017-10-28 21:38:26 +08:00
Anatol Belski
45613b3473 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix test compat with libxml2 2.9.5
2017-09-11 14:35:51 +02:00
Anatol Belski
3549d9184a Fix test compat with libxml2 2.9.5
From 2.9.5 on libxml explcitly initializes the keepBlanks flag.
2017-09-11 14:32:54 +02:00
Xinchen Hui
9b87b73fec Req #74963 (Improved error message on fetching property of non-object) 2017-07-31 11:51:23 +08:00
Andreas Treichel
f725d9b1b9 Implement Countable for DomNodeList and DOMNamedNodeMap (Request #74837) 2017-07-10 08:48:10 +02:00
Nikita Popov
d9886614dc Merge branch 'PHP-7.1' 2017-06-03 00:42:38 +02:00
Tim Toohey
d027bc2add Fixed bug #69373
xmlNodeSetContentLen() calls xmlFreeNode() on node->children. This
causes problems if there are other references around to those children.
2017-06-03 00:40:58 +02:00
Remi Collet
a1bd34b31c Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #74416 Wrong reflection on DOMNode::cloneNode
2017-04-13 07:07:56 +02:00
Fabien Villepinte
bc4bb7882b Fixed bug #74416 Wrong reflection on DOMNode::cloneNode 2017-04-13 07:07:24 +02:00
Nikita Popov
859a6505d3 Merge branch 'PHP-7.1' 2017-03-02 12:36:31 +01:00
somedaysummer
fab5ce347c PHP bug #74004
Fix for DOMDocument loadHTML and loadHTMLFile ignore LIBXML_NOWARNING
and LIBXML_NOERROR flags.
2017-03-02 12:35:42 +01:00
Nikita Popov
6ba7206620 Deprecate assert() with string argument 2017-02-03 21:02:52 +01:00
Nikita Popov
000b504b51 Merge branch 'PHP-7.1' 2017-02-03 18:42:33 +01:00
Nikita Popov
dcaf4da8a6 Revert "Merge branch 'pull-request/2344' into PHP-7.0"
This reverts commit 6988d070ea, reversing
changes made to 75ad2b301a.
2017-02-03 18:42:10 +01:00
Joe Watkins
984a6312e4
Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #74004 LIBXML_NOWARNING (etc) ignored by DOMDocument::loadHTML
2017-02-03 06:13:40 +00:00
somedaysummer
4df993d89d
Fixed bug #74004 LIBXML_NOWARNING (etc) ignored by DOMDocument::loadHTML 2017-02-03 06:08:42 +00:00
Anatol Belski
ac16d944bb Merge branch 'PHP-7.1'
* PHP-7.1:
  remove the reverted NEWS entry
  sync NEWS with the reverted stuff
  Revert "fixed bug #50989 (DOM support for LIBXML_NOXMLDECL)"
  Revert "fix BC break introduced by #2346 (sebastianbergmann/phpunit#2454)"
2017-02-01 20:07:07 +01:00
Anatol Belski
3446e3b749 Revert "fixed bug #50989 (DOM support for LIBXML_NOXMLDECL)"
This reverts commit 2fcf1259c6.
2017-02-01 19:59:24 +01:00
Anatol Belski
69a2e4ece2 Revert "fix BC break introduced by #2346 (sebastianbergmann/phpunit#2454)"
This reverts commit 62938bf088.
2017-02-01 19:59:18 +01:00
Joe Watkins
82d363c21b
Merge branch 'PHP-7.1'
* PHP-7.1:
  fix BC break introduced by #2346 (sebastianbergmann/phpunit#2454)
2017-01-30 11:26:51 +00:00
jhdxr
62938bf088
fix BC break introduced by #2346 (sebastianbergmann/phpunit#2454) 2017-01-30 11:25:04 +00:00
Joe Watkins
3de7b2ab52
Merge branch 'PHP-7.1'
* PHP-7.1:
  fixed bug #50989 (DOM support for LIBXML_NOXMLDECL)
2017-01-28 08:28:31 +00:00
jhdxr
2fcf1259c6
fixed bug #50989 (DOM support for LIBXML_NOXMLDECL) 2017-01-28 08:27:05 +00:00
Joe Watkins
b8f1c798fc
Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix bug #54382 (getAttributeNodeNS doesn't get xmlns* attributes)
  Added (failing) testcase for bug #54382
2017-01-25 20:59:52 +00:00
Arnout Boks
737ee0661c
Added (failing) testcase for bug #54382 2017-01-25 20:59:23 +00:00
Nikita Popov
9b916b15a5 Merge branch 'PHP-7.1' 2017-01-10 23:29:50 +01:00
Arnout Boks
13edec75a3 Fixed #73907 (nextSibling property not included in var_dump of DOMNode) 2017-01-10 23:29:02 +01:00
Nikita Popov
52a22fa63c Merge branch 'PHP-7.1' 2017-01-10 23:25:23 +01:00
Arnout Boks
07340553a5 Fixed bug #61858 (DOMAttr debug info generates E_WARNING)
It seems fair to remove this warning, given that:

* it is not documented in the official documentation
* the $specified property, which has a similar 'not implemented' status,
  also does not trigger a warning
* it apparently hinders quite a lot of people during debugging, judging by
  the number of votes on the bug
2017-01-10 23:24:34 +01:00
Joe Watkins
869a2a1c1b
Merge branch 'PHP-7.1'
* PHP-7.1:
  PR #2211 don't supress warnings in tests
2017-01-07 08:08:25 +00:00
Craig Duncan
98c2cd4311
PR #2211 don't supress warnings in tests 2017-01-07 08:06:38 +00:00