JMSI18nRoutingBundle icon indicating copy to clipboard operation
JMSI18nRoutingBundle copied to clipboard

Hard times overriding router classes

Open umpirsky opened this issue 9 years ago • 2 comments

In my project I override:

  • DefaultLocaleResolver
  • DefaultPatternGenerationStrategy
  • I18nLoader
  • I18nRouter

All of them have private properties, which made extending them harder. It would be nice to turn this into protected.

Would you accept such PR @schmittjoh?

umpirsky avatar Oct 23 '14 14:10 umpirsky

Switching properties to protected means that library maintainers must then maintain BC on these properties. This increases the maintenance cost a lot. It would be much better to describe your use case for accessing it so that the maintainer can decide what is the right extension point to allow it (most of the time, changing the visibility to protected is the worse way to add an extension point)

stof avatar Dec 17 '14 10:12 stof

My use case was to enable using subdomain and prefix strategy together in the same project.

umpirsky avatar Dec 17 '14 10:12 umpirsky