Problem with instances in Myth-auth - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Problem with instances in Myth-auth (/showthread.php?tid=77650) |
Problem with instances in Myth-auth - futureisnow - 09-30-2020 Hi, 1. I use myth/auth in my CI4 app 2. I have imported all myth/auth/config/* classes into app/config directory (also Auth and Services). 3. Method passwords() in the class Services (which is in app/config/ now) returns PasswordValidator class with argument of Auth class. 4. PasswordValidator is internal class in the myth/auth package. 5. The problem is: PasswordValidator expects myth/auth/config/Auth class while it receives app/config/Auth class. 6. What is the best method to solve it? a) I could use myth/auth/config/Auth instance, but it is not a perfect solution because I need to maintain a class inside the package from vendor with my customized data (problems after upgrade) b) I could modify PasswordValidator to accept app/config/Auth instance, but it is a similar problem with upgrades So my question is: is there an elegant solution for problem like that? Thanks and best greetings! RE: Problem with instances in Myth-auth - InsiteFX - 09-30-2020 It was meant to be installed as a separate module. |