lonnieezell / myth-auth

One-stop Auth package for CodeIgniter 4
MIT License
632 stars 206 forks source link

Inconsistent Models #516

Open MGatner opened 2 years ago

MGatner commented 2 years ago

Model use throughout the library is inconsistent, src/Config/Services.php being a central discrepancy:

  50     Parameter #1 $groupModel of class Myth\Auth\Authorization\FlatAuthorization constructor expects Myth\Auth\Authorization\GroupModel, CodeIgniter\Model given.            
  50     Parameter #2 $permissionModel of class Myth\Auth\Authorization\FlatAuthorization constructor expects Myth\Auth\Authorization\PermissionModel, CodeIgniter\Model given.  
  52     Parameter #1 $model of method Myth\Auth\Authorization\FlatAuthorization::setUserModel() expects Myth\Auth\Models\UserModel, CodeIgniter\Model given.                    

This library should decide one of two ways:

manageruz commented 2 years ago

And it would be concise if we move GroupModel and PermissionModel inside Authorization folder to the respective Models folder. What do you think about it ?

MGatner commented 2 years ago

Yes, I lobbied for this on Shield and we went with that. It's a pain always having to remember which Models folder to go looking for 😱