-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Docs: Moving *attributes* mapping to first position #10364
Conversation
Option 3: |
Is this the only place where would need to swap annotations and attributes? Note to my future self: This is going to be hell to merge up. 🙈 |
AFAIK, the agreed best-practice is to always show attributes first: #9555 (comment) |
Absolutely.
The reason for my asking is that I'd rather merge one big painful PR that fixes this inconsistency once and for all that to merge hundreds of micro-PRs for the same problem. 😓 |
Yet another micro-PR ;-) - as requested at doctrine#10364 (comment) I also changed `$currentPrice` from `float` to `int`, since IMO it's better to store prices as `int` (=cents). Question: Is there a reason why most typehints are `int|null`, instead of `?int`? Should I change them?
Yet another micro-PR ;-) - as requested at #10364 (comment) I also changed `$currentPrice` from `float` to `int`, since IMO it's better to store prices as `int` (=cents). Question: Is there a reason why most typehints are `int|null`, instead of `?int`? Should I change them?
* 2.14.x: PHPStan 1.9.8, Psalm 5.4.0 (doctrine#10382) fix typo for missing a comma (doctrine#10377) Docs: Removing `type: 'integer'` from mappings (doctrine#10368) Docs: Moving *attributes* mapping to first position (doctrine#10364) Docs: Deleting duplicate mapping example (doctrine#10363)
* 2.15.x: Use more precise types for class strings (doctrine#10381) PHPStan 1.9.8, Psalm 5.4.0 (doctrine#10382) fix typo for missing a comma (doctrine#10377) Docs: Removing `type: 'integer'` from mappings (doctrine#10368) Docs: Moving *attributes* mapping to first position (doctrine#10364) Docs: Deleting duplicate mapping example (doctrine#10363)
Question: There are various occurrences of
#[Column(type: 'integer')]
on this page. I'd like to replace them with either:#[Column()]
since in recent versions the type is derived from the PHP typehint anyway#[Column(type: Types::INTEGER)]
Which one is better?