Skip to content

Commit d69e764

Browse files
authored
Merge pull request #614 from FriendsOfSymfony/fix-doc
fix readthedocs
2 parents d3da27a + 08d39c4 commit d69e764

File tree

6 files changed

+18
-83
lines changed

6 files changed

+18
-83
lines changed

.github/workflows/php.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
steps:
4141

4242
- name: Pull the code
43-
uses: actions/checkout@v2
43+
uses: actions/checkout@v4
4444

4545
- name: Install PHP and Composer
4646
uses: shivammathur/setup-php@v2

.github/workflows/spellcheck.yml

+2-5
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
@@ -25,7 +25,4 @@ jobs:
2525
run: |
2626
make -C Resources/doc/ spelling
2727
if [[ -s "Resources/doc/_build/spelling/output.txt" ]]; then echo "\nSpelling errors found\n" && cat "Resources/doc/_build/spelling/output.txt"; fi
28-
- name: Spellcheck
29-
run: |
30-
if [[ -s "Resources/doc/_build/spelling/output.txt" ]]; then cat "Resources/doc/_build/spelling/output.txt"; fi
3128
if [[ -s "Resources/doc/_build/spelling/output.txt" ]]; then false; fi

Resources/doc/conf.py

+7-59
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,12 @@
88

99
lexers['php'] = PhpLexer(startinline=True, linenos=1)
1010

11-
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
12-
if not on_rtd: # only import and set the theme if we're building docs locally
13-
import sphinx_rtd_theme
14-
html_theme = 'sphinx_rtd_theme'
15-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
16-
1711
primary_domain = 'php'
1812
highlight_language = 'php'
1913

20-
# If extensions (or modules to document with autodoc) are in another directory,
21-
# add these directories to sys.path here. If the directory is relative to the
22-
# documentation root, use os.path.abspath to make it absolute, like shown here.
23-
#sys.path.insert(0, os.path.abspath('.'))
24-
25-
# -- General configuration -----------------------------------------------------
26-
27-
# If your documentation needs a minimal Sphinx version, state it here.
28-
#needs_sphinx = '1.0'
29-
30-
# Add any Sphinx extension module names here, as strings. They can be extensions
31-
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
3214
extensions = [
33-
'sphinx.ext.intersphinx',
34-
'sphinxcontrib.phpdomain',
35-
'sensio.sphinx.configurationblock',
36-
'sensio.sphinx.phpcode',
37-
'sphinxcontrib.spelling'
15+
'sphinxcontrib.spelling',
16+
'sphinx_rtd_theme',
3817
]
3918

4019
# Spelling configuration
@@ -62,13 +41,13 @@
6241
# built documents.
6342
#
6443
# The short X.Y version.
65-
version = '2.0.0'
44+
version = '2.x'
6645
# The full version, including alpha/beta/rc tags.
6746
release = '2.0.0'
6847

6948
# The language for content autogenerated by Sphinx. Refer to documentation
7049
# for a list of supported languages.
71-
#language = None
50+
language = 'en'
7251

7352
# There are two options for replacing |today|: either, you set today to some
7453
# non-false value, then it is used:
@@ -103,6 +82,8 @@
10382

10483
# -- Options for HTML output ---------------------------------------------------
10584

85+
html_theme = 'sphinx_rtd_theme'
86+
10687
# Theme options are theme-specific and customize the look and feel of a theme
10788
# further. For a list of options available for each theme, see the
10889
# documentation.
@@ -214,41 +195,8 @@
214195
#latex_domain_indices = True
215196

216197

