Skip to content

Commit 43da950

Browse files
committed
add spell checking and fix spelling errors
1 parent 97a1b5e commit 43da950

24 files changed

+205
-144
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,13 @@ before_script:
4343
- bash -c 'FLAWED_DEPRECATIONS=`echo "${SYMFONY_VERSION:0:3} >= 2.7"|bc`; if [ "$FLAWED_DEPRECATIONS" = "1" ]; then echo "error_reporting = E_ALL & ~E_DEPRECATED" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; echo "PHPUnit_Framework_Error_Deprecated::\$enabled = false;" >> Tests/bootstrap.php; fi;'
4444
- sh -c 'if [ "$FRAMEWORK_EXTRA_VERSION" != "" ]; then composer require --dev --no-update sensio/framework-extra-bundle=$FRAMEWORK_EXTRA_VERSION; fi;'
4545
- composer install
46-
- sudo apt-get install python-sphinx
46+
- sudo apt-get install python-sphinx enchant
47+
- sudo pip install -r Resources/doc/requirements.txt
4748

4849
script:
4950
- phpunit --coverage-clover=coverage.clover
5051
- make -C Resources/doc SPHINXOPTS='-nW' html
52+
- make -C Resources/doc spelling
5153

5254
after_script:
5355
- wget https://scrutinizer-ci.com/ocular.phar

Resources/doc/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ help:
3737
@echo " changes to make an overview of all changed/added/deprecated items"
3838
@echo " linkcheck to check all external links for integrity"
3939
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
40+
@echo " spelling generate a spelling report"
4041

