Skip to content

Conversation

Crovitche-1623
Copy link

Q A
Type improvement
Fixed issues Close #6885

Summary

See #6885

@Crovitche-1623
Copy link
Author

May I also remove the @internal annotation from the __construct() method as the class can be used using wrapper_class?

return $this->handleDriverException($e, new Query($sql, $params, $types));
}

/** @internal */
Copy link
Member

Choose a reason for hiding this comment

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

Where else is this method expected to be invoked from?

Copy link
Author

@Crovitche-1623 Crovitche-1623 Sep 17, 2025

Choose a reason for hiding this comment

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

@morozov I used the convertException method from the connect and commit methods that I overrode.

Copy link
Author

Choose a reason for hiding this comment

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

@morozov Another solution would be to make the handleDriverException method protected instead of private.

@morozov
Copy link
Member

morozov commented Sep 10, 2025

May I also remove the @internal annotation from the __construct() method as the class can be used using wrapper_class?

I don't think this is a good idea. It would make the shape of $params part of the public API which we discussed in #6885 (comment).

@Crovitche-1623
Copy link
Author

May I also remove the @internal annotation from the __construct() method as the class can be used using wrapper_class?

I don't think this is a good idea. It would make the shape of $params part of the public API which we discussed in #6885 (comment).

@morozov Okay, in that case, do you have any idea how I can silence the deprecation message that indicates the class is internal?

@morozov
Copy link
Member

morozov commented Sep 17, 2025

Okay, in that case, do you have any idea how I can silence the deprecation message that indicates the class is internal?

What does this message look like? I don't think the DBAL itself emits any messages when an internal method is invoked from outside. It must be some 3rd-party tooling.

@Crovitche-1623
Copy link
Author

Okay, in that case, do you have any idea how I can silence the deprecation message that indicates the class is internal?

What does this message look like? I don't think the DBAL itself emits any messages when an internal method is invoked from outside. It must be some 3rd-party tooling.

Yep it's the Symfony\Component\Config\Resource\ClassExistenceResource on line 76.

I have no clue what this class does though.

image

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

Successfully merging this pull request may close these issues.

RFC: Remove @internal annotation on methods that could be reused in a wrapper_classand add a setter
2 participants