diff --git a/.editorconfig b/.editorconfig index e147490..5e5b915 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,6 +11,6 @@ indent_style = tab indent_size = tab tab_width = 4 -[{*.json,*.yaml,*.yml,*.md}] +[*.{json,yaml,yml,md}] indent_style = space indent_size = 2 diff --git a/.gitattributes b/.gitattributes index 12910b6..aad8529 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,11 +1,10 @@ -# Not archived .docs export-ignore -tests export-ignore .editorconfig export-ignore .gitattributes export-ignore .gitignore export-ignore .travis.yml export-ignore Makefile export-ignore -phpstan.neon export-ignore README.md export-ignore +phpstan.neon export-ignore ruleset.xml export-ignore +tests export-ignore diff --git a/.github/.kodiak.toml b/.github/.kodiak.toml deleted file mode 100644 index 60c34b6..0000000 --- a/.github/.kodiak.toml +++ /dev/null @@ -1,10 +0,0 @@ -version = 1 - -[merge] -automerge_label = "automerge" -blacklist_title_regex = "^WIP.*" -blacklist_labels = ["WIP"] -method = "rebase" -delete_branch_on_merge = true -notify_on_conflict = true -optimistic_updates = false diff --git a/.github/workflows/codesniffer.yml b/.github/workflows/codesniffer.yml index d5ff803..a58ac4f 100644 --- a/.github/workflows/codesniffer.yml +++ b/.github/workflows/codesniffer.yml @@ -15,4 +15,4 @@ jobs: name: "Codesniffer" uses: contributte/.github/.github/workflows/codesniffer.yml@master with: - php: "8.3" + php: "8.2" diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 85f1300..860c47e 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -15,4 +15,4 @@ jobs: name: "Nette Tester" uses: contributte/.github/.github/workflows/nette-tester-coverage-v2.yml@master with: - php: "8.3" + php: "8.2" diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 9827fdd..eb916bf 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -15,4 +15,4 @@ jobs: name: "Phpstan" uses: contributte/.github/.github/workflows/phpstan.yml@master with: - php: "8.3" + php: "8.2" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c5f3e62..0bdeea0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,6 +11,12 @@ on: - cron: "0 8 * * 1" jobs: + test85: + name: "Nette Tester" + uses: contributte/.github/.github/workflows/nette-tester.yml@master + with: + php: "8.5" + test84: name: "Nette Tester" uses: contributte/.github/.github/workflows/nette-tester.yml@master diff --git a/.gitignore b/.gitignore index b0fa45a..f0b3670 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,9 @@ /composer.lock # Tests -/coverage.xml +/tests/tmp +/coverage.* +/tests/**/*.log +/tests/**/*.html +/tests/**/*.expected +/tests/**/*.actual diff --git a/composer.json b/composer.json index eb1caf8..01adc2b 100644 --- a/composer.json +++ b/composer.json @@ -29,9 +29,9 @@ "require-dev": { "nette/caching": "^3.1.3", "nette/http": "^3.0.1", - "contributte/qa": "^0.4.0", - "contributte/phpstan": "^0.3.0", - "contributte/tester": "^0.4.0", + "contributte/qa": "~0.4.0", + "contributte/phpstan": "~0.3.0", + "contributte/tester": "~0.4.0", "mockery/mockery": "^1.5.1", "tracy/tracy": "^2.10.9" }, diff --git a/phpstan.neon b/phpstan.neon index 15a01de..b74a83b 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -11,7 +11,6 @@ parameters: fileExtensions: - php - - phpt paths: - src @@ -19,5 +18,3 @@ parameters: excludePaths: - src/DI/RedisExtension24.php - - ignoreErrors: diff --git a/tests/.coveralls.yml b/tests/.coveralls.yml deleted file mode 100644 index 8450382..0000000 --- a/tests/.coveralls.yml +++ /dev/null @@ -1,4 +0,0 @@ -# for php-coveralls -service_name: github-actions -coverage_clover: coverage.xml -json_path: coverage.json diff --git a/tests/.gitignore b/tests/.gitignore deleted file mode 100644 index f0d3402..0000000 --- a/tests/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -# Folders - recursive -*.expected -*.actual - -# Folders -/tmp - -# Files -/*.log -/*.html diff --git a/tests/Cases/DI/RedisExtension.phpt b/tests/Cases/DI/RedisExtension.phpt index 4fed957..5786a05 100644 --- a/tests/Cases/DI/RedisExtension.phpt +++ b/tests/Cases/DI/RedisExtension.phpt @@ -5,6 +5,7 @@ namespace Tests\Cases\DI; use Contributte\Redis\Caching\RedisJournal; use Contributte\Redis\Caching\RedisStorage; use Contributte\Redis\DI\RedisExtension; +use Contributte\Tester\Environment; use Contributte\Tester\Toolkit; use Contributte\Tester\Utils\ContainerBuilder; use Contributte\Tester\Utils\Liberator; @@ -15,7 +16,6 @@ use Nette\DI\Compiler; use Predis\Client; use Tester\Assert; use Tests\Fixtures\DummyRedisClient; -use Tests\Toolkit\Tests; require_once __DIR__ . '/../../bootstrap.php'; @@ -26,8 +26,8 @@ Toolkit::test(function (): void { $compiler->addExtension('redis', new RedisExtension()); $compiler->addConfig([ 'parameters' => [ - 'tempDir' => Tests::TEMP_PATH, - 'appDir' => Tests::APP_PATH, + 'tempDir' => Environment::getTestDir(), + 'appDir' => Environment::getCwd(), ], ]); $compiler->addConfig(Neonkit::load(' @@ -48,7 +48,7 @@ Toolkit::test(function (): void { $container = ContainerBuilder::of() ->withCompiler(function (Compiler $compiler): void { $compiler->addExtension('redis', new RedisExtension()); - $compiler->addExtension('caching', new CacheExtension(Tests::TEMP_PATH)); + $compiler->addExtension('caching', new CacheExtension(Environment::getTestDir())); $compiler->addConfig(Neonkit::load(' redis: connection: @@ -69,7 +69,7 @@ Toolkit::test(function (): void { $container = ContainerBuilder::of() ->withCompiler(function (Compiler $compiler): void { $compiler->addExtension('redis', new RedisExtension()); - $compiler->addExtension('caching', new CacheExtension(Tests::TEMP_PATH)); + $compiler->addExtension('caching', new CacheExtension(Environment::getTestDir())); $compiler->addConfig(Neonkit::load(' redis: connection: @@ -90,7 +90,7 @@ Toolkit::test(function (): void { $container = ContainerBuilder::of() ->withCompiler(function (Compiler $compiler): void { $compiler->addExtension('redis', new RedisExtension()); - $compiler->addExtension('caching', new CacheExtension(Tests::TEMP_PATH)); + $compiler->addExtension('caching', new CacheExtension(Environment::getTestDir())); $compiler->addConfig(Neonkit::load(' redis: connection: @@ -116,7 +116,7 @@ Toolkit::test(function (): void { $container = ContainerBuilder::of() ->withCompiler(function (Compiler $compiler): void { $compiler->addExtension('redis', new RedisExtension()); - $compiler->addExtension('caching', new CacheExtension(Tests::TEMP_PATH)); + $compiler->addExtension('caching', new CacheExtension(Environment::getTestDir())); $compiler->addConfig(Neonkit::load(' redis: connection: @@ -183,7 +183,7 @@ Toolkit::test(function (): void { $container = ContainerBuilder::of() ->withCompiler(function (Compiler $compiler): void { $compiler->addExtension('redis', new RedisExtension()); - $compiler->addExtension('caching', new CacheExtension(Tests::TEMP_PATH)); + $compiler->addExtension('caching', new CacheExtension(Environment::getTestDir())); $compiler->addConfig(Neonkit::load(' redis: clientFactory: Tests\Fixtures\DummyRedisClient diff --git a/tests/Cases/E2E/Predis.phpt b/tests/Cases/E2E/Predis.phpt index 79f5b99..67e0c27 100644 --- a/tests/Cases/E2E/Predis.phpt +++ b/tests/Cases/E2E/Predis.phpt @@ -1,6 +1,6 @@