Skip to content

Commit

Permalink
Merge branch '7.1' into 7.2
Browse files Browse the repository at this point in the history
* 7.1:
  [#19940] Use specialized directive
  Add more necessary information
  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
  • Loading branch information
OskarStark committed Dec 7, 2024
2 parents 719ea94 + afe6504 commit 47a7aeb
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 4 deletions.
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
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
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 47a7aeb

Please sign in to comment.