Skip to content

Commit 98949b0

Browse files
committed
Improve documentation and examples
1 parent c3505ba commit 98949b0

File tree

4 files changed

+11
-17
lines changed

4 files changed

+11
-17
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# clue/reactphp-shell
22

3-
[![CI status](https://github.com/clue/reactphp-shell/workflows/CI/badge.svg)](https://github.com/clue/reactphp-shell/actions)
3+
[![CI status](https://github.com/clue/reactphp-shell/actions/workflows/ci.yml/badge.svg)](https://github.com/clue/reactphp-shell/actions)
44
[![installs on Packagist](https://img.shields.io/packagist/dt/clue/shell-react?color=blue&label=installs%20on%20Packagist)](https://packagist.org/packages/clue/shell-react)
55

66
Run async commands within any interactive shell command, built on top of [ReactPHP](https://reactphp.org/).
@@ -28,42 +28,42 @@ $shell->execute('env | sort | head -n10')->then(function ($env) {
2828
$shell->end();
2929
```
3030

31-
See also the [examples](examples):
31+
See also the [examples](examples/):
3232

3333
* [Run shell commands within a bash shell](examples/bash.php)
3434
* [Run PHP code within an interactive PHP shell](examples/php.php)
3535
* [Run shell commands within a docker container](examples/docker.php)
3636

3737
## Install
3838

39-
The recommended way to install this library is [through Composer](https://getcomposer.org).
39+
The recommended way to install this library is [through Composer](https://getcomposer.org/).
4040
[New to Composer?](https://getcomposer.org/doc/00-intro.md)
4141

4242
This will install the latest supported version:
4343

4444
```bash
45-
$ composer require clue/shell-react:^0.2
45+
composer require clue/shell-react:^0.2
4646
```
4747

4848
See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.
4949

5050
This project aims to run on any platform and thus does not require any PHP
5151
extensions and supports running on legacy PHP 5.3 through current PHP 8+.
52-
It's *highly recommended to use PHP 7+* for this project.
52+
It's *highly recommended to use the latest supported PHP version* for this project.
5353

5454
## Tests
5555

5656
To run the test suite, you first need to clone this repo and then install all
57-
dependencies [through Composer](https://getcomposer.org):
57+
dependencies [through Composer](https://getcomposer.org/):
5858

5959
```bash
60-
$ composer install
60+
composer install
6161
```
6262

6363
To run the test suite, go to the project root and run:
6464

6565
```bash
66-
$ php vendor/bin/phpunit
66+
vendor/bin/phpunit
6767
```
6868

6969
## License

examples/bash.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<?php
22

3-
use Clue\React\Shell\ProcessLauncher;
4-
53
require __DIR__ . '/../vendor/autoload.php';
64

7-
$launcher = new ProcessLauncher();
5+
$launcher = new Clue\React\Shell\ProcessLauncher();
86

97
$shell = $launcher->createDeferredShell('bash 2>&1');
108

examples/docker.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<?php
22

3-
use Clue\React\Shell\ProcessLauncher;
4-
53
require __DIR__ . '/../vendor/autoload.php';
64

7-
$launcher = new ProcessLauncher();
5+
$launcher = new Clue\React\Shell\ProcessLauncher();
86

97
$shell = $launcher->createDeferredShell('docker run -i --rm debian bash');
108

examples/php.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<?php
22

3-
use Clue\React\Shell\ProcessLauncher;
4-
53
require __DIR__ . '/../vendor/autoload.php';
64

7-
$launcher = new ProcessLauncher();
5+
$launcher = new Clue\React\Shell\ProcessLauncher();
86

97
$shell = $launcher->createDeferredShell('php -a');
108
$shell->setBounding("echo '{{ bounding }}';");

0 commit comments

Comments
 (0)