New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Proposal] Make workbench create packages with PSR4 structure #5643
Comments
I support this. |
Is this that approval? Not sure who approves. |
Taylor does.
|
I think this isn't so easily done because some locations are hardcoded (like public, views, lang and config). You could just use PSR-4 and make it something like this:
And still load /src folder with PSR-4, but that would mix classes with other resources. But it would be nice of packages could be structured more similar to the new laravel folder. But that would mean something has to change to allow for flexible paths, see #4118 for example. |
Exactly. Thanks for the link to the other proposal. I'll see what @anlutro did. If paths are hardcoded to src/whatever/, would it work to just change what they're hardcoded to for the sake of this task and getting workbench packages to psr-4? Then allow customizable paths later in #4118 if someone decides to address that there? I could be missing details. |
No they are hardcoded so you can do |
Makes sense. I'll look into the proposal you mentioned. |
Replaced by #5807. |
I'm new to laravel but on investigating the develop branch, when I create a new package with workbench, files are still organized in the PSR0 structure and it seems that the dev is still expected to use the src/controller/ dir for controllers by adding the dir to the composer classmap. Ideally, package structures in 4.3 that are created from workbench would be similar to the one found in app/ which uses a PSR4 structure.
My bad if this task or similar was already created.
Implementation
Review implications. Since I'm new to laravel this may be a bit but there may not be much different from the rest of 4.3. Some of you may be able to help.
Edit file structure that is created. This is a matter of changing the structure that's created in Workbench/PackageCreator. The locations are below (relative to package root).
All other directories stay in the same location from what I can tell.
Edit the composer stub and...
Any info would be appreciated. Also, I'm new to this community so forgive me if I missed anything.
The text was updated successfully, but these errors were encountered: