Skip to content

Conversation

@neellii
Copy link

@neellii neellii commented Oct 23, 2025

refs: #216

@neellii neellii assigned DenTray and AZabolotnikov and unassigned DenTray Oct 23, 2025
$this->extractEntityNameAndPath();
$this->validateOnlyApiOption();
$this->validateCrudOptions();
$this->entityName = $this->convertToPascalCase($this->entityName);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please move it to handle method, because Is not validation operation.

@neellii neellii assigned AZabolotnikov and unassigned neellii Oct 28, 2025
@DenTray DenTray merged commit bd9e489 into master Nov 3, 2025
3 checks passed
@DenTray DenTray deleted the 216-entities-name branch November 3, 2025 15:17
@DenTray DenTray requested a review from Copilot November 3, 2025 15:18
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 implements automatic conversion of entity and relation names from snake_case/lowercase to PascalCase with informative user feedback. When users provide lowercase entity or relation names, the system now converts them to the proper PascalCase format and displays conversion messages.

Key Changes

  • Entity names are now converted to PascalCase in the command handler with user notification
  • Relation names are automatically converted to PascalCase during parsing
  • Removed premature PascalCase conversion in EntityGenerator::setModel() to allow proper conversion tracking

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/Commands/MakeEntityCommand.php Added convertToPascalCase() method for standardized case conversion with user notification; renamed trimRelations() to prepareRelations() and integrated conversion logic
src/Generators/EntityGenerator.php Removed Str::studly() conversion from setModel() to defer conversion to the command level
tests/ModelGeneratorTest.php Updated test to verify conversion messages are displayed for entity and relation names

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

4 participants