Skip to content

Conversation

@pirs1337
Copy link
Contributor

No description provided.

@pirs1337 pirs1337 self-assigned this Oct 21, 2025
@pirs1337 pirs1337 assigned DenTray and unassigned pirs1337 Oct 23, 2025
@DenTray DenTray requested a review from Copilot November 3, 2025 09:11
Copy link
Contributor

Copilot AI left a 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() to generateNamespace() 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 to generateNamespace() instead of config keys
  • Added 'translations' entry to the LOVER_CASE_DIRECTORIES_MAP constant

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.

@DenTray DenTray merged commit 219d2b1 into master Nov 3, 2025
10 checks passed
@DenTray DenTray deleted the 190_change_getNamespace_method branch November 3, 2025 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants