diff --git a/.github/workflows/structarmed.yml b/.github/workflows/structarmed.yml index b01db1910..4f2e15e3a 100644 --- a/.github/workflows/structarmed.yml +++ b/.github/workflows/structarmed.yml @@ -40,7 +40,7 @@ jobs: - name: Set up PHP uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # v2.40.0 with: - php-version: ${{ inputs['php-version'] }} + php-version: ${{ inputs['php-version'] || '8.2' }} tools: composer extensions: intl, json, mbstring, xml coverage: none diff --git a/.github/workflows/unused.yml b/.github/workflows/unused.yml index 60911677a..035df265e 100644 --- a/.github/workflows/unused.yml +++ b/.github/workflows/unused.yml @@ -19,3 +19,5 @@ on: jobs: unused: uses: codeigniter4/.github/.github/workflows/unused.yml@CI47 + with: + php-version: '8.3' diff --git a/composer.json b/composer.json index 534c2555f..58505f399 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ }, "require-dev": { "boundwize/pyrameter": "^0.5", - "boundwize/structarmed": "^0.21", + "boundwize/structarmed": "^0.22", "codeigniter/phpstan-codeigniter": "^2.0", "codeigniter4/devkit": "^1.3", "codeigniter4/framework": ">=4.3.5 <4.5.0 || ^4.5.1", diff --git a/phpstan-baseline.php b/phpstan-baseline.php index 1a1b375cd..ba0f3a989 100644 --- a/phpstan-baseline.php +++ b/phpstan-baseline.php @@ -194,6 +194,12 @@ 'count' => 3, 'path' => __DIR__ . '/tests/Unit/PwnedValidatorTest.php', ]; +$ignoreErrors[] = [ + 'rawMessage' => 'Field "id" is not in CodeIgniter\\Shield\\Models\\UserModel::$allowedFields and is dropped by save().', + 'identifier' => 'codeigniter.modelFieldNotAllowed', + 'count' => 1, + 'path' => __DIR__ . '/tests/Unit/UserModelTest.php', +]; $ignoreErrors[] = [ 'rawMessage' => 'Call to an undefined method CodeIgniter\\Shield\\Models\\UserModel::getLastQuery().', 'identifier' => 'method.notFound', diff --git a/src/Traits/Bannable.php b/src/Traits/Bannable.php index 71fe6c6cd..fbda6cc3f 100644 --- a/src/Traits/Bannable.php +++ b/src/Traits/Bannable.php @@ -20,7 +20,7 @@ trait Bannable */ public function isBanned(): bool { - return $this->status && $this->status === 'banned'; + return $this->status === 'banned'; } /**