File tree 5 files changed +7
-25
lines changed
5 files changed +7
-25
lines changed Original file line number Diff line number Diff line change @@ -77,11 +77,8 @@ so Symfony doesn't try to get/set its value from the related entity::
77
77
'constraints' => [
78
78
new File(
79
79
maxSize: '1024k',
80
- mimeTypes: [
81
- 'application/pdf',
82
- 'application/x-pdf',
83
- ],
84
- mimeTypesMessage: 'Please upload a valid PDF document',
80
+ extensions: ['pdf'],
81
+ extensionsMessage: 'Please upload a valid PDF document',
85
82
)
86
83
],
87
84
])
Original file line number Diff line number Diff line change @@ -501,7 +501,7 @@ following method to the ``ProductRepository`` class::
501
501
}
502
502
}
503
503
504
- This will *still * return an array of ``Product `` objects . But now, when you call
504
+ This will *still * return a ``Product `` object . But now, when you call
505
505
``$product->getCategory() `` and use that data, no second query is made.
506
506
507
507
Now, you can use this method in your controller to query for a ``Product ``
Original file line number Diff line number Diff line change @@ -304,23 +304,6 @@ listener in the Symfony application by creating a new service for it and
304
304
305
305
.. configuration-block ::
306
306
307
- .. code-block :: php-attributes
308
-
309
- // src/EventListener/SearchIndexer.php
310
- namespace App\EventListener;
311
-
312
- use Doctrine\Bundle\DoctrineBundle\Attribute\AsDoctrineListener;
313
- use Doctrine\ORM\Event\PostPersistEventArgs;
314
-
315
- #[AsDoctrineListener('postPersist'/*, 500, 'default'*/)]
316
- class SearchIndexer
317
- {
318
- public function postPersist(PostPersistEventArgs $event): void
319
- {
320
- // ...
321
- }
322
- }
323
-
324
307
.. code-block :: yaml
325
308
326
309
# config/services.yaml
Original file line number Diff line number Diff line change @@ -1504,7 +1504,7 @@ RabbitMQ. Install it by running:
1504
1504
1505
1505
$ composer require symfony/amqp-messenger
1506
1506
1507
- The AMQP transport DSN may looks like this:
1507
+ The AMQP transport DSN may look like this:
1508
1508
1509
1509
.. code-block :: env
1510
1510
Original file line number Diff line number Diff line change @@ -146,7 +146,8 @@ The WebLink component provides the following Twig functions to send those hints:
146
146
* ``prefetch() ``: "identifies a resource that might be required by the next
147
147
navigation, and that the user agent *should * fetch, such that the user agent
148
148
can deliver a faster response once the resource is requested in the future".
149
- * ``prerender() ``: "identifies a resource that might be required by the next
149
+ * ``prerender() ``: " **deprecated ** and superseded by the `Speculation Rules API `_,
150
+ identifies a resource that might be required by the next
150
151
navigation, and that the user agent *should * fetch and execute, such that the
151
152
user agent can deliver a faster response once the resource is requested later".
152
153
@@ -206,3 +207,4 @@ You can also add links to the HTTP response directly from controllers and servic
206
207
.. _`Akamai` : https://http2.akamai.com/
207
208
.. _`link defined in the HTML specification` : https://html.spec.whatwg.org/dev/links.html#linkTypes
208
209
.. _`PSR-13` : https://www.php-fig.org/psr/psr-13/
210
+ .. _`Speculation Rules API` : https://developer.mozilla.org/docs/Web/API/Speculation_Rules_API
You can’t perform that action at this time.
0 commit comments