-
-
Notifications
You must be signed in to change notification settings - Fork 993
Fix issues with app path and namespace #2042
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
base: master
Are you sure you want to change the base?
Fix issues with app path and namespace #2042
Conversation
7782291
to
8fe9572
Compare
Hi, @dcblogdev. Your attention is needed here, please. |
this needs to work with the existing Confirmed |
That is true. I'll immediately add a backward compatibility replacement for the old
Sure, they are all working, and I've written some tests for that. You can go ahead and confirm it. Tests:test_generates_app_path()
|
0e924d9
to
33aba43
Compare
33aba43
to
8097896
Compare
Sorry, your merge affected the workflow. I'll be submitting a new PR shortly. |
Hi, @dcblogdev. The backward compatibility support for both Thanks, and have a nice day. |
thanks, I'll have a look at this tonight. |
After merging this PR, we’ll likely be saying hi to a lot of new issues. 🤷♂️ Having 230 changed files is not normal. It would be better if the author could split this into smaller, more focused PRs so the community can review the changes more effectively. |
Do you discover any bug you'd like the author to correct? The CI/CD tests was created to detect early bugs. If passed, the code is believed to be okay! Thanks and have a great day |
I don't want this to happen again. Reference: https://x.com/taylorotwell/status/1552452998546300929 |
Do you realize at all that this same PR is to correct a problem you yourself introduced to this package? Don't be too sentimental. Go through the PR and recommend changes if any. Have you tested the PR and it's not working or do you find any bugs you'll like the author to fix? Do you know the level of damages your changes cost us? Let's join hands together and create solutions, not fighting each other all the time. No one is paying us to contribute code here! Let's not feel so entitled or sentimental or judgemental please 🙏 |
we're not looking to argue, its a massive PR, going to find some time to look over this and try out with a few apps I have. The tests are all passing which is great 👍 with there being so many changes just want to check there's no unexpected issues that the tests don't check for. |
bf0dd09
to
0435c4e
Compare
Hi, I figured out a way to extract fractions of the PR into a separate micro PR. I've created a draft PR and will mark it ready once this is reviewed and merged. While waiting for @dcblogdev and the rest of the QA team to complete the review, I'll review the codebase again to see if there is still room for more micro PRs. Thanks for your observation and recommendation. |
df4eb1b
to
1206ed2
Compare
I've squashed and optimized the commits to improve clarity. I recommend reviewing the pull request via the 14 commits rather than the 206 files changed—it’ll be much easier to follow the changes that way. Thanks. |
Hello! Thanks solomon-ochepa for showing me this solution. Can you check, if my solution is OK or easier? I have found a totally different solution compared to what is proposed above. My solution is tiny and simple, easy to implement. Check it here: |
Your solution is a temporary fix, yes. But this PR is a better solution to solve the entire problem once and for all. |
@solomon-ochepa as soon as I pull in this PR I'm getting this error
This happens when I have mhmiton/laravel-modules-livewire installed |
Thanks for the feedback. This probably happens because of the few changes I separated into new PRs. I'm debugging it right away! Thanks for the review and feedback, @dcblogdev |
… methods - [test] Enhance PathNamespaceTest with additional path and namespace conversion tests - [feat] add module_path and module_app_path methods for improved module path handling - [refactor] fix trimming logic in clean() method for improved path handling - [fix] trim leading and trailing slashes in app path for consistency - [refactor] enhance path handling methods for improved clarity and consistency
…ead of APP_FOLDER_NAME
…nerator for improved namespace handling and code clarity
refactor: update `default_namespace()` method to accept a default path for improved flexibility refactor: update `default_namespace()` method to use an empty string as default value for improved clarity
…ead of 'paths.app_folder'
…e new `path` method for improved module retrieval
…r generated files - Updated namespaces in generated module files from 'Modules\Blog\Http\Controllers' to 'Modules\Blog\App\Http\Controllers'. - Changed service provider namespaces from 'Modules\Blog\Providers' to 'Modules\Blog\App\Providers'. - Adjusted repository, request, resource, and rule namespaces to follow the new structure. - Modified test snapshots to reflect the updated namespaces. - Cleaned up unnecessary module path variables in tests for better readability and maintainability.
506f004
to
5bcef5b
Compare
Hi, @dcblogdev. The issue has been fixed successfully - d95887e Nevertheless, I need to work on the |
thanks that error is fixed now, my tests are failing because Livewire can't see my components. If you need a project that uses Livewire you can use https://github.com/laravel-modules-com/fuse |
Can you share a screenshot or at least the error log, please? Secondly, this PR is not about Livewire and has nothing to do with Livewire. Livewire integration is handled completely by another package ( I'm already working on a patch to fix every possible issue that may result from this PR. I need some time to finish it. I'm currently in a meeting at my workplace. Thank you, @dcblogdev |
I understand this is not about Livewire but my components work perfectly until I use this branch. tested on 3 different apps.
|
I understand why, and I'm not doubting you. Have you forgotten? When the changes were made by @alissn he also changed a few codes in the Laravel-modules-livewire repo, which I'll fix ASAP. |
Summary
Resolve issues with the
app/
path by supporting both default and custom names while ensuring proper namespace conversion.Description
The
app/
path was previously removed due to multiple issues. This task involves reintroducing support for it while ensuring:app/
) and custom paths (src/
,/
).Acceptance Criteria:
app/
path works with both default and custom configurations.Tests (
PathNamespaceTest
)Let me know if you want any modifications! 🚀