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

Deprecate SchemaException codes #5728

Merged
merged 2 commits into from
Oct 7, 2022

Conversation

morozov
Copy link
Member

@morozov morozov commented Oct 7, 2022

Q A
Type deprecation

Similar to #5726 and #5727, I want to convert SchemaException to an interface and declare some of its subclasses as LogicException. The problem with that is that SchemaException defines constants.

As of #3525, each of the constants has a corresponding class, so as an API, these constants are redundant.

In order to provide an upgrade path, we need to backport the introduction of SchemaException subclasses from 4.0.x.

@morozov morozov force-pushed the deprecate-schema-exception-codes branch from 610cf7e to 9fd0452 Compare October 7, 2022 17:22
@morozov morozov force-pushed the deprecate-schema-exception-codes branch from 9fd0452 to 2ceb2d3 Compare October 7, 2022 17:24
@morozov morozov marked this pull request as ready for review October 7, 2022 17:37
@morozov morozov requested a review from greg0ire October 7, 2022 17:37
@greg0ire
Copy link
Member

greg0ire commented Oct 7, 2022

The problem with that is that SchemaException defines constants.

How is that in issue? Interfaces can have constants.

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.

Regardless, this looks better 👍

@morozov
Copy link
Member Author

morozov commented Oct 7, 2022

Interfaces can have constants.

I didn't know.

@morozov morozov merged commit 1ebda1c into doctrine:3.5.x Oct 7, 2022
@morozov morozov deleted the deprecate-schema-exception-codes branch October 7, 2022 18:37
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants