rchouinard / phpass

PHP Password Library: Easy, secure password management for PHP
http://rchouinard.github.com/phpass/
MIT License
246 stars 28 forks source link

namespace for Phpass.php #1

Closed DerManoMann closed 12 years ago

DerManoMann commented 12 years ago

Hi there,

Just wondering if it would be possible to have Phpass.php in a namespace too? It seems weird to have all code nicely put into namespaces, but not the class you are bound to use?

rchouinard commented 12 years ago

In the 2.0-wip branch, I've actually removed the \Phpass class in favor of \Phpass\Hash and \Phpass\Strength. The file Phpass.php remains as a stub for the library autoloader, but no longer contains a class definition.

I do agree with you, I didn't like having \Phpass outside of the namespace, but \Phpass\Phpass just didn't flow right for me, and \Phpass\Core seemed contrived. Hopefully splitting the "core" class in 2.0 makes more sense.

rchouinard commented 12 years ago

With the new API in v2, I consider this issue closed. The Phpass.php file is now just a dummy file to trigger class autoloading, and there is no reason to add it to the namespace as it does not define and classes or functions.