Skip to content

Commit 2584959

Browse files
committed
Merge branch '4.3' into 4.4
* 4.3: Tweaks #11274 initial DOCtor-RST setup. [#12191] Fixed another wrong namespace Fixed namespace in example fix a little code example issue Remove unused link Adding missing semi colons Fix Description of PHPUnitBridge Fix variable name
2 parents efa57c2 + 3bc7821 commit 2584959

File tree

8 files changed

+102
-9
lines changed

8 files changed

+102
-9
lines changed

.doctor-rst.yaml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
rules:
2+
no_inheritdoc: ~
3+
avoid_repetetive_words: ~
4+
blank_line_after_directive: ~
5+
short_array_syntax: ~
6+
no_app_console: ~
7+
typo: ~
8+
replacement: ~
9+
composer_dev_option_not_at_the_end: ~
10+
yarn_dev_option_at_the_end: ~
11+
versionadded_directive_should_have_version: ~
12+
deprecated_directive_should_have_version: ~
13+
no_composer_req: ~
14+
no_php_open_tag_in_code_block_php_directive: ~
15+
no_blank_line_after_filepath_in_php_code_block: ~
16+
no_blank_line_after_filepath_in_yaml_code_block: ~
17+
no_blank_line_after_filepath_in_xml_code_block: ~
18+
no_blank_line_after_filepath_in_twig_code_block: ~
19+
php_prefix_before_bin_console: ~
20+
use_deprecated_directive_instead_of_versionadded: ~
21+
no_space_before_self_xml_closing_tag: ~
22+
no_explicit_use_of_code_block_php: ~
23+
ensure_order_of_code_blocks_in_configuration_block: ~
24+
american_english: ~
25+
valid_use_statements: ~
26+
lowercase_as_in_use_statements: ~
27+
ordered_use_statements: ~
28+
no_namespace_after_use_statements: ~
29+
correct_code_block_directive_based_on_the_content: ~
30+
max_blank_lines:
31+
max: 2
32+
replace_code_block_types: ~
33+
use_https_xsd_urls: ~
34+
blank_line_before_directive: ~
35+
extension_xlf_instead_of_xliff: ~
36+
valid_inline_highlighted_namespaces: ~
37+
indention: ~
38+
unused_links: ~
39+
yaml_instead_of_yml_suffix: ~
40+
extend_abstract_controller: ~
41+
# no_app_bundle: ~
42+
43+
# 4.x
44+
versionadded_directive_major_version:
45+
major_version: 4
46+
47+
versionadded_directive_min_version:
48+
min_version: '4.0'
49+
50+
deprecated_directive_major_version:
51+
major_version: 4
52+
53+
deprecated_directive_min_version:
54+
min_version: '4.0'
55+
56+
# do not report as violation
57+
whitelist:
58+
regex:
59+
- '/FOSUserBundle(.*)\.yml/'
60+
- '/``.yml``/'
61+
- '/(.*)\.orm\.yml/' # currently DoctrineBundle only supports .yml
62+
lines:
63+
- 'in config files, so the old ``app/config/config_dev.yml`` goes to'
64+
- '#. The most important config file is ``app/config/services.yml``, which now is'
65+
- 'code in production without a proxy, it becomes trivially easy to abuse your'
66+
- '.. _`EasyDeployBundle`: https://github.com/EasyCorp/easy-deploy-bundle'
67+
- 'The bin/console Command'
68+
- '# username is your full Gmail or Google Apps email address'
69+
- '.. _`LDAP injection`: http://projects.webappsec.org/w/page/13246947/LDAP%20Injection'
70+
- '.. versionadded:: 0.21.0' # Encore
71+
- '.. versionadded:: 2.4.0' # SwiftMailer
72+
- '.. versionadded:: 1.26' # Twig
73+
- '.. versionadded:: 1.30' # Twig
74+
- '.. versionadded:: 1.2' # MakerBundle
75+
- '.. versionadded:: 1.11' # MakerBundle
76+
- '.. versionadded:: 1.3' # MakerBundle
77+
- '.. versionadded:: 1.8' # MakerBundle
78+
- '0 => 123' # assertion for var_dumper - components/var_dumper.rst
79+
- '1 => "foo"' # assertion for var_dumper - components/var_dumper.rst
80+
- '$var .= "Because of this `\xE9` octet (\\xE9),\n";'
81+
- "`Deploying Symfony 4 Apps on Heroku`_."
82+
- ".. _`Deploying Symfony 4 Apps on Heroku`: https://devcenter.heroku.com/articles/deploying-symfony4"

