CodeIgniter-Aauth icon indicating copy to clipboard operation
CodeIgniter-Aauth copied to clipboard

CI4 Development

Open rmcdahal opened this issue 5 years ago • 22 comments

Any Plan For CI4 Implementation for this beautiful package ?

rmcdahal avatar Sep 29 '18 04:09 rmcdahal

Yep, i want to refactor Aauth v3 for CI4.

I started testing the new CI4 version today 😄

REJack avatar Sep 29 '18 12:09 REJack

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 avatar Oct 01 '18 15:10 hersag

@hersag Yes I'll create a new release soon, master repo is safe to use.

REJack avatar Oct 12 '18 14:10 REJack

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 avatar Nov 11 '18 19:11 REJack

@REJack we must use CI4's default namespace.

emreakay avatar Nov 12 '18 08:11 emreakay

@emreakay I'm ok with that, App\Libraries for the library and App\Models\Aauth for models.

REJack avatar Nov 12 '18 11:11 REJack

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 ^^

REJack avatar Nov 12 '18 11:11 REJack

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.

REJack avatar Nov 14 '18 11:11 REJack

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.

emreakay avatar Nov 15 '18 12:11 emreakay

Ok sweet 😄

REJack avatar Nov 15 '18 16:11 REJack

Any Updates?

rmcdahal avatar Aug 08 '19 17:08 rmcdahal

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 avatar Aug 09 '19 07:08 REJack

@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 avatar Sep 28 '19 15:09 tswagger

@tswagger It's pushed to the v3-dev repo incl testing over travis on CI4 rc.2 😄

REJack avatar Sep 28 '19 17:09 REJack

@REJack Awesome! Thank you!

tswagger avatar Sep 28 '19 22:09 tswagger

Too many database tables, btw thanks @REJack

rmcdahal avatar Sep 29 '19 06:09 rmcdahal

@rmcdahal Why you think there are to many databases? I‘ve created only 3 new tables compared to v2.

REJack avatar Sep 29 '19 08:09 REJack

I'm port my all my project CI3 to CI4, do you haces Aauth ready to use ir with CI4??

manukieli avatar Jun 24 '20 15:06 manukieli

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

iecoding avatar Jul 29 '20 03:07 iecoding

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!

PwrSrg avatar Oct 06 '20 19:10 PwrSrg

@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 avatar Dec 31 '20 23:12 tswagger

@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.

REJack avatar Dec 31 '20 23:12 REJack