Commit Graph

1221 Commits

Author SHA1 Message Date
Christoph M. Becker
1ea5d2e5ad Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Make test independent of online XSD schema
  Yet another check for php_strip_tags_ex()
2020-01-24 14:19:17 +01:00
Christoph M. Becker
49cbd23155 Make test independent of online XSD schema
The test still needs to access <http://www.w3.org/2009/01/xml.xsd>, but
at least we no longer depend on <http://x-road.eu/xsd/x-road.xsd>,
which may be moved again.
2020-01-24 14:18:16 +01:00
Nikita Popov
47b1a58e96 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug76348.phpt
2020-01-23 15:09:54 +01:00
Nikita Popov
2c2cbbbf55 Fix bug76348.phpt
Adjust for URL change in XSD file and mark as online test.

Is it possible for use to store http://x-road.eu/xsd/xroad.xsd
locally instead? Do relative file system paths work here?
I'm not familiar with this.
2020-01-23 15:08:20 +01:00
George Peter Banyard
6d6d954d0d Cleanup of remaining E_STRICT in tests 2019-07-23 11:27:23 +02:00
Nikita Popov
d59aac58b3 Report errors from stream read and write operations
The php_stream_read() and php_stream_write() functions now return
an ssize_t value, with negative results indicating failure. Functions
like fread() and fwrite() will return false in that case.

