Skip to content

Update confusing example using ->method(...) #16685

@GromNaN

Description

@GromNaN

It was common to write code examples using method(...) to omit the details of the arguments.

symfony-docs/messenger.rst

Lines 2040 to 2041 in 250afd3

$messenger->transport('async_priority_normal')->dsn(...);
$messenger->transport('image_transport')->dsn(...);

This notation is becoming confusing since first-class callable syntax was introduced in PHP 8.1.

I think we should find a new notation for such examples : I propose ->method(/* ... */)

             $messenger->transport('async_priority_normal')->dsn(/* ... */); 
             $messenger->transport('image_transport')->dsn(/* ... */); 

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions