1
0
mirror of https://github.com/php/php-src.git synced 2026-04-12 10:33:11 +02:00
Commit Graph

851 Commits

Author SHA1 Message Date
Pierrick Charron
f97a650944 Merge branch 'PHP-8.0' into PHP-8.1 2022-06-09 13:49:45 -04:00
Pierrick Charron
e2d55f2f12 Fix LONG_CHECK_VALID_INT in socket extension 2022-06-09 13:48:02 -04:00
Ilija Tovilo
7a2747ba78 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix undefined behavior in php_set_inet6_addr
  Reduce the scope of XFAIL (#8592)
2022-05-22 23:27:47 +02:00
Ilija Tovilo
f0480eb4de Fix undefined behavior in php_set_inet6_addr
Postfix `++` on `NULL` is undefined behavior

Closes GH-8607
2022-05-22 23:23:47 +02:00
Christoph M. Becker
f16d35cfe9 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix Solaris builds of ext/sockets
2022-03-10 14:51:30 +01:00
David Carlier
7eb972c456 Fix Solaris builds of ext/sockets
We enable the proper ancillary data handling layout and API.

Closes GH-7859.
2022-03-10 14:48:08 +01:00
Christoph M. Becker
943d6f642a Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-7978: sockets extension compilation errors
2022-01-21 23:59:26 +01:00
David Carlier
07aaa34cd4 Fix GH-7978: sockets extension compilation errors
We fix the `ucred` detection when custom `CFLAGS` are in use.

Closes GH-7981.
2022-01-21 23:56:56 +01:00
Christoph M. Becker
623b21220b Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix ext/sockets build on Haiku
2022-01-04 14:12:56 +01:00
David Carlier
09165ace37 Fix ext/sockets build on Haiku
The `SOCK_RDM` datagram option is unsupported on Haiku; instead `ifreq`
has direct access to `ifr_index`.

Closes GH-7849.
2022-01-04 14:10:50 +01:00
Christoph M. Becker
9d2dc1e9a9 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Avoid void* arithmetic in sockets/multicast.c on NetBSD
2021-12-23 16:21:28 +01:00
David Carlier
3f0bb67361 Avoid void* arithmetic in sockets/multicast.c on NetBSD
On NetBSD, ifconf.ifc_buf member, unlike most of platforms, is a void
pointer.

We also fix the cpuinfo declarations with empty parameter lists.

Closes GH-7819.
2021-12-23 16:17:30 +01:00
Joe Watkins
938a81cf01 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  socket cmsg credential test fixes, "backporting" from the FreeBSD PR.
2021-12-21 07:28:09 +01:00
David Carlier
80b02275bb socket cmsg credential test fixes, "backporting" from the FreeBSD PR. 2021-12-21 07:27:59 +01:00
Joe Watkins
00113b95b2 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  socket: ancillary credentials build fix for non linux systems.
2021-12-21 07:25:55 +01:00
David Carlier
51647eb23e socket: ancillary credentials build fix for non linux systems.
for systems using SO_PASSCRED sockopt flag but not using ucred struct.
2021-12-21 07:25:43 +01:00
Máté Kocsis
d9e5e63032 Add more specific array return type hints for various extensions - part 6 (#7474) 2021-10-07 14:29:29 +02:00
Nikita Popov
e91a751e3d Use ephemeral port in test 2021-10-05 16:00:50 +02:00
Nikita Popov
624848f118 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Use ephemeral ports in socket test
2021-09-20 10:20:03 +02:00
Nikita Popov
07f6c61c8e Use ephemeral ports in socket test 2021-09-20 10:19:48 +02:00
Nikita Popov
e539cb9ca0 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix port clash in socket tests
2021-08-12 12:02:37 +02:00
Nikita Popov
77c1c42c66 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix port clash in socket tests
2021-08-12 12:02:27 +02:00
Nikita Popov
78cbe56e68 Fix port clash in socket tests
Use ephemeral port instead.
2021-08-12 12:02:05 +02:00
Joe Watkins
570d9b63e9 Not serializable flag permeation 2021-07-20 12:28:35 +02:00
David Carlier
4c873df7d5 sockets enabling SO_MARK socket option which is relatively similar
to FreeBSD's SO_USER_COOKIE giving a socket an identifier for packet filter,
 giving a specific route table.
2021-07-16 12:18:24 +02:00
Patrick Allaert
ac18dd0dc7 Prefer EXPECT over EXPECTF 2021-06-29 17:13:02 +02:00
Patrick Allaert
aff365871a Fixed some spaces used instead of tabs 2021-06-29 11:30:26 +02:00
David CARLIER
c4a005bb2d exposing few macOS socket options to give hints how to handle data, 2021-06-22 09:43:56 -05:00
Nikita Popov
892421c9a8 Make some zend_test dependencies explicit
Rather than checking that specific functions exist.
2021-06-14 15:40:34 +02:00
Nikita Popov
6600ad6067 Add some missing EXTENSIONS sections to misc tests 2021-06-14 14:52:44 +02:00
David CARLIER
ff23a34757 define SO_ACCEPTFILTER separately where supported (#7146) 2021-06-14 07:24:55 +02:00
Nikita Popov
7485978339 Migrate SKIPIF -> EXTENSIONS (#7138)
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +02:00
David Carlier
fc147ed8db sockets exposing TC_DEFER_ACCEPT to optimise tcp exchanges. 2021-06-09 06:54:02 +02:00
David Carlier
95a9e558b6 Pull #6989 FreeBSD defines SO_ACCEPTFILTER 2021-05-31 11:40:20 +02:00
Nikita Popov
7bc8f2c83f Skip unsupported socket option test on FreeBSD 2021-05-19 09:48:22 +02:00
Nikita Popov
b9fbbcc867 Use different error condition in socket test
The previously used error does not occur on FreeBSD and instead
causes the operation to time out.

Also clean up the test a bit. And make sure it actually tests
something -- the point is that socket_last_error() should be 0
after socket_clear_error(). It's kind of pointless if the test
uses a wildcard for the final result instead.
2021-05-19 09:48:17 +02:00
Nikita Popov
79c9028ca6 Relax error message expectation in socket test 2021-05-18 19:34:34 +02:00
Nikita Popov
4baf340c39 Merge branch 'PHP-8.0'
* PHP-8.0:
  Remove getservbyname() variation tests
  Use SOL_TCP instead of getprotobyname() in tests
2021-05-07 14:56:13 +02:00
Nikita Popov
0413cf3c20 Use SOL_TCP instead of getprotobyname() in tests
This is more idiomatic anyway, and works on msan, which misses
interceptors for getprotobyname().
2021-05-07 14:55:18 +02:00
Remi Collet
f9547f2b47 get rid of inet_aton and inet_ntoa use inet_ntop iand inet_pton where available standardize buffer size 2021-05-06 13:39:58 +02:00
KsaR
01b3fc03c3 Update http->https in license (#6945)
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
2021-05-06 12:16:35 +02:00
Nikita Popov
ce0bc58c22 Merge branch 'PHP-8.0'
* PHP-8.0:
  Mark resource-like objects as non-comparable
2021-02-16 14:22:03 +01:00
Nikita Popov
b63ea1047a Mark resource-like objects as non-comparable
As these hold on to some internal resource, there can't be two
"equal" objects with different identity. Make sure the lack of
public properties doesn't result in these being treated as always
equal.
2021-02-16 14:20:45 +01:00
Máté Kocsis
bf0f6aaf18 Improve class entry generation
Related to GH-6701
2021-02-16 13:09:56 +01:00
Nikita Popov
1f04f162a6 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #80723
2021-02-16 12:34:00 +01:00
Nikita Popov
cb9785add1 Fixed bug #80723
This fixes the issue just for the Socket class. Presumably we'll
want to do the same for other "resource" objects.
2021-02-16 12:33:50 +01:00
Máté Kocsis
a730dc0cf9 Generate class entries for snmp, soap, sockets, sodium, sqlite3, sysv*, tidy
Closes GH-6696
2021-02-15 11:45:26 +01:00
Nikita Popov
b10416a652 Deprecate passing null to non-nullable arg of internal function
This deprecates passing null to non-nullable scale arguments of
internal functions, with the eventual goal of making the behavior
consistent with userland functions, where null is never accepted
for non-nullable arguments.

This change is expected to cause quite a lot of fallout. In most
cases, calling code should be adjusted to avoid passing null. In
some cases, PHP should be adjusted to make some function arguments
nullable. I have already fixed a number of functions before landing
this, but feel free to file a bug if you encounter a function that
doesn't accept null, but probably should. (The rule of thumb for
this to be applicable is that the function must have special behavior
for 0 or "", which is distinct from the natural behavior of the
parameter.)

RFC: https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg

Closes GH-6475.
2021-02-11 21:46:13 +01:00
Nikita Popov
3e01f5afb1 Replace zend_bool uses with bool
We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.

Of course, zend_bool is retained as an alias.
2021-01-15 12:33:06 +01:00
Nikita Popov
422d1665a2 Make convert_to_*_ex simple aliases of convert_to_*
Historically, the _ex variants separated the zval first, if a
conversion was necessary. This distinction no longer makes sense
since PHP 7.

The only difference that was still left is that _ex checked whether
the type is the same first, but the usage of these macros did not
actually distinguish on whether such an inlined check is valuable
or not in a given context.

Also drop the unused convert_to_explicit_type macros.
2021-01-14 12:11:11 +01:00