Merge branch '6.4' into 7.2

* 6.4:
  Highligh 'extensions' instead of 'mimeTypes' for File constraint
  Update messenger.rst
  [Doctrine] Remove redundant example with attribute
  Changed text to mention one Product object instead of many
  [WebLink] Hint that prerender is deprecated
This commit is contained in:
Christian Flothmann
2025-05-18 13:08:34 +02:00
5 changed files with 7 additions and 25 deletions

View File

@@ -77,11 +77,8 @@ so Symfony doesn't try to get/set its value from the related entity::
'constraints' => [
new File([
'maxSize' => '1024k',
'mimeTypes' => [
'application/pdf',
'application/x-pdf',
],
'mimeTypesMessage' => 'Please upload a valid PDF document',
'extensions' => ['pdf'],
'extensionsMessage' => 'Please upload a valid PDF document',
])
],
])

View File

@@ -501,7 +501,7 @@ following method to the ``ProductRepository`` class::
}
}
This will *still* return an array of ``Product`` objects. But now, when you call
This will *still* return a ``Product`` object. But now, when you call
``$product->getCategory()`` and use that data, no second query is made.
Now, you can use this method in your controller to query for a ``Product``

View File

@@ -304,23 +304,6 @@ listener in the Symfony application by creating a new service for it and
.. configuration-block::
.. code-block:: php-attributes
// src/EventListener/SearchIndexer.php
namespace App\EventListener;
use Doctrine\Bundle\DoctrineBundle\Attribute\AsDoctrineListener;
use Doctrine\ORM\Event\PostPersistEventArgs;
#[AsDoctrineListener('postPersist'/*, 500, 'default'*/)]
class SearchIndexer
{
public function postPersist(PostPersistEventArgs $event): void
{
// ...
}
}
.. code-block:: yaml
# config/services.yaml

View File

@@ -1447,7 +1447,7 @@ RabbitMQ. Install it by running:
$ composer require symfony/amqp-messenger
The AMQP transport DSN may looks like this:
The AMQP transport DSN may look like this:
.. code-block:: env

View File

@@ -146,7 +146,8 @@ The WebLink component provides the following Twig functions to send those hints:
* ``prefetch()``: "identifies a resource that might be required by the next
navigation, and that the user agent *should* fetch, such that the user agent
can deliver a faster response once the resource is requested in the future".
* ``prerender()``: "identifies a resource that might be required by the next
* ``prerender()``: " **deprecated** and superseded by the `Speculation Rules API`_,
identifies a resource that might be required by the next
navigation, and that the user agent *should* fetch and execute, such that the
user agent can deliver a faster response once the resource is requested later".
@@ -206,3 +207,4 @@ You can also add links to the HTTP response directly from controllers and servic
.. _`Akamai`: https://http2.akamai.com/
.. _`link defined in the HTML specification`: https://html.spec.whatwg.org/dev/links.html#linkTypes
.. _`PSR-13`: https://www.php-fig.org/psr/psr-13/
.. _`Speculation Rules API`: https://developer.mozilla.org/docs/Web/API/Speculation_Rules_API