mirror of
https://github.com/pestphp/pest.git
synced 2026-06-07 20:02:13 +02:00
Fixes --version and --help
This commit is contained in:
@ -10,7 +10,7 @@ use Pest\Plugin\Loader;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
final class AddsOutput
|
||||
final class CallsAddsOutput
|
||||
{
|
||||
/**
|
||||
* Executes the Plugin action.
|
||||
29
src/Plugins/Actions/CallsBoot.php
Normal file
29
src/Plugins/Actions/CallsBoot.php
Normal 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 CallsBoot
|
||||
{
|
||||
/**
|
||||
* Executes the Plugin action.
|
||||
*
|
||||
* Provides an opportunity for any plugins to boot..
|
||||
*/
|
||||
public function __invoke(): void
|
||||
{
|
||||
$plugins = Loader::getPlugins(Plugins\Bootable::class);
|
||||
|
||||
/** @var Plugins\Bootable $plugin */
|
||||
foreach ($plugins as $plugin) {
|
||||
$plugin->boot();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -10,7 +10,7 @@ use Pest\Plugin\Loader;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
final class HandleArguments
|
||||
final class CallsHandleArguments
|
||||
{
|
||||
/**
|
||||
* Executes the Plugin action.
|
||||
29
src/Plugins/Actions/CallsShutdown.php
Normal file
29
src/Plugins/Actions/CallsShutdown.php
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user