The correct approach would be to extract the method into either: * a static utility * an injected dependency
Reuse through `protected` only leads to a massive amount of coupling, and more BC concerns for us. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Thu, Jan 19, 2017 at 12:49 PM, Peter Bowyer <pe...@mapledesign.co.uk> wrote: > Hi, > > I've subclassed Doctrine\DBAL\Connection to add an extra method. Code @ > https://gist.github.com/pbowyer/97c779a5a0c74df91b8bd4d0eefc955b > > However while adapting one of the parent class's method I discovered it > relied on a private method. > > I have duplicated this private method into my subclass, but: > > 1) Is there a better alternative to add functionality? > > 2) If not, should DBAL's Connection class use protected rather than > private for method visibility? > > > Peter > > -- > You received this message because you are subscribed to the Google Groups > "doctrine-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to doctrine-user+unsubscr...@googlegroups.com. > To post to this group, send email to doctrine-user@googlegroups.com. > Visit this group at https://groups.google.com/group/doctrine-user. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to doctrine-user+unsubscr...@googlegroups.com. To post to this group, send email to doctrine-user@googlegroups.com. Visit this group at https://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/d/optout.