Skip to content

Update service_container.rst #18790

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions service_container.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1420,7 +1420,7 @@ You also have a service that defines many methods and one of them is the same
{
// other methods...

public function format($string $message, array $parameters): string
public function formatMessage($string $message, array $parameters): string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm missing something, but the method is called format() in the interface. So, the current text looks good to me. Could you please elaborate about why should we change this? Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I have noticed also something wrong in the docs. I would rather to change the name of the function in the parameter of the AutowireCallable than the name of the function in the class MessageUtils (and therefore in the interface).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, I have done the changes in this PR : #19076

{
// ...
}
Expand Down Expand Up @@ -1514,7 +1514,7 @@ an adapter for a functional interface through configuration:
By doing so, Symfony will generate a class (also called an *adapter*)
implementing ``MessageFormatterInterface`` that will forward calls of
``MessageFormatterInterface::format()`` to your underlying service's method
``MessageUtils::format()``, with all its arguments.
``MessageUtils::formatMessage()``, with all its arguments.

Learn more
----------
Expand Down