Open Harfusha opened 1 month ago
The require phpdoc is only available in the CakePHP 5 @template
and @mixin
https://github.com/cakephp/cakephp/blob/5.x/src/ORM/Association/BelongsToMany.php#L41
This is the source for TableAssociationTypeNodeResolverExtension https://github.com/CakeDC/cakephp-phpstan/blob/3.next-cake5/src/PhpDoc/TableAssociationTypeNodeResolverExtension.php
The extension is loaded at https://github.com/CakeDC/cakephp-phpstan/blob/3.next-cake5/extension.neon#L62
If you have the time you could try to add the required phpdoc for CakePHP 4 at your localhost and try TableAssociationTypeNodeResolverExtension.php
If that work then sent a pull request to CakePHP and here
I will try it tomorrow, thanks :)
When it is added it throws this error + the old one Call to an undefined method Cake\ORM\Association\BelongsTo<App\Model\Table\AccountsTable>::getAccountTier().
HAve you added phpdoc to your localhost cakephp install https://github.com/cakephp/cakephp/blob/5.x/src/ORM/Association/BelongsToMany.php#L41
That may be the problem, i dont have time to test it today, but i will test is asap
Yes that did the job! Thanks a lot, i will open PR for cakephp 4 :)
Edit: This helped me fix 200+ phpstan errors, thanks a lot for your time :)
When the PR will be merged into cakephp 4 i will make PR for this repo
I will make the PR next week
Im i need of this extension TableAssociationTypeNodeResolverExtension, but i saw that it was added in version 3.1.
Any possiblity you will backport it?
Im little bit lost in this repo, but with little guidance i can backport it myself :)