@@ -1420,7 +1420,7 @@ You also have a service that defines many methods and one of them is the same
1420
1420
{
1421
1421
// other methods...
1422
1422
1423
- public function format($ string $message, array $parameters): string
1423
+ public function format(string $message, array $parameters): string
1424
1424
{
1425
1425
// ...
1426
1426
}
@@ -1438,7 +1438,7 @@ Thanks to the ``#[AutowireCallable]`` attribute, you can now inject this
1438
1438
class Mailer
1439
1439
{
1440
1440
public function __construct(
1441
- #[AutowireCallable(service: MessageUtils::class, method: 'formatMessage ')]
1441
+ #[AutowireCallable(service: MessageUtils::class, method: 'format ')]
1442
1442
private MessageFormatterInterface $formatter
1443
1443
) {
1444
1444
}
@@ -1470,7 +1470,7 @@ an adapter for a functional interface through configuration:
1470
1470
1471
1471
app.message_formatter :
1472
1472
class : App\Service\MessageFormatterInterface
1473
- from_callable : [!service {class: 'App\Service\MessageUtils'}, 'formatMessage ']
1473
+ from_callable : [!service {class: 'App\Service\MessageUtils'}, 'format ']
1474
1474
1475
1475
.. code-block :: xml
1476
1476
@@ -1485,7 +1485,7 @@ an adapter for a functional interface through configuration:
1485
1485
<!-- ... -->
1486
1486
1487
1487
<service id =" app.message_formatter" class =" App\Service\MessageFormatterInterface" >
1488
- <from-callable method =" formatMessage " >
1488
+ <from-callable method =" format " >
1489
1489
<service class =" App\Service\MessageUtils" />
1490
1490
</from-callable >
1491
1491
</service >
@@ -1506,7 +1506,7 @@ an adapter for a functional interface through configuration:
1506
1506
1507
1507
$container
1508
1508
->set('app.message_formatter', MessageFormatterInterface::class)
1509
- ->fromCallable([inline_service(MessageUtils::class), 'formatMessage '])
1509
+ ->fromCallable([inline_service(MessageUtils::class), 'format '])
1510
1510
->alias(MessageFormatterInterface::class, 'app.message_formatter')
1511
1511
;
1512
1512
};
0 commit comments