Skip to content

Update processes.md #608

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

Merged
merged 1 commit into from
Jul 16, 2025
Merged
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
24 changes: 12 additions & 12 deletions processes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
git: 4f4c78e4a04ac1c09c8092016ff2434c9c0532a0
git: 0790883cb65b64c49bcdca57b5d114bf2ccb5abb
---

# Процессы
Expand Down Expand Up @@ -96,16 +96,16 @@ $result = Process::timeout(60)->idleTimeout(30)->run('bash import.sh');

```php
$result = Process::forever()
->env(['IMPORT_PATH' => __DIR__])
->run('bash import.sh');
->env(['IMPORT_PATH' => __DIR__])
->run('bash import.sh');
```

Если вы хотите удалить унаследованную переменную среды из вызванного процесса, вы можете предоставить этой переменной среды значение `false`:

```php
$result = Process::forever()
->env(['LOAD_PATH' => false])
->run('bash import.sh');
->env(['LOAD_PATH' => false])
->run('bash import.sh');
```

<a name="tty-mode"></a>
Expand Down Expand Up @@ -489,8 +489,8 @@ Process::fake([
```php
Process::fake([
'ls *' => Process::sequence()
->push(Process::result('First invocation'))
->push(Process::result('Second invocation')),
->push(Process::result('First invocation'))
->push(Process::result('Second invocation')),
]);
```

Expand Down Expand Up @@ -522,11 +522,11 @@ To properly fake this process, we need to be able to describe how many times the
```php
Process::fake([
'bash import.sh' => Process::describe()
->output('First line of standard output')
->errorOutput('First line of error output')
->output('Second line of standard output')
->exitCode(0)
->iterations(3),
->output('First line of standard output')
->errorOutput('First line of error output')
->output('Second line of standard output')
->exitCode(0)
->iterations(3),
]);
```

Expand Down