[phpMyAdmin Developers] Single location for classes

Isaac Bennetch bennetch at gmail.com
Thu Jun 15 14:34:43 CEST 2017


> On Jun 13, 2017, at 8:35 PM, MaurĂ­cio Meneghini Fauth <mauriciofauth at gmail.com> wrote:
>
> Hello
>
> Currently, classes do not have a single location in the directory structure. The class files are mixed with other kinds of files in the libraries directory, and the PMA namespace points to the root path which causes all classes to have a namespace that begins with PMA\libraries. This affects the performance of the autoloader.
>
> One solution to solve this problem would be to move the classes to a new directory that contains only class files and create a new namespace that points to that directory.
> The directory can have any name that describes it, like lib, classes, includes or src, but what I usually see in open source projects is the src directory.

I like this suggestion. It doesn't make a lot of sense to have class
files scattered around the entire
source tree, especially if it affects the autoloader.

I have a preference to NOT use "src" because that doesn't make much
sense to me personally. I
tend to think of src as containing a project source code, which isn't
very useful in our case since
the whole codebase is source code. Most of your other suggestions
would be fine by me, I think
./classes or ./libraries/classes make the most sense to me, but I'm
open to other ideas.

> Then we can use the namespace PhpMyAdmin, which is already used in SqlParser, in the src directory, and after all classes are moved to that directory, we remove the PMA namespace.

I think this is a good idea.

> I would like to hear your opinion on this subject.
>
> Best regards
> MaurĂ­cio Meneghini Fauth
> _______________________________________________
> Developers mailing list
> Developers at phpmyadmin.net
> https://lists.phpmyadmin.net/mailman/listinfo/developers



More information about the Developers mailing list