community-forum icon indicating copy to clipboard operation
community-forum copied to clipboard

Reorganize backpack packages to use standard PHP package structure

Open tabacitu opened this issue 4 years ago • 2 comments

Notice all our packages have EVERYTHING inside the src folder. While that made sense at the time, due to little documentation on how to create Laravel packages, it no longer seems like a good way to organize packages, because:

  • it's different than all other PHP packages, so for knowledgeable devs it's unintuitive and for beginners it sets a bad example;
  • it hides a lot of important files into a folder, that should be at root level to communicate what that package includes;
  • it makes for some weird class namespaces, that include the "app" keyword, which could be confusing and is definitely ugly (since it's lowercase);

Check out this too: https://github.com/php-pds/skeleton

But the gist of it is that we should make all packages follow the exact folder structure of a Laravel project, but with "app" renamed to "src".

In existing projects, that just means moving everything that's inside "src" outside of it, and renaming "app" to "src".

tabacitu avatar Nov 10 '20 13:11 tabacitu