Fixes --version and --help

This commit is contained in:
Nuno Maduro
2022-09-17 23:47:47 +01:00
parent 08b62f6633
commit 0e0e2adfbe
26 changed files with 511 additions and 86 deletions

View File

@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
namespace Pest\Plugins\Actions;
use Pest\Contracts\Plugins;
use Pest\Plugin\Loader;
/**
* @internal
*/
final class CallsShutdown
{
/**
* Executes the Plugin action.
*
* Provides an opportunity for any plugins to shutdown.
*/
public function __invoke(): void
{
$plugins = Loader::getPlugins(Plugins\Shutdownable::class);
/** @var Plugins\Shutdownable $plugin */
foreach ($plugins as $plugin) {
$plugin->shutdown();
}
}
}