Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI4 Development #238

Open
rmcdahal opened this issue Sep 29, 2018 · 22 comments
Open

CI4 Development #238

rmcdahal opened this issue Sep 29, 2018 · 22 comments

Comments

@rmcdahal
Copy link

Any Plan For CI4 Implementation for this beautiful package ?

@REJack
Copy link
Collaborator

REJack commented Sep 29, 2018

Yep, i want to refactor Aauth v3 for CI4.

I started testing the new CI4 version today 😄

@hersag
Copy link

hersag commented Oct 1, 2018

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?

@REJack
Copy link
Collaborator

REJack commented Oct 12, 2018

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

@REJack
Copy link
Collaborator

REJack commented Nov 11, 2018

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.

@emreakay
Copy link
Owner

@REJack we must use CI4's default namespace.

@REJack
Copy link
Collaborator

REJack commented Nov 12, 2018

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

@REJack
Copy link
Collaborator

REJack commented Nov 12, 2018

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
Copy link
Collaborator

REJack commented Nov 14, 2018

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.

@emreakay
Copy link
Owner

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.

@REJack
Copy link
Collaborator

REJack commented Nov 15, 2018

Ok sweet 😄

@rmcdahal
Copy link
Author

rmcdahal commented Aug 8, 2019

Any Updates?

@REJack
Copy link
Collaborator

REJack commented Aug 9, 2019

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.

@tswagger
Copy link
Contributor

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

@REJack
Copy link
Collaborator

REJack commented Sep 28, 2019

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

@tswagger
Copy link
Contributor

@REJack Awesome! Thank you!

@rmcdahal
Copy link
Author

Too many database tables, btw thanks @REJack

@REJack
Copy link
Collaborator

REJack commented Sep 29, 2019

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

@REJack REJack added this to the Aauth v3.0.0 milestone Feb 21, 2020
@manukieli
Copy link
Contributor

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

@iecoding
Copy link
Contributor

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

@PwrSrg
Copy link

PwrSrg commented Oct 6, 2020

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!

@tswagger
Copy link
Contributor

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

@REJack
Copy link
Collaborator

REJack commented Dec 31, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants