PHPStan return types when using model() helper |
Hi all,
with the changes here: https://github.com/codeigniter4/CodeIgni...c5bf540a80 the PHP Code: model() PHP Code: @phpstan-return Model Now, PHPStan will complain whenever one tries to call a function of a model that is not the original CodeIgniter\Model but was invoked with the helper. E.g.: PHP Code: Model: This will trigger PHPStan: PHP Code: Call to an undefined method CodeIgniter\Model::getCrudData(). as it exepects a "CodeIgniter\Model". Did anyone run into the same issue or am I misusing the helper function? Thanks Alex Same goes, e.g., for Lonnies myth\auth library: https://github.com/lonnieezell/myth-auth
> am I misusing the helper function?
No. This is an issue that we need a solution. See https://github.com/codeigniter4/CodeIgniter4/pull/5358 |
Welcome Guest, Not a member yet? Register Sign In |