Skip to content

Commit

Permalink
fix readthedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
dbu committed Mar 22, 2024
1 parent d3da27a commit 08d39c4
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 83 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
steps:

- name: Pull the code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install PHP and Composer
uses: shivammathur/setup-php@v2
Expand Down
7 changes: 2 additions & 5 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 All @@ -25,7 +25,4 @@ jobs:
run: |
make -C Resources/doc/ spelling
if [[ -s "Resources/doc/_build/spelling/output.txt" ]]; then echo "\nSpelling errors found\n" && cat "Resources/doc/_build/spelling/output.txt"; fi
- name: Spellcheck
run: |
if [[ -s "Resources/doc/_build/spelling/output.txt" ]]; then cat "Resources/doc/_build/spelling/output.txt"; fi
if [[ -s "Resources/doc/_build/spelling/output.txt" ]]; then false; fi
66 changes: 7 additions & 59 deletions Resources/doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,12 @@

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

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'

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))

# -- General configuration -----------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.intersphinx',
'sphinxcontrib.phpdomain',
'sensio.sphinx.configurationblock',
'sensio.sphinx.phpcode',
'sphinxcontrib.spelling'
'sphinxcontrib.spelling',
'sphinx_rtd_theme',
]

# Spelling configuration
Expand Down Expand Up @@ -62,13 +41,13 @@
# built documents.
#
# The short X.Y version.
version = '2.0.0'
version = '2.x'
# The full version, including alpha/beta/rc tags.
release = '2.0.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
language = 'en'

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand Down Expand Up @@ -103,6 +82,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 @@ -214,41 +195,8 @@
#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', 'foshttptpcachebundle', 'FOSHttptpCacheBundle Documentation',
['David de Boer, David Buchmann'], 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', 'FOSHttpCacheBundle', 'FOSHttpCacheBundle Documentation',
'David de Boer, David Buchmann', 'FOSHttpCacheBundle', 'A Symfony bundle to help with HTTP caching and invalidation',
'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'

# --------------

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

rst_epilog = """
Expand Down
16 changes: 6 additions & 10 deletions Resources/doc/reference/configuration/proxy-client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ configure the purge plugin for your HttpCache with the matching header if you
change this.

cloudflare
-------
----------

.. code-block:: yaml
Expand All @@ -255,14 +255,14 @@ cloudflare
- 'https://api.cloudflare.com'
``authentication_token``
"""""""""""""""""""""""
""""""""""""""""""""""""

**type**: ``string``

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

``zone_identifier``
"""""""""""""""""
"""""""""""""""""""

**type**: ``string``

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

.. _configuration_noop_proxy_client:

cloudfront
----------
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.
Expand Down Expand Up @@ -325,8 +323,6 @@ the `AWS Async documentation_`. It can not be used with the ``client`` option.
Service identifier of a `AsyncAws\CloudFront\CloudFrontClient` client. More information is available on the
`AWS Async documentation_`. It can not be used with the ``configuration`` option.

.. _configuration_fastly_proxy_client:

Fastly
----------
.. code-block:: yaml
Expand All @@ -340,21 +336,21 @@ Fastly
soft_purge: true
``service_identifier``
"""""""""""""""""""""
""""""""""""""""""""""

**type**: ``string``

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

``authentication_token``
"""""""""""""""""""""
""""""""""""""""""""""""

**type**: ``string``

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

``soft_purge``
"""""""""""""""""""""
""""""""""""""

**type**: ``boolean`` **default**: ``true``

Expand Down
8 changes: 2 additions & 6 deletions Resources/doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
sphinx==1.8.5
git+https://github.com/fabpot/sphinx-php.git
sphinx-rtd-theme==1.0.0
sphinx
sphinx-rtd-theme
sphinxcontrib-spelling
sphinxcontrib-phpdomain
pyenchant
docutils==0.17.1
jinja2<3.1.0
2 changes: 0 additions & 2 deletions src/UserContext/RoleProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ class RoleProvider implements ContextProvider
* The token storage is optional to not fail on routes that have no
* firewall. It is however not valid to call updateUserContext when not in
* a firewall context.
*
* @param TokenStorageInterface $tokenStorage
*/
public function __construct(TokenStorageInterface $tokenStorage = null)
{
Expand Down

0 comments on commit 08d39c4

Please sign in to comment.