[Phpmyadmin-devel] SQLValidator

Dieter Adriaenssens dieter.adriaenssens at gmail.com
Mon Jul 8 16:38:34 CEST 2013


2013/7/8 Ayush Chaudhary <ayushchd at gmail.com>:
>
> On Wednesday, 3 July 2013 at 8:41 PM, Madhura Jayaratne wrote:
>
>
>
>
> On Wed, Jul 3, 2013 at 1:59 PM, Ayush Chaudhary <ayushchd at gmail.com> wrote:
>
> Hi,
>
> On Wednesday, 3 July 2013 at 2:08 PM, Dieter Adriaenssens wrote:
>
> 2013/7/3 Ayush Chaudhary <ayushchd at gmail.com>:
>
> Hi,
>
> Is there a reason why validation.lib.php is not a class with public static
> method? Is it okay to convert it to a class with all methods' access
> specifier as public static?
>
>
> Did you mean the PMA_SQLValidator class in
> libraries/sqlvalidator.class.php? I didn't find a validation.lib.php,
> or something similar, in the PMA codebase, that contains a class.
> (libraries/config/validate.lib.php doesn't contain a class)
>
> Sorry for not being clear. I was referring to the library
> libraries/config/validate.lib.php. I am currently writing tests for
> libraries/config/FormDisplay.class.php, and there are numerous calls to
> functions from validate.lib.php which cannot be mocked because they are not
> contained in a class. Also, the same issue holds for
> libraries/config/FormDisplay.tpl.php
>
>
> I am in favor of putting these functions into a class as static methods.
>
> Waiting for more confirmations :)

I agree too.

BTW : In an ideal world, everyone on this mailing list, or at least
the core developers would have voted in favor or against. In practice,
if nobody objects within a few days, it is a silent agreement. ;)


Kind regards,
Dieter Adriaenssens




More information about the Developers mailing list