Skip to content

chore: update to phpstan-codeigniter v2.4 - #10800

Merged
paulbalandan merged 1 commit into
codeigniter4:developfrom
paulbalandan:cast-handler-handling
Nov 20, 2026
Merged

paulbalandan merged 1 commit into
codeigniter4:developfrom
paulbalandan:cast-handler-handling

Conversation

@paulbalandan

Copy link
Copy Markdown
Member

Description
v2.4 adds rules against adding unknown or invalid cast handlers such as:

------- ----------------------------------------------------------------------------------------------- 
  Line    tests/system/Entity/EntityTest.php                                                             
 ------- ----------------------------------------------------------------------------------------------- 
  :1859   Cast handler "Tests\Support\Entity\Cast\NotExtendsBaseCast" of cast "someType" must implement  
          CodeIgniter\DataCaster\Cast\CastInterface or CodeIgniter\Entity\Cast\CastInterface.            
          🪪  codeigniter.castHandlerInvalid                                                             
          ✏️  tests/system/Entity/EntityTest.php                                                         
 ------- ----------------------------------------------------------------------------------------------- 

In the test, it is intentional since we're testing the runtime throw. For the docs, it's just a matter of making it a class string.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@paulbalandan
paulbalandan merged commit 0699287 into codeigniter4:develop Nov 20, 2026
59 checks passed
@paulbalandan
paulbalandan deleted the cast-handler-handling branch November 20, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants