Releases: TitasGailius/terminal
Releases · TitasGailius/terminal
symfony/process ^6.0 support
1.2.0 Fix tests
PHP 8.1 Support
1.1.0 php 8.1
PHP 8 Support
PHP 8 Support
To use Terminal with PHP 8.x, please upgrade Terminal to the ^1.0
version.
- Update your
composer.json
to use the latest version of the terminal:"titasgailius/terminal": "^1.0"
. - Note that the
Builder::retry
is now aprotected
method.
It's very unlikely that you were was using this method..
Add "assertNotExecuted"
Alternatively you can also check that a given command was not executed. You may accomplish this by calling the Terminal::assertNotExecuted
method after calling Terminal::fake
.
Terminal::fake();
Terminal::assertNotExecuted('php artisan migrate');
Enable/Disable TTY & set max time since last output (idleTimeout)
TTY
You may enable or disable TTY mode:
Terminal::enableTty()->run(...);
Terminal::disableTty()->run(...);
Idle Timeout
You may specify max allowed time since last output:
// Seconds.
Terminal::idleTimeout(20)->run(...);
// Carbon.
Terminal::idleTimeout(Carbon::now()->addSeconds(20))->run(...);
// DateInterval.
Terminal::idleTimeout(new DateInterval('PT20S'))->run(...);
Expose `runProcess` method publically
0.3.1 Update BuilderFake.php
Send output to Laravel's Artisan command or Symfony's Console command
Output via Laravel Artisan Command
If you run Terminal from the Laravel's Artisan command, you may send the output to the console by
passing an instance of the Command to the output
method:
public function handle()
{
Terminal::output($this)->run('echo Hello, World');
}
Output via Symfony Console Command
If you run Terminal from the Symfony's Console command, you may send the output to the console by
passing an instance of the OutputInterface to the output
method:
protected function execute(InputInterface $input, OutputInterface $output)
{
Terminal::output($output)->run('echo Hello, World');
}
Bump symfony/process to "^4.4.2" to support Terminal::data feature
0.2.7 Bump symfony/process to "^4.4.2" to support Terminal::data feature
Add support for Symfony/Process v4
0.2.6 Update composer.lock
Implemented "toString".
- Reset captured commands after each test.
- Introduce a test that checks if a command passed as an array is executed correctly.
- Implemented the "toString" method that returns the current (or a given) command as a string.