Commit Graph

209 Commits

Author SHA1 Message Date
Máté Kocsis
77172c220a Convert resources to objects in ext/sockets
Closes GH-5900.
2020-08-03 23:26:38 +02:00
Santiago M. Mola
65713aaddd Fix #79923: fix socket_set_option_bindtodevice test
Closes GH-5924.
2020-08-03 15:03:07 +02:00
Nikita Popov
b0dc325bba Merge branch 'PHP-7.4'
* PHP-7.4:
  Handle SO_ options only at SOL_SOCKET level
  Allow different error message for errno 58
2020-07-02 11:44:34 +02:00
Nikita Popov
0a216f5edb Allow different error message for errno 58
Apparently this is EDEADLOCK on some systems.
2020-07-02 11:39:22 +02:00
Nikita Popov
b53f83c0c3 Merge branch 'PHP-7.4'
* PHP-7.4:
  Use automatic port assignment in socket_import/export test
2020-05-28 10:20:12 +02:00
Nikita Popov
490ca05883 Use automatic port assignment in socket_import/export test 2020-05-28 10:18:59 +02:00
George Peter Banyard
7ff8eaa545 Promote warnings to Errors in sockets's extension. 2020-04-21 20:41:26 +02:00
Nikita Popov
58f9c4053e Merge branch 'PHP-7.4'
* PHP-7.4:
  Don't rand() in test
2020-04-20 16:37:19 +02:00
Nikita Popov
3e9dac2c6b Don't rand() in test
Instead use port 0 to get a free port from the OS.
2020-04-20 16:35:52 +02:00
Nikita Popov
934e60b594 Merge branch 'PHP-7.4'
* PHP-7.4:
  Don't specify ports in socket_export_stream-4.phpt
2020-03-16 10:32:39 +01:00
Nikita Popov
a57905dbac Don't specify ports in socket_export_stream-4.phpt
Let the system pick a free port instead...
2020-03-16 10:32:04 +01:00
Nikita Popov
f8d795820e Reindent phpt files 2020-02-03 22:52:20 +01:00
Máté Kocsis
d1764ca330
Make error messages more consistent by fixing capitalization
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
2020-01-17 14:52:46 +01:00
Máté Kocsis
afdaa91170
Fix #78880: Final spelling fixes 2020-01-16 19:14:31 +01:00
Christoph M. Becker
424d34d1c0 Make test more resilient
`socket_bind()` may raise `E_WARNING` on failure, which would cause the
test to be marked as borked.  Since we're checking the return value
anyway, we can silence warnings.
2019-11-21 13:40:36 +01:00
Christoph M. Becker
735c4cab74 Make test more resilient
`socket_bind()` may raise `E_WARNING` on failure, which would cause the
test to fail.
2019-11-11 18:08:54 +01:00
Christoph M. Becker
ecc9588d0c Properly handle non resources passed to socket_select()
As of PHP 8.0.0, failing `zend_fetch_resource_ex()` throws a TypeError,
so we cannot simply skip non resources in the `$read`, `$write` and
`$except` arrays.  Instead we bail out.  Since these arrays are already
checked in `php_sock_array_to_fd_set()`, we remove the additional check
in `php_sock_array_from_fd_set()`.
2019-10-18 14:16:25 +02:00
Thomas Gerbet
428bd3d908 Add stubs for ext-sockets 2019-10-12 17:08:24 +02:00
Christoph M. Becker
cc8739cfb9 Fix potentially borked test case
If interface 'lo' is not available, `socket_set_option()` may warn,
which would cause the test to be marked as borked.  Thus we silence the
function call.
2019-10-12 16:48:45 +02:00
Christoph M. Becker
52f0610b74 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix test case
2019-10-12 16:29:42 +02:00
Christoph M. Becker
f6bd5dcbe9 Fix test case
`MSG_EOR` and `MSG_EOF` are not necessarily defined, in which case the
test would fail.
2019-10-12 16:28:57 +02:00
Nikita Popov
85c8c5bfac Merge branch 'PHP-7.4' 2019-10-11 10:58:03 +02:00
Fabien Villepinte
8b8c226dbf Replace port already used
Closes GH-4811.
2019-10-11 10:57:09 +02:00
Fabien Villepinte
78c753e8ee
Fix typo in tests 2019-10-10 15:57:57 +02:00
Nikita Popov
b0cf34a30c Merge branch 'PHP-7.4' 2019-10-08 18:20:31 +02:00
Fabien Villepinte
8b5c351154 Avoid file clash in root_check skipifs
Extract root check into skipif_root.inc to share this commonly
repeated logic.

