mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
feat: clarifies that profile is not supported in parallel
This commit is contained in:
@ -95,6 +95,7 @@
|
||||
"Pest\\Plugins\\Memory",
|
||||
"Pest\\Plugins\\Printer",
|
||||
"Pest\\Plugins\\ProcessIsolation",
|
||||
"Pest\\Plugins\\Profile",
|
||||
"Pest\\Plugins\\Retry",
|
||||
"Pest\\Plugins\\Version",
|
||||
"Pest\\Plugins\\Parallel"
|
||||
|
||||
28
src/Plugins/Profile.php
Normal file
28
src/Plugins/Profile.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Pest\Plugins;
|
||||
|
||||
use Pest\Contracts\Plugins\HandlesArguments;
|
||||
use Pest\Exceptions\InvalidOption;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
final class Profile implements HandlesArguments
|
||||
{
|
||||
use Concerns\HandleArguments;
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function handleArguments(array $arguments): array
|
||||
{
|
||||
if ($this->hasArgument('--parallel', $arguments)) {
|
||||
throw new InvalidOption('The [--profile] option is not supported when running in parallel.');
|
||||
}
|
||||
|
||||
return $arguments;
|
||||
}
|
||||
}
|
||||
@ -23,7 +23,6 @@ final class Retry implements HandlesArguments
|
||||
return $arguments;
|
||||
}
|
||||
|
||||
// If running in parallel, we need to disable the retry plugin
|
||||
if ($this->hasArgument('--parallel', $arguments)) {
|
||||
throw new InvalidOption('The [--retry] option is not supported when running in parallel.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user