-
-
Notifications
You must be signed in to change notification settings - Fork 192
For names replace enum fields values symbols to abbreviations #556
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?
Conversation
uldisn
commented
Jun 16, 2025
Q | A |
---|---|
Is bugfix? | ✔️ |
New feature? | ❌ |
Breaks BC? | ❌ |
Fixed issues | [(https://github.com//issues/557)] |
…mbols change to abbreviations
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.
This breaks BC to my understanding!
What you could do is moving constantName
to a callback with the current function as a default.
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.
Need a line for CHANGELOG.
src/generators/model/Generator.php
Outdated
const JUNCTION_RELATION_VIA_TABLE = 'table'; | ||
const JUNCTION_RELATION_VIA_MODEL = 'model'; | ||
|
||
const SYMBOLS_ABBREVIATION = [ |
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.
const SYMBOLS_ABBREVIATION = [ | |
const SYMBOLS_ABBREVIATION = [ |
|
@schmunk42 is it better now? |
No, I don't see my points addresses. |
…validation. Simplified structure and reduced redundancy.
…ypos in error messages.
…ames for consistency with enum constant names and added validation for `optsType`.
…y appending "To" in alignment with naming conventions.
…e` to `assertTrue`.
@samdark all generated code is covered |
Still breaks BC. This line should read:
This is the public property
Somehow like that... I haven't tested it. With this you should be able to plug-in any constant name generator function you want. |
…handling and updated related tests and templates.
…ple fields sharing default values.
…g rules for fields sharing default values.
…thod signatures, and adjusted related tests.
…thod signatures, and adjusted related tests.
…ed related test cases.
…teValueForFunction` for improved value transformation logic.
Honestly, this is a huge change, I can not tell if it is BC or not. I am against it, sorry. |
? |
So, to my understanding here's some magic, which handles stuff like But if you have something like
correct? As mentioned before, it's too opinionated IMHO and an approach with a simple callback would be the best: |