Skip to content

Conversation

Fan2Shrek
Copy link
Contributor

Fix #1675

When trying to create a class with a native PHP name (e.g., Directory), Validator::classDoesNotExist incorrectly throws an error stating that the class already exists. To fix this, we need to prepend the namespace before performing the check.

@Fan2Shrek Fan2Shrek force-pushed the fix/creation-with-native-php-classname branch from 7bd0bd1 to a571ae6 Compare March 24, 2025 22:27
@Fan2Shrek Fan2Shrek force-pushed the fix/creation-with-native-php-classname branch from a571ae6 to bc92fb0 Compare March 24, 2025 22:37
@Fan2Shrek
Copy link
Contributor Author

The test failures are related, but I'm not entirely sure how Generator::createClassNameDetails is supposed to behave. In my view, it should assert that the FQCN does not exist, not just the class itself. However, related tests are failing.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot create an entity named 'Directory'
1 participant