Skip to content

Add entryExists to EntrypointLookupInterface#167

Open
lcharette wants to merge 2 commits intosymfony:mainfrom
lcharette:main-patch-1
Open

Add entryExists to EntrypointLookupInterface#167
lcharette wants to merge 2 commits intosymfony:mainfrom
lcharette:main-patch-1

Conversation

@lcharette
Copy link
Copy Markdown

I don't know why it was proposed in #147 not to include entryExists in EntrypointLookupInterface, but it doesn't makes sense to test agains't a specific class instead of the interface.

In my case, this cause an issue as I cannot use dependence injection on EntrypointLookupInterface and expect entryExists to be present.

If this is not approved, I suggest adding entryExists to it's own interface and have EntrypointLookup implement both (although you won't fix the dependency injection problem).

@weaverryan
Copy link
Copy Markdown
Contributor

Sorry for the slow reply. Not breaking BC was the reason behind not adding it to the interface, which I agree is a bit awkward. We have two choices:

A) Add a 2nd interface as you suggested
B) Add the new method to the interface in a BC-friendly way (this includes documenting the new method on the interface, then we would actually make it a real method in the next major version - the UserInterface::getUserIdentifier() is an example of doing that - https://github.com/symfony/symfony/blob/1b57d282713423be349104fd2c9786c9eda2fc38/src/Symfony/Component/Security/Core/User/UserInterface.php#L29

So, we can't merge this PR - but I'd welcome a PR with either of these approaches.

Cheers!

@jrushlow jrushlow added the Feature New Feature label Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature New Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants