Skip to content

Commit bd7c6d0

Browse files
committed
Merge branch 'main' into 0.3x
2 parents e66925e + 97e3b89 commit bd7c6d0

File tree

6 files changed

+9
-11
lines changed

6 files changed

+9
-11
lines changed

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@
66

77
This **libuv ffi** implementation is based on PHP extension [ext-uv](https://github.com/amphp/ext-uv). All **ext-uv 0.3.0** _tests and functions_ been implemented, except **uv_queue_work**.
88

9-
- Functionality works as expected under `Windows` _PHP 7.4, 8.0, 8.1, 8.2_.
10-
- `Linux` all functions and tests completes, but failing by way of `2`, _segmentation fault (core dumped)_ after completing, issues around current **destruct/shutdown** routine implementations and usage of **FFI::free** on _libuv_ C structures.
11-
- `macOS` most functions and tests completes, but failing by way of `4`, implementation issues around **uv_spawn**, **uv_ip4_addr** and **uv_signal**.
12-
13-
**All functionality is interdependent on [zend-ffi](https://github.com/symplely/zend-ffi).**
9+
- Functionality works as expected under _`Windows`_, _`Linux`_, and _`Apple macOS`_, **PHP 7.4 to 8.2**.
10+
- All functionality is interdependent on [zend-ffi](https://github.com/symplely/zend-ffi).
1411

1512
The actual threading feature of `uv_queue_work` in **ext-uv 0.3.0** is on pause. Getting native PThreads working with FFI, needs a lot more investigation and more likely C development of PHP source code. Seems someone else has started something similar <https://github.com/mrsuh/php-pthreads>.
1613

@@ -55,7 +52,8 @@ opcache.jit_buffer_size=8M
5552
ffi.enable="true"
5653

5754
; List of headers files to preload, wildcard patterns allowed. `ffi.preload` has no effect on Windows.
58-
;ffi.preload=path/to/vendor/symplely/uv-ffi/headers/uv_your-OS-platform_vendor.h
55+
; replace `your-platform` with: windows, centos7, centos8+, macos, pi, ubuntu18.04, or ubuntu20.04
56+
;ffi.preload=path/to/vendor/symplely/uv-ffi/headers/uv_your-platform_generated.h
5957

6058
;opcache.preload==path/to/vendor/symplely/uv-ffi/preload.php
6159
```

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"require": {
2929
"php": ">7.4",
3030
"ext-ffi": "*",
31-
"symplely/zend-ffi": "~0.12.1"
31+
"symplely/zend-ffi": "~0.12.2"
3232
},
3333
"autoload": {
3434
"files": [

preload.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ function uv_ffi_loader()
332332

333333
$vendor_dir = 'vendor' . \DS . 'symplely' . \DS . 'uv-ffi';
334334
if (\file_exists($vendor_dir) && (\IS_WINDOWS || \IS_MACOS)) {
335-
$vendor_code = \str_replace('.h', '_vendor.h', $code);
335+
$vendor_code = \str_replace('.h', '_generated.h', $code);
336336
if (!\file_exists($vendor_code)) {
337337
$file = \str_replace(
338338
'FFI_LIB ".',

tests/004-uv_write-no-memory_leak.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--TEST--
22
Check for uv_write has no memory leak
33
--SKIPIF--
4-
<?php if (!extension_loaded("ffi") || (getenv('GITHUB_ACTIONS') !== false && '\\' !== \DIRECTORY_SEPARATOR && (float) \phpversion() < 8.2)) print "skip"; ?>
4+
<?php if (!extension_loaded("ffi") || (getenv('GITHUB_ACTIONS') !== false && \PHP_OS === 'Linux' && (float) \phpversion() < 8.0)) print "skip"; ?>
55
--FILE--
66
<?php
77
require 'vendor/autoload.php';

tests/800.1-uv_signal.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ $stdio[] = uv_stdio_new($out, UV::CREATE_PIPE | UV::WRITABLE_PIPE);
3232
$flags = 0;
3333
$process = uv_spawn(
3434
uv_default_loop(),
35-
"php",
35+
PHP_BINARY,
3636
array('-r', 'echo "World!" . PHP_EOL; sleep(100);'),
3737
$stdio,
3838
__DIR__,

tests/800.1-uv_spawn.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ $stdio[] = uv_stdio_new($out, UV::CREATE_PIPE | UV::WRITABLE_PIPE);
1717

1818
uv_spawn(
1919
uv_default_loop(),
20-
"php",
20+
PHP_BINARY,
2121
array('-r', "var_dump(getenv('KEY'));"),
2222
$stdio,
2323
__DIR__,

0 commit comments

Comments
 (0)