Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Zend\Authentication\Adapter\Http::_challengeClient() should be public #4653

Closed
wants to merge 0 commits into from

Conversation

corentin-larose
Copy link
Contributor

Zend\Authentication\Adapter\Http::_challengeClient() should be public since one could need to call it this way:

$auth->getAdapter()->challengeClient();

for instance when the authenticated user tries to access a resource for which he is not granted by ACLs.

@mwillbanks
Copy link
Contributor

To preserve breaks in the API for folks that might be extending the Adapter\Http, you should provide a deprecated method in the event someone was previously overloading it. Additionally you should not modify the code already calling it. Unless @weierophinney disagrees and that this is an acceptable BC break in the API for potentially 2.3.

Only issue I really see is that it is part of the authentication component and in those cases these tend to be overwritten a bit more.

/**
 * @deprecated
 */
protected function _challengeClient()
{
    return $this->challengeClient();
}

@weierophinney
Copy link
Member

@corentin-larose Agreed with @mwillbanks -- keep a stub _challengeClient() method in place, but mark it as deprecated via an annotation, and also have it raise an E_USER_DEPRECATED error indicating users should convert their code to use challengeClient() directly.

@corentin-larose
Copy link
Contributor Author

@weierophinney @mwillbanks, I made the changes for Zend\Authentication\Adapter\Http::_challengeClient() (#4653), I gonna a issue another pull request.

Hope it gonna do the trick.

Cheers

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants