nineinchnick / yii2-usr

Yii framework module for user authentication, password reset, registration and profile updating. A port of yii-usr to Yii Framework 2.0.
http://demo2.niix.pl
MIT License
39 stars 8 forks source link

add PSR autoloading support in composer.json #13

Closed schmunk42 closed 10 years ago

schmunk42 commented 10 years ago

for details see http://getcomposer.org/doc/04-schema.md#psr-0

nineinchnick commented 10 years ago

I was considering it when starting but I'm not sure it's needed, this module once configured is not referred to from outside.

schmunk42 commented 10 years ago

But I think you should at least add namespaces to your code. Adding the autoload could be decided later.

nineinchnick commented 10 years ago

I'm using the nineinchnick/usr namespace.

schmunk42 commented 10 years ago

Because I looked through some files and didn't find the declaration, eg.:

nineinchnick commented 10 years ago

Thanks for checking that. The controller should declare it but the Diceware is an external component. I'm going to create a repo for it to use composer for installing it as a requirement.

schmunk42 commented 10 years ago

Just did a little search ... This one is already on packagist: https://github.com/timoh6/GenPhrase It has diceware, but I don't know if it fit your needs.

nineinchnick commented 10 years ago

I also found it earlier but didn't have time to compare the implementation to the one I already use. I will consider it, it looks good.

schmunk42 commented 10 years ago

As far as I can tell, you need a password generator in general, right? Maybe there are even more packages available which do that, but I haven't looked really deep at the code.

nineinchnick commented 10 years ago

I've made some improvements and I think this issue can be closed now. If I stumble on any class without a namespace it will be added.