Skip to content

Conversation

michaelperrin
Copy link
Contributor

#SymfonyConHackday2017
I am not entirely sure that we should document this way (creating a src/CacheKernel.php file as I propose here). Feel free to comment :)

@javiereguiluz
Copy link
Member

I guess this is duplicated of #8682 ... these days we're updating all docs, so please check the open PR and create an issue saying that you are going to work on some files. Thanks!

@michaelperrin
Copy link
Contributor Author

Thanks @javiereguiluz . That's too bad because I checked but didn't see your PR, my bad.

The cool thing is that @weaverryan proposes the same name for the caching kernel, so it seems its quite a natural one :)

You can close this PR then if you wish!

Copy link
Member

@weaverryan weaverryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michaelperrin if you are able to make the suggested changes faster than Javier, then I would be happy to merge your's in. Javier's PR has additional changes - so he could just rebase after your merge. But, quick! Symfony 4 is upon us! :)

http_cache.rst Outdated
To enable caching, modify the code of your front controller. You can also make these
changes to ``index.php`` to add caching to the ``dev`` environment::
// src/CacheKernel.php
<?php
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the <?php

Modify the code of your front controller to wrap the default kernel into the
caching kernel::

// public/index.php
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's change the :: to just : and add (on the next line) .. code-block:: diff.

Then, you can add + and - to emphasize the changes:

.. code-block:: diff // some line from before - // line to go away + // line to add 
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's great advice, thanks :) I could check that everything is fine by compiling the doc with Sphinx.

@michaelperrin michaelperrin force-pushed the fix/symfony4-http-cache-kernel branch from 865d565 to b15dba2 Compare November 22, 2017 15:47
@michaelperrin
Copy link
Contributor Author

@weaverryan I made the changes you requested :)

@weaverryan weaverryan changed the base branch from master to 4.0 November 27, 2017 18:43
@weaverryan
Copy link
Member

Thank you Michaël!

@weaverryan weaverryan merged commit b15dba2 into symfony:4.0 Nov 27, 2017
weaverryan added a commit that referenced this pull request Nov 27, 2017
…chaelperrin) This PR was merged into the 4.0 branch. Discussion ---------- Update HttpCache kernel documentation for Symfony 4 #SymfonyConHackday2017 I am not entirely sure that we should document this way (creating a `src/CacheKernel.php` file as I propose here). Feel free to comment :) Commits ------- b15dba2 Update HttpCache kernel documentation for Symfony 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4 participants