-
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
Cleanup bc layers #10764
Cleanup bc layers #10764
Conversation
'Passing an instance of %s to %s is deprecated, please pass a %s instance instead.', | ||
$metadata::class, | ||
throw new TypeError(sprintf( | ||
'Argument #2 passed to %s() must be an instance of %s, %s given.', |
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.
I didn't provide an upgrade note for that one because it's not precisely a realistic scenario to provide anything else than an ORM metadata instance to this method.
__METHOD__, | ||
ClassMetadata::class, | ||
); | ||
$metadata::class, |
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.
$metadata::class, | |
get_debug_type($metadata), |
When embedding a class into a message, we should prefer get_debug_type()
over ::class
because the former plays more nicely with anonymous classes.
* @param bool $reportFieldsWhereDeclared no-op, to be removed in 4.0 | ||
*/ | ||
public function __construct(array $paths, bool $reportFieldsWhereDeclared = false) |
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.
* @param bool $reportFieldsWhereDeclared no-op, to be removed in 4.0 | |
*/ | |
public function __construct(array $paths, bool $reportFieldsWhereDeclared = false) | |
* @param true $reportFieldsWhereDeclared no-op, to be removed in 4.0 | |
*/ | |
public function __construct(array $paths, bool $reportFieldsWhereDeclared = true) |
Also, let's throw if false
has been passed explicitly.
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.
Let's switch to checking func_num_args()
when deprecating this on 3.1.x
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.
Wrong button. I should go to bed. 🙈
48bee72
to
575d0c0
Compare
@mpdude please review |
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.
A bit too late, but 👍🏻 from me
Thanks for reviewing anyway :) |
No description provided.