From 467dd359a2cffaf4aca0570e2a65deb97bfe2a40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Felix=20=C5=A0ulc?= Date: Thu, 4 Jan 2024 21:38:25 +0100 Subject: [PATCH 1/6] Versions: open v0.3.x --- README.md | 4 ++-- composer.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index beed917..53a4b60 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,8 @@ For details on how to use this package, check out our [documentation](.docs). | State | Version | Branch | Nette | PHP | |--------|---------|----------|-------|---------| -| dev | `^0.2` | `master` | 3.1+ | `>=8.1` | -| stable | `^0.1` | `master` | 3.1+ | `>=8.0` | +| dev | `^0.3` | `master` | 3.1+ | `>=8.1` | +| stable | `^0.2` | `master` | 3.1+ | `>=8.1` | ## Development diff --git a/composer.json b/composer.json index adb7c5d..dc3e563 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ }, "extra": { "branch-alias": { - "dev-master": "0.2.x-dev" + "dev-master": "0.3.x-dev" } } } From 9cf6f41627b1df8391ec1a863e191152b124ab6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Felix=20=C5=A0ulc?= Date: Wed, 29 May 2024 22:04:00 +0200 Subject: [PATCH 2/6] Composer: require nette/application 3.2.5+ --- composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composer.json b/composer.json index dc3e563..c345f19 100644 --- a/composer.json +++ b/composer.json @@ -42,6 +42,9 @@ "Tests\\": "tests" } }, + "conflict": { + "nette/application": "<3.2.5" + }, "minimum-stability": "dev", "prefer-stable": true, "config": { From 25013bc3b76e5a645367dc21af536b850cce649a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Felix=20=C5=A0ulc?= Date: Wed, 29 May 2024 22:07:53 +0200 Subject: [PATCH 3/6] Override: improve layout detection --- src/Override/Override.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Override/Override.php b/src/Override/Override.php index d19ef87..53864c5 100644 --- a/src/Override/Override.php +++ b/src/Override/Override.php @@ -22,7 +22,8 @@ public function __construct(AppFolder $appFolder) public function getLayoutTemplateFiles(NellaPresenter $presenter): array { $layout = $presenter->getLayout(); - if (is_string($layout) && preg_match('#/|\\\\#', $layout) !== false) { + + if (is_string($layout) && preg_match('#/|\\\\#', $layout) === true) { return [$layout]; } @@ -39,7 +40,7 @@ public function getLayoutTemplateFiles(NellaPresenter $presenter): array do { $list[] = dirname($dir) . '/@Templates/@layout.latte'; $dir = dirname($dir); - } while ($dir !== '' && $module && ([$module] = Helpers::splitName($module)) !== []); + } while ($dir !== '' && $module && ([$module] = Helpers::splitName($module)) !== []); // @phpstan-ignore-line return $list; } From ceb0509bf3ecb41712089059299e80a798b7c481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Felix=20=C5=A0ulc?= Date: Sun, 28 Dec 2025 16:35:20 +0100 Subject: [PATCH 4/6] Composer: allow contributte/utils 0.7+ --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c345f19..b48618a 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "contributte/di": "^0.5.6 || ^0.6.0", "contributte/latte": "^0.6.0", "contributte/tracy": "^0.6.0", - "contributte/utils": "^0.6.0", + "contributte/utils": "^0.7.0 || ^0.8.0", "contributte/forms": "^0.5.1 || ^0.6.0" }, "require-dev": { From 333985a2baaffa6bde67e2d8b63dea8007b4b453 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Felix=20=C5=A0ulc?= Date: Sun, 28 Dec 2025 16:37:35 +0100 Subject: [PATCH 5/6] Update & maintenance (#1) --- .editorconfig | 2 -- .github/workflows/codesniffer.yml | 4 ++-- .github/workflows/coverage.yml | 4 ++-- .github/workflows/phpstan.yml | 4 ++-- .github/workflows/tests.yml | 24 +++++++++++++++--------- composer.json | 2 +- phpstan.neon | 2 +- ruleset.xml | 2 +- src/Boot/Preset/NellaPreset.php | 6 ++++-- src/Override/Override.php | 2 +- 10 files changed, 29 insertions(+), 23 deletions(-) diff --git a/.editorconfig b/.editorconfig index 5e5b915..352f1e9 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,5 +1,3 @@ -# EditorConfig is awesome: http://EditorConfig.org - root = true [*] diff --git a/.github/workflows/codesniffer.yml b/.github/workflows/codesniffer.yml index a58ac4f..d1603b1 100644 --- a/.github/workflows/codesniffer.yml +++ b/.github/workflows/codesniffer.yml @@ -8,11 +8,11 @@ on: branches: ["*"] schedule: - - cron: "0 8 * * 1" + - cron: "0 10 * * 1" jobs: codesniffer: name: "Codesniffer" uses: contributte/.github/.github/workflows/codesniffer.yml@master with: - php: "8.2" + php: "8.4" diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 860c47e..c51c356 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -8,11 +8,11 @@ on: branches: ["*"] schedule: - - cron: "0 8 * * 1" + - cron: "0 9 * * 1" jobs: coverage: name: "Nette Tester" uses: contributte/.github/.github/workflows/nette-tester-coverage-v2.yml@master with: - php: "8.2" + php: "8.4" diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index eb916bf..cd37eba 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -8,11 +8,11 @@ on: branches: ["*"] schedule: - - cron: "0 8 * * 1" + - cron: "0 10 * * 1" jobs: phpstan: name: "Phpstan" uses: contributte/.github/.github/workflows/phpstan.yml@master with: - php: "8.2" + php: "8.4" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a574bd1..ef17693 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,33 +5,39 @@ on: workflow_dispatch: push: - branches: [ "*" ] + branches: ["*"] schedule: - - cron: "0 8 * * 1" + - cron: "0 10 * * 1" jobs: - test83: + test85: name: "Nette Tester" uses: contributte/.github/.github/workflows/nette-tester.yml@master with: - php: "8.3" + php: "8.5" - test82: + test84: name: "Nette Tester" uses: contributte/.github/.github/workflows/nette-tester.yml@master with: - php: "8.2" + php: "8.4" - test81: + test83: name: "Nette Tester" uses: contributte/.github/.github/workflows/nette-tester.yml@master with: - php: "8.1" + php: "8.3" + + test82: + name: "Nette Tester" + uses: contributte/.github/.github/workflows/nette-tester.yml@master + with: + php: "8.2" testlower: name: "Nette Tester" uses: contributte/.github/.github/workflows/nette-tester.yml@master with: - php: "8.1" + php: "8.2" composer: "composer update --no-interaction --no-progress --prefer-dist --prefer-stable --prefer-lowest" diff --git a/composer.json b/composer.json index b48618a..c827d63 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ } ], "require": { - "php": ">=8.1", + "php": ">=8.2", "contributte/application": "^0.5.2 || ^0.6.0", "contributte/bootstrap": "^0.6.0", "contributte/di": "^0.5.6 || ^0.6.0", diff --git a/phpstan.neon b/phpstan.neon index 562ab05..16b3197 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -3,7 +3,7 @@ includes: parameters: level: 9 - phpVersion: 80100 + phpVersion: 80200 scanDirectories: - src diff --git a/ruleset.xml b/ruleset.xml index d81faa3..472f131 100644 --- a/ruleset.xml +++ b/ruleset.xml @@ -1,7 +1,7 @@ - + diff --git a/src/Boot/Preset/NellaPreset.php b/src/Boot/Preset/NellaPreset.php index 2b5709c..b777bb5 100644 --- a/src/Boot/Preset/NellaPreset.php +++ b/src/Boot/Preset/NellaPreset.php @@ -4,6 +4,7 @@ use Contributte\Bootstrap\ExtraConfigurator; use Contributte\Nella\DI\NellaExtension; +use Nette\Bootstrap\Configurator; use Nette\DI\Compiler; class NellaPreset extends BasePreset @@ -36,12 +37,13 @@ public function apply(ExtraConfigurator $configurator): void $configurator->enableTracy($this->bootPoint . '/../var/log'); // extensions - $configurator->onCompile[] = static function (ExtraConfigurator $configurator, Compiler $compiler): void { + $configurator->onCompile[] = static function (Configurator $configurator, Compiler $compiler): void { $compiler->addExtension('nella', new NellaExtension()); }; // environment variables - $configurator->onCompile[] = static function (ExtraConfigurator $configurator, Compiler $compiler): void { + $configurator->onCompile[] = static function (Configurator $configurator, Compiler $compiler): void { + assert($configurator instanceof ExtraConfigurator); $compiler->addConfig(['parameters' => $configurator->getEnvironmentParameters()]); }; diff --git a/src/Override/Override.php b/src/Override/Override.php index 53864c5..c47097d 100644 --- a/src/Override/Override.php +++ b/src/Override/Override.php @@ -23,7 +23,7 @@ public function getLayoutTemplateFiles(NellaPresenter $presenter): array { $layout = $presenter->getLayout(); - if (is_string($layout) && preg_match('#/|\\\\#', $layout) === true) { + if (is_string($layout) && preg_match('#/|\\\\#', $layout) === 1) { return [$layout]; } From 9e53a61ff993667077eec6ce4e1b3bf484e0c468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Felix=20=C5=A0ulc?= Date: Mon, 29 Dec 2025 20:08:46 +0100 Subject: [PATCH 6/6] Composer: upgrade deps --- composer.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index c827d63..6f0e5a3 100644 --- a/composer.json +++ b/composer.json @@ -18,11 +18,11 @@ ], "require": { "php": ">=8.2", - "contributte/application": "^0.5.2 || ^0.6.0", - "contributte/bootstrap": "^0.6.0", - "contributte/di": "^0.5.6 || ^0.6.0", - "contributte/latte": "^0.6.0", - "contributte/tracy": "^0.6.0", + "contributte/application": "^0.6.2 || ^0.7.0", + "contributte/bootstrap": "^0.6.0 || ^0.7.0", + "contributte/di": "^0.6.0 || ^0.7.0", + "contributte/latte": "^0.6.0 || ^0.7.0", + "contributte/tracy": "^0.6.0 || ^0.7.0", "contributte/utils": "^0.7.0 || ^0.8.0", "contributte/forms": "^0.5.1 || ^0.6.0" },