Skip to content

[FrameworkBundle] Remove Response* from classes to compile #21184

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

Merged
merged 1 commit into from
Jan 6, 2017

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Jan 6, 2017

Q A
Branch? 3.2
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #20560, symfony/demo#411, FriendsOfSymfony/FOSHttpCacheBundle#276
License MIT
Doc PR -

When HttpCache is used, Response is loaded first, then the kernel is booted (on cache miss), which triggers the loading of classes.php. Since 3.2 generates a context free classes.php, the Response class is now included there when it was excluded previously. And boom, "Cannot declare class Symfony\Component\HttpFoundation\Response".

@fabpot
Copy link
Member

fabpot commented Jan 6, 2017

Thank you @nicolas-grekas.

@fabpot fabpot merged commit 9ab5982 into symfony:3.2 Jan 6, 2017
fabpot added a commit that referenced this pull request Jan 6, 2017
… (nicolas-grekas)

This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] Remove Response* from classes to compile

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #20560, symfony/demo#411, FriendsOfSymfony/FOSHttpCacheBundle#276
| License       | MIT
| Doc PR        | -

When HttpCache is used, Response is loaded first, then the kernel is booted (on cache miss), which triggers the loading of classes.php. Since 3.2 generates a context free classes.php, the Response class is now included there when it was excluded previously. And boom, "Cannot declare class Symfony\Component\HttpFoundation\Response".

Commits
-------

9ab5982 [FrameworkBundle] Remove Response* from classes to compile
@nicolas-grekas nicolas-grekas deleted the fix-kernel-class-cache branch January 6, 2017 17:25
@fabpot fabpot mentioned this pull request Jan 12, 2017
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.

3 participants