Skip to content

Update confusing first class callable syntax #17614

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

Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion components/validator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ If you have lots of validation errors, you can filter them by error code::

use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;

$violations = $validator->validate(...);
$violations = $validator->validate(/* ... */);
if (0 !== count($violations->findByCodes(UniqueEntity::NOT_UNIQUE_ERROR))) {
// handle this specific error (display some message, send an email, etc.)
}
Expand Down
6 changes: 3 additions & 3 deletions controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ special type of exception::
// throw new NotFoundHttpException('The product does not exist');
}

return $this->render(...);
return $this->render(/* ... */);
}

The :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController::createNotFoundException`
Expand Down Expand Up @@ -461,10 +461,10 @@ For example, imagine you're processing a :doc:`form </forms>` submission::
);
// $this->addFlash() is equivalent to $request->getSession()->getFlashBag()->add()

return $this->redirectToRoute(...);
return $this->redirectToRoute(/* ... */);
}

return $this->render(...);
return $this->render(/* ... */);
}

After processing the request, the controller sets a flash message in the session
Expand Down
2 changes: 1 addition & 1 deletion form/data_transformers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ slightly::
$builder->add(
$builder
->create('tags', TextType::class)
->addModelTransformer(...)
->addModelTransformer(/* ... */)
);

Example #2: Transforming an Issue Number into an Issue Entity
Expand Down
2 changes: 1 addition & 1 deletion form/validation_groups.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ this as an option when :ref:`creating forms in controllers <creating-forms-in-co

$form = $this->createFormBuilder($user, [
'validation_groups' => ['registration'],
])->add(...);
])->add(/* ... */);

When :ref:`creating forms in classes <creating-forms-in-classes>`, add the
following to the ``configureOptions()`` method::
Expand Down
2 changes: 1 addition & 1 deletion http_client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1257,7 +1257,7 @@ that network errors can happen when calling e.g. ``getStatusCode()`` too::
// ...
try {
// both lines can potentially throw
$response = $client->request(...);
$response = $client->request(/* ... */);
$headers = $response->getHeaders();
// ...
} catch (TransportExceptionInterface $e) {
Expand Down
2 changes: 1 addition & 1 deletion logging/monolog_exclude_http_codes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ logging these HTTP codes based on the MonologBundle configuration:
$mainHandler = $monolog->handler('main')
// ...
->type('fingers_crossed')
->handler(...)
->handler('...')
;

$mainHandler->excludedHttpCode()->code(403);
Expand Down
6 changes: 3 additions & 3 deletions messenger.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1917,7 +1917,7 @@ this globally (or for each transport) to a service that implements
->context('foo', 'bar');

$messenger->transport('async_priority_normal')
->dsn(...)
->dsn('...')
->serializer('messenger.transport.symfony_serializer');
};

Expand Down Expand Up @@ -2180,8 +2180,8 @@ Then, make sure to "route" your message to *both* transports:
return static function (FrameworkConfig $framework) {
$messenger = $framework->messenger();

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

$messenger->routing('App\Message\UploadedImage')
->senders(['image_transport', 'async_priority_normal']);
Expand Down
2 changes: 1 addition & 1 deletion testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ the container is returned by ``static::getContainer()``::

// (3) run some service & test the result
$newsletterGenerator = $container->get(NewsletterGenerator::class);
$newsletter = $newsletterGenerator->generateMonthlyNews(...);
$newsletter = $newsletterGenerator->generateMonthlyNews(/* ... */);

$this->assertEquals('...', $newsletter->getContent());
}
Expand Down