-
-
Notifications
You must be signed in to change notification settings - Fork 970
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
Update config.php #1628
Update config.php #1628
Conversation
Format the file structure to the current Laravel standard.
Update seeder.stub
Please, I need an explanation as to why this PR was closed without being merged. This particular PR is crucial, and I expected it to be treated before any other. Please quote me if I'm wrong! |
this is making sweeping changes that I don't want. This would require a version dump due to breaking changes. In future, before making fundamental changes I suggest asking to see if it would be well received to save your time. You're free to change the config to your liking in your application. I try to keep changes in the config to essential changes only to avoid breaking existing applications that may not have published the config file. |
You are right, but not in all aspects.
There is a breaking change at However, the rest of the code is as clean as possible, and wouldn't cause any form of breaking changes from Laravel 5 up to date. Please, do point out any of the other observations. Thanks. |
Please, can you reopen the PR so I can make an edit so we can continue the review? |
You're right the generator changes don't break existing modules. I don't think its a good idea to be a mix of namespaces names ie: a controller would have lower case app
or a seeder
They would be better to match the style ie
|
That's not correct, following the Laravel code standard. Note that the namespace should be assigned in accordance with the path! Note that the |
I disagree, for instance, looking at seeders from Laravel their namespace is |
Reverse activator filename to `modules_statuses.json`
That's true. It's configured via the composer Can you please review the standard Laravel's "autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/",
"Modules\\": "Modules/"
}
}, Notwithstanding, I think your concept may be possible if we added these same rules to each generated module's Moreover, in a future release, you may consider renaming the root path from Thanks. |
Hi, @dcblogdev. I'm still waiting for you here, please. |
if you can get this to work with the namespaces I've tried the config and adding
but having problems getting this to work. |
You are complicating the whole process! This PR has nothing to do with the This PR aims to give each new module the same file structure as the latest Laravel version. From Laravel v5.* to the current v10.*, the Controller's namespace, for instance, has been So, if a new module Making the We can work on making the |
Please take note of the Try this out instead:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The namespace can be changed from the config file.
Notwithstanding, I'm working on how to get the value directly from the module's composer.json
file.
This change has resulted in a less appealing namespace structure, in fact, not really following Laravel modern architecture or standards. The usage of lowercase directory namespace like I believe that @dcblogdev or @solomon-ochepa should have addressed the issue of these lowercase directory related namespace, including app, database, and any others located at the root of the module, before merging the change into the package. The PR is great, but using a lowercase namespace folder is not that much. Despite my attempts to find various solutions, I haven't found any solution to make it working. |
Point of correction, the structures are accurate and follows Laravel current standard. The only point we are currently missing and seeking solution to is how to map the namespaces. Like in Laravel, the We are currently working towards that, in short we have added the necessary properties to the Module's So, please, this issue has nothing to do with the lowercase directories. |
Format the file structure to the current Laravel standard.
These changes will only apply to newly created modules.