From ba172bf3de0780b866a0fe465bf392c4fcbff0a8 Mon Sep 17 00:00:00 2001 From: jakubvojacek Date: Sat, 4 Feb 2023 11:20:59 +0100 Subject: [PATCH 01/12] Allow ^4.0 for lib-innerbrowser required to allow phpunit ^10 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4966112..4b93024 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "require": { "php": ">= 8.0", "codeception/codeception": "^5.0.0", - "codeception/lib-innerbrowser": "^3.0", + "codeception/lib-innerbrowser": "^3.0 || ^4.0", "nette/di": "^3.0.13", "nette/bootstrap": "^3.1.2", "nette/http": "^3.1.6", From 6c87a6d981641318d2a185946a31761e847cb109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Proch=C3=A1zka?= Date: Sat, 25 Feb 2023 12:02:24 +0100 Subject: [PATCH 02/12] Composer: allow nette/utils 4.0 (#40) Allow package to be used with nette/utils 4.0. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4b93024..bbb31f9 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "nette/di": "^3.0.13", "nette/bootstrap": "^3.1.2", "nette/http": "^3.1.6", - "nette/utils": "^3.2.8" + "nette/utils": "^3.2.8 || ^4.0" }, "require-dev": { "latte/latte": "^2.11.5", From 82b471bb2a90202bd784dc15ff870781fca4b5a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Felix=20=C5=A0ulc?= Date: Sat, 25 Feb 2023 12:03:41 +0100 Subject: [PATCH 03/12] CI: add PHP 8.2 --- .github/workflows/coverage.yml | 2 -- .github/workflows/tests.yml | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 02c5394..121f718 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -13,5 +13,3 @@ jobs: coverage: name: "Nette Tester" uses: contributte/.github/.github/workflows/nette-tester-coverage.yml@v1 - with: - php: "8.1" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 809a3e1..b37ff92 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,6 +10,12 @@ on: - cron: "0 8 * * 1" jobs: + test82: + name: "Nette Tester" + uses: contributte/.github/.github/workflows/nette-tester.yml@v1 + with: + php: "8.2" + test81: name: "Nette Tester" uses: contributte/.github/.github/workflows/nette-tester.yml@v1 From bd6f52019ccae3a4e370f8b363b7a2458bdccea8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Felix=20=C5=A0ulc?= Date: Sat, 25 Feb 2023 12:06:02 +0100 Subject: [PATCH 04/12] Composer: upgrade codeception/lib-innerbrowser to 3.1.3+ --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index bbb31f9..2bae44c 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "require": { "php": ">= 8.0", "codeception/codeception": "^5.0.0", - "codeception/lib-innerbrowser": "^3.0 || ^4.0", + "codeception/lib-innerbrowser": "^3.1.3 || ^4.0.0", "nette/di": "^3.0.13", "nette/bootstrap": "^3.1.2", "nette/http": "^3.1.6", From b6dd40263c50f7a6cfab7a191ef08b4ed669b849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Felix=20=C5=A0ulc?= Date: Sat, 25 Feb 2023 12:06:55 +0100 Subject: [PATCH 05/12] Composer: upgrade tracy/tracy --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 2bae44c..745fa57 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-nette": "^1.1.0", "phpstan/phpstan-strict-rules": "^1.4.4", - "tracy/tracy": "^2.7.9" + "tracy/tracy": "^2.9.0" }, "autoload": { "psr-4": { From bf63064a931e165dc75ae253806061afe1189ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Felix=20=C5=A0ulc?= Date: Sat, 25 Feb 2023 12:10:19 +0100 Subject: [PATCH 06/12] Composer: upgrade ninjify/qa --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 745fa57..a743a67 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "latte/latte": "^2.11.5", "nette/application": "^3.1.7", "nette/caching": "^3.1.4", - "ninjify/qa": "^0.12", + "ninjify/qa": "^0.14", "phpstan/phpstan": "^1.8.11", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-nette": "^1.1.0", From a7bbcdf624a41fa1853b65bc40eb7a28a27676a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Felix=20=C5=A0ulc?= Date: Sat, 25 Feb 2023 12:10:29 +0100 Subject: [PATCH 07/12] Composer: upgrade nette/di --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index a743a67..6b76e91 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "php": ">= 8.0", "codeception/codeception": "^5.0.0", "codeception/lib-innerbrowser": "^3.1.3 || ^4.0.0", - "nette/di": "^3.0.13", + "nette/di": "^3.1.1", "nette/bootstrap": "^3.1.2", "nette/http": "^3.1.6", "nette/utils": "^3.2.8 || ^4.0" From 618d659beb7f0c960b9d2ff855bf87a5b3cd0c38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Felix=20=C5=A0ulc?= Date: Sat, 25 Feb 2023 12:10:53 +0100 Subject: [PATCH 08/12] Composer: upgrade nette/bootstrap --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 6b76e91..51f2568 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "codeception/codeception": "^5.0.0", "codeception/lib-innerbrowser": "^3.1.3 || ^4.0.0", "nette/di": "^3.1.1", - "nette/bootstrap": "^3.1.2", + "nette/bootstrap": "^3.2.0", "nette/http": "^3.1.6", "nette/utils": "^3.2.8 || ^4.0" }, From d3d745619345c88abe20f2ae5308c85beb5eeaee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Felix=20=C5=A0ulc?= Date: Sat, 25 Feb 2023 12:11:04 +0100 Subject: [PATCH 09/12] Composer: upgrade nette/http --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 51f2568..cd62040 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "codeception/lib-innerbrowser": "^3.1.3 || ^4.0.0", "nette/di": "^3.1.1", "nette/bootstrap": "^3.2.0", - "nette/http": "^3.1.6", + "nette/http": "^3.2.1", "nette/utils": "^3.2.8 || ^4.0" }, "require-dev": { From f5c068b631fffb070b80ffd93eb33d5dc10197e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Felix=20=C5=A0ulc?= Date: Sat, 25 Feb 2023 12:10:06 +0100 Subject: [PATCH 10/12] Phpstan: fixes --- src/Http/Response.php | 2 +- src/Module/NetteDIModule.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Http/Response.php b/src/Http/Response.php index d12bd29..b2b7392 100644 --- a/src/Http/Response.php +++ b/src/Http/Response.php @@ -66,7 +66,7 @@ public function setContentType(string $type, ?string $charset = null) return $this; } - public function redirect(string $url, int $code = self::S302_FOUND): void + public function redirect(string $url, int $code = self::S302_Found): void { $this->setCode($code); $this->setHeader('Location', $url); diff --git a/src/Module/NetteDIModule.php b/src/Module/NetteDIModule.php index e81a2cf..33d7b97 100644 --- a/src/Module/NetteDIModule.php +++ b/src/Module/NetteDIModule.php @@ -4,9 +4,9 @@ use Codeception\Module; use Codeception\TestInterface; +use Nette\Bootstrap\Configurator; use Nette\Caching\Storages\Journal; use Nette\Caching\Storages\SQLiteJournal; -use Nette\Configurator; use Nette\DI\Container; use Nette\DI\Extensions\ExtensionsExtension; use Nette\DI\MissingServiceException; @@ -34,7 +34,7 @@ class NetteDIModule extends Module 'newContainerForEachTest' => false, ]; - /** @var string[] */ + /** @var string[] */ protected array $requiredFields = [ 'tempDir', ]; @@ -132,10 +132,10 @@ private function createContainer(): void if ($this->config['logDir'] !== null) { $logDir = $this->path . '/' . $this->config['logDir']; FileSystem::createDir($logDir); - $configurator->enableDebugger($logDir); + $configurator->enableTracy($logDir); } - $configurator->addParameters([ + $configurator->addStaticParameters([ 'appDir' => $this->path . ($this->config['appDir'] !== null ? '/' . $this->config['appDir'] : ''), 'wwwDir' => $this->path . ($this->config['wwwDir'] !== null ? '/' . $this->config['wwwDir'] : ''), ]); From 6187e969ff8e00d570bca5742d82c8ec9d866eba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Felix=20=C5=A0ulc?= Date: Sat, 25 Feb 2023 12:16:29 +0100 Subject: [PATCH 11/12] Coverage: install missing phpunit/php-code-coverage --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index cd62040..d2d9e07 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,8 @@ "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-nette": "^1.1.0", "phpstan/phpstan-strict-rules": "^1.4.4", - "tracy/tracy": "^2.9.0" + "tracy/tracy": "^2.9.0", + "phpunit/php-code-coverage": "^9.2.24" }, "autoload": { "psr-4": { From b7fa4cc807f86023e1dd27ca1fec6bef29940716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Felix=20=C5=A0ulc?= Date: Sat, 25 Feb 2023 12:20:52 +0100 Subject: [PATCH 12/12] Coverage: fix path for coveralls --- tests/.coveralls.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 tests/.coveralls.yml diff --git a/tests/.coveralls.yml b/tests/.coveralls.yml new file mode 100644 index 0000000..76845b0 --- /dev/null +++ b/tests/.coveralls.yml @@ -0,0 +1,4 @@ +# for php-coveralls +service_name: github-actions +coverage_clover: tests/_output/coverage.xml +json_path: coverage.json