.github/workflows/lint.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
on: push
2+
name: Lint
3+
jobs:
4+
doctor-rst:
5+
name: DOCtor-RST
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@master
9+
- name: DOCtor-RST
10+
uses: docker://oskarstark/doctor-rst
11+
with:
12+
args: --short

cache.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,13 +449,13 @@ the same key could be invalidate with one function call::
449449
use Symfony\Contracts\Cache\ItemInterface;
450450

451451
$value0 = $pool->get('item_0', function (ItemInterface $item) {
452-
$item->tag(['foo', 'bar'])
452+
$item->tag(['foo', 'bar']);
453453

454454
return 'debug';
455455
});
456456

457457
$value1 = $pool->get('item_1', function (ItemInterface $item) {
458-
$item->tag('foo')
458+
$item->tag('foo');
459459

460460
return 'debug';
461461
});

components/phpunit_bridge.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ not find the SUT:
882882
</listener>
883883
</listeners>
884884
885-
.. _PHPUnit: https://phpunit.de
885+
.. _`PHPUnit`: https://phpunit.de
886886
.. _`PHPUnit event listener`: https://phpunit.de/manual/current/en/extending-phpunit.html#extending-phpunit.PHPUnit_Framework_TestListener
887887
.. _`PHPUnit's assertStringMatchesFormat()`: https://phpunit.de/manual/current/en/appendixes.assertions.html#appendixes.assertions.assertStringMatchesFormat
888888
.. _`PHP error handler`: https://php.net/manual/en/book.errorfunc.php

components/serializer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ When serializing, you can set a callback to format a specific object property::
655655
$encoder = new JsonEncoder();
656656

657657
// all callback parameters are optional (you can omit the ones you don't use)
658-
$callback = function ($innerObject, $outerObject, string $attributeName, string $format = null, array $context = []) {
658+
$dateCallback = function ($innerObject, $outerObject, string $attributeName, string $format = null, array $context = []) {
659659
return $innerObject instanceof \DateTime ? $innerObject->format(\DateTime::ISO8601) : '';
660660
};
661661

deployment/proxies.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,4 @@ In this case, you'll need to set the header ``X-Forwarded-Proto`` with the value
9393
$response = $kernel->handle($request);
9494

9595
.. _`security groups`: http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-security-groups.html
96-
.. _`RFC 7239`: http://tools.ietf.org/html/rfc7239
9796
.. _`CloudFront`: https://en.wikipedia.org/wiki/Amazon_CloudFront

forms.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ extend from :class:`Symfony\\Component\\Form\\AbstractType`, which already
168168
implements the interface and provides some utilities::
169169

170170
// src/Form/Type/TaskType.php
171-
namespace App\Form;
171+
namespace App\Form\Type;
172172

173173
use Symfony\Component\Form\AbstractType;
174174
use Symfony\Component\Form\Extension\Core\Type\DateType;
@@ -731,7 +731,7 @@ When building the form, omit the second argument to the ``add()`` method, or
731731
pass ``null`` to it, to enable Symfony's "guessing mechanism"::
732732

733733
// src/Form/Type/TaskType.php
734-
namespace App\Form;
734+
namespace App\Form\Type;
735735

736736
use Symfony\Component\Form\AbstractType;
737737
use Symfony\Component\Form\Extension\Core\Type\DateType;

routing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,8 +1243,8 @@ to get the request and its attributes:
12431243

12441244
.. code-block:: twig
12451245
1246-
{% set route_name = app.request.attributes('_route') %}
1247-
{% set route_parameters = app.request.attributes('_route_params') %}
1246+
{% set route_name = app.request.attributes.get('_route') %}
1247+
{% set route_parameters = app.request.attributes.get('_route_params') %}
12481248
12491249
{# use this to get all the available attributes (not only routing ones) #}
12501250
{% set all_attributes = app.request.attributes.all %}

0 commit comments

Comments
 (0)