217-
# -- Options for manual page output --------------------------------------------
218-
219-
# One entry per manual page. List of tuples
220-
# (source start file, name, description, authors, manual section).
221-
man_pages = [
222-
('index', 'foshttptpcachebundle', 'FOSHttptpCacheBundle Documentation',
223-
['David de Boer, David Buchmann'], 1)
224-
]
225-
226-
# If true, show URL addresses after external links.
227-
#man_show_urls = False
228-
229-
230-
# -- Options for Texinfo output ------------------------------------------------
231-
232-
# Grouping the document tree into Texinfo files. List of tuples
233-
# (source start file, target name, title, author,
234-
# dir menu entry, description, category)
235-
texinfo_documents = [
236-
('index', 'FOSHttpCacheBundle', 'FOSHttpCacheBundle Documentation',
237-
'David de Boer, David Buchmann', 'FOSHttpCacheBundle', 'A Symfony bundle to help with HTTP caching and invalidation',
238-
'Miscellaneous'),
239-
]
240-
241-
# Documents to append as an appendix to all manuals.
242-
#texinfo_appendices = []
243-
244-
# If false, no module index is generated.
245-
#texinfo_domain_indices = True
246-
247-
# How to display URL addresses: 'footnote', 'no', or 'inline'.
248-
#texinfo_show_urls = 'footnote'
249-
198+
# --------------
250199

251-
# Example configuration for intersphinx: refer to the Python standard library.
252200
intersphinx_mapping = {'foshttpcache': ('http://foshttpcache.readthedocs.org/en/latest/', None)}
253201

254202
rst_epilog = """

Resources/doc/reference/configuration/proxy-client.rst

+6-10
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ configure the purge plugin for your HttpCache with the matching header if you
240240
change this.
241241

242242
cloudflare
243-
-------
243+
----------
244244

245245
.. code-block:: yaml
246246
@@ -255,14 +255,14 @@ cloudflare
255255
- 'https://api.cloudflare.com'
256256
257257
``authentication_token``
258-
"""""""""""""""""""""""
258+
""""""""""""""""""""""""
259259

260260
**type**: ``string``
261261

262262
User API token for authentication against Cloudflare APIs, requires ``Zone.Cache`` Purge permissions.
263263

264264
``zone_identifier``
265-
"""""""""""""""""
265+
"""""""""""""""""""
266266

267267
**type**: ``string``
268268

@@ -276,8 +276,6 @@ Identifier for the Cloudflare zone you want to purge the cache for.
276276
List of Cloudflare API endpoints to use for purging the cache. You can use this to specify a different
277277
endpoint for testing purposes.
278278

279-
.. _configuration_noop_proxy_client:
280-
281279
cloudfront
282280
----------
283281
Talking to AWS cloudfront requires the ``jean-beru/fos-http-cache-cloudfront`` library. You need to require this dependency before you can configure the ``cloudfront`` proxy client.
@@ -325,8 +323,6 @@ the `AWS Async documentation_`. It can not be used with the ``client`` option.
325323
Service identifier of a `AsyncAws\CloudFront\CloudFrontClient` client. More information is available on the
326324
`AWS Async documentation_`. It can not be used with the ``configuration`` option.
327325

328-
.. _configuration_fastly_proxy_client:
329-
330326
Fastly
331327
----------
332328
.. code-block:: yaml
@@ -340,21 +336,21 @@ Fastly
340336
soft_purge: true
341337
342338
``service_identifier``
343-
"""""""""""""""""""""
339+
""""""""""""""""""""""
344340

345341
**type**: ``string``
346342

347343
Identifier for the Fastly service you want to purge the cache for.
348344

349345
``authentication_token``
350-
"""""""""""""""""""""
346+
""""""""""""""""""""""""
351347

352348
**type**: ``string``
353349

354350
Authentication token (API Token) which can be created in the profile section of your account
355351

356352
``soft_purge``
357-
"""""""""""""""""""""
353+
""""""""""""""
358354

359355
**type**: ``boolean`` **default**: ``true``
360356

Resources/doc/requirements.txt

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

src/UserContext/RoleProvider.php

-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ class RoleProvider implements ContextProvider
3535
* The token storage is optional to not fail on routes that have no
3636
* firewall. It is however not valid to call updateUserContext when not in
3737
* a firewall context.
38-
*
39-
* @param TokenStorageInterface $tokenStorage
4038
*/
4139
public function __construct(TokenStorageInterface $tokenStorage = null)
4240
{

0 commit comments

Comments
 (0)