Re: Text_Password static or non-static?

Martin Jansen <[email protected]> Sun, 31 Jan 2016 10:36:58 +0100
Newsgroups gmane.comp.php.pear.devel
Message-ID <[email protected]>
On 30.01.16 23:28, Michael Gauthier wrote:
> I'm making a PR to update the Text_Password package to explicitly state 
> static methods so it works properly in PHP 7. While updating, I noticed 
> the documentation and internal code seems to be written assuming the API 
> is entirely static but the unit tests are written assuming the API uses 
> class instances.
> 
> For example, the docs say to use:
> 
> Text_Password::create();
> 
> but the unit tests use:
> 
> $subject = new Text_Password();
> $subject->create();
> 
> My question to the list is does anyone besides the unit tests use the 
> non-static API for Text_Password?

Back when I wrote that code my intention was for the methods to be
called statically at all times. I'm not sure why the unit tests differ.
but I'd say that this is a bug.

That being said I'm extremely happy that you are working on Text_Password.

- Martin


-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php