Skip to content
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

[HttpKernel] Missing documentation about HttpKernel Extension #4492

Closed
linaori opened this issue Nov 19, 2014 · 3 comments
Closed

[HttpKernel] Missing documentation about HttpKernel Extension #4492

linaori opened this issue Nov 19, 2014 · 3 comments
Labels
actionable Clear and specific issues ready for anyone to take them. hasPR A Pull Request has already been submitted for this issue.

Comments

@linaori
Copy link
Contributor

linaori commented Nov 19, 2014

Recently I've made a PR for the SecurityComponent to remove the SecurityContext in 3.0. I found something in the SecurityExtension that caught my eye:

$this->addClassesToCompile([
    // list of class names
]);

I've never seen this method before so I went on searching for it. It seems like the HttpKernel component has a custom Extension that adds this method and the SecurityExtension extends this. It seems like this makes it possible to add the contents of the classes to classes.php in your cache directory.

When I was looking for documentation, I couldn't find any. I was expecting it to be on at least one of the following pages:

Should this be a feature that's documented? If that's the case, I can take a look at how it exactly works, implement it and write down when you should or should not add classes to this list.

@javiereguiluz
Copy link
Member

👍 I agree that this feature should be documented in the articles you linked. Even if most developers won't need it, for complex applications it can improve the performance.

PS: by the way, this is one of the tips that I'll briefly explain in my SymfonyCon talk next week ;)

@linaori
Copy link
Contributor Author

linaori commented Nov 19, 2014

@javiereguiluz Ah that's very cool! Sadly I won't be there. If you want, you can update this issue with your slides (or what ever you are using), and I can try to incorporate the same subjects.

@wouterj
Copy link
Member

wouterj commented May 3, 2015

@javiereguiluz talk can be found at: https://youtu.be/B8Sbo-JxKMo?t=7m11s

I propose to add a new section about adding classes to compile in cookbook/bundles/extension. We can then add a nice tip in book/performance linking to this new section. I won't add it to the HttpKernel components, as it's not talking about extensions at the moment (those component docs has to be extended).

@wouterj wouterj added the actionable Clear and specific issues ready for anyone to take them. label May 3, 2015
@xabbuh xabbuh added the hasPR A Pull Request has already been submitted for this issue. label Mar 29, 2016
wouterj added a commit that referenced this issue May 21, 2016
…d (javiereguiluz)

This PR was squashed before being merged into the 2.3 branch (closes #6405).

Discussion
----------

Added the explanation about addClassesToCompile() method

This fixes #4492.

Commits
-------

c5664a1 Added the explanation about addClassesToCompile() method
@wouterj wouterj closed this as completed May 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actionable Clear and specific issues ready for anyone to take them. hasPR A Pull Request has already been submitted for this issue.
Projects
None yet
Development

No branches or pull requests

4 participants