4142
clean:
4243
-rm -rf $(BUILDDIR)/*
@@ -151,3 +152,7 @@ doctest:
151152
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
152153
@echo "Testing of doctests in the sources finished, look at the " \
153154
"results in $(BUILDDIR)/doctest/output.txt."
155+
156+
spelling:
157+
$(SPHINXBUILD) -b spelling $(ALLSPHINXOPTS) $(BUILDDIR)/spelling
158+
@echo "Spelling report generated in $(BUILDDIR)/spelling/output.txt"

Resources/doc/conf.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,17 @@
2323

2424
# Add any Sphinx extension module names here, as strings. They can be extensions
2525
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
26-
extensions = ['sphinx.ext.intersphinx', 'sphinx.ext.coverage', 'sphinx.ext.todo']
26+
extensions = [
27+
'sphinx.ext.intersphinx',
28+
'sphinx.ext.coverage',
29+
'sphinx.ext.todo',
30+
'sensio.sphinx.configurationblock',
31+
'sphinxcontrib.spelling'
32+
]
33+
34+
# Spelling configuration
35+
spelling_lang='en_US'
36+
spelling_word_list_filename='spelling_word_list.txt'
2737

2838
# Add any paths that contain templates here, relative to this directory.
2939
templates_path = ['_templates']

Resources/doc/contributing.rst

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Contributing
2+
============
3+
4+
We are happy for contributions. Before you invest a lot of time however, best
5+
open an issue on github to discuss your idea. Then we can coordinate efforts
6+
if somebody is already working on the same thing. If your idea is specific to
7+
the Symfony framework, it belongs into the ``FOSHttpCacheBundle``, otherwise
8+
it should go into the ``FOSHttpCache`` library.
9+
10+
When you change code, you can run the tests as described in :doc:`testing`.
11+
12+
Building the Documentation
13+
--------------------------
14+
15+
First `install Sphinx`_ and `install enchant`_ (e.g. ``sudo apt-get install enchant``),
16+
then download the requirements:
17+
18+
.. code-block:: bash
19+
20+
$ pip install -r Resources/doc/requirements.txt
21+
22+
To build the docs:
23+
24+
.. code-block:: bash
25+
26+
$ cd doc
27+
$ make html
28+
$ make spelling
29+
30+
.. _install Sphinx: http://sphinx-doc.org/latest/install.html
31+
.. _install enchant: http://www.abisource.com/projects/enchant/

Resources/doc/features/invalidation.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
Invalidation
22
============
33

4-
**Works with**:
4+
**Works with**:
55

66
* :ref:`Varnish <foshttpcache:varnish configuration>`
77
* :ref:`Nginx <foshttpcache:nginx configuration>`
88

99
**Preparation**:
1010

11-
In order to invalidate cached objects, requests are sent to your caching proxy,
11+
In order to invalidate cached objects, requests are sent to your caching proxy,
1212
so first:
1313

14-
1. :ref:`configure your proxy <foshttpcache:proxy-configuration>`
14+
1. :ref:`configure your proxy <foshttpcache:proxy-configuration>`
1515
2. :doc:`enable a proxy client </reference/configuration/proxy-client>`
1616

1717
By *invalidating* a piece of content, you tell your HTTP caching proxy (Varnish
@@ -86,7 +86,7 @@ You can add invalidation rules to your application configuration:
8686
villain_details: ~ # e.g., /villain/{id}
8787
8888
Now when a request to either route ``villain_edit`` or route ``villain_delete``
89-
returns a succesful response, both routes ``vilains_index`` and
89+
returns a successful response, both routes ``villains_index`` and
9090
``villain_details`` will be purged. See the
9191
:doc:`/reference/configuration/invalidation` configuration reference.
9292

@@ -115,8 +115,8 @@ Console Commands
115115

116116
This bundle provides commands to trigger cache invalidation from the command
117117
line. You could also send invalidation requests with a command line tool like
118-
curl or, in the case of varnish, varnishadm. But the commands simplify the task
119-
and will automatically talk to all configured cache instances.
118+
``curl`` or, in the case of varnish, ``varnishadm``. But the commands simplify
119+
the task and will automatically talk to all configured cache instances.
120120

121121
* ``fos:httpcache:invalidate:path`` accepts one or more paths and invalidates
122122
each of them. See :ref:`cache manager invalidation`.

Resources/doc/features/symfony-http-cache.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ By default, the event dispatching cache kernel registers all subscribers it know
4242
about. You can disable subscribers, or customize how they are instantiated.
4343

4444
If you do not need all subscribers, or need to register some yourself to
45-
customize their behaviour, overwrite ``getOptions`` and return the right bitmap
45+
customize their behavior, overwrite ``getOptions`` and return the right bitmap
4646
in ``fos_default_subscribers``. Use the constants provided by the cache kernel::
4747

4848
public function getOptions()

Resources/doc/features/testing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Testing
66
* :ref:`Varnish <foshttpcache:varnish configuration>`
77
* :ref:`Nginx <foshttpcache:nginx configuration>`
88

9-
**Preparation**:
9+
**Preparation**:
1010

1111
1. :ref:`Configure caching proxy <foshttpcache:proxy-configuration>`
1212
2. Your application must be reachable from the caching proxy through HTTP, so you
@@ -49,7 +49,7 @@ Test Client
4949
^^^^^^^^^^^
5050

5151
The ``getResponse()`` method calls ``getHttpClient()`` to retrieve a test client. You
52-
can use this client yourself to customise the requests. Note that the test
52+
can use this client yourself to customize the requests. Note that the test
5353
client must be :doc:`enabled in your configuration </reference/configuration/test>`.
5454
By default, it is enabled when you access your application in debug mode and
5555
you have :doc:`configured a proxy client </reference/configuration/proxy-client>`

Resources/doc/includes/enabled.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
enabled
2-
-------
1+
``enabled``
2+
-----------
33

44
**type**: ``enum``, **default**: ``auto``, **options**: ``true``, ``false``, ``auto``
55

Resources/doc/includes/match.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
match
2-
^^^^^
1+
``match``
2+
^^^^^^^^^
33

44
**type**: ``array``
55

Resources/doc/index.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FOSHttpCacheBundle
44
This is the documentation for the `FOSHttpCacheBundle <https://github.com/FriendsOfSymfony/FOSHttpCacheBundle>`_.
55
Use the FOSHttpCacheBundle to:
66

7-
* Set path-based cache expiration headers via your app configuration;
7+
* Set path-based cache expiration headers via your application configuration;
88
* Set up an invalidation scheme without writing PHP code;
99
* Tag your responses and invalidate cache based on tags;
1010
* Send invalidation requests with minimal impact on performance with the FOSHttpCache_ library;
@@ -20,4 +20,6 @@ Contents
2020
overview
2121
features
2222
reference
23+
2324
testing
25+
contributing

Resources/doc/reference/annotations.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ actions are executed.
1313

1414
.. _invalidatepath:
1515

16-
@InvalidatePath
17-
---------------
16+
``@InvalidatePath``
17+
-------------------
1818

1919
Invalidate a path::
2020

@@ -32,8 +32,8 @@ See :doc:`/features/invalidation` for more information.
3232

3333
.. _invalidateroute:
3434

35-
@InvalidateRoute
36-
----------------
35+
``@InvalidateRoute``
36+
--------------------
3737

3838
Invalidate a route with parameters::
3939

@@ -66,8 +66,8 @@ See :doc:`/features/invalidation` for more information.
6666

6767
.. _tag:
6868

69-
@Tag
70-
----
69+
``@Tag``
70+
--------
7171

7272
You can make this bundle tag your response automatically using the ``@Tag``
7373
annotation. :term:`Safe <safe>` operations like GET that produce a successful

Resources/doc/reference/cache-manager.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ By *refreshing* a piece of content, a fresh copy will be fetched right away.
1717

1818
.. _cache manager invalidation:
1919

20-
invalidatePath
21-
--------------
20+
``invalidatePath()``
21+
------------------
2222

2323
.. important::
2424

@@ -58,8 +58,8 @@ The cache manager offers a fluent interface::
5858

5959
.. _cache manager refreshing:
6060

61-
Refreshing
62-
----------
61+
``refreshPath()`` and ``refreshRoute()``
62+
----------------------------------------
6363

6464
.. note::
6565

@@ -82,8 +82,8 @@ Refresh a Route::
8282

8383
.. _cache_manager_tags:
8484

85-
tagResponse()
86-
-------------
85+
``tagResponse()``
86+
-----------------
8787

8888
Use the Cache Manager to tag responses::
8989

@@ -95,17 +95,17 @@ option to true::
9595

9696
$cacheManager->tagResponse($response, array('different'), true);
9797

98-
invalidateTags()
99-
----------------
98+
``invalidateTags()``
99+
--------------------
100100

101101
Invalidate cache tags::
102102

103103
$cacheManager->invalidateTags(array('some-tag', 'other-tag'));
104104

105105
.. _flushing:
106106

107-
Flushing
108-
--------
107+
``flush()``
108+
-----------
109109

110110
Internally, the invalidation requests are queued and only sent out to your HTTP
111111
proxy when the manager is flushed. The manager is flushed automatically at the

Resources/doc/reference/configuration/cache-manager.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ by default if a :doc:`Proxy Client <proxy-client>` is configured.
1212
enabled: true
1313
generate_url_type: true
1414
15-
enabled
16-
-------
15+
``enabled``
16+
-----------
1717

1818
**type**: ``enum`` **options**: ``auto``, ``true``, ``false``
1919

2020
Whether the cache manager service should be enabled. By default, it is enabled
2121
if a proxy client is configured. It can not be enabled without a proxy client.
2222

23-
generate_url_type
24-
-----------------
23+
``generate_url_type``
24+
---------------------
2525

2626
**type**: ``enum`` **options**: ``auto``, ``true``, ``false``, ``relative``, ``network``
2727

28-
The ``$referenceType`` to be used when generating URLs in the invalidateRoute and
29-
refreshRoute calls. True results in absolute URLs including the current domain,
28+
The ``$referenceType`` to be used when generating URLs in the ``invalidateRoute()``
29+
and ``refreshRoute()`` calls. True results in absolute URLs including the current domain,
3030
``false`` generates a path without domain, needing a ``base_url`` to be configured
3131
on the proxy client. When set to ``auto``, the value is determined based on ``base_url``
3232
of the default proxy client.

Resources/doc/reference/configuration/debug.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ debug information when that header is present:
1515
enabled: true
1616
header: Please-Send-Debug-Infos
1717
18-
enabled
19-
-------
18+
``enabled``
19+
-----------
2020

2121
**type**: ``enum`` **default**: ``auto`` **options**: ``true``, ``false``, ``auto``
2222

2323
The default value is ``%kernel.debug%``, triggering the header when you are in
24-
dev mode but not in prod mode.
24+
``dev`` mode but not in prod mode.
2525

26-
header
27-
------
26+
``header``
27+
----------
2828

2929
**type**: ``string`` **default**: ``X-Cache-Debug``
3030

Resources/doc/reference/configuration/flash-message.rst

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,38 +16,37 @@ another building brick for caching pages for logged in users.
1616
host: null
1717
secure: false
1818
19-
enabled
20-
-------
19+
``enabled``
20+
-----------
2121

2222
**type**: ``boolean`` **default**: ``false``
2323

2424
This event subscriber is disabled by default. You can set enabled to true if
2525
the default values for all options are good for you. When you configure any of
2626
the options, the subscriber is automatically enabled.
2727

28-
name
29-
----
28+
``name``
29+
--------
3030

3131
**type**: ``string`` **default**: ``flashes``
3232
Set the name of the cookie.
3333

34-
35-
path
36-
----
34+
``path``
35+
--------
3736

3837
**type**: ``string`` **default**: ``/``
3938

4039
The cookie path to use.
4140

42-
host
43-
----
41+
``host``
42+
--------
4443

4544
**type**: ``string``
4645

4746
Set the host for the cookie, e.g. to share among subdomains.
4847

49-
secure
50-
------
48+
``secure``
49+
----------
5150

5251
**type**: ``boolean`` **default**: ``false``
5352

0 commit comments

Comments
 (0)