diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 92bca772..45445823 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -16,8 +16,11 @@ jobs: fail-fast: false matrix: php-version: ["8.1", "8.2", "8.3"] - typo3-version: ["11.5", "12.4"] + typo3-version: ["11.5", "12.4", "13.0"] dependencies: ["highest", "lowest"] + exclude: + - php-version: "8.1" + typo3-version: "13.0" env: typo3DatabaseName: typo3 typo3DatabaseHost: '127.0.0.1' diff --git a/Classes/Configuration/LowLevelConfigurationProvider.php b/Classes/Configuration/LowLevelConfigurationProvider.php index 4649ac69..4d40b752 100644 --- a/Classes/Configuration/LowLevelConfigurationProvider.php +++ b/Classes/Configuration/LowLevelConfigurationProvider.php @@ -39,7 +39,6 @@ final class LowLevelConfigurationProvider implements ConfigurationProvider { public function get(string $configPath, mixed $default = null): mixed { - /* @phpstan-ignore-next-line */ $extensionConfiguration = $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS'][Extension::KEY] ?? null; if (!is_array($extensionConfiguration)) { diff --git a/Classes/Formatter/WebStreamFormatter.php b/Classes/Formatter/WebStreamFormatter.php index 0a223f28..eba755a1 100644 --- a/Classes/Formatter/WebStreamFormatter.php +++ b/Classes/Formatter/WebStreamFormatter.php @@ -72,7 +72,7 @@ private function filterPendingChoices(array $choices): array { return array_filter( $choices, - static fn(Responses\Chat\CreateResponseChoice $choice): bool => $choice->finishReason === null, + static fn (Responses\Chat\CreateResponseChoice $choice): bool => $choice->finishReason === null, ); } } diff --git a/Classes/ProblemSolving/Solution/Solution.php b/Classes/ProblemSolving/Solution/Solution.php index 5b80f1dc..b5db3735 100644 --- a/Classes/ProblemSolving/Solution/Solution.php +++ b/Classes/ProblemSolving/Solution/Solution.php @@ -71,7 +71,7 @@ public static function fromArray(array $solution): self { $choices = array_map( /* @phpstan-ignore-next-line */ - static fn(array $choice): Responses\Chat\CreateResponseChoice => Responses\Chat\CreateResponseChoice::from($choice), + static fn (array $choice): Responses\Chat\CreateResponseChoice => Responses\Chat\CreateResponseChoice::from($choice), $solution['choices'], ); @@ -137,7 +137,7 @@ public function toArray(): array { return [ 'choices' => array_map( - static fn(Responses\Chat\CreateResponseChoice $choice): array => $choice->toArray(), + static fn (Responses\Chat\CreateResponseChoice $choice): array => $choice->toArray(), $this->choices, ), 'model' => $this->model, diff --git a/Classes/ViewHelpers/MarkdownToHtmlViewHelper.php b/Classes/ViewHelpers/MarkdownToHtmlViewHelper.php index ffae5d08..304993a9 100644 --- a/Classes/ViewHelpers/MarkdownToHtmlViewHelper.php +++ b/Classes/ViewHelpers/MarkdownToHtmlViewHelper.php @@ -90,7 +90,7 @@ private static function replaceLineNumbersInCodeSnippets(string $html): string '(.*?)<\/code><\/pre>/s', - static fn(array $matches): string => self::replaceLineNumbersInCodeSnippet($matches[1]), + static fn (array $matches): string => self::replaceLineNumbersInCodeSnippet($matches[1]), $html, ) ?? $html, ) ?? $html; diff --git a/Configuration/Services.php b/Configuration/Services.php index 011ec100..9c6491df 100644 --- a/Configuration/Services.php +++ b/Configuration/Services.php @@ -25,7 +25,7 @@ use Symfony\Component\DependencyInjection; -return static function ( +return static function( DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator, DependencyInjection\ContainerBuilder $containerBuilder, ): void { diff --git a/Documentation/Installation/Index.rst b/Documentation/Installation/Index.rst index 7f75f4fe..11c1b726 100644 --- a/Documentation/Installation/Index.rst +++ b/Documentation/Installation/Index.rst @@ -12,7 +12,7 @@ Requirements ============ - PHP 8.1 - 8.3 -- TYPO3 11.5 LTS - 12.4 LTS +- TYPO3 11.5 LTS - 13.0 LTS .. _steps: @@ -33,10 +33,12 @@ Or download it from the Version matrix ============== -+--------------------+-------------------------+---------------+ -| Extension versions | TYPO3 versions | PHP versions | -+====================+=========================+===============+ -| **since 0.2.8** | **11.5 LTS - 12.4 LTS** | **8.1 - 8.3** | -+--------------------+-------------------------+---------------+ -| 0.1.0 - 0.2.7 | 11.5 LTS - 12.4 LTS | 8.1 - 8.2 | -+--------------------+-------------------------+---------------+ ++--------------------+---------------------+---------------+ +| Extension versions | TYPO3 versions | PHP versions | ++====================+=====================+===============+ +| **since 0.2.10** | **11.5 LTS - 13.0** | **8.1 - 8.3** | ++--------------------+---------------------+---------------+ +| 0.2.8 - 0.2.9 | 11.5 LTS - 12.4 LTS | 8.1 - 8.3 | ++--------------------+---------------------+---------------+ +| 0.1.0 - 0.2.7 | 11.5 LTS - 12.4 LTS | 8.1 - 8.2 | ++--------------------+---------------------+---------------+ diff --git a/Documentation/Introduction/Index.rst b/Documentation/Introduction/Index.rst index 3c6e6a35..4bb4e610 100644 --- a/Documentation/Introduction/Index.rst +++ b/Documentation/Introduction/Index.rst @@ -34,7 +34,7 @@ Features - Caching integration for solves problems - Console command to solve problems from command line - Customizable solution providers and prompts -- Compatible with TYPO3 11.5 LTS and 12.4 LTS +- Compatible with TYPO3 11.5 LTS, 12.4 LTS and 13.0 .. _support: diff --git a/README.md b/README.md index 6d00268e..34be60f4 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ provides a console command to solve problems from command line. * Caching integration for solved problems * Command to solve problems from command line * Customizable solution providers and prompts -* Compatible with TYPO3 11.5 LTS and 12.4 LTS +* Compatible with TYPO3 11.5 LTS, 12.4 LTS and 13.0 ## 🔥 Installation diff --git a/Tests/Hooks/ExtensionConfigurationHook.php b/Tests/Extension/ExtensionConfigurationExtension.php similarity index 73% rename from Tests/Hooks/ExtensionConfigurationHook.php rename to Tests/Extension/ExtensionConfigurationExtension.php index be20c6b5..c8ff6185 100644 --- a/Tests/Hooks/ExtensionConfigurationHook.php +++ b/Tests/Extension/ExtensionConfigurationExtension.php @@ -21,22 +21,32 @@ * along with this program. If not, see . */ -namespace EliasHaeussler\Typo3Solver\Tests\Hooks; +namespace EliasHaeussler\Typo3Solver\Tests\Extension; use EliasHaeussler\Typo3Solver as Src; +use PHPUnit\Event; use PHPUnit\Runner; +use PHPUnit\TextUI; /** - * ExtensionConfigurationHook + * ExtensionConfigurationExtension * * @author Elias Häußler * @license GPL-2.0-or-later + * @internal */ -final class ExtensionConfigurationHook implements Runner\BeforeTestHook +final class ExtensionConfigurationExtension implements Runner\Extension\Extension, Event\Test\BeforeTestMethodCalledSubscriber { - public function executeBeforeTest(string $test): void + public function bootstrap( + TextUI\Configuration\Configuration $configuration, + Runner\Extension\Facade $facade, + Runner\Extension\ParameterCollection $parameters, + ): void { + $facade->registerSubscriber($this); + } + + public function notify(Event\Test\BeforeTestMethodCalled $event): void { - /* @phpstan-ignore-next-line */ $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS'][Src\Extension::KEY] = [ 'api' => [ 'key' => 'foo', diff --git a/Tests/Functional/Fixtures/Extensions/middleware_bridge/Configuration/RequestMiddlewares.php b/Tests/Functional/Fixtures/Extensions/middleware_bridge/Configuration/RequestMiddlewares.php index 711183cd..f64f139b 100644 --- a/Tests/Functional/Fixtures/Extensions/middleware_bridge/Configuration/RequestMiddlewares.php +++ b/Tests/Functional/Fixtures/Extensions/middleware_bridge/Configuration/RequestMiddlewares.php @@ -21,7 +21,7 @@ * along with this program. If not, see . */ -return (static function () { +return (static function() { $middlewares = require dirname(__DIR__, 6) . '/Configuration/RequestMiddlewares.php'; foreach ($middlewares as &$contextMiddlewares) { diff --git a/Tests/Functional/Fixtures/Extensions/middleware_bridge/Configuration/Services.php b/Tests/Functional/Fixtures/Extensions/middleware_bridge/Configuration/Services.php index 335738b4..641de977 100644 --- a/Tests/Functional/Fixtures/Extensions/middleware_bridge/Configuration/Services.php +++ b/Tests/Functional/Fixtures/Extensions/middleware_bridge/Configuration/Services.php @@ -23,6 +23,6 @@ use Symfony\Component\DependencyInjection; -return static function (DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator): void { +return static function(DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator): void { $containerConfigurator->import('../../../../../../Configuration/Services.php'); }; diff --git a/Tests/Functional/Middleware/PingMiddlewareTest.php b/Tests/Functional/Middleware/PingMiddlewareTest.php index a205cab5..198cf68f 100644 --- a/Tests/Functional/Middleware/PingMiddlewareTest.php +++ b/Tests/Functional/Middleware/PingMiddlewareTest.php @@ -24,6 +24,7 @@ namespace EliasHaeussler\Typo3Solver\Tests\Functional\Middleware; use EliasHaeussler\Typo3Solver\Tests; +use PHPUnit\Framework; use TYPO3\TestingFramework; /** @@ -42,9 +43,7 @@ final class PingMiddlewareTest extends TestingFramework\Core\Functional\Function protected bool $initializeDatabase = false; - /** - * @test - */ + #[Framework\Attributes\Test] public function middlewareIsSkippedOnUnsupportedRequest(): void { $request = self::createRequest('/tx_solver/ping')->withoutHeader('Accept'); @@ -53,9 +52,7 @@ public function middlewareIsSkippedOnUnsupportedRequest(): void self::assertNotSame(200, $response->getStatusCode()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function middlewareIsSkippedOnNonMatchingRoute(): void { $request = self::createRequest('/'); diff --git a/Tests/Functional/Middleware/SolutionMiddlewareTest.php b/Tests/Functional/Middleware/SolutionMiddlewareTest.php index 55ee5351..570c2cbb 100644 --- a/Tests/Functional/Middleware/SolutionMiddlewareTest.php +++ b/Tests/Functional/Middleware/SolutionMiddlewareTest.php @@ -24,6 +24,7 @@ namespace EliasHaeussler\Typo3Solver\Tests\Functional\Middleware; use EliasHaeussler\Typo3Solver\Tests; +use PHPUnit\Framework; use TYPO3\TestingFramework; /** @@ -42,9 +43,7 @@ final class SolutionMiddlewareTest extends TestingFramework\Core\Functional\Func protected bool $initializeDatabase = false; - /** - * @test - */ + #[Framework\Attributes\Test] public function middlewareIsSkippedOnUnsupportedRequest(): void { $request = self::createRequest('/tx_solver/solution')->withoutHeader('Accept'); @@ -53,9 +52,7 @@ public function middlewareIsSkippedOnUnsupportedRequest(): void self::assertNotSame(200, $response->getStatusCode()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function middlewareIsSkippedOnNonMatchingRoute(): void { $request = self::createRequest('/'); diff --git a/Tests/Functional/ViewHelpers/DateViewHelperTest.php b/Tests/Functional/ViewHelpers/DateViewHelperTest.php index 0b9a87f8..985070bb 100644 --- a/Tests/Functional/ViewHelpers/DateViewHelperTest.php +++ b/Tests/Functional/ViewHelpers/DateViewHelperTest.php @@ -27,6 +27,7 @@ use DateTimeInterface; use EliasHaeussler\Typo3Solver\Tests; use Generator; +use PHPUnit\Framework; use TYPO3\TestingFramework; use function trim; @@ -47,9 +48,7 @@ final class DateViewHelperTest extends TestingFramework\Core\Functional\Function protected bool $initializeDatabase = false; - /** - * @test - */ + #[Framework\Attributes\Test] public function renderStaticReturnsNonReadableFormattedDate(): void { $date = new DateTimeImmutable(); @@ -64,10 +63,10 @@ public function renderStaticReturnsNonReadableFormattedDate(): void } /** - * @test - * @dataProvider renderStaticReturnsHumanReadableDateDataProvider * @param non-empty-string $expected */ + #[Framework\Attributes\Test] + #[Framework\Attributes\DataProvider('renderStaticReturnsHumanReadableDateDataProvider')] public function renderStaticReturnsHumanReadableDate(DateTimeInterface $date, string $expected): void { $view = $this->createView(''); @@ -81,7 +80,7 @@ public function renderStaticReturnsHumanReadableDate(DateTimeInterface $date, st */ public static function renderStaticReturnsHumanReadableDateDataProvider(): Generator { - $format = static fn(int $interval, string $unit): array => [ + $format = static fn (int $interval, string $unit): array => [ new DateTimeImmutable($interval . ' ' . $unit . ' ago'), $unit . ' ago', ]; diff --git a/Tests/Functional/ViewHelpers/MarkdownToHtmlViewHelperTest.php b/Tests/Functional/ViewHelpers/MarkdownToHtmlViewHelperTest.php index 5767d91f..918053aa 100644 --- a/Tests/Functional/ViewHelpers/MarkdownToHtmlViewHelperTest.php +++ b/Tests/Functional/ViewHelpers/MarkdownToHtmlViewHelperTest.php @@ -25,6 +25,7 @@ use EliasHaeussler\Typo3Solver\Tests; use Parsedown; +use PHPUnit\Framework; use TYPO3\TestingFramework; use function trim; @@ -55,9 +56,7 @@ protected function setUp(): void $this->parsedown = new Parsedown(); } - /** - * @test - */ + #[Framework\Attributes\Test] public function renderStaticConvertsMarkdownToHtml(): void { $markdown = <<<'MARKDOWN' @@ -75,9 +74,7 @@ public function renderStaticConvertsMarkdownToHtml(): void ); } - /** - * @test - */ + #[Framework\Attributes\Test] public function renderStaticCanBeUsedWithContentArgument(): void { $markdown = <<<'MARKDOWN' @@ -95,9 +92,7 @@ public function renderStaticCanBeUsedWithContentArgument(): void ); } - /** - * @test - */ + #[Framework\Attributes\Test] public function renderStaticReplacesLinNumbersInCodeSnippets(): void { $markdown = <<<'MARKDOWN' diff --git a/Tests/Unit/Authentication/StreamAuthenticationTest.php b/Tests/Unit/Authentication/StreamAuthenticationTest.php index 5f5151b2..126fa4be 100644 --- a/Tests/Unit/Authentication/StreamAuthenticationTest.php +++ b/Tests/Unit/Authentication/StreamAuthenticationTest.php @@ -24,6 +24,7 @@ namespace EliasHaeussler\Typo3Solver\Tests\Unit\Authentication; use EliasHaeussler\Typo3Solver as Src; +use PHPUnit\Framework; use Symfony\Component\Filesystem; use TYPO3\TestingFramework; @@ -52,9 +53,7 @@ protected function setUp(): void $this->subject = new Src\Authentication\StreamAuthentication(); } - /** - * @test - */ + #[Framework\Attributes\Test] public function constructorCreatesTransientFileIfNotExists(): void { $this->filesystem->remove($this->filename); @@ -67,9 +66,7 @@ public function constructorCreatesTransientFileIfNotExists(): void self::assertSame('', file_get_contents($this->filename)); } - /** - * @test - */ + #[Framework\Attributes\Test] public function authenticateThrowsExceptionIfFileCannotBeRead(): void { $this->filesystem->remove($this->filename); @@ -81,9 +78,7 @@ public function authenticateThrowsExceptionIfFileCannotBeRead(): void $this->subject->authenticate('foo'); } - /** - * @test - */ + #[Framework\Attributes\Test] public function authenticateThrowsExceptionIfHashIsNotRegistered(): void { $this->expectExceptionObject( @@ -93,9 +88,7 @@ public function authenticateThrowsExceptionIfHashIsNotRegistered(): void $this->subject->authenticate('foo'); } - /** - * @test - */ + #[Framework\Attributes\Test] public function authenticateRemovesHashFromTransientFileOnSuccessfulAuthentication(): void { $registeredHash = $this->subject->register(); @@ -112,9 +105,7 @@ public function authenticateRemovesHashFromTransientFileOnSuccessfulAuthenticati self::assertNotContains($registeredHash, $registeredHashesAfterAuthentication); } - /** - * @test - */ + #[Framework\Attributes\Test] public function registerWritesHashToTransientFile(): void { $actual = $this->subject->register(); diff --git a/Tests/Unit/Cache/ExceptionsCacheTest.php b/Tests/Unit/Cache/ExceptionsCacheTest.php index df60aadd..33680e26 100644 --- a/Tests/Unit/Cache/ExceptionsCacheTest.php +++ b/Tests/Unit/Cache/ExceptionsCacheTest.php @@ -25,6 +25,7 @@ use EliasHaeussler\Typo3Solver as Src; use Exception; +use PHPUnit\Framework; use Symfony\Component\Filesystem; use TYPO3\TestingFramework; @@ -49,9 +50,7 @@ protected function setUp(): void $this->exception = new Exception('Something went wrong.', 123); } - /** - * @test - */ + #[Framework\Attributes\Test] public function constructorCreatesCacheFileIfNotExists(): void { $cacheFile = dirname(__DIR__, 3) . '/var/cache/data/tx_solver/exceptions.php'; @@ -67,9 +66,7 @@ public function constructorCreatesCacheFileIfNotExists(): void self::assertSame([], require $cacheFile); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getReturnsNullOnEmptyCache(): void { $this->subject->flush(); @@ -77,9 +74,7 @@ public function getReturnsNullOnEmptyCache(): void self::assertNull($this->subject->get('foo')); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getReturnsNullOnMissingCacheEntry(): void { $this->subject->flush(); @@ -89,9 +84,7 @@ public function getReturnsNullOnMissingCacheEntry(): void self::assertNull($this->subject->get('foo')); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getReturnsCacheEntry(): void { $this->subject->flush(); @@ -106,9 +99,7 @@ public function getReturnsCacheEntry(): void self::assertSame($this->exception->getLine(), $actual->getLine()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function removeRemovesGivenExceptionFromCache(): void { $this->subject->set($this->exception); diff --git a/Tests/Unit/Cache/Serializer/ExceptionSerializerTest.php b/Tests/Unit/Cache/Serializer/ExceptionSerializerTest.php index 74649295..ed04b5c8 100644 --- a/Tests/Unit/Cache/Serializer/ExceptionSerializerTest.php +++ b/Tests/Unit/Cache/Serializer/ExceptionSerializerTest.php @@ -24,6 +24,7 @@ namespace EliasHaeussler\Typo3Solver\Tests\Unit\Cache\Serializer; use EliasHaeussler\Typo3Solver as Src; +use PHPUnit\Framework; use TYPO3\TestingFramework; /** @@ -43,9 +44,7 @@ protected function setUp(): void $this->subject = new Src\Cache\Serializer\ExceptionSerializer(); } - /** - * @test - */ + #[Framework\Attributes\Test] public function serializeReturnsSerializedException(): void { $exception = Src\Exception\CustomSolvableException::create( @@ -68,9 +67,7 @@ public function serializeReturnsSerializedException(): void self::assertSame($expected, $this->subject->serialize($exception)); } - /** - * @test - */ + #[Framework\Attributes\Test] public function deserializeReturnsDeserializedException(): void { $exceptionArray = [ diff --git a/Tests/Unit/Cache/Serializer/SolutionSerializerTest.php b/Tests/Unit/Cache/Serializer/SolutionSerializerTest.php index f7c6ceb3..87211778 100644 --- a/Tests/Unit/Cache/Serializer/SolutionSerializerTest.php +++ b/Tests/Unit/Cache/Serializer/SolutionSerializerTest.php @@ -25,6 +25,7 @@ use DateTimeImmutable; use EliasHaeussler\Typo3Solver as Src; +use PHPUnit\Framework; use TYPO3\TestingFramework; use function time; @@ -48,9 +49,7 @@ protected function setUp(): void $this->configuration = new Src\Configuration\Configuration(); } - /** - * @test - */ + #[Framework\Attributes\Test] public function serializeReturnsSerializedSolution(): void { $solution = Src\Tests\Unit\DataProvider\SolutionDataProvider::get(); @@ -62,9 +61,7 @@ public function serializeReturnsSerializedSolution(): void self::assertGreaterThanOrEqual(time() + $this->configuration->getCacheLifetime(), $actual['validUntil']); } - /** - * @test - */ + #[Framework\Attributes\Test] public function deserializeReturnsNullIfSolutionIsExpired(): void { $solutionArray = [ @@ -76,9 +73,7 @@ public function deserializeReturnsNullIfSolutionIsExpired(): void self::assertNull($this->subject->deserialize($solutionArray)); } - /** - * @test - */ + #[Framework\Attributes\Test] public function deserializeReturnsDeserializedSolution(): void { $solution = Src\Tests\Unit\DataProvider\SolutionDataProvider::get(); diff --git a/Tests/Unit/Cache/SolutionsCacheTest.php b/Tests/Unit/Cache/SolutionsCacheTest.php index 2da93cfa..f5bdf645 100644 --- a/Tests/Unit/Cache/SolutionsCacheTest.php +++ b/Tests/Unit/Cache/SolutionsCacheTest.php @@ -24,6 +24,7 @@ namespace EliasHaeussler\Typo3Solver\Tests\Unit\Cache; use EliasHaeussler\Typo3Solver as Src; +use PHPUnit\Framework; use Symfony\Component\Filesystem; use TYPO3\TestingFramework; @@ -50,9 +51,7 @@ protected function setUp(): void $this->solution = Src\Tests\Unit\DataProvider\SolutionDataProvider::get(); } - /** - * @test - */ + #[Framework\Attributes\Test] public function constructorCreatesCacheFileIfNotExists(): void { $cacheFile = dirname(__DIR__, 3) . '/var/cache/data/tx_solver/solutions.php'; @@ -68,9 +67,7 @@ public function constructorCreatesCacheFileIfNotExists(): void self::assertSame([], require $cacheFile); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getReturnsNullIfSolutionProviderIsNotCacheable(): void { $solutionProvider = $this->problem->getSolutionProvider(); @@ -82,21 +79,16 @@ public function getReturnsNullIfSolutionProviderIsNotCacheable(): void self::assertNull($this->subject->get($this->problem)); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getReturnsNullIfCacheIsDisabled(): void { // Disable cache - /* @phpstan-ignore-next-line */ $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS'][Src\Extension::KEY]['cache']['lifetime'] = 0; self::assertNull($this->subject->get($this->problem)); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getReturnsNullOnEmptyCache(): void { $this->subject->flush(); @@ -104,9 +96,7 @@ public function getReturnsNullOnEmptyCache(): void self::assertNull($this->subject->get($this->problem)); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getReturnsCacheEntry(): void { $this->subject->flush(); @@ -125,13 +115,10 @@ public function getReturnsCacheEntry(): void self::assertEquals($expected, $actual); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getRemovesExpiredCacheEntryAndReturnsNull(): void { // Manipulate cache lifetime - /* @phpstan-ignore-next-line */ $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS'][Src\Extension::KEY]['cache']['lifetime'] = 2; $this->subject->flush(); @@ -145,9 +132,7 @@ public function getRemovesExpiredCacheEntryAndReturnsNull(): void self::assertNull($this->subject->get($this->problem)); } - /** - * @test - */ + #[Framework\Attributes\Test] public function setDoesNothingIfSolutionProviderIsNotCacheable(): void { $this->subject->flush(); @@ -163,13 +148,10 @@ public function setDoesNothingIfSolutionProviderIsNotCacheable(): void self::assertNull($this->subject->get($this->problem)); } - /** - * @test - */ + #[Framework\Attributes\Test] public function setDoesNothingIfCacheIsDisabled(): void { // Disable cache - /* @phpstan-ignore-next-line */ $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS'][Src\Extension::KEY]['cache']['lifetime'] = 0; $this->subject->flush(); @@ -178,9 +160,7 @@ public function setDoesNothingIfCacheIsDisabled(): void self::assertNull($this->subject->get($this->problem)); } - /** - * @test - */ + #[Framework\Attributes\Test] public function removeRemovesGivenExceptionFromCache(): void { $this->subject->set($this->problem, $this->solution); diff --git a/Tests/Unit/Command/CacheFlushCommandTest.php b/Tests/Unit/Command/CacheFlushCommandTest.php index 7afc28cf..99d3cb57 100644 --- a/Tests/Unit/Command/CacheFlushCommandTest.php +++ b/Tests/Unit/Command/CacheFlushCommandTest.php @@ -24,6 +24,7 @@ namespace EliasHaeussler\Typo3Solver\Tests\Unit\Command; use EliasHaeussler\Typo3Solver as Src; +use PHPUnit\Framework; use Symfony\Component\Console; use TYPO3\TestingFramework; @@ -50,9 +51,7 @@ protected function setUp(): void $this->cache->flush(); } - /** - * @test - */ + #[Framework\Attributes\Test] public function executeRemovesSpecificCacheEntryFromCache(): void { $problem = Src\Tests\Unit\DataProvider\ProblemDataProvider::get(); @@ -75,9 +74,7 @@ public function executeRemovesSpecificCacheEntryFromCache(): void self::assertNull($this->cache->get($problem)); } - /** - * @test - */ + #[Framework\Attributes\Test] public function executeFlushesCompleteCache(): void { $problem1 = Src\Tests\Unit\DataProvider\ProblemDataProvider::get('message 1'); diff --git a/Tests/Unit/Command/ListModelsCommandTest.php b/Tests/Unit/Command/ListModelsCommandTest.php index aad2db0c..c13533ed 100644 --- a/Tests/Unit/Command/ListModelsCommandTest.php +++ b/Tests/Unit/Command/ListModelsCommandTest.php @@ -28,6 +28,7 @@ use GuzzleHttp\Handler; use GuzzleHttp\Psr7; use OpenAI; +use PHPUnit\Framework; use Symfony\Component\Console; use TYPO3\TestingFramework; @@ -64,9 +65,7 @@ protected function setUp(): void $this->listResponse = $this->createListResponse(); } - /** - * @test - */ + #[Framework\Attributes\Test] public function executeListsAllGPTModels(): void { $response = new Psr7\Response(headers: [ @@ -101,9 +100,7 @@ public function executeListsAllGPTModels(): void ); } - /** - * @test - */ + #[Framework\Attributes\Test] public function executeListsAllAvailableModels(): void { $response = new Psr7\Response(headers: [ diff --git a/Tests/Unit/Command/SolveCommandTest.php b/Tests/Unit/Command/SolveCommandTest.php index c4c486f6..742fb4df 100644 --- a/Tests/Unit/Command/SolveCommandTest.php +++ b/Tests/Unit/Command/SolveCommandTest.php @@ -26,6 +26,7 @@ use EliasHaeussler\Typo3Solver as Src; use EliasHaeussler\Typo3Solver\Tests; use Exception; +use PHPUnit\Framework; use Symfony\Component\Console; use TYPO3\TestingFramework; @@ -69,9 +70,7 @@ protected function setUp(): void $this->solutionsCache->flush(); } - /** - * @test - */ + #[Framework\Attributes\Test] public function executeThrowsExceptionIfConflictingParametersAreGiven(): void { $this->expectExceptionObject( @@ -84,9 +83,7 @@ public function executeThrowsExceptionIfConflictingParametersAreGiven(): void ]); } - /** - * @test - */ + #[Framework\Attributes\Test] public function executeThrowsExceptionIfExceptionCacheEntryForGivenCacheIdentifierDoesNotExist(): void { $this->expectExceptionObject( @@ -96,9 +93,7 @@ public function executeThrowsExceptionIfExceptionCacheEntryForGivenCacheIdentifi $this->commandTester->execute(['--identifier' => 'foo']); } - /** - * @test - */ + #[Framework\Attributes\Test] public function executeProvidesSolutionForGivenExceptionIdentifier(): void { $exception = new Exception('Something went wrong.', 123); @@ -118,9 +113,7 @@ public function executeProvidesSolutionForGivenExceptionIdentifier(): void ); } - /** - * @test - */ + #[Framework\Attributes\Test] public function executeProvidesSolutionForGivenReconstructedProblem(): void { $exception = Src\Exception\CustomSolvableException::create( @@ -148,9 +141,7 @@ public function executeProvidesSolutionForGivenReconstructedProblem(): void ); } - /** - * @test - */ + #[Framework\Attributes\Test] public function executeThrowsExceptionIfRequiredParametersAreMissing(): void { $this->expectExceptionObject( @@ -160,9 +151,7 @@ public function executeThrowsExceptionIfRequiredParametersAreMissing(): void $this->commandTester->execute([]); } - /** - * @test - */ + #[Framework\Attributes\Test] public function executeRemovesCacheEntryWithRefreshOption(): void { $exception = Src\Exception\CustomSolvableException::create( @@ -186,9 +175,7 @@ public function executeRemovesCacheEntryWithRefreshOption(): void self::assertNotEquals($solution->getChoices(), $this->solutionsCache->get($problem)->getChoices()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function executeFailsIfProviderCannotBeUsed(): void { $exception = new Exception('Something went wrong.'); @@ -204,9 +191,7 @@ public function executeFailsIfProviderCannotBeUsed(): void ); } - /** - * @test - */ + #[Framework\Attributes\Test] public function executeUsesJsonFormatterWithJsonOption(): void { $solution = Tests\Unit\DataProvider\SolutionDataProvider::get(); diff --git a/Tests/Unit/Configuration/ConfigurationTest.php b/Tests/Unit/Configuration/ConfigurationTest.php index 77150b9c..64b14dde 100644 --- a/Tests/Unit/Configuration/ConfigurationTest.php +++ b/Tests/Unit/Configuration/ConfigurationTest.php @@ -25,6 +25,7 @@ use EliasHaeussler\Typo3Solver as Src; use EliasHaeussler\Typo3Solver\Tests; +use PHPUnit\Framework; use TYPO3\TestingFramework; /** @@ -46,17 +47,13 @@ protected function setUp(): void $this->subject = new Src\Configuration\Configuration($this->configurationProvider); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getApiKeyReturnsNullIfNoApiKeyIsConfigured(): void { self::assertNull($this->subject->getApiKey()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getApiKeyReturnsNullIfConfiguredApiKeyIsInvalid(): void { $this->configurationProvider->configuration = [ @@ -66,9 +63,7 @@ public function getApiKeyReturnsNullIfConfiguredApiKeyIsInvalid(): void self::assertNull($this->subject->getApiKey()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getApiKeyReturnsConfiguredApiKey(): void { $this->configurationProvider->configuration = [ @@ -78,17 +73,13 @@ public function getApiKeyReturnsConfiguredApiKey(): void self::assertSame('foo', $this->subject->getApiKey()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getModelReturnsDefaultModelIfNoModelIsConfigured(): void { self::assertSame('gpt-3.5-turbo-0301', $this->subject->getModel()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getModelReturnsDefaultModelIfConfiguredModelIsInvalid(): void { $this->configurationProvider->configuration = [ @@ -98,9 +89,7 @@ public function getModelReturnsDefaultModelIfConfiguredModelIsInvalid(): void self::assertSame('gpt-3.5-turbo-0301', $this->subject->getModel()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getModelReturnsConfiguredModel(): void { $this->configurationProvider->configuration = [ @@ -110,17 +99,13 @@ public function getModelReturnsConfiguredModel(): void self::assertSame('foo', $this->subject->getModel()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getMaxTokensReturnsDefaultMaxTokensIfNoMaxTokensAreConfigured(): void { self::assertSame(300, $this->subject->getMaxTokens()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getMaxTokensReturnsDefaultMaxTokensIfConfiguredMaxTokensAreInvalid(): void { $this->configurationProvider->configuration = [ @@ -130,9 +115,7 @@ public function getMaxTokensReturnsDefaultMaxTokensIfConfiguredMaxTokensAreInval self::assertSame(300, $this->subject->getMaxTokens()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getMaxTokensReturnsConfiguredMaxTokens(): void { $this->configurationProvider->configuration = [ @@ -142,17 +125,13 @@ public function getMaxTokensReturnsConfiguredMaxTokens(): void self::assertSame(150, $this->subject->getMaxTokens()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getTemperatureReturnsDefaultTemperatureIfNoTemperatureIsConfigured(): void { self::assertSame(0.5, $this->subject->getTemperature()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getTemperatureReturnsDefaultTemperatureIfConfiguredTemperatureIsInvalid(): void { $this->configurationProvider->configuration = [ @@ -162,9 +141,7 @@ public function getTemperatureReturnsDefaultTemperatureIfConfiguredTemperatureIs self::assertSame(0.5, $this->subject->getTemperature()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getTemperatureReturnsConfiguredTemperature(): void { $this->configurationProvider->configuration = [ @@ -174,17 +151,13 @@ public function getTemperatureReturnsConfiguredTemperature(): void self::assertSame(0.75, $this->subject->getTemperature()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getNumberOfCompletionsReturnsDefaultNumberOfCompletionsIfNoNumberOfCompletionsIsConfigured(): void { self::assertSame(1, $this->subject->getNumberOfCompletions()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getNumberOfCompletionsReturnsDefaultNumberOfCompletionsIfConfiguredNumberOfCompletionsIsInvalid(): void { $this->configurationProvider->configuration = [ @@ -194,9 +167,7 @@ public function getNumberOfCompletionsReturnsDefaultNumberOfCompletionsIfConfigu self::assertSame(1, $this->subject->getNumberOfCompletions()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getNumberOfCompletionsReturnsConfiguredNumberOfCompletions(): void { $this->configurationProvider->configuration = [ @@ -206,17 +177,13 @@ public function getNumberOfCompletionsReturnsConfiguredNumberOfCompletions(): vo self::assertSame(5, $this->subject->getNumberOfCompletions()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getCacheLifetimeReturnsDefaultCacheLifetimeIfNoCacheLifetimeIsConfigured(): void { self::assertSame(60 * 60 * 24, $this->subject->getCacheLifetime()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getCacheLifetimeReturnsDefaultCacheLifetimeIfConfiguredCacheLifetimeIsInvalid(): void { $this->configurationProvider->configuration = [ @@ -226,9 +193,7 @@ public function getCacheLifetimeReturnsDefaultCacheLifetimeIfConfiguredCacheLife self::assertSame(60 * 60 * 24, $this->subject->getCacheLifetime()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getCacheLifetimeReturnsConfiguredCacheLifetime(): void { $this->configurationProvider->configuration = [ @@ -238,9 +203,7 @@ public function getCacheLifetimeReturnsConfiguredCacheLifetime(): void self::assertSame(3600, $this->subject->getCacheLifetime()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function isCacheEnabledReturnsTrueIfCacheLifetimeIsGreaterThanZero(): void { $this->configurationProvider->configuration = [ @@ -250,9 +213,7 @@ public function isCacheEnabledReturnsTrueIfCacheLifetimeIsGreaterThanZero(): voi self::assertTrue($this->subject->isCacheEnabled()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function isCacheEnabledReturnsFalseIfCacheLifetimeIsZero(): void { $this->configurationProvider->configuration = [ @@ -262,9 +223,7 @@ public function isCacheEnabledReturnsFalseIfCacheLifetimeIsZero(): void self::assertFalse($this->subject->isCacheEnabled()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getProviderReturnsDefaultProviderIfNoProviderIsConfigured(): void { self::assertInstanceOf( @@ -273,9 +232,7 @@ public function getProviderReturnsDefaultProviderIfNoProviderIsConfigured(): voi ); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getProviderReturnsDefaultProviderIfConfiguredProviderIsInvalid(): void { $this->configurationProvider->configuration = [ @@ -288,9 +245,7 @@ public function getProviderReturnsDefaultProviderIfConfiguredProviderIsInvalid() ); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getProviderReturnsConfiguredProvider(): void { $this->configurationProvider->configuration = [ @@ -303,9 +258,7 @@ public function getProviderReturnsConfiguredProvider(): void ); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getPromptReturnsDefaultPromptIfNoPromptIsConfigured(): void { self::assertInstanceOf( @@ -314,9 +267,7 @@ public function getPromptReturnsDefaultPromptIfNoPromptIsConfigured(): void ); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getPromptReturnsDefaultPromptIfConfiguredPromptIsInvalid(): void { $this->configurationProvider->configuration = [ @@ -329,9 +280,7 @@ public function getPromptReturnsDefaultPromptIfConfiguredPromptIsInvalid(): void ); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getPromptReturnsConfiguredPrompt(): void { $this->configurationProvider->configuration = [ @@ -344,17 +293,13 @@ public function getPromptReturnsConfiguredPrompt(): void ); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getIgnoredCodesReturnsEmptyArrayIfCodesToIgnoreAreNotConfigured(): void { self::assertSame([], $this->subject->getIgnoredCodes()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getIgnoredCodesReturnsEmptyArrayIfCodesToIgnoreAreInvalid(): void { $this->configurationProvider->configuration = [ @@ -364,9 +309,7 @@ public function getIgnoredCodesReturnsEmptyArrayIfCodesToIgnoreAreInvalid(): voi self::assertSame([], $this->subject->getIgnoredCodes()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getIgnoredCodesReturnsConfiguredCodesToIgnore(): void { $this->configurationProvider->configuration = [ diff --git a/Tests/Unit/Exception/ApiKeyMissingExceptionTest.php b/Tests/Unit/Exception/ApiKeyMissingExceptionTest.php index 1216baee..ac2f4e26 100644 --- a/Tests/Unit/Exception/ApiKeyMissingExceptionTest.php +++ b/Tests/Unit/Exception/ApiKeyMissingExceptionTest.php @@ -24,6 +24,7 @@ namespace EliasHaeussler\Typo3Solver\Tests\Unit\Exception; use EliasHaeussler\Typo3Solver as Src; +use PHPUnit\Framework; use TYPO3\TestingFramework; /** @@ -34,9 +35,7 @@ */ final class ApiKeyMissingExceptionTest extends TestingFramework\Core\Unit\UnitTestCase { - /** - * @test - */ + #[Framework\Attributes\Test] public function createReturnsExceptionForMissingApiKey(): void { $actual = Src\Exception\ApiKeyMissingException::create(); diff --git a/Tests/Unit/Exception/AuthenticationFailureExceptionTest.php b/Tests/Unit/Exception/AuthenticationFailureExceptionTest.php index 5e9bdaf2..4171293d 100644 --- a/Tests/Unit/Exception/AuthenticationFailureExceptionTest.php +++ b/Tests/Unit/Exception/AuthenticationFailureExceptionTest.php @@ -24,6 +24,7 @@ namespace EliasHaeussler\Typo3Solver\Tests\Unit\Exception; use EliasHaeussler\Typo3Solver as Src; +use PHPUnit\Framework; use TYPO3\TestingFramework; /** @@ -34,9 +35,7 @@ */ final class AuthenticationFailureExceptionTest extends TestingFramework\Core\Unit\UnitTestCase { - /** - * @test - */ + #[Framework\Attributes\Test] public function createReturnsExceptionForFailedAuthentication(): void { $actual = Src\Exception\AuthenticationFailureException::create(); diff --git a/Tests/Unit/Exception/CustomSolvableExceptionTest.php b/Tests/Unit/Exception/CustomSolvableExceptionTest.php index 830a881f..5c919fcb 100644 --- a/Tests/Unit/Exception/CustomSolvableExceptionTest.php +++ b/Tests/Unit/Exception/CustomSolvableExceptionTest.php @@ -24,6 +24,7 @@ namespace EliasHaeussler\Typo3Solver\Tests\Unit\Exception; use EliasHaeussler\Typo3Solver as Src; +use PHPUnit\Framework; use TYPO3\TestingFramework; /** @@ -34,9 +35,7 @@ */ final class CustomSolvableExceptionTest extends TestingFramework\Core\Unit\UnitTestCase { - /** - * @test - */ + #[Framework\Attributes\Test] public function createReturnsCustomSolvableException(): void { $actual = Src\Exception\CustomSolvableException::create( diff --git a/Tests/Unit/Exception/EventStreamExceptionTest.php b/Tests/Unit/Exception/EventStreamExceptionTest.php index 60c8f29d..b117b4e0 100644 --- a/Tests/Unit/Exception/EventStreamExceptionTest.php +++ b/Tests/Unit/Exception/EventStreamExceptionTest.php @@ -24,6 +24,7 @@ namespace EliasHaeussler\Typo3Solver\Tests\Unit\Exception; use EliasHaeussler\Typo3Solver as Src; +use PHPUnit\Framework; use TYPO3\TestingFramework; /** @@ -34,9 +35,7 @@ */ final class EventStreamExceptionTest extends TestingFramework\Core\Unit\UnitTestCase { - /** - * @test - */ + #[Framework\Attributes\Test] public function forActiveResponseReturnsExceptionForActiveResponse(): void { $actual = Src\Exception\EventStreamException::forActiveResponse(); @@ -45,9 +44,7 @@ public function forActiveResponseReturnsExceptionForActiveResponse(): void self::assertSame(1680364482, $actual->getCode()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function forClosedStreamReturnsExceptionForClosedStream(): void { $actual = Src\Exception\EventStreamException::forClosedStream(); diff --git a/Tests/Unit/Exception/IOExceptionTest.php b/Tests/Unit/Exception/IOExceptionTest.php index 27c7fcae..ee9a7de3 100644 --- a/Tests/Unit/Exception/IOExceptionTest.php +++ b/Tests/Unit/Exception/IOExceptionTest.php @@ -24,6 +24,7 @@ namespace EliasHaeussler\Typo3Solver\Tests\Unit\Exception; use EliasHaeussler\Typo3Solver as Src; +use PHPUnit\Framework; use TYPO3\TestingFramework; /** @@ -34,9 +35,7 @@ */ final class IOExceptionTest extends TestingFramework\Core\Unit\UnitTestCase { - /** - * @test - */ + #[Framework\Attributes\Test] public function forConflictingParametersReturnsExceptionForConflictingParameters(): void { $actual = Src\Exception\IOException::forConflictingParameters('foo', 'baz'); @@ -45,9 +44,7 @@ public function forConflictingParametersReturnsExceptionForConflictingParameters self::assertSame(1680388489, $actual->getCode()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function forMissingRequiredParameterReturnsExceptionForMissingRequiredParameter(): void { $actual = Src\Exception\IOException::forMissingRequiredParameter('foo'); diff --git a/Tests/Unit/Exception/MissingCacheEntryExceptionTest.php b/Tests/Unit/Exception/MissingCacheEntryExceptionTest.php index d1f28e41..060e6c0e 100644 --- a/Tests/Unit/Exception/MissingCacheEntryExceptionTest.php +++ b/Tests/Unit/Exception/MissingCacheEntryExceptionTest.php @@ -24,6 +24,7 @@ namespace EliasHaeussler\Typo3Solver\Tests\Unit\Exception; use EliasHaeussler\Typo3Solver as Src; +use PHPUnit\Framework; use TYPO3\TestingFramework; /** @@ -34,9 +35,7 @@ */ final class MissingCacheEntryExceptionTest extends TestingFramework\Core\Unit\UnitTestCase { - /** - * @test - */ + #[Framework\Attributes\Test] public function createReturnsExceptionForMissingCacheEntry(): void { $actual = Src\Exception\MissingCacheEntryException::create('foo'); diff --git a/Tests/Unit/Exception/MissingSolutionProviderExceptionTest.php b/Tests/Unit/Exception/MissingSolutionProviderExceptionTest.php index 7c945246..c2303b76 100644 --- a/Tests/Unit/Exception/MissingSolutionProviderExceptionTest.php +++ b/Tests/Unit/Exception/MissingSolutionProviderExceptionTest.php @@ -24,6 +24,7 @@ namespace EliasHaeussler\Typo3Solver\Tests\Unit\Exception; use EliasHaeussler\Typo3Solver as Src; +use PHPUnit\Framework; use TYPO3\TestingFramework; /** @@ -34,9 +35,7 @@ */ final class MissingSolutionProviderExceptionTest extends TestingFramework\Core\Unit\UnitTestCase { - /** - * @test - */ + #[Framework\Attributes\Test] public function forDelegateReturnsExceptionForDelegate(): void { $actual = Src\Exception\MissingSolutionProviderException::forDelegate(); diff --git a/Tests/Unit/Exception/UnableToSolveExceptionTest.php b/Tests/Unit/Exception/UnableToSolveExceptionTest.php index 5504be66..5654b317 100644 --- a/Tests/Unit/Exception/UnableToSolveExceptionTest.php +++ b/Tests/Unit/Exception/UnableToSolveExceptionTest.php @@ -24,6 +24,7 @@ namespace EliasHaeussler\Typo3Solver\Tests\Unit\Exception; use EliasHaeussler\Typo3Solver as Src; +use PHPUnit\Framework; use TYPO3\TestingFramework; use function sprintf; @@ -36,9 +37,7 @@ */ final class UnableToSolveExceptionTest extends TestingFramework\Core\Unit\UnitTestCase { - /** - * @test - */ + #[Framework\Attributes\Test] public function createReturnsExceptionForGivenProblem(): void { $problem = Src\Tests\Unit\DataProvider\ProblemDataProvider::get(); diff --git a/Tests/Unit/Exception/UnrecoverableExceptionExceptionTest.php b/Tests/Unit/Exception/UnrecoverableExceptionExceptionTest.php index ba3da94f..511692ad 100644 --- a/Tests/Unit/Exception/UnrecoverableExceptionExceptionTest.php +++ b/Tests/Unit/Exception/UnrecoverableExceptionExceptionTest.php @@ -24,6 +24,7 @@ namespace EliasHaeussler\Typo3Solver\Tests\Unit\Exception; use EliasHaeussler\Typo3Solver as Src; +use PHPUnit\Framework; use TYPO3\TestingFramework; /** @@ -34,9 +35,7 @@ */ final class UnrecoverableExceptionExceptionTest extends TestingFramework\Core\Unit\UnitTestCase { - /** - * @test - */ + #[Framework\Attributes\Test] public function createReturnsExceptionForUnrecoverableException(): void { $actual = Src\Exception\UnrecoverableExceptionException::create('foo'); @@ -45,9 +44,7 @@ public function createReturnsExceptionForUnrecoverableException(): void self::assertSame(1681219687, $actual->getCode()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function forMissingIdentifierReturnsExceptionForMissingIdentifier(): void { $actual = Src\Exception\UnrecoverableExceptionException::forMissingIdentifier(); diff --git a/Tests/Unit/Formatter/CliFormatterTest.php b/Tests/Unit/Formatter/CliFormatterTest.php index 139b791f..83dc0bc7 100644 --- a/Tests/Unit/Formatter/CliFormatterTest.php +++ b/Tests/Unit/Formatter/CliFormatterTest.php @@ -25,6 +25,7 @@ use DateTimeImmutable; use EliasHaeussler\Typo3Solver as Src; +use PHPUnit\Framework; use Symfony\Component\Console; use TYPO3\TestingFramework; @@ -47,9 +48,7 @@ protected function setUp(): void $this->subject = new Src\Formatter\CliFormatter(new Src\View\TemplateRenderer()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function formatFormatsSolution(): void { $now = new DateTimeImmutable(); @@ -80,9 +79,7 @@ public function formatFormatsSolution(): void self::assertSame(trim($expected), $this->subject->format($problem, $solution)); } - /** - * @test - */ + #[Framework\Attributes\Test] public function formatIncludesPromptIfOutputIsVerbose(): void { $output = new Console\Output\BufferedOutput(); diff --git a/Tests/Unit/Formatter/JsonFormatterTest.php b/Tests/Unit/Formatter/JsonFormatterTest.php index 5348a5f3..93797c59 100644 --- a/Tests/Unit/Formatter/JsonFormatterTest.php +++ b/Tests/Unit/Formatter/JsonFormatterTest.php @@ -24,6 +24,7 @@ namespace EliasHaeussler\Typo3Solver\Tests\Unit\Formatter; use EliasHaeussler\Typo3Solver as Src; +use PHPUnit\Framework; use TYPO3\TestingFramework; use function json_encode; @@ -45,9 +46,7 @@ protected function setUp(): void $this->subject = new Src\Formatter\JsonFormatter(); } - /** - * @test - */ + #[Framework\Attributes\Test] public function formatReturnsJsonSerializedSolution(): void { $problem = Src\Tests\Unit\DataProvider\ProblemDataProvider::get(); diff --git a/Tests/Unit/Formatter/Message/ExceptionFormatterTest.php b/Tests/Unit/Formatter/Message/ExceptionFormatterTest.php index 988cebd7..3f1afb19 100644 --- a/Tests/Unit/Formatter/Message/ExceptionFormatterTest.php +++ b/Tests/Unit/Formatter/Message/ExceptionFormatterTest.php @@ -26,6 +26,7 @@ use EliasHaeussler\Typo3Solver as Src; use EliasHaeussler\Typo3Solver\Tests; use Exception; +use PHPUnit\Framework; use TYPO3\TestingFramework; /** @@ -47,9 +48,7 @@ protected function setUp(): void $this->subject = new Src\Formatter\Message\ExceptionFormatter(new Src\View\TemplateRenderer()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function formatReturnsFormattedException(): void { $exception = new Exception('Something went wrong.', 123); diff --git a/Tests/Unit/Formatter/Message/ExceptionStreamFormatterTest.php b/Tests/Unit/Formatter/Message/ExceptionStreamFormatterTest.php index c9b56fa9..db2dfdcc 100644 --- a/Tests/Unit/Formatter/Message/ExceptionStreamFormatterTest.php +++ b/Tests/Unit/Formatter/Message/ExceptionStreamFormatterTest.php @@ -26,6 +26,7 @@ use EliasHaeussler\Typo3Solver as Src; use EliasHaeussler\Typo3Solver\Tests; use Exception; +use PHPUnit\Framework; use TYPO3\TestingFramework; /** @@ -47,9 +48,7 @@ protected function setUp(): void $this->subject = new Src\Formatter\Message\ExceptionStreamFormatter(new Src\View\TemplateRenderer()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function formatReturnsJsonEncodedExceptionStream(): void { $exception = new Exception('Something went wrong.', 123); diff --git a/Tests/Unit/Formatter/WebFormatterTest.php b/Tests/Unit/Formatter/WebFormatterTest.php index 86f5f4a9..5cebfdf1 100644 --- a/Tests/Unit/Formatter/WebFormatterTest.php +++ b/Tests/Unit/Formatter/WebFormatterTest.php @@ -25,6 +25,7 @@ use EliasHaeussler\Typo3Solver as Src; use EliasHaeussler\Typo3Solver\Tests; +use PHPUnit\Framework; use TYPO3\TestingFramework; use function dirname; @@ -58,9 +59,7 @@ protected function setUp(): void ); } - /** - * @test - */ + #[Framework\Attributes\Test] public function formatReturnsFormattedSolution(): void { $problem = Src\Tests\Unit\DataProvider\ProblemDataProvider::get(); @@ -113,9 +112,7 @@ public function formatReturnsFormattedSolution(): void self::assertNodeContentEqualsString('prompt', '//form/details[1]/pre[1]/text()', $xpath); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getAdditionalStylesReturnsAdditionalStylesheet(): void { self::assertStringEqualsFile( @@ -124,9 +121,7 @@ public function getAdditionalStylesReturnsAdditionalStylesheet(): void ); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getAdditionalScriptsReturnsAdditionalJavaScript(): void { self::assertStringEqualsFile( diff --git a/Tests/Unit/Formatter/WebStreamFormatterTest.php b/Tests/Unit/Formatter/WebStreamFormatterTest.php index cc31d200..db1206e2 100644 --- a/Tests/Unit/Formatter/WebStreamFormatterTest.php +++ b/Tests/Unit/Formatter/WebStreamFormatterTest.php @@ -25,6 +25,7 @@ use EliasHaeussler\Typo3Solver as Src; use EliasHaeussler\Typo3Solver\Tests; +use PHPUnit\Framework; use TYPO3\TestingFramework; use function json_decode; @@ -48,9 +49,7 @@ protected function setUp(): void $this->subject = new Src\Formatter\WebStreamFormatter(new Src\View\TemplateRenderer()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function formatReturnsJsonEncodedSolutionStream(): void { $problem = Src\Tests\Unit\DataProvider\ProblemDataProvider::get(); diff --git a/Tests/Unit/Http/ClientFactoryTest.php b/Tests/Unit/Http/ClientFactoryTest.php index bfa66f88..7684f440 100644 --- a/Tests/Unit/Http/ClientFactoryTest.php +++ b/Tests/Unit/Http/ClientFactoryTest.php @@ -24,6 +24,7 @@ namespace EliasHaeussler\Typo3Solver\Tests\Unit\Http; use EliasHaeussler\Typo3Solver as Src; +use PHPUnit\Framework; use TYPO3\TestingFramework; /** @@ -45,9 +46,7 @@ protected function setUp(): void $this->subject = new Src\Http\ClientFactory(new Src\Configuration\Configuration($this->provider)); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getThrowsExceptionIfApiKeyIsNotConfigured(): void { $this->expectExceptionObject( @@ -57,9 +56,7 @@ public function getThrowsExceptionIfApiKeyIsNotConfigured(): void $this->subject->get(); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getReturnsOpenAIClient(): void { $exception = null; diff --git a/Tests/Unit/ProblemSolving/Problem/ProblemTest.php b/Tests/Unit/ProblemSolving/Problem/ProblemTest.php index 7fa3d601..eafc84f0 100644 --- a/Tests/Unit/ProblemSolving/Problem/ProblemTest.php +++ b/Tests/Unit/ProblemSolving/Problem/ProblemTest.php @@ -26,6 +26,7 @@ use EliasHaeussler\Typo3Solver as Src; use EliasHaeussler\Typo3Solver\Tests; use Exception; +use PHPUnit\Framework; use TYPO3\TestingFramework; /** @@ -49,25 +50,19 @@ protected function setUp(): void $this->subject = new Src\ProblemSolving\Problem\Problem($this->exception, $this->provider, 'foo'); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getExceptionReturnsException(): void { self::assertSame($this->exception, $this->subject->getException()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getSolutionProviderReturnsSolutionProvider(): void { self::assertSame($this->provider, $this->subject->getSolutionProvider()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getPromptReturnsPrompt(): void { self::assertSame('foo', $this->subject->getPrompt()); diff --git a/Tests/Unit/ProblemSolving/Solution/Prompt/DefaultPromptTest.php b/Tests/Unit/ProblemSolving/Solution/Prompt/DefaultPromptTest.php index 10739cb4..7086b609 100644 --- a/Tests/Unit/ProblemSolving/Solution/Prompt/DefaultPromptTest.php +++ b/Tests/Unit/ProblemSolving/Solution/Prompt/DefaultPromptTest.php @@ -25,6 +25,7 @@ use EliasHaeussler\Typo3Solver as Src; use Exception; +use PHPUnit\Framework; use TYPO3\CMS\Core; use TYPO3\TestingFramework; @@ -45,9 +46,7 @@ protected function setUp(): void $this->subject = new Src\ProblemSolving\Solution\Prompt\DefaultPrompt(new Src\View\TemplateRenderer()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function generateReturnsGeneratedPrompt(): void { $exception = new Exception('Something went wrong.', 1680791875); diff --git a/Tests/Unit/ProblemSolving/Solution/Provider/CacheSolutionProviderTest.php b/Tests/Unit/ProblemSolving/Solution/Provider/CacheSolutionProviderTest.php index 4251bf5d..bae51a70 100644 --- a/Tests/Unit/ProblemSolving/Solution/Provider/CacheSolutionProviderTest.php +++ b/Tests/Unit/ProblemSolving/Solution/Provider/CacheSolutionProviderTest.php @@ -26,6 +26,7 @@ use EliasHaeussler\Typo3Solver as Src; use EliasHaeussler\Typo3Solver\Tests; use Exception; +use PHPUnit\Framework; use TYPO3\TestingFramework; use function iterator_to_array; @@ -53,9 +54,7 @@ protected function setUp(): void $this->cache->flush(); } - /** - * @test - */ + #[Framework\Attributes\Test] public function createThrowsExceptionIfDelegatingProviderIsNotGiven(): void { $this->expectExceptionObject( @@ -65,9 +64,7 @@ public function createThrowsExceptionIfDelegatingProviderIsNotGiven(): void Src\ProblemSolving\Solution\Provider\CacheSolutionProvider::create(); } - /** - * @test - */ + #[Framework\Attributes\Test] public function createReturnsInitializedProviderWithGivenDelegate(): void { self::assertEquals( @@ -76,9 +73,7 @@ public function createReturnsInitializedProviderWithGivenDelegate(): void ); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getSolutionReturnsSolutionFromCache(): void { $problem = Tests\Unit\DataProvider\ProblemDataProvider::get(solutionProvider: $this->provider); @@ -91,9 +86,7 @@ public function getSolutionReturnsSolutionFromCache(): void self::assertEquals($this->cache->get($problem), $actual); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getSolutionReturnsSolutionFromProviderAndStoresItInCache(): void { $problem = Tests\Unit\DataProvider\ProblemDataProvider::get(solutionProvider: $this->provider); @@ -109,9 +102,7 @@ public function getSolutionReturnsSolutionFromProviderAndStoresItInCache(): void self::assertNotNull($this->cache->get($problem)); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getStreamedSolutionYieldsSolutionFromCache(): void { $problem = Tests\Unit\DataProvider\ProblemDataProvider::get(solutionProvider: $this->provider); @@ -125,9 +116,7 @@ public function getStreamedSolutionYieldsSolutionFromCache(): void self::assertEquals([$this->cache->get($problem)], $actual); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getStreamedSolutionYieldsSolutionFromNonStreamedProvider(): void { $problem = Tests\Unit\DataProvider\ProblemDataProvider::get(solutionProvider: $this->provider); @@ -143,9 +132,7 @@ public function getStreamedSolutionYieldsSolutionFromNonStreamedProvider(): void self::assertSame([$solution], $actual); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getStreamedSolutionYieldsSolutionsFromProvider(): void { $problem = Tests\Unit\DataProvider\ProblemDataProvider::get(solutionProvider: $this->provider); @@ -163,9 +150,7 @@ public function getStreamedSolutionYieldsSolutionsFromProvider(): void self::assertEquals($expected2, $actual[1]); } - /** - * @test - */ + #[Framework\Attributes\Test] public function canBeUsedDelegatesRequestToProvider(): void { $exception = new Exception(); @@ -179,17 +164,13 @@ public function canBeUsedDelegatesRequestToProvider(): void self::assertFalse($this->subject->canBeUsed($exception)); } - /** - * @test - */ + #[Framework\Attributes\Test] public function isCacheableReturnsTrue(): void { self::assertTrue($this->subject->isCacheable()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getProviderReturnsProvider(): void { self::assertSame($this->provider, $this->subject->getProvider()); diff --git a/Tests/Unit/ProblemSolving/Solution/Provider/DelegatingCacheSolutionProviderTest.php b/Tests/Unit/ProblemSolving/Solution/Provider/DelegatingCacheSolutionProviderTest.php index 70de8042..40144ea2 100644 --- a/Tests/Unit/ProblemSolving/Solution/Provider/DelegatingCacheSolutionProviderTest.php +++ b/Tests/Unit/ProblemSolving/Solution/Provider/DelegatingCacheSolutionProviderTest.php @@ -27,6 +27,7 @@ use EliasHaeussler\Typo3Solver\Tests; use Exception; use OpenAI\Responses; +use PHPUnit\Framework; use TYPO3\TestingFramework; /** @@ -52,9 +53,7 @@ protected function setUp(): void $this->cache->flush(); } - /** - * @test - */ + #[Framework\Attributes\Test] public function createThrowsExceptionIfDelegatingProviderIsNotGiven(): void { $this->expectExceptionObject( @@ -64,9 +63,7 @@ public function createThrowsExceptionIfDelegatingProviderIsNotGiven(): void Src\ProblemSolving\Solution\Provider\DelegatingCacheSolutionProvider::create(); } - /** - * @test - */ + #[Framework\Attributes\Test] public function createReturnsInitializedProviderWithGivenDelegate(): void { self::assertEquals( @@ -75,9 +72,7 @@ public function createReturnsInitializedProviderWithGivenDelegate(): void ); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getSolutionReturnsSolutionFromCache(): void { $problem = Tests\Unit\DataProvider\ProblemDataProvider::get(solutionProvider: $this->provider); @@ -103,9 +98,7 @@ public function getSolutionReturnsSolutionFromCache(): void self::assertEquals($solution, $actual); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getSolutionReturnsDummySolution(): void { $problem = Tests\Unit\DataProvider\ProblemDataProvider::get(solutionProvider: $this->provider); @@ -118,17 +111,13 @@ public function getSolutionReturnsDummySolution(): void self::assertEquals($this->cache->get($problem), $actual); } - /** - * @test - */ + #[Framework\Attributes\Test] public function canBeUsedReturnsTrue(): void { self::assertTrue($this->subject->canBeUsed(new Exception())); } - /** - * @test - */ + #[Framework\Attributes\Test] public function isCacheableReturnsFalse(): void { self::assertFalse($this->subject->isCacheable()); diff --git a/Tests/Unit/ProblemSolving/Solution/Provider/OpenAISolutionProviderTest.php b/Tests/Unit/ProblemSolving/Solution/Provider/OpenAISolutionProviderTest.php index 04d0f2a4..afccd057 100644 --- a/Tests/Unit/ProblemSolving/Solution/Provider/OpenAISolutionProviderTest.php +++ b/Tests/Unit/ProblemSolving/Solution/Provider/OpenAISolutionProviderTest.php @@ -30,6 +30,7 @@ use GuzzleHttp\Handler; use GuzzleHttp\Psr7; use OpenAI; +use PHPUnit\Framework; use TYPO3\TestingFramework; use function iterator_to_array; @@ -61,13 +62,10 @@ protected function setUp(): void $this->problem = Tests\Unit\DataProvider\ProblemDataProvider::get(solutionProvider: $this->subject); // Configure API key - /* @phpstan-ignore-next-line */ $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS'][Src\Extension::KEY]['api']['key'] = 'foo'; } - /** - * @test - */ + #[Framework\Attributes\Test] public function createReturnsInitializedProvider(): void { self::assertEquals( @@ -76,12 +74,9 @@ public function createReturnsInitializedProvider(): void ); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getSolutionThrowsExceptionIfApiKeyIsNotConfigured(): void { - /* @phpstan-ignore-next-line */ unset($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS'][Src\Extension::KEY]['api']['key']); $this->expectExceptionObject( @@ -91,9 +86,7 @@ public function getSolutionThrowsExceptionIfApiKeyIsNotConfigured(): void $this->subject->getSolution($this->problem); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getSolutionThrowsExceptionIfRequestFails(): void { $this->expectExceptionObject( @@ -105,9 +98,7 @@ public function getSolutionThrowsExceptionIfRequestFails(): void $this->subject->getSolution($this->problem); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getSolutionReturnsSolutionFromClientResponse(): void { $payload = [ @@ -147,12 +138,9 @@ public function getSolutionReturnsSolutionFromClientResponse(): void ); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getStreamedSolutionThrowsExceptionIfApiKeyIsNotConfigured(): void { - /* @phpstan-ignore-next-line */ unset($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS'][Src\Extension::KEY]['api']['key']); $this->expectExceptionObject( @@ -162,9 +150,7 @@ public function getStreamedSolutionThrowsExceptionIfApiKeyIsNotConfigured(): voi iterator_to_array($this->subject->getStreamedSolution($this->problem)); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getStreamedSolutionThrowsExceptionIfRequestFails(): void { $this->expectExceptionObject( @@ -176,9 +162,7 @@ public function getStreamedSolutionThrowsExceptionIfRequestFails(): void iterator_to_array($this->subject->getStreamedSolution($this->problem)); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getStreamedSolutionReturnsSolutionFromClientResponse(): void { $streamedResponse1 = [ @@ -229,25 +213,19 @@ public function getStreamedSolutionReturnsSolutionFromClientResponse(): void self::assertEquals($expected, iterator_to_array($this->subject->getStreamedSolution($this->problem))); } - /** - * @test - */ + #[Framework\Attributes\Test] public function canBeUsedChecksIfIgnoredExceptionCodesAreConfigured(): void { - /* @phpstan-ignore-next-line */ $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS'][Src\Extension::KEY]['ignoredCodes'] = '123'; self::assertFalse($this->subject->canBeUsed($this->problem->getException())); - /* @phpstan-ignore-next-line */ $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS'][Src\Extension::KEY]['ignoredCodes'] = ''; self::assertTrue($this->subject->canBeUsed($this->problem->getException())); } - /** - * @test - */ + #[Framework\Attributes\Test] public function isCacheableReturnsTrue(): void { self::assertTrue($this->subject->isCacheable()); diff --git a/Tests/Unit/ProblemSolving/Solution/SolutionTest.php b/Tests/Unit/ProblemSolving/Solution/SolutionTest.php index f4adf5ef..be479b5e 100644 --- a/Tests/Unit/ProblemSolving/Solution/SolutionTest.php +++ b/Tests/Unit/ProblemSolving/Solution/SolutionTest.php @@ -26,6 +26,7 @@ use DateTimeImmutable; use EliasHaeussler\Typo3Solver as Src; use OpenAI\Responses; +use PHPUnit\Framework; use TYPO3\TestingFramework; use function class_exists; @@ -60,9 +61,7 @@ protected function setUp(): void $this->subject = new Src\ProblemSolving\Solution\Solution([$this->choice], 'foo', 'baz'); } - /** - * @test - */ + #[Framework\Attributes\Test] public function fromResponseReturnsSolution(): void { $attributes = [ @@ -126,9 +125,7 @@ public function fromResponseReturnsSolution(): void self::assertEquals([$choice], $actual->getChoices()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function fromArrayReturnsSolution(): void { $solution = [ @@ -182,9 +179,7 @@ public function fromArrayReturnsSolution(): void self::assertEquals([$choice1, $choice2], $actual->getChoices()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function setCreateDateAppliesCreateDate(): void { self::assertNull($this->subject->getCreateDate()); @@ -194,34 +189,26 @@ public function setCreateDateAppliesCreateDate(): void self::assertSame($createDate, $this->subject->setCreateDate($createDate)->getCreateDate()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function setCacheIdentifierAppliesCacheIdentifier(): void { self::assertNull($this->subject->getCacheIdentifier()); self::assertSame('foo', $this->subject->setCacheIdentifier('foo')->getCacheIdentifier()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function subjectIsCountable(): void { self::assertCount(1, $this->subject); } - /** - * @test - */ + #[Framework\Attributes\Test] public function subjectIsIterable(): void { self::assertSame([$this->choice], iterator_to_array($this->subject)); } - /** - * @test - */ + #[Framework\Attributes\Test] public function toArrayReturnsArrayRepresentation(): void { $expected = [ @@ -235,9 +222,7 @@ public function toArrayReturnsArrayRepresentation(): void self::assertSame($expected, $this->subject->toArray()); } - /** - * @test - */ + #[Framework\Attributes\Test] public function subjectIsJsonSerializable(): void { $expected = [ diff --git a/Tests/Unit/ProblemSolving/SolverTest.php b/Tests/Unit/ProblemSolving/SolverTest.php index 32ab297d..b28e2ca0 100644 --- a/Tests/Unit/ProblemSolving/SolverTest.php +++ b/Tests/Unit/ProblemSolving/SolverTest.php @@ -26,6 +26,7 @@ use EliasHaeussler\Typo3Solver as Src; use EliasHaeussler\Typo3Solver\Tests; use Exception; +use PHPUnit\Framework; use TYPO3\TestingFramework; use function iterator_to_array; @@ -56,9 +57,7 @@ protected function setUp(): void (new Src\Cache\SolutionsCache())->flush(); } - /** - * @test - */ + #[Framework\Attributes\Test] public function solveReturnsNullIfProviderCannotBeUsed(): void { $this->provider->shouldBeUsed = false; @@ -66,9 +65,7 @@ public function solveReturnsNullIfProviderCannotBeUsed(): void self::assertNull($this->subject->solve(new Exception())); } - /** - * @test - */ + #[Framework\Attributes\Test] public function solveReturnsFormattedSolution(): void { $dummySolution = Tests\Unit\DataProvider\SolutionDataProvider::get(); @@ -81,9 +78,7 @@ public function solveReturnsFormattedSolution(): void self::assertJsonStringEqualsJsonString(json_encode($dummySolution, JSON_THROW_ON_ERROR), $actual); } - /** - * @test - */ + #[Framework\Attributes\Test] public function solveStreamedYieldsEmptySolutionStreamIfProviderCannotBeUsed(): void { $this->provider->shouldBeUsed = false; @@ -91,9 +86,7 @@ public function solveStreamedYieldsEmptySolutionStreamIfProviderCannotBeUsed(): self::assertSame([], iterator_to_array($this->subject->solveStreamed(new Exception()))); } - /** - * @test - */ + #[Framework\Attributes\Test] public function solveStreamedYieldsFormattedSolutionStreams(): void { $solutions = iterator_to_array(Tests\Unit\DataProvider\SolutionDataProvider::getStream()); diff --git a/Tests/Unit/Utility/HttpUtilityTest.php b/Tests/Unit/Utility/HttpUtilityTest.php index 065a08a3..b5c508d3 100644 --- a/Tests/Unit/Utility/HttpUtilityTest.php +++ b/Tests/Unit/Utility/HttpUtilityTest.php @@ -24,6 +24,7 @@ namespace EliasHaeussler\Typo3Solver\Tests\Unit\Utility; use EliasHaeussler\Typo3Solver as Src; +use PHPUnit\Framework; use TYPO3\CMS\Core; use TYPO3\TestingFramework; @@ -35,9 +36,7 @@ */ final class HttpUtilityTest extends TestingFramework\Core\Unit\UnitTestCase { - /** - * @test - */ + #[Framework\Attributes\Test] public function uriMatchesRequestReturnsTrueIfGivenRoutePathMatchesRequestUri(): void { $routePath = '/foo'; @@ -46,9 +45,7 @@ public function uriMatchesRequestReturnsTrueIfGivenRoutePathMatchesRequestUri(): self::assertTrue(Src\Utility\HttpUtility::uriMatchesRequest($routePath, $request)); } - /** - * @test - */ + #[Framework\Attributes\Test] public function uriMatchesRequestReturnsFalseIfGivenRoutePathDoesNotMatchRequestUri(): void { $routePath = '/foo'; @@ -57,9 +54,7 @@ public function uriMatchesRequestReturnsFalseIfGivenRoutePathDoesNotMatchRequest self::assertFalse(Src\Utility\HttpUtility::uriMatchesRequest($routePath, $request)); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getServerRequestReturnsGlobalServerRequest(): void { $request = new Core\Http\ServerRequest(); @@ -71,9 +66,7 @@ public function getServerRequestReturnsGlobalServerRequest(): void unset($GLOBALS['TYPO3_REQUEST']); } - /** - * @test - */ + #[Framework\Attributes\Test] public function getServerRequestCreatesServerRequestIfNoGlobalServerRequestIsAvailable(): void { $emptyStream = new Core\Http\Stream('php://temp'); diff --git a/Tests/Unit/Utility/StringUtilityTest.php b/Tests/Unit/Utility/StringUtilityTest.php index 0853e007..4b78ef0e 100644 --- a/Tests/Unit/Utility/StringUtilityTest.php +++ b/Tests/Unit/Utility/StringUtilityTest.php @@ -24,6 +24,7 @@ namespace EliasHaeussler\Typo3Solver\Tests\Unit\Utility; use EliasHaeussler\Typo3Solver as Src; +use PHPUnit\Framework; use TYPO3\TestingFramework; /** @@ -34,9 +35,7 @@ */ final class StringUtilityTest extends TestingFramework\Core\Unit\UnitTestCase { - /** - * @test - */ + #[Framework\Attributes\Test] public function replaceFirstOccurrenceDoesNothingIfSearchedStringDoesNotExistInSubject(): void { $subject = 'foo baz foo baz'; @@ -44,9 +43,7 @@ public function replaceFirstOccurrenceDoesNothingIfSearchedStringDoesNotExistInS self::assertSame($subject, Src\Utility\StringUtility::replaceFirstOccurrence('x', 'y', $subject)); } - /** - * @test - */ + #[Framework\Attributes\Test] public function replaceFirstOccurrenceReplacesFirstOccurrenceOfSearchedStringInSubject(): void { $subject = 'foo baz foo baz'; diff --git a/Tests/Unit/View/TemplateRendererTest.php b/Tests/Unit/View/TemplateRendererTest.php index e5d6da44..5b17cd0d 100644 --- a/Tests/Unit/View/TemplateRendererTest.php +++ b/Tests/Unit/View/TemplateRendererTest.php @@ -25,6 +25,7 @@ use EliasHaeussler\Typo3Solver as Src; use Exception; +use PHPUnit\Framework; use TYPO3\TestingFramework; use function trim; @@ -46,9 +47,7 @@ protected function setUp(): void $this->subject = new Src\View\TemplateRenderer(); } - /** - * @test - */ + #[Framework\Attributes\Test] public function renderRendersTemplateWithGivenVariables(): void { $file = __FILE__; diff --git a/composer.json b/composer.json index d31ab3c9..53822d0b 100644 --- a/composer.json +++ b/composer.json @@ -27,10 +27,10 @@ "psr/http-server-handler": "^1.0", "psr/http-server-middleware": "^1.0", "spatie/backtrace": "^1.2", - "symfony/console": "^5.4 || ^6.0", - "symfony/filesystem": "^5.4 || ^6.0", - "symfony/routing": "^5.4 || ^6.0", - "typo3/cms-core": "^11.5 || ^12.4", + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", + "symfony/routing": "^5.4 || ^6.0 || ^7.0", + "typo3/cms-core": "^11.5 || ^12.4 || ~13.0.0", "typo3fluid/fluid": "^2.9" }, "require-dev": { @@ -41,12 +41,11 @@ "ergebnis/composer-normalize": "^2.29", "phpstan/extension-installer": "^1.2", "phpstan/phpstan-symfony": "^1.2", - "phpunit/phpcov": "^8.2 || ^9.0", - "phpunit/phpunit": "^9.6", + "phpunit/phpcov": "^9.0 || ^10.0", "saschaegerer/phpstan-typo3": "^1.8", - "symfony/dependency-injection": "^5.4 || ^6.0", - "typo3/coding-standards": "^0.7.1", - "typo3/testing-framework": "^7.0.2 || ^8.0.1" + "symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0", + "typo3/coding-standards": "^0.8.0@dev", + "typo3/testing-framework": "^7.0.2 || ^8.0.9" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 47913894..23fb8663 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "161efce4443962b38075cdab3770ed36", + "content-hash": "4dc69a2e593a3395122abb158fd2d0af", "packages": [ { "name": "bacon/bacon-qr-code", @@ -6506,21 +6506,21 @@ }, { "name": "nikic/php-parser", - "version": "v4.18.0", + "version": "v4.19.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999" + "reference": "4e1b88d21c69391150ace211e9eaf05810858d0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999", - "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4e1b88d21c69391150ace211e9eaf05810858d0b", + "reference": "4e1b88d21c69391150ace211e9eaf05810858d0b", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.1" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", @@ -6556,26 +6556,27 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.19.1" }, - "time": "2023-12-10T21:03:43+00:00" + "time": "2024-03-17T08:10:35+00:00" }, { "name": "phar-io/manifest", - "version": "2.0.3", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + "reference": "54750ef60c58e43759730615a392c31c80e23176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-phar": "*", "ext-xmlwriter": "*", "phar-io/version": "^3.0.1", @@ -6616,9 +6617,15 @@ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" + "source": "https://github.com/phar-io/manifest/tree/2.0.4" }, - "time": "2021-07-20T11:28:43+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" }, { "name": "phar-io/version", @@ -6783,21 +6790,21 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.8.0", + "version": "1.8.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "fad452781b3d774e3337b0c0b245dd8e5a4455fc" + "reference": "153ae662783729388a584b4361f2545e4d841e3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/fad452781b3d774e3337b0c0b245dd8e5a4455fc", - "reference": "fad452781b3d774e3337b0c0b245dd8e5a4455fc", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/153ae662783729388a584b4361f2545e4d841e3c", + "reference": "153ae662783729388a584b4361f2545e4d841e3c", "shasum": "" }, "require": { "doctrine/deprecations": "^1.0", - "php": "^7.4 || ^8.0", + "php": "^7.3 || ^8.0", "phpdocumentor/reflection-common": "^2.0", "phpstan/phpdoc-parser": "^1.13" }, @@ -6835,9 +6842,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.8.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.8.2" }, - "time": "2024-01-11T11:49:22+00:00" + "time": "2024-02-23T11:10:43+00:00" }, { "name": "phpstan/extension-installer", @@ -6885,16 +6892,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.25.0", + "version": "1.26.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "bd84b629c8de41aa2ae82c067c955e06f1b00240" + "reference": "231e3186624c03d7e7c890ec662b81e6b0405227" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/bd84b629c8de41aa2ae82c067c955e06f1b00240", - "reference": "bd84b629c8de41aa2ae82c067c955e06f1b00240", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/231e3186624c03d7e7c890ec662b81e6b0405227", + "reference": "231e3186624c03d7e7c890ec662b81e6b0405227", "shasum": "" }, "require": { @@ -6926,9 +6933,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.25.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.26.0" }, - "time": "2024-01-04T17:06:16+00:00" + "time": "2024-02-23T16:05:55+00:00" }, { "name": "phpstan/phpstan", @@ -7163,16 +7170,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.30", + "version": "10.1.14", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089" + "reference": "e3f51450ebffe8e0efdf7346ae966a656f7d5e5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca2bd87d2f9215904682a9cb9bb37dda98e76089", - "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/e3f51450ebffe8e0efdf7346ae966a656f7d5e5b", + "reference": "e3f51450ebffe8e0efdf7346ae966a656f7d5e5b", "shasum": "" }, "require": { @@ -7180,18 +7187,18 @@ "ext-libxml": "*", "ext-xmlwriter": "*", "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", + "php": ">=8.1", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-text-template": "^3.0", + "sebastian/code-unit-reverse-lookup": "^3.0", + "sebastian/complexity": "^3.0", + "sebastian/environment": "^6.0", + "sebastian/lines-of-code": "^2.0", + "sebastian/version": "^4.0", "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.1" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -7200,7 +7207,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "10.1-dev" } }, "autoload": { @@ -7229,7 +7236,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.30" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.14" }, "funding": [ { @@ -7237,32 +7244,32 @@ "type": "github" } ], - "time": "2023-12-22T06:47:57+00:00" + "time": "2024-03-12T15:33:41+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.6", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c", + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -7289,7 +7296,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0" }, "funding": [ { @@ -7297,28 +7305,28 @@ "type": "github" } ], - "time": "2021-12-02T12:48:52+00:00" + "time": "2023-08-31T06:24:48+00:00" }, { "name": "phpunit/php-invoker", - "version": "3.1.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-pcntl": "*" @@ -7326,7 +7334,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -7352,7 +7360,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" }, "funding": [ { @@ -7360,32 +7368,32 @@ "type": "github" } ], - "time": "2020-09-28T05:58:55+00:00" + "time": "2023-02-03T06:56:09+00:00" }, { "name": "phpunit/php-text-template", - "version": "2.0.4", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -7411,7 +7419,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1" }, "funding": [ { @@ -7419,32 +7428,32 @@ "type": "github" } ], - "time": "2020-10-26T05:33:50+00:00" + "time": "2023-08-31T14:07:24+00:00" }, { "name": "phpunit/php-timer", - "version": "5.0.3", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -7470,7 +7479,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" }, "funding": [ { @@ -7478,30 +7487,30 @@ "type": "github" } ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2023-02-03T06:57:52+00:00" }, { "name": "phpunit/phpcov", - "version": "8.2.1", + "version": "9.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpcov.git", - "reference": "8ec45dde34a84914a0ace355fbd6d7af2242c9a4" + "reference": "05307478b8f4b2a50c508d6f4eca15704cf7c1fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpcov/zipball/8ec45dde34a84914a0ace355fbd6d7af2242c9a4", - "reference": "8ec45dde34a84914a0ace355fbd6d7af2242c9a4", + "url": "https://api.github.com/repos/sebastianbergmann/phpcov/zipball/05307478b8f4b2a50c508d6f4eca15704cf7c1fd", + "reference": "05307478b8f4b2a50c508d6f4eca15704cf7c1fd", "shasum": "" }, "require": { - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2", - "phpunit/php-file-iterator": "^3.0", - "phpunit/phpunit": "^9.3", - "sebastian/cli-parser": "^1.0", - "sebastian/diff": "^4.0", - "sebastian/version": "^3.0" + "php": ">=8.1", + "phpunit/php-code-coverage": "^10.1.5", + "phpunit/php-file-iterator": "^4.0", + "phpunit/phpunit": "^10.0", + "sebastian/cli-parser": "^2.0", + "sebastian/diff": "^5.0", + "sebastian/version": "^4.0" }, "bin": [ "phpcov" @@ -7509,7 +7518,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "8.2-dev" + "dev-main": "9.0-dev" } }, "autoload": { @@ -7532,7 +7541,7 @@ "homepage": "https://github.com/sebastianbergmann/phpcov", "support": { "issues": "https://github.com/sebastianbergmann/phpcov/issues", - "source": "https://github.com/sebastianbergmann/phpcov/tree/8.2.1" + "source": "https://github.com/sebastianbergmann/phpcov/tree/9.0.2" }, "funding": [ { @@ -7540,24 +7549,23 @@ "type": "github" } ], - "time": "2022-03-24T12:07:05+00:00" + "time": "2023-09-12T14:47:35+00:00" }, { "name": "phpunit/phpunit", - "version": "9.6.16", + "version": "10.5.13", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "3767b2c56ce02d01e3491046f33466a1ae60a37f" + "reference": "20a63fc1c6db29b15da3bd02d4b6cf59900088a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3767b2c56ce02d01e3491046f33466a1ae60a37f", - "reference": "3767b2c56ce02d01e3491046f33466a1ae60a37f", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/20a63fc1c6db29b15da3bd02d4b6cf59900088a7", + "reference": "20a63fc1c6db29b15da3bd02d4b6cf59900088a7", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -7567,27 +7575,26 @@ "myclabs/deep-copy": "^1.10.1", "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.28", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.5", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.2", - "sebastian/version": "^3.0.2" + "php": ">=8.1", + "phpunit/php-code-coverage": "^10.1.5", + "phpunit/php-file-iterator": "^4.0", + "phpunit/php-invoker": "^4.0", + "phpunit/php-text-template": "^3.0", + "phpunit/php-timer": "^6.0", + "sebastian/cli-parser": "^2.0", + "sebastian/code-unit": "^2.0", + "sebastian/comparator": "^5.0", + "sebastian/diff": "^5.0", + "sebastian/environment": "^6.0", + "sebastian/exporter": "^5.1", + "sebastian/global-state": "^6.0.1", + "sebastian/object-enumerator": "^5.0", + "sebastian/recursion-context": "^5.0", + "sebastian/type": "^4.0", + "sebastian/version": "^4.0" }, "suggest": { - "ext-soap": "To be able to generate mocks based on WSDL files", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + "ext-soap": "To be able to generate mocks based on WSDL files" }, "bin": [ "phpunit" @@ -7595,7 +7602,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.6-dev" + "dev-main": "10.5-dev" } }, "autoload": { @@ -7627,7 +7634,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.16" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.13" }, "funding": [ { @@ -7643,7 +7650,7 @@ "type": "tidelift" } ], - "time": "2024-01-19T07:03:14+00:00" + "time": "2024-03-12T15:37:41+00:00" }, { "name": "rector/rector", @@ -7773,28 +7780,28 @@ }, { "name": "sebastian/cli-parser", - "version": "1.0.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084", + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -7817,7 +7824,8 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.1" }, "funding": [ { @@ -7825,32 +7833,32 @@ "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2024-03-02T07:12:49+00:00" }, { "name": "sebastian/code-unit", - "version": "1.0.8", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -7873,7 +7881,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" }, "funding": [ { @@ -7881,32 +7889,32 @@ "type": "github" } ], - "time": "2020-10-26T13:08:54+00:00" + "time": "2023-02-03T06:58:43+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -7928,7 +7936,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" }, "funding": [ { @@ -7936,34 +7944,36 @@ "type": "github" } ], - "time": "2020-09-28T05:30:19+00:00" + "time": "2023-02-03T06:59:15+00:00" }, { "name": "sebastian/comparator", - "version": "4.0.8", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + "reference": "2db5010a484d53ebf536087a70b4a5423c102372" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2db5010a484d53ebf536087a70b4a5423c102372", + "reference": "2db5010a484d53ebf536087a70b4a5423c102372", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/diff": "^5.0", + "sebastian/exporter": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -8002,7 +8012,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.1" }, "funding": [ { @@ -8010,33 +8021,33 @@ "type": "github" } ], - "time": "2022-09-14T12:41:17+00:00" + "time": "2023-08-14T13:18:12+00:00" }, { "name": "sebastian/complexity", - "version": "2.0.3", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" + "reference": "68ff824baeae169ec9f2137158ee529584553799" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", - "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799", + "reference": "68ff824baeae169ec9f2137158ee529584553799", "shasum": "" }, "require": { "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.2-dev" } }, "autoload": { @@ -8059,7 +8070,8 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/3.2.0" }, "funding": [ { @@ -8067,33 +8079,33 @@ "type": "github" } ], - "time": "2023-12-22T06:19:30+00:00" + "time": "2023-12-21T08:37:17+00:00" }, { "name": "sebastian/diff", - "version": "4.0.5", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e", + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" + "phpunit/phpunit": "^10.0", + "symfony/process": "^6.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -8125,7 +8137,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.1.1" }, "funding": [ { @@ -8133,27 +8146,27 @@ "type": "github" } ], - "time": "2023-05-07T05:35:17+00:00" + "time": "2024-03-02T07:15:17+00:00" }, { "name": "sebastian/environment", - "version": "5.1.5", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/43c751b41d74f96cbbd4e07b7aec9675651e2951", + "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-posix": "*" @@ -8161,7 +8174,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -8180,7 +8193,7 @@ } ], "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", + "homepage": "https://github.com/sebastianbergmann/environment", "keywords": [ "Xdebug", "environment", @@ -8188,7 +8201,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/6.0.1" }, "funding": [ { @@ -8196,34 +8210,34 @@ "type": "github" } ], - "time": "2023-02-03T06:03:51+00:00" + "time": "2023-04-11T05:39:26+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.5", + "version": "5.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + "reference": "955288482d97c19a372d3f31006ab3f37da47adf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/955288482d97c19a372d3f31006ab3f37da47adf", + "reference": "955288482d97c19a372d3f31006ab3f37da47adf", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -8265,7 +8279,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.2" }, "funding": [ { @@ -8273,38 +8288,35 @@ "type": "github" } ], - "time": "2022-09-14T06:03:37+00:00" + "time": "2024-03-02T07:17:12+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.6", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bde739e7565280bda77be70044ac1047bc007e34" + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", - "reference": "bde739e7565280bda77be70044ac1047bc007e34", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -8323,13 +8335,14 @@ } ], "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", "keywords": [ "global state" ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.2" }, "funding": [ { @@ -8337,33 +8350,33 @@ "type": "github" } ], - "time": "2023-08-02T09:26:13+00:00" + "time": "2024-03-02T07:19:19+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.4", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", - "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0", + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0", "shasum": "" }, "require": { "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -8386,7 +8399,8 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.2" }, "funding": [ { @@ -8394,34 +8408,34 @@ "type": "github" } ], - "time": "2023-12-22T06:20:34+00:00" + "time": "2023-12-21T08:38:20+00:00" }, { "name": "sebastian/object-enumerator", - "version": "4.0.4", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -8443,7 +8457,7 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" }, "funding": [ { @@ -8451,32 +8465,32 @@ "type": "github" } ], - "time": "2020-10-26T13:12:34+00:00" + "time": "2023-02-03T07:08:32+00:00" }, { "name": "sebastian/object-reflector", - "version": "2.0.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -8498,7 +8512,7 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" }, "funding": [ { @@ -8506,32 +8520,32 @@ "type": "github" } ], - "time": "2020-10-26T13:14:26+00:00" + "time": "2023-02-03T07:06:18+00:00" }, { "name": "sebastian/recursion-context", - "version": "4.0.5", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + "reference": "05909fb5bc7df4c52992396d0116aed689f93712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", + "reference": "05909fb5bc7df4c52992396d0116aed689f93712", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -8561,7 +8575,7 @@ "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" }, "funding": [ { @@ -8569,87 +8583,32 @@ "type": "github" } ], - "time": "2023-02-03T06:07:39+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2023-02-03T07:05:40+00:00" }, { "name": "sebastian/type", - "version": "3.2.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -8672,7 +8631,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" }, "funding": [ { @@ -8680,29 +8639,29 @@ "type": "github" } ], - "time": "2023-02-03T06:13:03+00:00" + "time": "2023-02-03T07:10:45+00:00" }, { "name": "sebastian/version", - "version": "3.0.2", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -8725,7 +8684,7 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" }, "funding": [ { @@ -8733,7 +8692,7 @@ "type": "github" } ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2023-02-07T11:34:05+00:00" }, { "name": "symfony/polyfill-php81", @@ -9096,16 +9055,16 @@ }, { "name": "theseer/tokenizer", - "version": "1.2.2", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", - "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { @@ -9134,7 +9093,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.2" + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" }, "funding": [ { @@ -9142,7 +9101,7 @@ "type": "github" } ], - "time": "2023-11-20T00:12:19+00:00" + "time": "2024-03-03T12:36:25+00:00" }, { "name": "typo3/cms-backend", @@ -9497,41 +9456,42 @@ }, { "name": "typo3/coding-standards", - "version": "v0.7.1", + "version": "dev-main", "source": { "type": "git", "url": "https://github.com/TYPO3/coding-standards.git", - "reference": "b53fc46dc3fc997f98c96bc630d24c1e12028646" + "reference": "27798dd4b8a15d2178260dbd6aad83fb0d6a017e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/TYPO3/coding-standards/zipball/b53fc46dc3fc997f98c96bc630d24c1e12028646", - "reference": "b53fc46dc3fc997f98c96bc630d24c1e12028646", + "url": "https://api.github.com/repos/TYPO3/coding-standards/zipball/27798dd4b8a15d2178260dbd6aad83fb0d6a017e", + "reference": "27798dd4b8a15d2178260dbd6aad83fb0d6a017e", "shasum": "" }, "require": { "ext-json": "*", - "friendsofphp/php-cs-fixer": "^3.11", - "php": "^8.0", - "symfony/console": "^4.4.30 || ^5.3.7 || ^6.0", - "symfony/filesystem": "^4.4 || ^5.0 || ^6.0" + "friendsofphp/php-cs-fixer": "^3.49", + "php": "^8.1", + "symfony/console": "^5.4 || ^6.4 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.4 || ^7.0" }, "require-dev": { - "composer/package-versions-deprecated": "^1.11.99.4", - "ergebnis/composer-normalize": "*", + "composer/package-versions-deprecated": "^1.11.99.5", + "ergebnis/composer-normalize": "^2.28", "keradus/cli-executor": "^1.5", "maglnet/composer-require-checker": "*", - "nikic/php-parser": "^4.13.1", - "overtrue/phplint": "^3.0", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.0", - "phpstan/phpstan-strict-rules": "^1.0", - "phpstan/phpstan-symfony": "^1.0", - "phpunit/phpunit": "^9.5.18", - "symfony/finder": ">=4.4", - "symfony/process": ">=4.4" + "nikic/php-parser": "^4.15.5", + "overtrue/phplint": "^9.0", + "phpstan/extension-installer": "^1.3.1", + "phpstan/phpstan-deprecation-rules": "^1.1.3", + "phpstan/phpstan-phpunit": "^1.3.12", + "phpstan/phpstan-strict-rules": "^1.5.1", + "phpstan/phpstan-symfony": "^1.3.2", + "phpunit/phpunit": "^10.1.3", + "symfony/finder": ">=5.4", + "symfony/process": ">=5.4" }, + "default-branch": true, "bin": [ "t3-cs", "typo3-coding-standards" @@ -9539,7 +9499,7 @@ "type": "coding-standards", "extra": { "branch-alias": { - "dev-main": "0.7.x-dev" + "dev-main": "0.8.x-dev" } }, "autoload": { @@ -9576,7 +9536,7 @@ "issues": "https://github.com/TYPO3/coding-standards/issues", "source": "https://github.com/TYPO3/coding-standards" }, - "time": "2022-12-20T16:02:01+00:00" + "time": "2024-02-15T20:27:01+00:00" }, { "name": "typo3/testing-framework", @@ -9718,7 +9678,9 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "typo3/coding-standards": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/ext_emconf.php b/ext_emconf.php index 9e8c9622..a0e49bb2 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -31,7 +31,7 @@ 'author_email' => 'elias@haeussler.dev', 'constraints' => [ 'depends' => [ - 'typo3' => '11.5.0-12.4.99', + 'typo3' => '11.5.0-13.0.99', 'php' => '8.1.0-8.3.99', ], ], diff --git a/phpstan.php b/phpstan.php index b7e5f8ef..b010af47 100644 --- a/phpstan.php +++ b/phpstan.php @@ -34,7 +34,10 @@ 'Tests', ) ->withBaseline() - ->withBleedingEdge() + ->withBleedingEdge([ + // Avoids errors with $GLOBALS['TYPO3_CONF_VARS'] access + 'explicitMixedForGlobalVariables' => false, + ]) ->maxLevel() ->withSets($symfonySet) ->toArray() diff --git a/phpunit.functional.xml b/phpunit.functional.xml index 5f4890cc..ae4245fb 100644 --- a/phpunit.functional.xml +++ b/phpunit.functional.xml @@ -9,9 +9,6 @@ - - Classes - @@ -26,4 +23,9 @@ + + + Classes + + diff --git a/phpunit.unit.xml b/phpunit.unit.xml index 6611042d..885e9138 100644 --- a/phpunit.unit.xml +++ b/phpunit.unit.xml @@ -9,12 +9,9 @@ - + - - Classes - @@ -29,4 +26,9 @@ + + + Classes + + diff --git a/rector.php b/rector.php index b50a2990..af963d46 100644 --- a/rector.php +++ b/rector.php @@ -25,7 +25,7 @@ use Rector\Config\RectorConfig; use Rector\ValueObject\PhpVersion; -return static function (RectorConfig $rectorConfig): void { +return static function(RectorConfig $rectorConfig): void { Config::create($rectorConfig, PhpVersion::PHP_81) ->in( __DIR__ . '/Classes',