Skip to content

Commit a362b80

Browse files
authored
Merge pull request #567 from FriendsOfSymfony/fix-readthedocs-build
fix documentation build
2 parents 466dd92 + 8337120 commit a362b80

File tree

10 files changed

+63
-12
lines changed

10 files changed

+63
-12
lines changed

.github/workflows/.editorconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[*.yml]
2+
indent_size = 2

.github/workflows/spellcheck.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Spellcheck
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Python
17+
uses: actions/setup-python@v1
18+
with:
19+
python-version: 3.7
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade setuptools
23+
python -m pip install -r Resources/doc/requirements.txt
24+
- name: Run spell check
25+
run: |
26+
make -C Resources/doc/ spelling
27+
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
31+
if [[ -s "Resources/doc/_build/spelling/output.txt" ]]; then false; fi

.readthedocs.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
3+
sphinx:
4+
configuration: Resources/doc/conf.py
5+
6+
# additional formats
7+
formats:
8+
- pdf
9+
10+
python:
11+
version: "3.7"
12+
install:
13+
- requirements: Resources/doc/requirements.txt

Resources/doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
# General information about the project.
5757
project = 'FOSHttpCacheBundle'
58-
copyright = '2014-2018, David de Boer, David Buchmann'
58+
copyright = 'David de Boer, David Buchmann'
5959

6060
# The version info for the project you're documenting, acts as replacement for
6161
# |version| and |release|, also used in various other places throughout the

Resources/doc/reference/annotations.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ See :doc:`/features/invalidation` for more information.
4949
``@InvalidateRoute``
5050
--------------------
5151

52-
Like InvalidatePath annotations, you can use php attributes instead if you are using PHP 8
52+
Like InvalidatePath annotations, you can use PHP attributes instead if you are using PHP 8
5353
Invalidate a route with parameters::
5454

5555
use FOS\HttpCacheBundle\Configuration\InvalidateRoute;
@@ -99,7 +99,7 @@ HTTP header (``X-Cache-Tags``, by default).
9999
Any non-safe request to the ``editAction`` that returns a successful response
100100
will trigger invalidation of both the ``news`` and the ``news-123`` tags.
101101

102-
Like InvalidatePath annotations, you can use php attributes instead if you are using PHP 8
102+
Like InvalidatePath annotations, you can use PHP attributes instead if you are using PHP 8
103103

104104
Set/invalidate a tag::
105105

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ inconsistent caches.
8181

8282
**type**: ``string``
8383

84-
Json encoded servers array as string. The servers array has the same specs as ``http.servers``.
84+
JSON encoded servers array as string. The servers array has the same specs as ``http.servers``.
8585

8686
Use this option only when using a variable amount of proxy servers that shall be defined via
8787
environment variable. Otherwise use the regular ``http.servers`` option.
8888

8989
Usage:
90-
* fos_http_cache.yaml: ``servers_from_jsonenv: '%env(json:VARNISH_SERVERS)%'``
90+
* ``fos_http_cache.yaml``: ``servers_from_jsonenv: '%env(json:VARNISH_SERVERS)%'``
9191
* environment definition: ``VARNISH_SERVERS='["123.123.123.1:6060","123.123.123.2"]'``
9292

9393

Resources/doc/reference/configuration/tags.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ section of the tag configuration and ``@tag`` :ref:`annotations<tag>`.
6464
By default, the generated response header will not be split into multiple headers.
6565
This means that depending on the amount of tags generated in your application the
6666
value of that header might become pretty long. This again might cause issues with
67-
your webserver which usually come with a pre-defined maximum header value length and
68-
will throw an exception if you exceed this. Using this configuration key you can
67+
your web server, as it usually has a default maximum header length and will reject
68+
the request if the header exceeds this value. Using this configuration key, you can
6969
configure a maximum length **in bytes** which will split your value into multiple
70-
headers. Note that you might update your proxy configuration because it needs
71-
to be able to handle multiple headers instead of just one.
70+
headers. Note that you might have to update your proxy configuration because it
71+
needs to be able to handle multiple headers instead of just one.
7272

7373
.. code-block:: yaml
7474
@@ -79,7 +79,7 @@ to be able to handle multiple headers instead of just one.
7979
8080
.. note::
8181

82-
4096 bytes is generally a good choice because it seems like most webservers have
82+
4096 bytes is generally a good choice because it seems like most web servers have
8383
a maximum value of 4 KB configured.
8484

8585
``strict``

Resources/doc/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
sphinx==1.8.5
12
git+https://github.com/fabpot/sphinx-php.git
2-
sphinx_rtd_theme
3+
sphinx-rtd-theme
34
sphinxcontrib-spelling
45
sphinxcontrib-phpdomain
56
pyenchant

Resources/doc/spelling_word_list.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,18 @@ cacheable
88
ETag
99
friendsofsymfony
1010
github
11+
hardcoded
1112
hostname
1213
invalidations
1314
invalidator
1415
javascript
16+
JSON
1517
login
1618
logout
1719
lookup
1820
lookups
1921
matcher
22+
md
2023
mistyped
2124
multi
2225
nginx
@@ -31,5 +34,6 @@ symfony
3134
subdomains
3235
templating
3336
TTL
37+
vmod
3438
xkey
3539
yaml

tests/Functional/DependencyInjection/ServiceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ protected function bootDebugKernel()
3232
{
3333
static::ensureKernelShutdown();
3434

35-
/** @var \AppKernel $kernel */
3635
static::$kernel = static::createKernel();
36+
assert(static::$kernel instanceof \AppKernel);
3737
static::$kernel->addCompilerPass(new ServicesPublicPass());
3838
$fs = new Filesystem();
3939
$fs->remove(static::$kernel->getCacheDir());

0 commit comments

Comments
 (0)