-
-
Notifications
You must be signed in to change notification settings - Fork 509
Favour bool and int over boolean and integer #2183
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
Conversation
0cbb290
to
f066733
Compare
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.
Apart from the wording suggestion, the INTEGER
and BOOLEAN
constants in Doctrine\ODM\MongoDB\Types\Type
should be deprecated as well.
UPGRADE-2.1.md
Outdated
@@ -5,3 +5,5 @@ the `Doctrine\ODM\MongoDB\Id\IdGenerator` interface. | |||
|
|||
The `Doctrine\ODM\MongoDB\Mapping\ClassMetadata` class has been marked final. The class will no longer be extendable | |||
in ODM 3.0. | |||
|
|||
`boolean` and `integer` types have been deprecated. Use their shorthand counterparts: `bool` and `int` respectively. |
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.
`boolean` and `integer` types have been deprecated. Use their shorthand counterparts: `bool` and `int` respectively. | |
The `boolean` and `integer` mapping types have been deprecated. Use their shorthand counterparts: `bool` and `int` respectively. |
@alcaeus also while I'm here there's also oddly looking |
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.
One nit in the deprecation message I missed the first time around. Feel free to merge once it has been changed.
]; | ||
if (isset($deprecatedTypes[$mapping['type']])) { | ||
@trigger_error(sprintf( | ||
'"%s" type was deprecated in 2.1 and will be removed in 3.0. Use "%s" instead.', |
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.
Missed this the first time around: please provide the package name in the message:
'"%s" type was deprecated in 2.1 and will be removed in 3.0. Use "%s" instead.', | |
'"%s" type was deprecated in doctrine/mongodb-odm 2.1 and will be removed in 3.0. Use "%s" instead.', |
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.
Added in const as well 👍
I think deprecating it makes sense. The class itself provides no value, so deprecating it in favour of
I'm not sure why this uses |
Closes #2124