Skip to content
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

Merged
merged 4 commits into from
Jun 6, 2023
Merged

Cleanup bc layers #10764

merged 4 commits into from
Jun 6, 2023

Conversation

greg0ire
Copy link
Member

@greg0ire greg0ire commented Jun 5, 2023

No description provided.

'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.',
Copy link
Member Author

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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$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.

Comment on lines 38 to 40
* @param bool $reportFieldsWhereDeclared no-op, to be removed in 4.0
*/
public function __construct(array $paths, bool $reportFieldsWhereDeclared = false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @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.

Copy link
Member Author

@greg0ire greg0ire Jun 6, 2023

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

Copy link
Member

@derrabus derrabus left a 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. 🙈

@greg0ire
Copy link
Member Author

greg0ire commented Jun 6, 2023

@mpdude please review

@greg0ire greg0ire merged commit e0b7240 into doctrine:3.0.x Jun 6, 2023
@greg0ire greg0ire deleted the cleanup-bc-layers branch June 6, 2023 09:42
@greg0ire greg0ire added this to the 3.0.0 milestone Jun 6, 2023
Copy link
Contributor

@mpdude mpdude left a 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

@greg0ire
Copy link
Member Author

greg0ire commented Jun 6, 2023

Thanks for reviewing anyway :)

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

Successfully merging this pull request may close these issues.

3 participants