Skip to content

Commit

Permalink
Merge pull request #558 from FriendsOfSymfony/2-to-3
Browse files Browse the repository at this point in the history
2 to 3
  • Loading branch information
dbu committed Mar 23, 2024
2 parents e446b18 + 8c021ce commit 797ae1c
Show file tree
Hide file tree
Showing 25 changed files with 135 additions and 226 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: 3.7
- name: Install dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Pull in optional dependencies
run: composer require --no-update phpunit/phpunit toflar/psr6-symfony-http-cache-store:^4.2
Expand All @@ -31,7 +31,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Pull in optional dependencies
run: composer require --no-update phpunit/phpunit toflar/psr6-symfony-http-cache-store:^4.2
Expand All @@ -47,7 +47,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga
Expand Down
60 changes: 60 additions & 0 deletions doc/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
div.highlight {
background-color: #343131 !important;
}

div.highlight pre {
border: none;
color: white !important;
}

div.highlight pre span.n,
div.highlight pre span.na,
div.highlight pre span.nb,
div.highlight pre span.nc,
div.highlight pre span.nf,
div.highlight pre span.nx,
div.highlight pre span.kn {
color: white;
}

div.highlight pre span.nv {
color: #6ab0de
}

div.highlight pre span.k,
div.highlight pre span.o,
div.highlight pre span.nt
{
color: #ff8400;
}

div.highlight pre span.mi,
div.highlight pre span.s,
div.highlight pre span.s1,
div.highlight pre span.s2,
div.highlight pre span.sr,
div.highlight pre span.cp
{
color: #56db3a;
}

div.highlight pre span.hll {
background-color: #848484;
}

div.highlight pre span.hll span.c1 {
color: #d8d8d8;
}

div.highlight pre span.p {
color: #b3b3b3;
}

table.highlighttable td {
padding: 0;
}

table.highlighttable td div.linenodiv {
text-align: right;
width: 38px;
}
103 changes: 0 additions & 103 deletions doc/_static/tabs.css

This file was deleted.

1 change: 0 additions & 1 deletion doc/_static/tabs.js

This file was deleted.

3 changes: 1 addition & 2 deletions doc/cache-invalidator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,7 @@ multiple times. If there are no requests to be sent, flush will simply do nothin
Error handling
--------------

If an error occurs during ``flush()``, the method throws an
:source:`ExceptionCollection <src/Exception/ExceptionCollection.php>`
If an error occurs during ``flush()``, the method throws an ``ExceptionCollection``
that contains an exception for each failed request to the proxy server.

These exception are of two types:
Expand Down
60 changes: 5 additions & 55 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@
lexers['varnish3'] = CLexer()
lexers['varnish4'] = CLexer()

on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if not on_rtd: # only import and set the theme if we're building docs locally
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

primary_domain = 'php'
highlight_language = 'php'

Expand All @@ -29,10 +23,9 @@
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.coverage',
'sphinx.ext.extlinks',
'sphinx_rtd_theme',
'sphinx_tabs.tabs',
'sphinxcontrib.phpdomain',
'sensio.sphinx.configurationblock',
'sensio.sphinx.phpcode',
'sphinxcontrib.spelling'
]

Expand Down Expand Up @@ -102,6 +95,8 @@

# -- Options for HTML output ---------------------------------------------------

html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
Expand Down Expand Up @@ -132,12 +127,8 @@
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

html_js_files = [
'tabs.js',
]

html_css_files = [
'tabs.css',
'custom.css',
'fos.css',
]

Expand Down Expand Up @@ -226,48 +217,7 @@
# If false, no module index is generated.
#latex_domain_indices = True


# -- Options for manual page output --------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'foshttpcache', 'FOSHttpCache Documentation',
['David Buchmann, David de Boer'], 1)
]

# If true, show URL addresses after external links.
#man_show_urls = False


# -- Options for Texinfo output ------------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'FOSHttpCache', 'FOSHttpCache Documentation',
'David Buchmann, David de Boer', 'FOSHttpCache', 'One line description of project.',
'Miscellaneous'),
]

# Documents to append as an appendix to all manuals.
#texinfo_appendices = []

# If false, no module index is generated.
#texinfo_domain_indices = True

# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'

rst_epilog = """
.. _FOSHttpCacheBundle: https://github.com/FriendsOfSymfony/FOSHttpCacheBundle
.. _GitHub: https://github.com/FriendsOfSymfony/FOSHttpCache
"""

extlinks = {'source': ('https://github.com/FriendsOfSymfony/FOSHttpCache/blob/master/%s', '') }

config_block = {
'varnish3': 'Varnish 3',
'varnish4': 'Varnish 4 - 6'
}
4 changes: 2 additions & 2 deletions doc/fastly-configuration.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _fastly configuration:

Fastly Configuration
-------------------
--------------------

Caching is enabled by default. All requests that are marked as cacheable will be cached.

Expand All @@ -12,7 +12,7 @@ Caching is enabled by default. All requests that are marked as cacheable will be
Tagging
~~~~~~~

Fastly supports :term:`tagging` out of the box.
Fastly supports cache tagging out of the box.
Configure the tag header to ``Surrogate-Keys``. (``fos_http_cache.tags.response_header`` if you use FOSHttpCacheBundle)

Purge
Expand Down
2 changes: 1 addition & 1 deletion doc/nginx-configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ NGINX does not support :term:`purge` functionality out of the box but you can ea
`ngx_cache_purge <https://github.com/FRiCKLE/ngx_cache_purge>`_ module. You just need to compile
NGINX from sources adding ``ngx_cache_purge`` with ``--add-module``.

You can check the script :source:`install-nginx.sh <tests/install-nginx.sh>` to get an idea
You can check the script ``tests/install-nginx.sh`` to get an idea
about the steps you need to perform.

Then configure NGINX for purge requests:
Expand Down
2 changes: 1 addition & 1 deletion doc/proxy-clients.rst
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ The recommended usage of the proxy client is to create an instance of
Implementation Notes
--------------------

Each client is an implementation of :source:`ProxyClient <src/ProxyClient/ProxyClient.php>`.
Each client is an implementation of ``ProxyClient``.
All other interfaces, ``PurgeCapable``, ``RefreshCapable``, ``BanCapable``, ``TagCapable``
and ``ClearCapable`` extend this ``ProxyClient``. So each client implements at least
one of the :ref:`invalidation methods <invalidation methods>` depending on
Expand Down
10 changes: 4 additions & 6 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
sphinx==1.8.5
git+https://github.com/fabpot/sphinx-php.git
sphinx-rtd-theme==1.0.0
sphinxcontrib-spelling
sphinx
sphinx-rtd-theme
sphinx-tabs
sphinxcontrib-phpdomain
sphinxcontrib-spelling
pyenchant
docutils==0.17.1
jinja2<3.1.0
1 change: 0 additions & 1 deletion doc/response-tagging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ up one header into multiple ones.
This library ships with a ``MaxHeaderValueLengthFormatter`` that does
the splitting for you. You give it an inner formatter and the maximum length like so::


use FOS\HttpCache\TagHeaderFormatter\CommaSeparatedTagHeaderFormatter;
use FOS\HttpCache\TagHeaderFormatter\MaxHeaderValueLengthFormatter

Expand Down
1 change: 1 addition & 0 deletions doc/spelling_word_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ cacheable
config
css
Fastly
formatter
getter
getters
hostname
Expand Down
Loading

0 comments on commit 797ae1c

Please sign in to comment.