-
Notifications
You must be signed in to change notification settings - Fork 3
190 change get namespace method #215
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
Conversation
…pace_method # Conflicts: # src/Generators/ResourceGenerator.php
refs: #190
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.
Pull Request Overview
This PR refactors the namespace generation logic across all generator classes. The main change is renaming the getNamespace() method to generateNamespace() and modifying it to accept the actual path string directly instead of a config key, along with moving path validation logic to the constructor.
Key changes:
- Renamed
getNamespace()togenerateNamespace()and changed parameters to accept paths directly instead of config keys - Moved path validation logic from inline checks to a new
checkConfigHasCorrectPaths()method called in the constructor - Updated all generator classes to pass
$this->paths[...]directly togenerateNamespace()instead of config keys - Added
'translations'entry to theLOVER_CASE_DIRECTORIES_MAPconstant
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Generators/EntityGenerator.php | Core refactoring: renamed method, updated parameter handling, moved validation logic to constructor, added translations path mapping |
| src/Generators/TestsGenerator.php | Updated calls to use generateNamespace() with direct path references |
| src/Generators/ServiceGenerator.php | Updated calls to use generateNamespace() with direct path references |
| src/Generators/SeederGenerator.php | Updated calls to use generateNamespace() with direct path references |
| src/Generators/ResourceGenerator.php | Updated calls to use generateNamespace() with direct path references |
| src/Generators/RequestsGenerator.php | Updated calls to use generateNamespace() with direct path references |
| src/Generators/RepositoryGenerator.php | Updated calls to use generateNamespace() with direct path references |
| src/Generators/NovaTestGenerator.php | Updated calls to use generateNamespace() with direct path references |
| src/Generators/NovaResourceGenerator.php | Updated calls to use generateNamespace() with direct path references |
| src/Generators/ModelGenerator.php | Updated calls to use generateNamespace() with direct path references |
| src/Generators/FactoryGenerator.php | Updated calls to use generateNamespace() with direct path references |
| src/Generators/ControllerGenerator.php | Updated calls to use generateNamespace() with direct path references |
| src/Generators/AbstractTestsGenerator.php | Updated calls to use generateNamespace() with direct path references |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.