Re: Text_Password static or non-static?
| From: | Martin Jansen | Date: | Sun, 31 Jan 2016 09:36:58 +0000 |
| Subject: | Re: Text_Password static or non-static? | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-55496@lists.php.net to get a copy of this message | ||
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