Closes GH-4779.
2019-10-08 18:20:13 +02:00
Nikita Popov
235983dfde Merge branch 'PHP-7.4' 2019-09-30 17:52:39 +02:00
Fabien Villepinte
0aa3acc6c4 Fix borked SKIPIFs 2019-09-30 17:51:41 +02:00
viest
48040cf345 Remove deprecated getaddrinfo flags
The AI_IDN_ALLOW_UNASSIGNED and AI_IDN_USE_STD3_ASCII_RULES have
been deprecated by glibcs, and PHP 7.4 follows this deprecation.

This removes the offending flags for PHP 8.0.
2019-08-26 11:45:31 +02:00
Nikita Popov
06a4a9ba42 Merge branch 'PHP-7.4' 2019-08-26 11:33:38 +02:00
viest
5703943081 Deprecate AI_IDN_ALLOW_UNASSIGNED and AI_IDN_USE_STD3_ASCII_RULES
These flags have been deprecated in glibc 2.28, so we also
deprecate them in PHP.

As we can't deprecate constants, we can only check for their use
in socket_addrinfo_lookup().
2019-08-26 11:33:18 +02:00
Nikita Popov
057012f241 Merge branch 'PHP-7.4' 2019-07-03 12:48:00 +02:00
Nikita Popov
d6d9024cb8 Avoid use of random ports in some socket tests 2019-07-03 12:47:49 +02:00
Joe Watkins
9bcbd80775
Merge branch 'PHP-7.4'
* PHP-7.4:
  fix flaky socket test
2019-06-18 08:31:32 +02:00
Joe Watkins
68785c00ef
fix flaky socket test 2019-06-18 08:30:46 +02:00
Joe Watkins
7231ee9f55
Merge branch 'PHP-7.4'
* PHP-7.4:
  fix flaky socket tests
2019-06-15 08:09:17 +02:00
Joe Watkins
afdf7ed5ba
fix flaky socket tests 2019-06-15 08:08:08 +02:00
Joe Watkins
956db0cdc2
Merge branch 'PHP-7.4'
* PHP-7.4:
  fix mac tests on azure
2019-06-14 12:58:13 +02:00
Joe Watkins
f16b012116
fix mac tests on azure 2019-06-14 12:55:00 +02:00
Nikita Popov
af10245034 Merge branch 'PHP-7.4' 2019-06-13 09:38:19 +02:00
Nikita Popov
4603ce731b Don't throw warning if testing multiple ports 2019-06-13 09:34:23 +02:00
Joe Watkins
6df77cafb9
Merge branch 'PHP-7.4'
* PHP-7.4:
  fix flaky sockets test - form of response is OS dependent
2019-06-12 08:48:18 +02:00
Joe Watkins
c54a247cb0
fix flaky sockets test - form of response is OS dependent 2019-06-12 08:47:35 +02:00
Joe Watkins
2a11d88bc5
Merge branch 'PHP-7.4'
* PHP-7.4:
  fix flaky test on OSX
2019-06-12 08:33:19 +02:00
Joe Watkins
abe38b5e48
fix flaky test on OSX 2019-06-12 08:33:07 +02:00
Joe Watkins
f5e79e0b40
Merge branch 'PHP-7.4'
* PHP-7.4:
  fix flaky ipv4 loopback test
2019-06-10 10:35:57 +02:00
Joe Watkins
52ca8ca7d5
fix flaky ipv4 loopback test 2019-06-10 10:35:31 +02:00
Christoph M. Becker
3b77f269e9 Merge branch 'PHP-7.4'
* PHP-7.4:
  Use zero port in socket_(export|import)_stream-4-win.phpt
2019-06-06 16:19:37 +02:00
Christoph M. Becker
3b05bdedcd Use zero port in socket_(export|import)_stream-4-win.phpt
These regularly fail due to port clashes, though we don't seem to
use those ports in any other tests.

As we don't care about the specific port that is used here, pass
zero so that a random ephemeral port is used.
2019-06-06 16:19:19 +02:00
Nikita Popov
03a9c2df7b Merge branch 'PHP-7.4' 2019-06-05 11:58:20 +02:00