Skip to content

Missing Table generic definitions #1131

@LordSimal

Description

@LordSimal

E.g. if one has an overwriten/custom CakeDC\Users\Model\Table\UsersTable class the IDE Helper Plugin will inject

 * @extends \CakeDC\Users\Model\Table\UsersTable<array{SunlimeEncryption: \App\Model\Behavior\SunlimeEncryptionBehavior, Timestamp: \Cake\ORM\Behavior\TimestampBehavior}>

which does not work for stan since it reports

 ------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
  Line   plugins/AlfredStaffMembers/src/Model/Table/StaffMembersTable.php                                                                                                                                                                     
 ------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
  62     PHPDoc tag @extends contains generic type CakeDC\Users\Model\Table\UsersTable<array<string, App\Model\Behavior\SunlimeEncryptionBehavior|Cake\ORM\Behavior\TimestampBehavior>> but class CakeDC\Users\Model\Table\UsersTable is not  
         generic.                                                                                                                                                                                                                             
         🪪  generics.notGeneric                                                                                                                                                                                                              
 ------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 

Not sure what the syntax is, but the generics TBehaviors needs to be passed down to the base Cake\ORM\Table class.

Refs: cakephp/cakephp#18323

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions