Skip to content

Commit 797ae1c

Browse files
authored
Merge pull request #558 from FriendsOfSymfony/2-to-3
2 to 3
2 parents e446b18 + 8c021ce commit 797ae1c

25 files changed

+135
-226
lines changed

.github/workflows/spellcheck.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v4
1616
- name: Set up Python
17-
uses: actions/setup-python@v1
17+
uses: actions/setup-python@v5
1818
with:
1919
python-version: 3.7
2020
- name: Install dependencies

.github/workflows/static.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
steps:
1515
- name: Checkout code
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v4
1717

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

3232
steps:
3333
- name: Checkout code
34-
uses: actions/checkout@v2
34+
uses: actions/checkout@v4
3535

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

4848
steps:
4949
- name: Checkout code
50-
uses: actions/checkout@v2
50+
uses: actions/checkout@v4
5151

5252
- name: PHP-CS-Fixer
5353
uses: docker://oskarstark/php-cs-fixer-ga

doc/_static/custom.css

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
div.highlight {
2+
background-color: #343131 !important;
3+
}
4+
5+
div.highlight pre {
6+
border: none;
7+
color: white !important;
8+
}
9+
10+
div.highlight pre span.n,
11+
div.highlight pre span.na,
12+
div.highlight pre span.nb,
13+
div.highlight pre span.nc,
14+
div.highlight pre span.nf,
15+
div.highlight pre span.nx,
16+
div.highlight pre span.kn {
17+
color: white;
18+
}
19+
20+
div.highlight pre span.nv {
21+
color: #6ab0de
22+
}
23+
24+
div.highlight pre span.k,
25+
div.highlight pre span.o,
26+
div.highlight pre span.nt
27+
{
28+
color: #ff8400;
29+
}
30+
31+
div.highlight pre span.mi,
32+
div.highlight pre span.s,
33+
div.highlight pre span.s1,
34+
div.highlight pre span.s2,
35+
div.highlight pre span.sr,
36+
div.highlight pre span.cp
37+
{
38+
color: #56db3a;
39+
}
40+
41+
div.highlight pre span.hll {
42+
background-color: #848484;
43+
}
44+
45+
div.highlight pre span.hll span.c1 {
46+
color: #d8d8d8;
47+
}
48+
49+
div.highlight pre span.p {
50+
color: #b3b3b3;
51+
}
52+
53+
table.highlighttable td {
54+
padding: 0;
55+
}
56+
57+
table.highlighttable td div.linenodiv {
58+
text-align: right;
59+
width: 38px;
60+
}

doc/_static/tabs.css

Lines changed: 0 additions & 103 deletions
This file was deleted.

doc/_static/tabs.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

doc/cache-invalidator.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,7 @@ multiple times. If there are no requests to be sent, flush will simply do nothin
189189
Error handling
190190
--------------
191191

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

196195
These exception are of two types:

doc/conf.py

Lines changed: 5 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@
1111
lexers['varnish3'] = CLexer()
1212
lexers['varnish4'] = CLexer()
1313

14-
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
15-
if not on_rtd: # only import and set the theme if we're building docs locally
16-
import sphinx_rtd_theme
17-
html_theme = 'sphinx_rtd_theme'
18-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
19-
2014
primary_domain = 'php'
2115
highlight_language = 'php'
2216

@@ -29,10 +23,9 @@
2923
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
3024
extensions = [
3125
'sphinx.ext.coverage',
32-
'sphinx.ext.extlinks',
26+
'sphinx_rtd_theme',
27+
'sphinx_tabs.tabs',
3328
'sphinxcontrib.phpdomain',
34-
'sensio.sphinx.configurationblock',
35-
'sensio.sphinx.phpcode',
3629
'sphinxcontrib.spelling'
3730
]
3831

@@ -102,6 +95,8 @@
10295

10396
# -- Options for HTML output ---------------------------------------------------
10497

98+
html_theme = 'sphinx_rtd_theme'
99+
105100
# Theme options are theme-specific and customize the look and feel of a theme
106101
# further. For a list of options available for each theme, see the
107102
# documentation.
@@ -132,12 +127,8 @@
132127
# so a file named "default.css" will overwrite the builtin "default.css".
133128
html_static_path = ['_static']
134129

135-
html_js_files = [
136-
'tabs.js',
137-
]
138-
139130
html_css_files = [
140-
'tabs.css',
131+
'custom.css',
141132
'fos.css',
142133
]
143134

@@ -226,48 +217,7 @@
226217
# If false, no module index is generated.
227218
#latex_domain_indices = True
228219

229-
230-
# -- Options for manual page output --------------------------------------------
231-
232-
# One entry per manual page. List of tuples
233-
# (source start file, name, description, authors, manual section).
234-
man_pages = [
235-
('index', 'foshttpcache', 'FOSHttpCache Documentation',
236-
['David Buchmann, David de Boer'], 1)
237-
]
238-
239-
# If true, show URL addresses after external links.
240-
#man_show_urls = False
241-
242-
243-
# -- Options for Texinfo output ------------------------------------------------
244-
245-
# Grouping the document tree into Texinfo files. List of tuples
246-
# (source start file, target name, title, author,
247-
# dir menu entry, description, category)
248-
texinfo_documents = [
249-
('index', 'FOSHttpCache', 'FOSHttpCache Documentation',
250-
'David Buchmann, David de Boer', 'FOSHttpCache', 'One line description of project.',
251-
'Miscellaneous'),
252-
]
253-
254-
# Documents to append as an appendix to all manuals.
255-
#texinfo_appendices = []
256-
257-
# If false, no module index is generated.
258-
#texinfo_domain_indices = True
259-
260-
# How to display URL addresses: 'footnote', 'no', or 'inline'.
261-
#texinfo_show_urls = 'footnote'
262-
263220
rst_epilog = """
264221
.. _FOSHttpCacheBundle: https://github.com/FriendsOfSymfony/FOSHttpCacheBundle
265222
.. _GitHub: https://github.com/FriendsOfSymfony/FOSHttpCache
266223
"""
267-
268-
extlinks = {'source': ('https://github.com/FriendsOfSymfony/FOSHttpCache/blob/master/%s', '') }
269-
270-
config_block = {
271-
'varnish3': 'Varnish 3',
272-
'varnish4': 'Varnish 4 - 6'
273-
}

doc/fastly-configuration.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _fastly configuration:
22

33
Fastly Configuration
4-
-------------------
4+
--------------------
55

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

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

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

1818
Purge

doc/nginx-configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ NGINX does not support :term:`purge` functionality out of the box but you can ea
2424
`ngx_cache_purge <https://github.com/FRiCKLE/ngx_cache_purge>`_ module. You just need to compile
2525
NGINX from sources adding ``ngx_cache_purge`` with ``--add-module``.
2626

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

3030
Then configure NGINX for purge requests:

doc/proxy-clients.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ The recommended usage of the proxy client is to create an instance of
433433
Implementation Notes
434434
--------------------
435435

436-
Each client is an implementation of :source:`ProxyClient <src/ProxyClient/ProxyClient.php>`.
436+
Each client is an implementation of ``ProxyClient``.
437437
All other interfaces, ``PurgeCapable``, ``RefreshCapable``, ``BanCapable``, ``TagCapable``
438438
and ``ClearCapable`` extend this ``ProxyClient``. So each client implements at least
439439
one of the :ref:`invalidation methods <invalidation methods>` depending on

doc/requirements.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
sphinx==1.8.5
2-
git+https://github.com/fabpot/sphinx-php.git
3-
sphinx-rtd-theme==1.0.0
4-
sphinxcontrib-spelling
1+
sphinx
2+
sphinx-rtd-theme
3+
sphinx-tabs
54
sphinxcontrib-phpdomain
5+
sphinxcontrib-spelling
66
pyenchant
7-
docutils==0.17.1
8-
jinja2<3.1.0

doc/response-tagging.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ up one header into multiple ones.
7474
This library ships with a ``MaxHeaderValueLengthFormatter`` that does
7575
the splitting for you. You give it an inner formatter and the maximum length like so::
7676

77-
7877
use FOS\HttpCache\TagHeaderFormatter\CommaSeparatedTagHeaderFormatter;
7978
use FOS\HttpCache\TagHeaderFormatter\MaxHeaderValueLengthFormatter
8079

doc/spelling_word_list.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ cacheable
55
config
66
css
77
Fastly
8+
formatter
89
getter
910
getters
1011
hostname

0 commit comments

Comments
 (0)