You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know already this example violates some of the async principles, for example these are all blocking: is_readable, fopen, filesize but this is only for a dev-convenience function not for production use. I have confirmed this works thus far, but wanted to see if this reactphp/filesystem project could be used as a more proper implementation. Thanks!
The README refers to installing ^0.2 but I didn't see that in Packagist and got an error when trying to install it.
Correct, the initial, big chunk, of work of the rewrite is done. v0.2.0 isn't out yet as a bunch of smaller improvements/bug fixes will need to be addressed. We didn't wait to wait to get the 80% of the features/changes available before working on the other 20% (which will probably take the other 80% of the time 😂 ).
But it looks like this was just rewritten 4 days ago! what a coincidence as I'm trying to use it for the first time in a project.
Please try it out and let us know how it worked for what you wanted to use it for. We need feedback like that.
That said, I have a question. Is this a valid alternative to using this project which is still experimental?
Yes, or well, I would. v0.1.x was experimental and I learned a lot from creating that version, including many many mistakes. v0.2 aims to take those lettings and mature this package into a stable version like our other components.
I know already this example violates some of the async principles, for example these are all blocking: is_readable, fopen, filesize but this is only for a dev-convenience function not for production use. I have confirmed this works thus far, but wanted to see if this reactphp/filesystem project could be used as a more proper implementation. Thanks!
Try this, it doesn't stream the file's contents, but maybe we can add that in v0.2 (or v0.3 as well):
(I didn't check this code for mistakes or try to run it, bugs might be inside 😜 .)
P.S. I took the liberty of editing your comment and enable PHP syntax highlighting to your code example by appending php to the opening of that code block like so it is easier to read:
Hmm... alright so how would I install the latest development version to test? I tried running: composer require 'react/filesystem:dev-master' and got this composer error:
composer require 'react/filesystem:dev-master' 2 ✘
./composer.json has been updated
Running composer update react/filesystem
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- wyrihaximus/react-child-process-promise-closure 1.0.0 requires php ^7.0 -> your php version (8.1.2) does not satisfy that requirement.
- react/filesystem dev-master requires wyrihaximus/react-child-process-promise-closure ^1.0 -> satisfiable by wyrihaximus/react-child-process-promise-closure[1.0.0].
- Root composer.json requires react/filesystem dev-master -> satisfiable by react/filesystem[dev-master].
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
So looks like wyrihaximus/react-child-process-promise-closure has to be updated too?
Activity
WyriHaximus commentedon Feb 13, 2022
Correct, the initial, big chunk, of work of the rewrite is done.
v0.2.0isn't out yet as a bunch of smaller improvements/bug fixes will need to be addressed. We didn't wait to wait to get the 80% of the features/changes available before working on the other 20% (which will probably take the other 80% of the time 😂 ).Please try it out and let us know how it worked for what you wanted to use it for. We need feedback like that.
Yes, or well, I would. v0.1.x was experimental and I learned a lot from creating that version, including many many mistakes. v0.2 aims to take those lettings and mature this package into a stable version like our other components.
Try this, it doesn't stream the file's contents, but maybe we can add that in v0.2 (or v0.3 as well):
(I didn't check this code for mistakes or try to run it, bugs might be inside 😜 .)
P.S. I took the liberty of editing your comment and enable
PHPsyntax highlighting to your code example by appendingphpto the opening of that code block like so it is easier to read:michaelbutler commentedon Feb 14, 2022
Hmm... alright so how would I install the latest development version to test? I tried running:
composer require 'react/filesystem:dev-master'and got this composer error:So looks like
wyrihaximus/react-child-process-promise-closurehas to be updated too?WyriHaximus commentedon Feb 19, 2022
Yes, working on that right now 👍 .
WyriHaximus commentedon Feb 19, 2022
@michaelbutler It should be requireable now