Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Will the signature for uv_fs_scandir be changing? #82

Closed
TheTechsTech opened this issue Mar 4, 2020 · 1 comment
Closed

Will the signature for uv_fs_scandir be changing? #82

TheTechsTech opened this issue Mar 4, 2020 · 1 comment

Comments

@TheTechsTech
Copy link

You have at:
https://github.com/bwoebi/php-uv/blob/0b40ad9f512953c1c5c00d9637732891516a703c/php_uv.c#L5859

The signature listed at http://docs.libuv.org/en/v1.x/fs.html#c.uv_fs_scandir shows:
uv_fs_scandir(uv_loop_t* loop, uv_fs_t* req, const char* path, int flags, uv_fs_cb cb)

Currently, the example readdir.php throws PHP Warning: uv_fs_scandir() expects parameter 3 to be integer, object given in ...

Works correctly once switched around.

@ghost
Copy link

ghost commented Mar 7, 2020

The callback signature was changed with commit e76ac0d. The example is for the new version v0.3.0 (not released yet), while previous versions had first the flags and then the callback.

I've had to update my library too, to temporarily support both v0.2.4 and git builds.
https://github.com/AndromedaGalaxy/reactphp-libuv-filesystem/commit/a48e67a68779a72876fe4c4e9ccb05f26431a13b#diff-6cccbfd4d0d4ee5eb861b1256b5fad51R343

Once v0.3.0 is released, I'll however drop support for v0.2.4, since there are some unavoidable segfaults and missing features with that version.

@kelunik kelunik closed this as completed Jan 13, 2022
TheTechsTech added a commit to symplely/uv-ffi that referenced this issue Aug 3, 2022
…t-uv

- added back `ext-uv` C source code until all functions within is implemented.
- added functions/methods for direct Zval handling, a rewrite from https://github.com/lisachenko/z-engine.
- updated each platform `libuv` cdef *.h header files, currently only Windows version is used for implementation at the moment.
- added `zend api` *.h headers.
- additional tests implemented.
- updated examples to use ffi version by adding `require 'vendor/autoload.php';`
- updated CI to build/use libuv 1.44.2.
- additional stubs/updates for IDE static analysis.
- update Readme sections and progress.
- discovered `ext-uv` issue amphp/ext-uv#78 not really a real issue. The tests and examples using old `libuv` version that does not do a conversion on Windows from '0.0.0.0', changing to '127.0.0.1' everything works.
- also `uv_tty_init($loop, STDOUT,0)` can be used instead for `uv_pipe_open($loop, STDOUT)` that does not work on Windows and according to libuv/help#120 it's the best solution.
- added an emulation mode for `uv_pipe_open($loop, STDOUT)` under Windows, by using `uv_pipe()` internally.
- Todo: address amphp/ext-uv#82 and amphp/ext-uv#45
TheTechsTech added a commit to symplely/ext-uv that referenced this issue Mar 30, 2023
**In reference to:** amphp#106, amphp#107, amphp#94, amphp#98, amphp#93, amphp#92, amphp#86, amphp#84, amphp#82, amphp#64

- BC signature changes has been revert since some of the tests wasn't changed to match, and too far off original design.
- Using current **Libuv** version or systems installed one, not `pecl`, this setup is not reliant on the really slow `pecl` system for updated installations.

The whole `uv_queue_work()` will need to be re implemented, the core internal `TSRM.c` thread related `tsrm_***_interpreter_context` functions used in PHP 7.4 has been removed since PHP 8.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants