Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[HttpKernel] Revert BC break introduced by #8957 #11039

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

Closed
wants to merge 1 commit into from

Conversation

dunglas
Copy link
Member

@dunglas dunglas commented Jun 2, 2014

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
License MIT

464439d (#8957) creates a BC break. At least the SonataPage CMS used with the "host and path" strategy (http://sonata-project.org/bundles/page/master/doc/reference/multisite.html#host-and-path-strategy) is not working anymore because of this patch.

SonataPage extends the Request class without using the new factory system (there is probably a cleaner way to implement the "host and path" strategy in the CMS too).

When a subrequest is handled by InlineFragment, a request of type Symfony\Component\HttpFoundation\Request is instantiated instead of the expected Sonata\PageBundle\Request\SiteRequest. Then, SonataPage fail on the subrequest.

I've just reverted the part of this commit changing the previous behavior, the factory system is still working.

ping @fabpot @rande @Sinjonathan

@dunglas dunglas changed the title [HttpKernel] Revert BC break introduced by 464439d195fc895079176498cb28d182dc8aef14 [HttpKernel] Revert BC break introduced by 464439d Jun 2, 2014
@dunglas dunglas changed the title [HttpKernel] Revert BC break introduced by 464439d [HttpKernel] Revert BC break introduced by #8957 Jun 2, 2014
@dunglas
Copy link
Member Author

dunglas commented Jun 2, 2014

Reopened against the good branch: #11040

@dunglas dunglas closed this Jun 2, 2014
@cordoval
Copy link
Contributor

cordoval commented Jun 2, 2014

maybe the create method needs to be rather modified to accept a class that was extended from? maybe it is not a good idea, but Doctrine entity repository factories do this?

@stof
Copy link
Member

stof commented Jun 3, 2014

@cordoval it cannot (BC break). But there is already an extension point in Request::create. The description even explicitly tells that the bundle does not use it

@dunglas dunglas deleted the revert_request_bc branch December 5, 2015 09:00
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.

3 participants