Skip to content

Commit

Permalink
Merge branch '7.2' into 7.3
Browse files Browse the repository at this point in the history
* 7.2:
  Add missing argument
  Added replacement suggestions for forbidden directives
  [#19940] Use specialized directive
  Add more necessary information
  Remove obsolete whitelist entry
  Update calling_commands.rst - call the command non interactively
  [HttpFoundation] Update http response test constraint signature
  add symfonycasts links in frontend doc
  [Serializer] Add class/format/context to NameConverterInterface
  [Mesenger] Mention that some option doesn't have docs
  • Loading branch information
javiereguiluz committed Dec 9, 2024
2 parents 58e825a + effd9bd commit e8094bb
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .doctor-rst.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ rules:
forbidden_directives:
directives:
- '.. index::'
- '.. caution::'
- directive: '.. caution::'
replacements: ['.. warning::', '.. danger::']
indention: ~
lowercase_as_in_use_statements: ~
max_blank_lines:
Expand Down Expand Up @@ -101,7 +102,6 @@ whitelist:
- '#. The most important config file is ``app/config/services.yml``, which now is'
- 'The bin/console Command'
- '.. _`LDAP injection`: http://projects.webappsec.org/w/page/13246947/LDAP%20Injection'
- '.. versionadded:: 2.7.2' # Doctrine
- '.. versionadded:: 2.8.0' # Doctrine
- '.. versionadded:: 1.9.0' # Encore
- '.. versionadded:: 1.18' # Flex in setup/upgrade_minor.rst
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
key: ${{ runner.os }}-doctor-rst-${{ steps.extract_base_branch.outputs.branch }}

- name: "Run DOCtor-RST"
uses: docker://oskarstark/doctor-rst:1.63.0
uses: docker://oskarstark/doctor-rst:1.64.0
with:
args: --short --error-format=github --cache-file=/github/workspace/.cache/doctor-rst.cache

Expand Down
3 changes: 3 additions & 0 deletions console/calling_commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ method)::
'--yell' => true,
]);

// disable interactive behavior for the greet command
$greetInput->setInteractive(false);

$returnCode = $this->getApplication()->doRun($greetInput, $output);

// ...
Expand Down
10 changes: 10 additions & 0 deletions frontend.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ be executed by a browser.
AssetMapper (Recommended)
~~~~~~~~~~~~~~~~~~~~~~~~~

.. screencast::

Do you prefer video tutorials? Check out the `AssetMapper screencast series`_.

AssetMapper is the recommended system for handling your assets. It runs entirely
in PHP with no complex build step or dependencies. It does this by leveraging
the ``importmap`` feature of your browser, which is available in all browsers thanks
Expand Down Expand Up @@ -118,6 +122,10 @@ the `StimulusBundle Documentation`_
Using a Front-end Framework (React, Vue, Svelte, etc)
-----------------------------------------------------

.. screencast::

Do you prefer video tutorials? Check out the `API Platform screencast series`_.

If you want to use a front-end framework (Next.js, React, Vue, Svelte, etc),
we recommend using their native tools and using Symfony as a pure API. A wonderful
tool to do that is `API Platform`_. Their standard distribution comes with a
Expand All @@ -143,3 +151,5 @@ Other Front-End Articles
.. _`Symfony UX`: https://ux.symfony.com
.. _`API Platform`: https://api-platform.com/
.. _`SensioLabs Minify Bundle`: https://github.com/sensiolabs/minify-bundle
.. _`AssetMapper screencast series`: https://symfonycasts.com/screencast/asset-mapper
.. _`API Platform screencast series`: https://symfonycasts.com/screencast/api-platform
2 changes: 1 addition & 1 deletion messenger.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1522,7 +1522,7 @@ The transport has a number of options:
(no description available)

``sasl_method``

(no description available)

``connection_name``
For custom connection names (requires at least version 1.10 of the PHP AMQP
Expand Down
4 changes: 4 additions & 0 deletions reference/forms/types/time.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ values for the hour, minute and second fields::
],
]);

.. seealso::

See the `with_seconds`_ option on how to enable seconds in the form type.

.. include:: /reference/forms/types/options/hours.rst.inc

.. include:: /reference/forms/types/options/html5.rst.inc
Expand Down
2 changes: 1 addition & 1 deletion serializer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1803,7 +1803,7 @@ property. This can be used instead of
},
],
];
$jsonContent = $serializer->serialize($person, 'json');
$jsonContent = $serializer->serialize($person, 'json', $context);
// $jsonContent contains {"name":"cordoval","age":34,"createdAt":"2014-03-22T09:43:12-0500"}

Advanced Deserialization
Expand Down
13 changes: 13 additions & 0 deletions serializer/custom_name_converter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,19 @@ A custom name converter can handle such cases::
}
}

.. versionadded:: 7.1

Accessing the current class name, format and context via
:method:`Symfony\\Component\\Serializer\\NameConverter\\NameConverterInterface::normalize`
and :method:`Symfony\\Component\\Serializer\\NameConverter\\NameConverterInterface::denormalize`
was introduced in Symfony 7.1.

.. note::

You can also implement
:class:`Symfony\\Component\\Serializer\\NameConverter\\AdvancedNameConverterInterface`
to access the current class name, format and context.

Then, configure the serializer to use your name converter:

.. configuration-block::
Expand Down
12 changes: 8 additions & 4 deletions testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -961,11 +961,11 @@ However, Symfony provides useful shortcut methods for the most common cases:
Response Assertions
...................

``assertResponseIsSuccessful(string $message = '')``
``assertResponseIsSuccessful(string $message = '', bool $verbose = true)``
Asserts that the response was successful (HTTP status is 2xx).
``assertResponseStatusCodeSame(int $expectedCode, string $message = '')``
``assertResponseStatusCodeSame(int $expectedCode, string $message = '', bool $verbose = true)``
Asserts a specific HTTP status code.
``assertResponseRedirects(?string $expectedLocation = null, ?int $expectedCode = null, string $message = '')``
``assertResponseRedirects(?string $expectedLocation = null, ?int $expectedCode = null, string $message = '', bool $verbose = true)``
Asserts the response is a redirect response (optionally, you can check
the target location and status code). The excepted location can be either
an absolute or a relative path.
Expand All @@ -983,9 +983,13 @@ Response Assertions
Asserts the response format returned by the
:method:`Symfony\\Component\\HttpFoundation\\Response::getFormat` method
is the same as the expected value.
``assertResponseIsUnprocessable(string $message = '')``
``assertResponseIsUnprocessable(string $message = '', bool $verbose = true)``
Asserts the response is unprocessable (HTTP status is 422)

.. versionadded:: 7.1

The ``$verbose`` parameters were introduced in Symfony 7.1.

Request Assertions
..................

Expand Down

0 comments on commit e8094bb

Please sign in to comment.