Skip to content

LinkGenerator: extract interface#273

Open
PavelJurasek wants to merge 7 commits intonette:masterfrom
PavelJurasek:feat-link-generator-interface
Open

LinkGenerator: extract interface#273
PavelJurasek wants to merge 7 commits intonette:masterfrom
PavelJurasek:feat-link-generator-interface

Conversation

@PavelJurasek
Copy link
Contributor

Since LinkGenerator is final, it would be nice if it had its own interface so that it can be replaced with own implementation.

@dg
Copy link
Member

dg commented Jan 15, 2021

What is the interface for? Replace it with your own implementation.

@PavelJurasek
Copy link
Contributor Author

Right, I can change service application.linkGenerator to whatever class I want, but it won't solve the problem with 3rd party packages that are typehinted to Nette\Application\LinkGenerator. That leads me to conclusion, that the PR should be reworked to:

  • create ILinkGenerator interface
  • create alias LinkGenerator for ILinkGenerator to keep BC
  • rename current class implementation, DefaultLinkGenerator or similar

@PavelJurasek PavelJurasek force-pushed the feat-link-generator-interface branch from b901a27 to 6739750 Compare January 19, 2021 12:13
@dg
Copy link
Member

dg commented Jan 19, 2021

@PavelJurasek I'll save this as a beautiful argument when someone wonders why I'm removing the letter I from the interface names. :-)

@PavelJurasek PavelJurasek force-pushed the feat-link-generator-interface branch from f230978 to febdc2b Compare January 19, 2021 12:52
@PavelJurasek PavelJurasek force-pushed the feat-link-generator-interface branch from febdc2b to 2f18bdc Compare January 19, 2021 12:57
@dg dg force-pushed the master branch 6 times, most recently from 13f5ab3 to c15bd94 Compare January 26, 2021 21:24
@dg dg force-pushed the master branch 9 times, most recently from 7de5809 to f817a0b Compare February 8, 2021 05:57
@dg dg force-pushed the master branch 2 times, most recently from 6e85bcc to 10d0d39 Compare August 29, 2021 21:33
@dg dg force-pushed the master branch 5 times, most recently from 31e6d6d to af52aa4 Compare September 12, 2021 21:52
@dg dg force-pushed the master branch 8 times, most recently from 7ade054 to 8cca00e Compare October 11, 2021 10:37
@dg dg force-pushed the master branch 2 times, most recently from 37d1dbf to 781992c Compare October 19, 2021 23:53
@dg dg force-pushed the master branch 2 times, most recently from e61605d to 3ded4e1 Compare November 8, 2021 22:07
@dg dg force-pushed the master branch 4 times, most recently from 059a3ee to 4e78fc4 Compare December 12, 2021 16:37
@dg dg force-pushed the master branch 2 times, most recently from af03d73 to 33f96e6 Compare December 22, 2021 00:50
@dg dg force-pushed the master branch 2 times, most recently from 3013dde to 9d383a9 Compare March 25, 2022 14:38
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.

2 participants