rchouinard/phpass

namespace for Phpass.php

Closed this issue · 2 comments

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?

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.

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.