From e53615aa6ef6fc72d0452507f904561d5e5cec46 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Thu, 25 Jan 2024 21:52:33 -0500 Subject: [PATCH 01/15] feat: Add `nystudio107/craft-autocomplete` to the `cms_v5/composer.json` --- cms_v5/composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cms_v5/composer.json b/cms_v5/composer.json index fef3d9a..2e27dad 100644 --- a/cms_v5/composer.json +++ b/cms_v5/composer.json @@ -17,7 +17,8 @@ "yiisoft/yii2-redis": "^2.0.6" }, "require-dev": { - "craftcms/generator": "2.0.x-dev" + "craftcms/generator": "2.0.x-dev", + "nystudio107/craft-autocomplete": "^1.12.0" }, "autoload": { "psr-4": { From 48a0fb61910174beaa057c233e2286eab2f37c60 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Thu, 25 Jan 2024 21:52:42 -0500 Subject: [PATCH 02/15] chore: Version 1.2.3 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0593ad2..e5c07bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # nystudio107/plugindev Change Log +## 1.2.3 - UNRELEASED +### Added +* Add `nystudio107/craft-autocomplete` to the `cms_v5/composer.json` + ## 1.2.2 - 2024.01.22 ### Added * Explicitly set `charset` & `collation` in `config/db.php` and `example.env` rather than depending on defaults From 09a87f4ae124a91bf4b13ddf07a81c5e276cd3d1 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Fri, 26 Jan 2024 20:10:10 -0500 Subject: [PATCH 03/15] feat: Add `nystudio107/craft-closure` to the `cms_v4/composer.json` --- cms_v4/composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/cms_v4/composer.json b/cms_v4/composer.json index 6f54762..76befe5 100644 --- a/cms_v4/composer.json +++ b/cms_v4/composer.json @@ -12,6 +12,7 @@ "craftcms/digital-products": "^3.0.0", "craftcms/redactor": "^3.0.0", "craftcms/shopify": "^3.0.0", + "nystudio107/craft-closure": "^1.0.0", "nystudio107/craft-code-field": "^4.0.0", "nystudio107/craft-connect": "^4.0.0", "nystudio107/craft-cookies": "^4.0.0", From c3fdd866f0d903d2cf542689e0dfa20eafa1c418 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Fri, 26 Jan 2024 20:10:19 -0500 Subject: [PATCH 04/15] feat: Add `nystudio107/craft-closure` to the `cms_v5/composer.json` --- cms_v5/composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/cms_v5/composer.json b/cms_v5/composer.json index 2e27dad..7e5e259 100644 --- a/cms_v5/composer.json +++ b/cms_v5/composer.json @@ -8,6 +8,7 @@ "craftcms/cms": "^5.0.0-alpha.1", "craftcms/ckeditor": "4.0.x-dev", "craftcms/redactor": "4.0.x-dev", + "nystudio107/craft-closure": "^1.0.1", "nystudio107/craft-code-field": "^5.0.0-beta.1", "nystudio107/craft-seomatic": "^5.0.0-beta.1", "nystudio107/craft-twig-base-templates": "^1.0.0", From 49600d4ecb37fd0ae8ea189c54e6b07b17b5a5de Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Fri, 26 Jan 2024 20:32:00 -0500 Subject: [PATCH 05/15] chore: Version 1.2.3 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5c07bb..b035299 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## 1.2.3 - UNRELEASED ### Added * Add `nystudio107/craft-autocomplete` to the `cms_v5/composer.json` +* Add `nystudio107/craft-closure` to the `cms_v4/composer.json` +* Add `nystudio107/craft-closure` to the `cms_v5/composer.json` ## 1.2.2 - 2024.01.22 ### Added From b32cd62d3283b90882e15e14e85cab0c6b0897e6 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Sun, 28 Jan 2024 17:15:29 -0500 Subject: [PATCH 06/15] refactor: Use `phpstan` level `5` by default --- cms_v3/phpstan.neon | 2 +- cms_v4/phpstan.neon | 2 +- cms_v5/phpstan.neon | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cms_v3/phpstan.neon b/cms_v3/phpstan.neon index 29f325e..28aa5c3 100644 --- a/cms_v3/phpstan.neon +++ b/cms_v3/phpstan.neon @@ -2,4 +2,4 @@ includes: - vendor/craftcms/phpstan/phpstan.neon parameters: - level: 0 + level: 5 diff --git a/cms_v4/phpstan.neon b/cms_v4/phpstan.neon index 29f325e..28aa5c3 100644 --- a/cms_v4/phpstan.neon +++ b/cms_v4/phpstan.neon @@ -2,4 +2,4 @@ includes: - vendor/craftcms/phpstan/phpstan.neon parameters: - level: 0 + level: 5 diff --git a/cms_v5/phpstan.neon b/cms_v5/phpstan.neon index 29f325e..28aa5c3 100644 --- a/cms_v5/phpstan.neon +++ b/cms_v5/phpstan.neon @@ -2,4 +2,4 @@ includes: - vendor/craftcms/phpstan/phpstan.neon parameters: - level: 0 + level: 5 From 889e5bd0dc105de67d6335726ce71ce1130de7c1 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Sun, 28 Jan 2024 17:19:08 -0500 Subject: [PATCH 07/15] refactor: Add `craftcms/ecs`, `craftcms/phpstan` & `craftcms/rector` --- cms_v5/composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cms_v5/composer.json b/cms_v5/composer.json index 7e5e259..1a5f377 100644 --- a/cms_v5/composer.json +++ b/cms_v5/composer.json @@ -18,7 +18,10 @@ "yiisoft/yii2-redis": "^2.0.6" }, "require-dev": { + "craftcms/ecs": "dev-main", "craftcms/generator": "2.0.x-dev", + "craftcms/phpstan": "dev-main", + "craftcms/rector": "dev-main", "nystudio107/craft-autocomplete": "^1.12.0" }, "autoload": { From f027f52ef96cb25c6cdd06bb9618ddbe566d1680 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Sun, 28 Jan 2024 17:32:29 -0500 Subject: [PATCH 08/15] fix: Update `ecs.php` to be compatible with the latest `ECSConfig` spec --- cms_v5/ecs.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cms_v5/ecs.php b/cms_v5/ecs.php index a4c245f..6436da2 100644 --- a/cms_v5/ecs.php +++ b/cms_v5/ecs.php @@ -3,11 +3,11 @@ declare(strict_types=1); use craft\ecs\SetList as CraftSetList; -use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; +use Symplify\EasyCodingStandard\Config\ECSConfig; use Symplify\EasyCodingStandard\ValueObject\Option; -return static function (ContainerConfigurator $containerConfigurator): void { - $parameters = $containerConfigurator->parameters(); +return static function (ECSConfig $ecsConfig): void { + $parameters = $ecsConfig->parameters(); $parameters->set(Option::PARALLEL, true); - $containerConfigurator->import(CraftSetList::CRAFT_CMS_4); + $ecsConfig->import(CraftSetList::CRAFT_CMS_4); }; From 9b253e58970b1f406a0735ccb4c3f769c2059eb6 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Sun, 28 Jan 2024 17:36:20 -0500 Subject: [PATCH 09/15] =?UTF-8?q?docs:=20Add=20example=20`=E2=80=94fix`=20?= =?UTF-8?q?for=20`ecs`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ff5ecde..acb6be7 100644 --- a/README.md +++ b/README.md @@ -163,7 +163,7 @@ You can run the following from terminal in the `cms_v3` or `cms_v4` CMS director - `make composer xxx` - runs the `composer` command passed in, e.g. `make composer install` in the php container - `make craft xxx` - runs the `craft` [console command](https://craftcms.com/docs/3.x/console-commands.html) passed in, e.g.: `make craft project-config/apply` in the php container - `make codecept xxx` - runs the [Codeception](https://codeception.com/) testing framework with the passed in commands, e.g.: `make codecept run -c ./vendor/putyourlightson/craft-blitz` in the php container -- `make ecs xxx` - runs [Easy Coding Standard](https://github.com/symplify/easy-coding-standard) using the [Craft CMS ECS config](https://github.com/craftcms/ecs), with the passed in path, e.g.: `make ecs check vendor/nystudio107/craft-seomatic/src`. Additional settings are available in the `ecs.php` file +- `make ecs xxx` - runs [Easy Coding Standard](https://github.com/symplify/easy-coding-standard) using the [Craft CMS ECS config](https://github.com/craftcms/ecs), with the passed in path, e.g.: `make ecs check vendor/nystudio107/craft-seomatic/src`. To automatically fix, add the `--fix` flag, e.g.: `make -- ecs check vendor/nystudio107/craft-seomatic/src --fix`. Additional settings are available in the `ecs.php` file - `make mysql` - switches the project to use the MySQL database container; just reload the browser - `make phpstan xxx` - runs [PHPStan](https://github.com/phpstan/phpstan) using the [Craft CMS PHPStan config](https://github.com/craftcms/phpstan), with the passed in path, e.g.: `make phpstan analyze vendor/nystudio107/craft-seomatic/src`. Additional settings are available in the `phpstan.neon` file - `make postgres` - switches the project to use the Postgres database container; just reload the browser From 8872a1038c2cbb82f01cae4ab0140ce73d0e5702 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Sun, 28 Jan 2024 21:38:04 -0500 Subject: [PATCH 10/15] fix: Update `ecs.php` to be compatible with the latest `ECSConfig` spec --- cms_v4/ecs.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cms_v4/ecs.php b/cms_v4/ecs.php index a4c245f..6436da2 100644 --- a/cms_v4/ecs.php +++ b/cms_v4/ecs.php @@ -3,11 +3,11 @@ declare(strict_types=1); use craft\ecs\SetList as CraftSetList; -use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; +use Symplify\EasyCodingStandard\Config\ECSConfig; use Symplify\EasyCodingStandard\ValueObject\Option; -return static function (ContainerConfigurator $containerConfigurator): void { - $parameters = $containerConfigurator->parameters(); +return static function (ECSConfig $ecsConfig): void { + $parameters = $ecsConfig->parameters(); $parameters->set(Option::PARALLEL, true); - $containerConfigurator->import(CraftSetList::CRAFT_CMS_4); + $ecsConfig->import(CraftSetList::CRAFT_CMS_4); }; From ea60a932f9ddd495da8d779b3c32aeaa3f2ace89 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Sun, 28 Jan 2024 21:38:12 -0500 Subject: [PATCH 11/15] chore: Version 1.2.3 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b035299..fa7f38d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ * Add `nystudio107/craft-closure` to the `cms_v4/composer.json` * Add `nystudio107/craft-closure` to the `cms_v5/composer.json` +### Changed +* Use `phpstan` level `5` by default +* Add `craftcms/ecs`, `craftcms/phpstan` & `craftcms/rector` + +### Fixed +* Update `ecs.php` to be compatible with the latest `ECSConfig` spec + ## 1.2.2 - 2024.01.22 ### Added * Explicitly set `charset` & `collation` in `config/db.php` and `example.env` rather than depending on defaults From a484ec54b0d142e2e115bf00ff61337c683e5596 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Sun, 28 Jan 2024 22:00:21 -0500 Subject: [PATCH 12/15] refactor: Update `ecs.php` to be compatible with the latest `ECSConfig` spec --- cms_v3/ecs.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cms_v3/ecs.php b/cms_v3/ecs.php index 3c317eb..6436da2 100644 --- a/cms_v3/ecs.php +++ b/cms_v3/ecs.php @@ -3,11 +3,11 @@ declare(strict_types=1); use craft\ecs\SetList as CraftSetList; -use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; +use Symplify\EasyCodingStandard\Config\ECSConfig; use Symplify\EasyCodingStandard\ValueObject\Option; -return static function (ContainerConfigurator $containerConfigurator) { - $parameters = $containerConfigurator->parameters(); +return static function (ECSConfig $ecsConfig): void { + $parameters = $ecsConfig->parameters(); $parameters->set(Option::PARALLEL, true); - $containerConfigurator->import(CraftSetList::CRAFT_CMS_3); + $ecsConfig->import(CraftSetList::CRAFT_CMS_4); }; From 894bb8a3c13ee8b0090adaa7d758b135059604be Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Sun, 28 Jan 2024 22:06:25 -0500 Subject: [PATCH 13/15] refactor: Use CRAFT_CMS_3 --- cms_v3/ecs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cms_v3/ecs.php b/cms_v3/ecs.php index 6436da2..ca9eb95 100644 --- a/cms_v3/ecs.php +++ b/cms_v3/ecs.php @@ -9,5 +9,5 @@ return static function (ECSConfig $ecsConfig): void { $parameters = $ecsConfig->parameters(); $parameters->set(Option::PARALLEL, true); - $ecsConfig->import(CraftSetList::CRAFT_CMS_4); + $ecsConfig->import(CraftSetList::CRAFT_CMS_3); }; From 6026b2ef37f39884f8b7ccd216f68b2373f59ab1 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Sun, 28 Jan 2024 22:15:10 -0500 Subject: [PATCH 14/15] refactor: Clean up ESC config --- cms_v3/ecs.php | 12 ++++-------- cms_v4/ecs.php | 12 ++++-------- cms_v5/ecs.php | 12 ++++-------- 3 files changed, 12 insertions(+), 24 deletions(-) diff --git a/cms_v3/ecs.php b/cms_v3/ecs.php index ca9eb95..e346eda 100644 --- a/cms_v3/ecs.php +++ b/cms_v3/ecs.php @@ -1,13 +1,9 @@ parameters(); - $parameters->set(Option::PARALLEL, true); - $ecsConfig->import(CraftSetList::CRAFT_CMS_3); +return static function(ECSConfig $ecsConfig): void { + $ecsConfig->parallel(); + $ecsConfig->sets([SetList::CRAFT_CMS_3]); }; diff --git a/cms_v4/ecs.php b/cms_v4/ecs.php index 6436da2..49685da 100644 --- a/cms_v4/ecs.php +++ b/cms_v4/ecs.php @@ -1,13 +1,9 @@ parameters(); - $parameters->set(Option::PARALLEL, true); - $ecsConfig->import(CraftSetList::CRAFT_CMS_4); +return static function(ECSConfig $ecsConfig): void { + $ecsConfig->parallel(); + $ecsConfig->sets([SetList::CRAFT_CMS_4]); }; diff --git a/cms_v5/ecs.php b/cms_v5/ecs.php index 6436da2..49685da 100644 --- a/cms_v5/ecs.php +++ b/cms_v5/ecs.php @@ -1,13 +1,9 @@ parameters(); - $parameters->set(Option::PARALLEL, true); - $ecsConfig->import(CraftSetList::CRAFT_CMS_4); +return static function(ECSConfig $ecsConfig): void { + $ecsConfig->parallel(); + $ecsConfig->sets([SetList::CRAFT_CMS_4]); }; From 425e6e8a89d921720a16bd2feacc2dafc0b7e677 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Tue, 30 Jan 2024 03:40:24 -0500 Subject: [PATCH 15/15] chore: Version 1.2.3 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa7f38d..0d4eaad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # nystudio107/plugindev Change Log -## 1.2.3 - UNRELEASED +## 1.2.3 - 2024.01.30 ### Added * Add `nystudio107/craft-autocomplete` to the `cms_v5/composer.json` * Add `nystudio107/craft-closure` to the `cms_v4/composer.json`