mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-3612: Make SQLFilter#em protected #4440
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Mar 11, 2015).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user nurikabe:
SQLFilter#em is private, which can be troublesome when extending SQLFilter. I notice, for example, that the Gedmo SoftDeleteableFilter goes to the trouble of using reflection to get access to SoftDeleteableFilter#em.
@Steveb-p commented on GitHub (Jun 12, 2019):
I've found this issue when I was looking for anything related to extending
SQLFilterclass. Is this still something that would be accepted if a PR would be provided?From what I've seen from code usage it would be worthwile to add an interface, since it is not strictly required for one to extend
SQLFilterfor a class to work withSqlWalker(I've tested this in my app and filter was applied successfully just based on the result ofaddFilterConstraintmethod - I know that there is also the case of parameters, but I believeSQLFiltershould be more "extension-friendly"? Maybe dropfinalfrom__constructto allow passing additional dependencies, if there are any required)@sebsastianek commented on GitHub (Oct 16, 2019):
+1 for dropping final in constructor of SQLFilter