mirror of
https://github.com/pestphp/pest.git
synced 2026-03-11 18:27:23 +01:00
Fixes --version and --help
This commit is contained in:
@ -59,16 +59,18 @@ final class BootFiles
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the given filename, if possible.
|
||||
* Loads, if possible, the given file.
|
||||
*/
|
||||
private function load(string $filename): void
|
||||
{
|
||||
if (! Str::endsWith($filename, '.php')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (! file_exists($filename)) {
|
||||
return;
|
||||
}
|
||||
|
||||
include_once $filename;
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ namespace Pest\Bootstrappers;
|
||||
|
||||
use Pest\Subscribers;
|
||||
use PHPUnit\Event;
|
||||
use PHPUnit\Event\Subscriber;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
@ -15,7 +16,7 @@ final class BootSubscribers
|
||||
/**
|
||||
* The Kernel subscribers.
|
||||
*
|
||||
* @var array<int, class-string<\PHPUnit\Event\Subscriber>>
|
||||
* @var array<int, class-string<Subscriber>>
|
||||
*/
|
||||
private const SUBSCRIBERS = [
|
||||
Subscribers\EnsureConfigurationIsValid::class,
|
||||
|
||||
28
src/Bootstrappers/BootView.php
Normal file
28
src/Bootstrappers/BootView.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Pest\Bootstrappers;
|
||||
|
||||
use Pest\Support\View;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
final class BootView
|
||||
{
|
||||
public function __construct(
|
||||
private readonly OutputInterface $output
|
||||
) {
|
||||
// ..
|
||||
}
|
||||
|
||||
/**
|
||||
* Boots the view renderer.
|
||||
*/
|
||||
public function __invoke(): void
|
||||
{
|
||||
View::renderUsing($this->output);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user