php-pds / skeleton

Standard PHP package skeleton.
Creative Commons Attribution Share Alike 4.0 International
2.3k stars 167 forks source link

Some Interfacing #26

Closed dracony closed 7 years ago

dracony commented 7 years ago

A small idea I have would be allow for some sort of an optional .skeleton.php file that would make it possible to redefine the structure. Could look something like this:

return new class implements SkeletonInterface
{
     public function sourceDirectory()
     {
          return '/src';
     }, //...
}

You get the idea. This would make it possible for projects with existing structure that they can't just change to still make the directory mapping known to some components that need it.

For example bower allows specifying main files in the bower.json instead of relying on a predefined component structure.

Revisor commented 7 years ago

Why? What for?

dracony commented 7 years ago

Good question ))

For example so that some automatic code linting tool can easily find your sources, etc.

calevans commented 7 years ago

Honestly, I am not in favor of this. If you rename your src file to something else, then you aren't in compliance.

-1

Cheers! :) =C=

pmjones commented 7 years ago

/me furrows brow

I don't see the point of redefining the structure; the whole idea here is that there's a standard skeleton, already agreed-upon by a large number of existing packages.

dracony commented 7 years ago

Alright, I guess I really took the cake with useless complexity with this)