Skip to content

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 5.4
Bug fix? yes
New feature? yes
Deprecations? no
Tickets -
License MIT
Doc PR -

When a service is built by a factory, we don't always know if the resulting instance will implement ResetInteface or not.
One such service is http_client: HttpClient::create() might return a curl-one or a native-one, and only the former is resettable.

This PR makes it possible to make a reset conditional, aka by ignoring when the reset method doesn't exist.
This is both a new feature for HttpKernel and a bugfix for the http_client service.
That's why I'm targeting 5.4.

@nicolas-grekas nicolas-grekas changed the title [HttpKernel] allow ignoring kernel.reset methods that don't exist [HttpKernel] allow ignoring kernel.reset for methods that don't exist Nov 9, 2021
@nicolas-grekas nicolas-grekas changed the title [HttpKernel] allow ignoring kernel.reset for methods that don't exist [HttpKernel] allow ignoring kernel.reset methods that don't exist Nov 9, 2021
@fabpot
Copy link
Member

fabpot commented Nov 9, 2021

Thank you @nicolas-grekas.

@fabpot fabpot merged commit ba061fc into symfony:5.4 Nov 9, 2021
@fabpot fabpot deleted the reset-ignore-invalid branch November 9, 2021 20:38
This was referenced Nov 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants