Upgrade framework

This commit is contained in:
2023-11-14 16:54:35 +01:00
parent 1648a5cd42
commit 4fcf6fffcc
10548 changed files with 693138 additions and 466698 deletions

View File

@@ -0,0 +1,16 @@
<?php
declare(strict_types=1);
namespace NunoMaduro\Collision\Contracts\Adapters\Phpunit;
/**
* @internal
*/
interface HasPrintableTestCaseName
{
/**
* Returns the test case name that should be used by the printer.
*/
public function getPrintableTestCaseName(): string;
}

View File

@@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
namespace NunoMaduro\Collision\Contracts\Adapters\Phpunit;
use PHPUnit\Framework\Test;
use PHPUnit\Framework\TestListener;
/**
* @internal
*/
interface Listener extends TestListener
{
/**
* Renders the provided error
* on the console.
*
* @return void
*/
public function render(Test $test, \Throwable $t);
}

View File

@@ -0,0 +1,17 @@
<?php
declare(strict_types=1);
namespace NunoMaduro\Collision\Contracts;
/**
* @internal
*/
interface ArgumentFormatter
{
/**
* Formats the provided array of arguments into
* an understandable description.
*/
public function format(array $arguments, bool $recursive = true): string;
}

View File

@@ -0,0 +1,28 @@
<?php
declare(strict_types=1);
namespace NunoMaduro\Collision\Contracts;
use Symfony\Component\Console\Output\OutputInterface;
use Whoops\Handler\HandlerInterface;
/**
* @internal
*/
interface Handler extends HandlerInterface
{
/**
* Sets the output.
*
* @return \NunoMaduro\Collision\Contracts\Handler
*/
public function setOutput(OutputInterface $output): Handler;
/**
* Returns the writer.
*
* @return \NunoMaduro\Collision\Contracts\Writer
*/
public function getWriter(): Writer;
}

View File

@@ -0,0 +1,16 @@
<?php
declare(strict_types=1);
namespace NunoMaduro\Collision\Contracts;
/**
* @internal
*/
interface Highlighter
{
/**
* Highlights the provided content.
*/
public function highlight(string $content, int $line): string;
}

View File

@@ -0,0 +1,25 @@
<?php
declare(strict_types=1);
namespace NunoMaduro\Collision\Contracts;
/**
* @internal
*/
interface Provider
{
/**
* Registers the current Handler as Error Handler.
*
* @return \NunoMaduro\Collision\Contracts\Provider
*/
public function register(): Provider;
/**
* Returns the handler.
*
* @return \NunoMaduro\Collision\Contracts\Handler
*/
public function getHandler(): Handler;
}

View File

@@ -0,0 +1,12 @@
<?php
declare(strict_types=1);
namespace NunoMaduro\Collision\Contracts;
/**
* @internal
*/
interface RenderlessEditor
{
}

View File

@@ -0,0 +1,12 @@
<?php
declare(strict_types=1);
namespace NunoMaduro\Collision\Contracts;
/**
* @internal
*/
interface RenderlessTrace
{
}

View File

@@ -0,0 +1,21 @@
<?php
declare(strict_types=1);
namespace NunoMaduro\Collision\Contracts;
use Spatie\Ignition\Contracts\Solution;
use Throwable;
/**
* @internal
*/
interface SolutionsRepository
{
/**
* Gets the solutions from the given `$throwable`.
*
* @return array<int, Solution>
*/
public function getFromThrowable(Throwable $throwable): array;
}

View File

@@ -0,0 +1,70 @@
<?php
declare(strict_types=1);
/**
* This file is part of Collision.
*
* (c) Nuno Maduro <enunomaduro@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace NunoMaduro\Collision\Contracts;
use Symfony\Component\Console\Output\OutputInterface;
use Whoops\Exception\Inspector;
/**
* @internal
*/
interface Writer
{
/**
* Ignores traces where the file string matches one
* of the provided regex expressions.
*
* @param string[] $ignore the regex expressions
* @return \NunoMaduro\Collision\Contracts\Writer
*/
public function ignoreFilesIn(array $ignore): Writer;
/**
* Declares whether or not the Writer should show the trace.
*
* @return \NunoMaduro\Collision\Contracts\Writer
*/
public function showTrace(bool $show): Writer;
/**
* Declares whether or not the Writer should show the title.
*
* @return \NunoMaduro\Collision\Contracts\Writer
*/
public function showTitle(bool $show): Writer;
/**
* Declares whether or not the Writer should show the editor.
*
* @return \NunoMaduro\Collision\Contracts\Writer
*/
public function showEditor(bool $show): Writer;
/**
* Writes the details of the exception on the console.
*/
public function write(Inspector $inspector): void;
/**
* Sets the output.
*
* @return \NunoMaduro\Collision\Contracts\Writer
*/
public function setOutput(OutputInterface $output): Writer;
/**
* Gets the output.
*/
public function getOutput(): OutputInterface;
}