From d0936e789f27887672d1a28b87bd78da03b76b44 Mon Sep 17 00:00:00 2001 From: Brandon Shipley Date: Fri, 23 Jan 2026 00:17:04 -0800 Subject: [PATCH 1/9] composer update prefer lowest should be workign now --- composer.json | 9 +++++---- tests/bootstrap.php | 1 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index f03a0aa..13a3f0a 100644 --- a/composer.json +++ b/composer.json @@ -4,15 +4,16 @@ "type": "cakephp-plugin", "license": "MIT", "require": { - "php": ">=8.1", - "cakephp/cakephp": "^5.0.1", + "php": ">=8.2", + "cakephp/cakephp": "^5.1", "ext-bcmath": "*" }, "require-dev": { - "phpunit/phpunit": "^10.1", + "phpunit/phpunit": "^10.3", "php-collective/decimal-object": "^1.3", "cakephp/migrations": "^4.0.0", - "phpstan/phpstan": "^2.1" + "phpstan/phpstan": "^2.1", + "dereuromark/composer-prefer-lowest": "^0.1.10" }, "suggest": { "dereuromark/cakephp-geo": "^3.2" diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 31b3827..38ebb8e 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -9,7 +9,6 @@ use Cake\Database\Connection; use Cake\Datasource\ConnectionManager; use Cake\TestSuite\Fixture\SchemaLoader; use CakeAddresses\CakeAddressesPlugin; -use CakeProducts\CakeProductsPlugin; use Migrations\TestSuite\Migrator; use TestApp\Controller\AppController; From 214d612d547d746b42f58fb9b74bafddf08b5f53 Mon Sep 17 00:00:00 2001 From: Brandon Shipley Date: Fri, 23 Jan 2026 00:25:21 -0800 Subject: [PATCH 2/9] phpstan fix command --- .gitea/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 91809c3..e6caac4 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -127,7 +127,7 @@ jobs: fi - name: Run phpstan - run: vendor/bin/phpstan analyse --error-format=github + run: vendor/bin/phpstan analyse src tests --error-format=github - name: Run phpcs run: composer cs-check From d79277495d98e3d2ae866d702d82b5237bdf62f8 Mon Sep 17 00:00:00 2001 From: Brandon Shipley Date: Fri, 23 Jan 2026 00:44:11 -0800 Subject: [PATCH 3/9] test upload artifiact action --- .gitea/workflows/ci.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index e6caac4..db09f99 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -101,7 +101,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: '8.2' extensions: mbstring, intl, sqlite, bcmath coverage: none @@ -127,9 +127,15 @@ jobs: fi - name: Run phpstan - run: vendor/bin/phpstan analyse src tests --error-format=github + run: vendor/bin/phpstan analyse src tests --error-format=github > phpstan.errors - name: Run phpcs run: composer cs-check + - run: mkdir -p art + - run: echo hello > art/world.txt + - uses: actions/upload-artifact@v4 + with: + name: my-artifact + path: art/world.txt From 7e694b4e756e21b6197eb40ec407985991dc71ff Mon Sep 17 00:00:00 2001 From: Brandon Shipley Date: Fri, 23 Jan 2026 01:08:22 -0800 Subject: [PATCH 4/9] test upload artifiact action v2 skip the checksytle and phpstan scripts for now --- .gitea/workflows/ci.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index db09f99..243330f 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -126,12 +126,6 @@ jobs: composer install --no-progress --prefer-dist --optimize-autoloader fi - - name: Run phpstan - run: vendor/bin/phpstan analyse src tests --error-format=github > phpstan.errors - - - name: Run phpcs - run: composer cs-check - - run: mkdir -p art - run: echo hello > art/world.txt - uses: actions/upload-artifact@v4 From 14ec05f6c513d4d86e055ae36d17805c8d28c62a Mon Sep 17 00:00:00 2001 From: Brandon Shipley Date: Fri, 23 Jan 2026 01:31:42 -0800 Subject: [PATCH 5/9] test upload artifiact action v2 skip the checksytle and phpstan scripts for now v2 --- .gitea/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 243330f..49d3aef 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -128,7 +128,7 @@ jobs: - run: mkdir -p art - run: echo hello > art/world.txt - - uses: actions/upload-artifact@v4 + - uses: https://github.com/christopherHX/gitea-upload-artifact@v4 with: name: my-artifact path: art/world.txt From 81a8ecaf734d4e5ca86b1fc8e0e94c13621b0ee3 Mon Sep 17 00:00:00 2001 From: Brandon Shipley Date: Fri, 23 Jan 2026 01:43:17 -0800 Subject: [PATCH 6/9] phpcs and phpstan uplaod artifacts working for tst file --- .gitea/workflows/ci.yaml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 49d3aef..d43ffed 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -126,10 +126,21 @@ jobs: composer install --no-progress --prefer-dist --optimize-autoloader fi - - run: mkdir -p art - - run: echo hello > art/world.txt + - name: Run phpstan + run: vendor/bin/phpstan analyse src tests --error-format=github > phpstan.errors + + - name: Run phpcs + run: composer cs-check > phpcs.errors + + - run: mkdir -p artifacts - uses: https://github.com/christopherHX/gitea-upload-artifact@v4 with: - name: my-artifact - path: art/world.txt + name: phpstan + path: artifacts/phpstan.errors + + - uses: https://github.com/christopherHX/gitea-upload-artifact@v4 + with: + name: phpcs + path: artifacts/phpcs.errors + From 7c04a5b2e7a9e7bd4343371d67b1189e55b3dad3 Mon Sep 17 00:00:00 2001 From: Brandon Shipley Date: Fri, 23 Jan 2026 01:45:23 -0800 Subject: [PATCH 7/9] phpcs and phpstan dont put in artifacts directory --- .gitea/workflows/ci.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index d43ffed..984ca21 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -132,15 +132,14 @@ jobs: - name: Run phpcs run: composer cs-check > phpcs.errors - - run: mkdir -p artifacts - uses: https://github.com/christopherHX/gitea-upload-artifact@v4 with: name: phpstan - path: artifacts/phpstan.errors + path: phpstan.errors - uses: https://github.com/christopherHX/gitea-upload-artifact@v4 with: name: phpcs - path: artifacts/phpcs.errors + path: phpcs.errors From 63539c3b24075787aafa1d6b4fc9abac70ca216f Mon Sep 17 00:00:00 2001 From: Brandon Shipley Date: Fri, 23 Jan 2026 03:03:22 -0800 Subject: [PATCH 8/9] php stan testing --- phpstan.neon | 9 +++++++++ psalm.xml | 15 +++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 phpstan.neon create mode 100644 psalm.xml diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000..b33c6bc --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,9 @@ +includes: + - vendor/cakedc/cakephp-phpstan/extension.neon +parameters: + level: 8 + treatPhpDocTypesAsCertain: false + checkGenericClassInNonGenericObjectType: false + paths: + - src + - tests diff --git a/psalm.xml b/psalm.xml new file mode 100644 index 0000000..4e9226b --- /dev/null +++ b/psalm.xml @@ -0,0 +1,15 @@ + + + + + + + + + From 7a34f2e9d5fa63dace7b45b775fd4a4764e3239e Mon Sep 17 00:00:00 2001 From: Brandon Shipley Date: Fri, 23 Jan 2026 03:03:30 -0800 Subject: [PATCH 9/9] phpstan testing --- phpstan.neon | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/phpstan.neon b/phpstan.neon index b33c6bc..fb2534f 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,9 +1,8 @@ includes: - vendor/cakedc/cakephp-phpstan/extension.neon parameters: - level: 8 - treatPhpDocTypesAsCertain: false - checkGenericClassInNonGenericObjectType: false + level: 5 paths: - src - - tests + treatPhpDocTypesAsCertain: false +