CodeIgniter-Aauth
CodeIgniter-Aauth copied to clipboard
CI4 Development
Any Plan For CI4 Implementation for this beautiful package ?
Yep, i want to refactor Aauth v3 for CI4.
I started testing the new CI4 version today 😄
will there be a new release for v2 ? last one was on March, i see some commits after that. is it safe to use master repo?
@hersag Yes I'll create a new release soon, master repo is safe to use.
CodeIgniter 4 looks & works really great. My big question about porting Aauth to CI4 is, should we create a own namespace for Magefly/Aauth or use CI4's default namespace.
I would use CI4's namespace as internal module, after some research it's easier than own namespace for testing.
@REJack we must use CI4's default namespace.
@emreakay I'm ok with that, App\Libraries
for the library and App\Models\Aauth
for models.
We can use the constant too APP_NAMESPACE
instead of App
😄
@emreakay Can you look over the release draft? If it's ok, you can create it 😃
EDIT: APP_NAMESPACE
doesn't work for namespacing inside files ^^
An other questions is should we follow CI4's function names? CI moved from snake case (snake_case) to pascal case (PascalCase) for files/classes & camel case (camelCase) for functions/methods.
I would use camel case, but not for the database.
Edit2: It's not only camel case it's pascal case too ^^ Edit: If we follow CI then we can use the CodeIgniter4 PHP_CodeSniffer Standard too.
Like what the author of the book Hackers and Painters think, i always prefer standard rules of what i use as well,
We must stick with the principles of CI4.
Ok sweet 😄
Any Updates?
I've waited for CodeIgniter 4.0.0-beta.4 release, now I need to update my code to get it work with beta.4 and then I'll push my CI4 build to this repo and create a new "News" issue with all infos around my build and a list with the last adds/changes.
@REJack Are you able to push your Aauth(CI4) build to the repository? With CodeIgniter 4 rc.2 available I am eager to get started. Let me know which pieces still need work, I am definitely willing to contribute to this.
@tswagger It's pushed to the v3-dev repo incl testing over travis on CI4 rc.2 😄
@REJack Awesome! Thank you!
Too many database tables, btw thanks @REJack
@rmcdahal Why you think there are to many databases? I‘ve created only 3 new tables compared to v2.
I'm port my all my project CI3 to CI4, do you haces Aauth ready to use ir with CI4??
Great work @REJack
I've started with CI4, I just saw some videos from Lonnie Ezell @ Patreon. https://www.patreon.com/posts/services-in-4-38595937
Hey @REJack , how is Aauth v3 for CI4 coming along? It has been over 2 years since you started testing Ci4, and 7 months since it's official release. I am really interested in using it in my current project if possible.
Thanks!
@emreakay, @REJack, Would like to propose a slight change to how the methods fail. Currently if an invalid request is made (e.g. getUserId() on a user that does not exist) the method will return a boolean (false). As PHP advances I am noticing a trend towards stricter variable typing, as well as declaring the return type in the method signature (https://www.php.net/manual/en/language.types.declarations.php).
I would propose that we return NULL (instead of false) when a method fails or an invalid request is made. This will allow us to specify a return type and still be able to identify invalid requests.
For Example
public function getUserId(string $email = null) {...}
might become
public function getUserId(string $email = null): ?int {...}
This will be more consistent with the current versions of PHP and with CI4. I am happy to make the changes and submit the updates in a pull request as I am actively working on a CI4 project with Aauth. Please let me know your thoughts.
@tswagger Feel free to create a PR for thr v3. I have no problems to define the types, I actually work much with TypeScript and I love it. 😂
I still some information if the v3-dev works without bugs/errors, to release it soon.