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

Fix self deprecation from getCustomSchemaOptions #6113

Merged
merged 1 commit into from
Jul 26, 2023
Merged

Fix self deprecation from getCustomSchemaOptions #6113

merged 1 commit into from
Jul 26, 2023

Conversation

VincentLanglet
Copy link
Contributor

@VincentLanglet VincentLanglet commented Jul 25, 2023

Q A
Type bug
Fixed issues

Summary

getCustomSchemaOptions is used here:

$customOptions1 = $column1->getCustomSchemaOptions();
$customOptions2 = $column2->getCustomSchemaOptions();

And diffColumn is used inside Comparator::compareTables, I asume that's why the deprecation was only "if call outside".

public function diffColumn(Column $column1, Column $column2)
{
Deprecation::triggerIfCalledFromOutside(
'doctrine/dbal',
'https://github.com/doctrine/dbal/pull/5650',
'%s is deprecated. Use diffTable() instead.',
__METHOD__,
);

@greg0ire
Copy link
Member

I'm not sure I understand. If you stop calling diffColumn, the issue will go away, won't it?

@VincentLanglet
Copy link
Contributor Author

I'm not sure I understand. If you stop calling diffColumn, the issue will go away, won't it?

I'm not the one calling diffColumn, it's called here:

$changedProperties = $this->diffColumn($column, $toColumn);

by the compareTables method, which is not deprecated (and called by doctrine migrations).

Copy link
Member

@greg0ire greg0ire left a comment

Choose a reason for hiding this comment

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

Thanks, I understand now 👍

@greg0ire greg0ire requested a review from derrabus July 25, 2023 21:56
@greg0ire greg0ire merged commit f94be5b into doctrine:3.6.x Jul 26, 2023
74 checks passed
@greg0ire greg0ire added this to the 3.6.6 milestone Jul 26, 2023
@greg0ire
Copy link
Member

Thanks @VincentLanglet !

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

Successfully merging this pull request may close these issues.

None yet

4 participants