As a special case, EWOULDBLOCK and EAGAIN on non-blocking streams
should not be regarded as error conditions, and be reported as
successful zero-length reads/writes instead. The handling of EINTR
remains unclear and is internally inconsistent (e.g. some code-paths
will automatically retry on EINTR, while some won't).

I'm landing this now to make sure the stream wrapper ops API changes
make it into 7.4 -- however, if the user-facing changes turn out to
be problematic we have the option of clamping negative returns to
zero in php_stream_read() and php_stream_write() to restore the
old behavior in a relatively non-intrusive manner.
2019-07-22 17:17:28 +02:00
Nikita Popov
290e520c03 Use ZEND_HASH_FOREACH APIs in a few more places 2019-07-16 12:20:16 +02:00
Nikita Popov
79b5b1a97f Merge branch 'PHP-7.3' into PHP-7.4 2019-07-12 16:51:52 +02:00
Nikita Popov
3f73916f10 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-12 16:51:47 +02:00
Nikita Popov
a7de2af46c Use TRY_ADDREF/TRY_DELREF in soap
The DELREF part is a possible fix for bug #78278, the ADDREF part
is a drive-by fix.
2019-07-12 16:50:43 +02:00
Nikita Popov
17f7fb7605 Switch to using shell-less proc_open() in various server tests 2019-07-11 15:48:10 +02:00
Nikita Popov
ba8c4894d8 Add server conflict to soap custom content type test 2019-07-11 10:26:53 +02:00
Dmitry Stogov
143f4e3b5c Reduce overhead 2019-06-28 12:03:01 +03:00
Nikita Popov
78375aa52f Fix persistent XML memory leaks in SOAP
SOAP uses a horrible bailout based error handling approach -- avoid
leaking persistent XML memory by catching bailouts in a number of
places.
2019-06-27 14:20:10 +02:00
Nikita Popov
788a68900d Fix xml doc leak in soap 2019-06-26 11:43:11 +02:00
Nikita Popov
27d3373496 SOAP: Avoid indexing into null pointer 2019-06-20 16:22:34 +02:00
Nikita Popov
8743d5e99a Avoid signed shift ub in php_sdl 2019-06-19 17:27:09 +02:00
Nikita Popov
608097a901 Fix various instances of memcpy null ub 2019-06-19 17:27:09 +02:00
Nikita Popov
365a905e00 Suppress int to char conversion warnings 2019-06-12 11:54:13 +02:00
Nikita Popov
d2921af348 Use labs() on long integer 2019-06-12 11:54:13 +02: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
Nikita Popov
b162c8f55a Mark bug44811.phpt as an online test
For some reason this was checked on PHP-7.2 and PHP-7.3, but not
on PHP-7.4. Bad merge?
2019-05-22 11:43:56 +02:00
Nikita Popov
ce8be6f499 Merge branch 'PHP-7.3' into PHP-7.4 2019-05-22 11:43:40 +02:00
Nikita Popov
3a719696bc Merge branch 'PHP-7.2' into PHP-7.3 2019-05-22 11:43:26 +02:00
Nikita Popov
3a0de243c3 Use a different URL in bug44811.phpt 2019-05-22 11:41:51 +02:00
Nikita Popov
4ebd9a5366 Merge branch 'PHP-7.2' into PHP-7.3 2019-05-21 10:04:51 +02:00
Vincent JARDIN
5f8c22d415 Support content_type stream context option in soap
Allows overriding the HTTP header using the HTTP context:

    $client = new SoapClient('http://url.wsdl&v=latest', [
      'stream_context' => stream_context_create([
        'http' => [
          'content_type' => 'foobarX',
        ],
      ]),
    ]);

This is a backport of c55af3c65a
to the PHP 7.2 branch.
2019-05-21 10:04:15 +02:00
Vincent JARDIN
c55af3c65a Support content_type stream context option in soap
Allows overriding the HTTP header using the HTTP context:

    $client = new SoapClient('http://url.wsdl&v=latest', [
      'stream_context' => stream_context_create([
        'http' => [
          'content_type' => 'foobarX',
        ],
      ]),
    ]);
2019-05-13 10:51:03 +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
4e0e0b8152 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Convert CRLF to LF in *.wsdl files
2019-05-11 17:16:50 +02:00
Peter Kokot
bec22af8d7 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Convert CRLF to LF in *.wsdl files
2019-05-11 17:15:08 +02:00
Peter Kokot
b15bfb9129 Convert CRLF to LF in *.wsdl files
These EOL types are part of different environments and not part of the
tests themselves.
2019-05-11 17:12:28 +02:00
Nikita Popov
b1c5f7b265 Merge branch 'PHP-7.3' into PHP-7.4 2019-04-29 13:53:57 +02:00
Nikita Popov
ff2b5bda59 Merge branch 'PHP-7.2' into PHP-7.3 2019-04-29 13:53:45 +02:00
Nikita Popov
5da0579259 Fixed bug #77945
Make sure that we proper distinguish between empty string key and
no key during SDL serialization.
2019-04-29 13:52:18 +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
Hugh McMaster
29d1b7fd52 Remove support for --with-libxml-dir 2019-04-18 13:04:54 +02:00
Nikita Popov
a3459084e1 Try to fix windows build
noreturn attribute has to be on the declaration as well.
2019-04-12 17:04:44 +02:00
Nikita Popov
afee7ed110 Avoid unitialized variable warning in soap
Extract envelope fetch into separate function, so the control
flow becomes more obvious.
2019-04-12 15:12:39 +02:00
Nikita Popov
4f28bbda51 Fix SOAP bailout handling
This code was reusing the _bailout variable from
SOAP_CLIENT_BEGIN/END_CODE(). As _bailout is not volatile, modifying
it after the setjmp call and then reading it back on return is
illegal. Use a separate local bailout variable instead.

This fixes the miscompile introduced by marking zend_bailout() as
noreturn.
2019-04-12 12:51:17 +02:00
Nikita Popov
88bfd2ae98 Regroup expressions in php_schema.c to avoid array bounds warnings 2019-04-12 11:11:53 +02:00
Nikita Popov
fb109bacea Mark bug76348.phpt as online test 2019-03-20 11:40:09 +01:00
Fabien Villepinte
26dfce7f36 Replace dirname(__FILE__) by __DIR__ in tests 2019-03-15 22:55:30 +01:00
c9s
9f6f6fe219 Remove function_table var from the caller
function_table var is not used in call_user_function macro anymore
hence replace the usage with NULL
2019-03-11 10:00:39 +01:00
Gabriel Caruso
6c4e2079c0 Use EXPECT when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2019-03-11 00:05:44 -03: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
Peter Kokot
a8c3e22d23 Replace PHP_TM_GMTOFF with AC_CHECK_MEMBERS
Changes:
- PHP_TM_GMTOFF removed
- HAVE_TM_GMTOFF replaced with HAVE_STRUCT_TM_TM_GMTOFF
- HAVE_TM_ZONE replaced with HAVE_STRUCT_TM_TM_ZONE
- HAVE_TZNAME removed

The PHP_TM_GMTOFF macro can be replaced with Autoconf's AC_CHECK_MEMBERS
that defines the HAVE_STRUCT_TM_TM_GMTOFF symbol instead of the
HAVE_TM_ZONE.

The HAVE_TZNAME symbol is not used in current code. The obsolete
HAVE_TM_ZONE symbol has been replaced with more proper
HAVE_STRUCT_TM_TM_ZONE. These are defined by the AC_STRUCT_TIMEZONE
macro.
2019-03-04 12:13:12 +01:00
Nikita Popov
c0e15a3b7f Implement fine-grained conflict handling
Tests can specify conflict keys, either in --CONFLICTS-- or
a per-directory CONFLICTS file. Non-conflicting tests may be run
in parallel.
2019-02-20 11:20:40 +01:00
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00