Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LinkGenerator: extract interface #273

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

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

@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. :-)

@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 a1e8c9b to df7c4c9 Compare January 21, 2024 23:50
@dg dg force-pushed the master branch 2 times, most recently from 891b6dd to e3d05b3 Compare February 2, 2024 17:51
@dg dg force-pushed the master branch 3 times, most recently from 426e735 to c19ebdc Compare March 11, 2024 20:02
@dg dg force-pushed the master branch 5 times, most recently from 2b9da37 to 30d90f4 Compare April 7, 2024 02:51
@dg dg force-pushed the master branch 6 times, most recently from bf86204 to c91f90a Compare April 20, 2024 00:46
@dg dg force-pushed the master branch 3 times, most recently from 57bd587 to e908315 Compare May 2, 2024 10:37
@dg dg force-pushed the master branch 8 times, most recently from c5ecbda to ecb200c Compare May 13, 2024 09:25
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.

None yet

2 participants