Skip to content

Commit 0b04b43

Browse files
committed
fix references in rst + add some postBuild validation
1 parent f15f133 commit 0b04b43

File tree

8 files changed

+44
-19
lines changed

8 files changed

+44
-19
lines changed

_build/composer.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_build/notes.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,5 @@ Bugs in RST Parser
2929

3030
- problem using glob: listed files are added twice (https://github.com/doctrine/rst-parser/issues/18)
3131
- problem with absolute path in toc trees (https://github.com/doctrine/rst-parser/pull/23)
32-
- problem with `_build` directory indexed (test case to create)
3332
- problem with `:ref:`, `:doc:` and `*.rst.inc` which are loaded in parseQueue (problem evoked in https://github.com/doctrine/rst-parser/pull/23)
3433
- problem with `.. include::` which are SOMETIMES failing to load (dirty fix in `UrlGenerator::relativeUrl`)

_build/parse.php

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,33 @@
33
require __DIR__.'/vendor/autoload.php';
44

55
use Doctrine\RST\Builder;
6+
use Symfony\Component\Filesystem\Filesystem;
7+
use Symfony\Component\Finder\Finder;
68
use SymfonyDocs\HtmlKernel;
79

8-
$kernel = new HtmlKernel();
10+
$kernel = new HtmlKernel();
911
$builder = new Builder($kernel);
1012

13+
$fs = new Filesystem();
14+
$fs->remove(__DIR__.'/html');
15+
1116
$builder->build(
1217
__DIR__.'/..',
1318
__DIR__.'/html',
14-
false
19+
true
1520
);
21+
22+
$finder = new Finder();
23+
$finder->in(__DIR__.'/..')
24+
->exclude(['_build', '.github', '.platform', '_images'])
25+
->notName('*.rst.inc')
26+
->name('*.rst');
27+
28+
foreach ($finder as $file) {
29+
$htmlFile = str_replace(['/home/niko/works/symfony-docs', '.rst'], ['/home/niko/works/symfony-docs/_build/html', '.html'], $file->getRealPath());
30+
if (!file_exists($htmlFile)) {
31+
dump("missing file: ".$htmlFile);
32+
}
33+
}
34+
35+

_build/src/Nodes/CodeNode.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ class CodeNode extends Base
2828
'varnish4' => 'c',
2929
'varnish3' => 'c',
3030
'json' => 'json',
31+
'apache' => 'apache',
32+
'nginx' => 'nginx',
33+
'javascript' => 'javascript',
34+
'sql' => 'sql',
35+
'css' => 'css',
36+
'diff' => 'diff',
3137
];
3238

3339
private const CODE_BLOCK_TEMPLATE = <<< TEMPLATE

components/property_info.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ within that class.
1717
.. versionadded:: 2.8
1818
The PropertyInfo component was introduced in Symfony 2.8.
1919

20-
.. _`components-property-information-installation`:
20+
.. _components-property-information-installation:
2121

2222
Installation
2323
------------
@@ -33,7 +33,7 @@ Alternatively, you can clone the `<https://github.com/symfony/property-info>`_ r
3333
Additional dependencies may be required for some of the
3434
:ref:`extractors provided with this component <components-property-info-extractors>`.
3535

36-
.. _`components-property-information-usage`:
36+
.. _components-property-information-usage:
3737

3838
Usage
3939
-----
@@ -117,7 +117,7 @@ both provide list and type information it is probably better that:
117117
)
118118
);
119119
120-
.. _`components-property-information-extractable-information`:
120+
.. _components-property-information-extractable-information:
121121

122122
Extractable Information
123123
-----------------------
@@ -253,7 +253,7 @@ works.
253253
available on the main :class:`Symfony\\Component\\PropertyInfo\\PropertyInfoExtractor`
254254
class.
255255

256-
.. _`components-property-info-type`:
256+
.. _components-property-info-type:
257257

258258
Type Objects
259259
------------
@@ -277,7 +277,7 @@ class.
277277

278278
Each object will provide 6 attributes, available in the 6 methods:
279279

280-
.. _`components-property-info-type-builtin`:
280+
.. _components-property-info-type-builtin:
281281

282282
Type::getBuiltInType()
283283
~~~~~~~~~~~~~~~~~~~~~~
@@ -326,7 +326,7 @@ available), via the :method:`Type::getCollectionKeyType() <Symfony\\Component\\P
326326
and :method:`Type::getCollectionValueType() <Symfony\\Component\\PropertyInfo\\Type::getCollectionValueType>`
327327
methods.
328328

329-
.. _`components-property-info-extractors`:
329+
.. _components-property-info-extractors:
330330

331331
Extractors
332332
----------
@@ -339,7 +339,7 @@ The :class:`Symfony\\Component\\PropertyInfo\\PropertyInfoExtractor` will
339339
iterate over the relevant extractor classes in the order they were set, call
340340
the appropriate method and return the first result that is not ``null``.
341341

342-
.. _`components-property-information-extractors-available`:
342+
.. _components-property-information-extractors-available:
343343

344344
While you can create your own extractors, the following are already available
345345
to cover most use-cases:
@@ -461,7 +461,7 @@ with the ``property_info`` service in the Symfony Framework.
461461
// Type information.
462462
$doctrineExtractor->getTypes($class, $property);
463463
464-
.. _`components-property-information-extractors-creation`:
464+
.. _components-property-information-extractors-creation:
465465

466466
Creating Your Own Extractors
467467
----------------------------

http_cache.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ as `Varnish`_, `Squid in reverse proxy mode`_, and the Symfony reverse proxy.
6363
.. index::
6464
single: Cache; Symfony reverse proxy
6565

66-
.. _`symfony-gateway-cache`:
66+
.. _symfony-gateway-cache:
6767
.. _symfony2-reverse-proxy:
6868

6969
Symfony Reverse Proxy

reference/configuration/doctrine.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ directory outside of a bundle.
287287
single: Configuration; Doctrine DBAL
288288
single: Doctrine; DBAL configuration
289289

290-
.. _`reference-dbal-configuration`:
290+
.. _reference-dbal-configuration:
291291

292292
Custom Mapping Entities in a Bundle
293293
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

setup/upgrade_minor.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ There are two steps to upgrading a minor version:
1616
#. :ref:`Update the Symfony library via Composer <upgrade-minor-symfony-composer>`;
1717
#. :ref:`Update your code to work with the new version <upgrade-minor-symfony-code>`.
1818

19-
.. _`upgrade-minor-symfony-composer`:
19+
.. _upgrade-minor-symfony-composer:
2020

2121
1) Update the Symfony Library via Composer
2222
------------------------------------------
@@ -45,7 +45,7 @@ Next, use Composer to download new versions of the libraries:
4545

4646
.. include:: /setup/_update_all_packages.rst.inc
4747

48-
.. _`upgrade-minor-symfony-code`:
48+
.. _upgrade-minor-symfony-code:
4949

5050
2) Updating your Code to Work with the new Version
5151
--------------------------------------------------

0 commit comments

Comments
 (0)