Skip to content

Commit c7cd767

Browse files
committed
Merge branch '7.4' into 8.0
* 7.4: Update DOCtor-RST and enable new rules
2 parents ca29a3f + 5ce06d0 commit c7cd767

File tree

12 files changed

+33
-20
lines changed

12 files changed

+33
-20
lines changed

.doctor-rst.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,17 @@ rules:
2121
ensure_order_of_code_blocks_in_configuration_block: ~
2222
ensure_php_reference_syntax: ~
2323
extend_abstract_controller: ~
24+
filepath_and_namespace_should_match:
25+
namespace_mapping:
26+
'src/': 'App\'
27+
'tests/': 'App\Tests\'
28+
ignored_namespaces:
29+
- '/^Acme/'
30+
- '/^Shared/'
31+
ignored_paths:
32+
- '/^config\//'
33+
- '/^example\.com\//'
34+
- '/^apps\/api\/tests\//'
2435
# extension_xlf_instead_of_xliff: ~
2536
forbidden_directives:
2637
directives:
@@ -43,12 +54,14 @@ rules:
4354
no_composer_req: ~
4455
no_directive_after_shorthand: ~
4556
no_duplicate_use_statements: ~
57+
no_empty_directive: ~
4658
no_empty_literals: ~
4759
no_explicit_use_of_code_block_php: ~
4860
no_footnotes: ~
4961
no_inheritdoc: ~
5062
no_merge_conflict: ~
5163
no_namespace_after_use_statements: ~
64+
no_non_breaking_space: ~
5265
no_php_open_tag_in_code_block_php_directive: ~
5366
no_space_before_self_xml_closing_tag: ~
5467
no_typographic_quotes: ~

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
key: ${{ runner.os }}-doctor-rst-${{ steps.extract_base_branch.outputs.branch }}
7373

7474
- name: "Run DOCtor-RST"
75-
uses: docker://oskarstark/doctor-rst:1.73.0
75+
uses: docker://oskarstark/doctor-rst:1.76.0
7676
with:
7777
args: --short --error-format=github --cache-file=/github/workspace/.cache/doctor-rst.cache
7878

bundles/prepend_extension.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ on another bundle being loaded as well.
2020
To give an Extension the power to do this, it needs to implement
2121
:class:`Symfony\\Component\\DependencyInjection\\Extension\\PrependExtensionInterface`::
2222

23-
// src/Acme/HelloBundle/DependencyInjection/AcmeHelloExtension.php
23+
// src/DependencyInjection/AcmeHelloExtension.php
2424
namespace Acme\HelloBundle\DependencyInjection;
2525

2626
use Symfony\Component\DependencyInjection\ContainerBuilder;

components/phpunit_bridge.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,12 @@ a directory containing multiple test suites with their own ``phpunit.xml.dist``.
138138
.. code-block:: terminal
139139
140140
├── tests/
141-
   ├── Functional/
142-
   │   ├── ...
143-
   │   └── phpunit.xml.dist
144-
   ├── Unit/
145-
   │   ├── ...
146-
   │   └── phpunit.xml.dist
141+
├── Functional/
142+
├── ...
143+
└── phpunit.xml.dist
144+
├── Unit/
145+
├── ...
146+
└── phpunit.xml.dist
147147
148148
.. code-block:: terminal
149149

console/style.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ your commands. Thanks to the ``StyleInterface`` you won't need to change the cod
483483
of your commands to change their appearance::
484484

485485
// src/Command/MyCommand.php
486-
namespace App\Console;
486+
namespace App\Command;
487487

488488
use App\Console\CustomStyle;
489489
use Symfony\Component\Console\Command\Command;

contributing/documentation/standards.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Example
101101
.. code-block:: php
102102
103103
// src/Foo/Bar.php
104-
namespace Foo;
104+
namespace App\Foo;
105105
106106
use Acme\Demo\Cat;
107107
// ...

mercure.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ During unit testing it's usually not needed to send updates to Mercure.
597597

598598
You can instead make use of the ``MockHub`` class::
599599

600-
// tests/FunctionalTest.php
600+
// tests/Unit/Controller/FunctionalTest.php
601601
namespace App\Tests\Unit\Controller;
602602

603603
use App\Controller\MessageController;

reference/constraints/Choice.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ If your valid choice list is simple, you can pass them in directly via the
8686
8787
.. code-block:: php
8888
89-
// src/EntityAuthor.php
89+
// src/Entity/Author.php
9090
namespace App\Entity;
9191
9292
use Symfony\Component\Validator\Constraints as Assert;
@@ -173,7 +173,7 @@ constraint.
173173
174174
.. code-block:: php
175175
176-
// src/EntityAuthor.php
176+
// src/Entity/Author.php
177177
namespace App\Entity;
178178
179179
use Symfony\Component\Validator\Constraints as Assert;

reference/constraints/Compound.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ You can now use it anywhere you need it:
5353
.. code-block:: php-attributes
5454
5555
// src/Entity/User.php
56-
namespace App\Entity\User;
56+
namespace App\Entity;
5757
5858
use App\Validator\Constraints as Assert;
5959
@@ -89,7 +89,7 @@ You can now use it anywhere you need it:
8989
.. code-block:: php
9090
9191
// src/Entity/User.php
92-
namespace App\Entity\User;
92+
namespace App\Entity;
9393
9494
use App\Validator\Constraints as Assert;
9595
use Symfony\Component\Validator\Mapping\ClassMetadata;

security.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1571,7 +1571,7 @@ You can logout user programmatically using the ``logout()`` method of the
15711571
:class:`Symfony\\Bundle\\SecurityBundle\\Security` helper::
15721572

15731573
// src/Controller/SecurityController.php
1574-
namespace App\Controller\SecurityController;
1574+
namespace App\Controller;
15751575

15761576
use Symfony\Bundle\SecurityBundle\Security;
15771577

0 commit comments

Comments
 (0)