Skip to content

Drop child process adapter #109

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

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 3 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* [Factory](#factory)
* [create()](#create)
* [Filesystem implementations](#filesystem-implementations)
* [ChildProcess](#childprocess)
* [Uv](#uv)
* [AdapterInterface](#adapterinterface)
* [detect()](#detect)
Expand Down Expand Up @@ -102,26 +101,15 @@ an implementation detail.
You should use the [`Factory`](#factory) to automatically create a new instance.

The factory will determine the most performant filesystem for your environment. Any extension based filesystem are
preferred before falling back to less performant filesystems. When no extensions are detected it will fall back to
the [`ChildProcess`](#childprocess) on Linux/Mac machines, and to an internal fallback filesystem for windows that
uses blocking system calls. This blocking filesystem isn't documented and will be removed once
the [`ChildProcess`](#childprocess) filesystem works on Windows. It's merely mentioned here for reference until then.
preferred before falling back to less performant filesystems. When no extensions are detected it will fall back to an
internal fallback filesystem that uses blocking system calls. As such it is highly recommended to install one of the
extensions that unlocks more performant filesystem operations.

Advanced! If you explicitly need a certain filesystem implementation, you can
manually instantiate one of the following classes.
Note that you may have to install the required PHP extensions for the respective
event loop implementation first or they will throw a `BadMethodCallException` on creation.

#### ChildProcess

A [`child process`](https://reactphp.org/child-process/) based filesystem.

This uses the blocking calls like the [`file_get_contents()`](https://www.php.net/manual/en/function.file-get-contents.php)
function to do filesystem calls and is the only implementation which works out of the box with PHP.

Due to using child processes to handle filesystem calls, this filesystem the least performant is only used when no
extensions are found to create a more performant filesystem.

#### Uv

An `ext-uv` based filesystem.
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
"react/event-loop": "^1.2",
"react/promise": "^2.8",
"react/promise-stream": "^1.2",
"react/stream": "^1.2",
"wyrihaximus/react-child-process-promise-closure": "^1.0"
"react/stream": "^1.2"
},
"require-dev": {
"clue/block-react": "^1.4",
Expand Down
60 changes: 30 additions & 30 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 0 additions & 52 deletions src/ChildProcess/Adapter.php

This file was deleted.

75 changes: 0 additions & 75 deletions src/ChildProcess/Directory.php

This file was deleted.

71 changes: 0 additions & 71 deletions src/ChildProcess/File.php

This file was deleted.

Loading