Skip to content

Fix usage of "e.g." and "etc." #19186

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 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 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 best_practices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ Use Dependency Injection to Get Services
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you extend the base ``AbstractController``, you can only get access to the most
common services (e.g ``twig``, ``router``, ``doctrine``, etc.), directly from the
common services (e.g. ``twig``, ``router``, ``doctrine``), directly from the
Copy link
Member

Choose a reason for hiding this comment

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

I think this should become

Suggested change
common services (e.g. ``twig``, ``router``, ``doctrine``), directly from the
common services (e.g. ``twig``, ``router`` and ``doctrine``), directly from the

same for all other changes where you removed "etc" on lists following "e.g."

Copy link
Member Author

Choose a reason for hiding this comment

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

Even with two examples?

A:  (e.g. twig, router)
B:  (e.g. twig and router)
C:  (e.g. twig or router)

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I think so.

This comment was marked as outdated.

Copy link
Member Author

@smnandre smnandre Nov 26, 2023

Choose a reason for hiding this comment

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

To be honest I'm in doubt what to do @wouterj

There are a lot of places where (e.g. "example_a", "example_b") is used (before my modifications i mean)..

Should i change those too ? Or maybe, on the contrary, could we set the following rule:

a set of single terms (values, code identifier, methods, etc.) can be listed without "and", to avoid any sense of relation

We also could say

we'd rather handle this on a case-per-case basis, so let's stop there for now

and i'll drop the commit "e.g. and etc. used together"

WDYT ?

container via ``$this->container->get()``.
Instead, you must use dependency injection to fetch services by
:ref:`type-hinting action method arguments <controller-accessing-services>` or
Expand Down Expand Up @@ -326,7 +326,7 @@ Use the XLIFF Format for Your Translation Files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Of all the translation formats supported by Symfony (PHP, Qt, ``.po``, ``.mo``,
JSON, CSV, INI, etc.), ``XLIFF`` and ``gettext`` have the best support in the tools used
JSON, CSV, INI), ``XLIFF`` and ``gettext`` have the best support in the tools used
by professional translators. And since it's based on XML, you can validate ``XLIFF``
file contents as you write them.

Expand Down
2 changes: 1 addition & 1 deletion bundles/best_practices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ With this, :ref:`Symfony Flex <symfony-flex>` will be able to automatically
enable your bundle when it's installed.

If your bundle requires any setup (e.g. configuration, new files, changes to
``.gitignore``, etc), then you should create a `Symfony Flex recipe`_.
``.gitignore``), then you should create a `Symfony Flex recipe`_.

Documentation
-------------
Expand Down
2 changes: 1 addition & 1 deletion components/cache/adapters/apcu_adapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ and cache items version string as constructor arguments::
.. tip::

This adapter's CRUD operations are specific to the PHP SAPI it is running under. This
means cache operations (such as additions, deletions, etc) using the CLI will not be
means cache operations (such as additions, deletions, etc.) using the CLI will not be
available under the FPM or CGI SAPIs.

.. _`APCu extension`: https://pecl.php.net/package/APCu
2 changes: 1 addition & 1 deletion components/cache/adapters/couchbasebucket_adapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ helper method allows creating and configuring a `Couchbase Bucket`_ class instan
'couchbase://10.0.0.100',
'couchbase://10.0.0.101',
'couchbase://10.0.0.102',
// etc...
// etc.
]);

// a single DSN can define multiple servers using the following syntax:
Expand Down
2 changes: 1 addition & 1 deletion components/cache/adapters/couchbasecollection_adapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ helper method allows creating and configuring a `Couchbase Collection`_ class in
'couchbase://10.0.0.100',
'couchbase://10.0.0.101',
'couchbase://10.0.0.102',
// etc...
// etc.
]);

// a single DSN can define multiple servers using the following syntax:
Expand Down
2 changes: 1 addition & 1 deletion components/cache/adapters/memcached_adapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ helper method allows creating and configuring a `Memcached`_ class instance usin
'memcached://10.0.0.100',
'memcached://10.0.0.101',
'memcached://10.0.0.102',
// etc...
// etc.
]);

// a single DSN can define multiple servers using the following syntax:
Expand Down
2 changes: 1 addition & 1 deletion components/console/helpers/progressindicator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Progress Indicator
Progress indicators are useful to let users know that a command isn't stalled.
Unlike :doc:`progress bars </components/console/helpers/progressbar>`, these
indicators are used when the command duration is indeterminate (e.g. long-running
commands, unquantifiable tasks, etc.)
commands, unquantifiable tasks).

They work by instantiating the :class:`Symfony\\Component\\Console\\Helper\\ProgressIndicator`
class and advancing the progress as the command executes::
Expand Down
2 changes: 1 addition & 1 deletion components/console/helpers/questionhelper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ the following to your command::

In this case, the user will be asked "Continue with this action?". If the user
answers with ``y`` (or any word, expression starting with ``y`` due to default
answer regex, e.g ``yeti``) it returns ``true`` or ``false`` otherwise, e.g. ``n``.
answer regex, e.g. ``yeti``) it returns ``true`` or ``false`` otherwise, e.g. ``n``.

The second argument to
:method:`Symfony\\Component\\Console\\Question\\ConfirmationQuestion::__construct`
Expand Down
2 changes: 1 addition & 1 deletion components/expression_language.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ PHP type (including objects)::

When using this component inside a Symfony application, certain objects and
variables are automatically injected by Symfony so you can use them in your
expressions (e.g. the request, the current user, etc.):
expressions (e.g. the request, the current user):

* :doc:`Variables available in security expressions </security/expressions>`;
* :doc:`Variables available in service container expressions </service_container/expression_language>`;
Expand Down
6 changes: 3 additions & 3 deletions components/http_kernel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ This is a simplified overview of the request workflow in Symfony applications:
#. The **browser** displays the **resource** to the **user**.

Typically, some sort of framework or system is built to handle all the repetitive
tasks (e.g. routing, security, etc) so that a developer can build each *page* of
tasks (e.g. routing, security) so that a developer can build each *page* of
the application. Exactly *how* these systems are built varies greatly. The HttpKernel
component provides an interface that formalizes the process of starting with a
request and creating the appropriate response. The component is meant to be the
Expand Down Expand Up @@ -405,7 +405,7 @@ to create a ``Response``.
This can be useful if you want to use a "view" layer: instead of returning
a ``Response`` from the controller, you return data that represents the page.
A listener to this event could then use this data to create a ``Response`` that
is in the correct format (e.g HTML, JSON, etc).
is in the correct format (e.g. HTML, JSON).

At this stage, if no listener sets a response on the event, then an exception
is thrown: either the controller *or* one of the view listeners must always
Expand All @@ -428,7 +428,7 @@ return a ``Response``.
Additionally, a popular community bundle `FOSRestBundle`_ implements
a listener on this event which aims to give you a robust view layer
capable of using a single controller to return many different content-type
responses (e.g. HTML, JSON, XML, etc).
responses (e.g. HTML, JSON, XML).

.. _component-http-kernel-kernel-response:

Expand Down
4 changes: 2 additions & 2 deletions components/phpunit_bridge.rst
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ Polyfills for the Unavailable Methods

When using the ``simple-phpunit`` script, PHPUnit Bridge injects polyfills for
most methods of the ``TestCase`` and ``Assert`` classes (e.g. ``expectException()``,
``expectExceptionMessage()``, ``assertContainsEquals()``, etc.). This allows writing
``expectExceptionMessage()``, ``assertContainsEquals()``). This allows writing
test cases using the latest best practices while still remaining compatible with
older PHPUnit versions.

Expand Down Expand Up @@ -637,7 +637,7 @@ And that's all!
.. caution::

Time-based function mocking follows the `PHP namespace resolutions rules`_
so "fully qualified function calls" (e.g ``\time()``) cannot be mocked.
so "fully qualified function calls" (e.g. ``\time()``) cannot be mocked.

The ``@group time-sensitive`` annotation is equivalent to calling
``ClockMock::register(MyTest::class)``. If you want to mock a function used in a
Expand Down
4 changes: 2 additions & 2 deletions console.rst
Original file line number Diff line number Diff line change
Expand Up @@ -524,9 +524,9 @@ console::
'username' => 'Wouter',

// prefix the key with two dashes when passing options,
// e.g: '--some-option' => 'option_value',
// e.g. '--some-option' => 'option_value',
// use brackets for testing array value,
// e.g: '--some-option' => ['option_value'],
// e.g. '--some-option' => ['option_value'],
]);

$commandTester->assertCommandIsSuccessful();
Expand Down
2 changes: 1 addition & 1 deletion console/coloring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ How to Color and Style the Console Output
Symfony provides an optional :doc:`console style </console/style>` to render the
input and output of commands in a consistent way. If you prefer to apply your
own style, use the utilities explained in this article to show colors in the command
output (e.g. to differentiate between important messages, titles, comments, etc.).
output (e.g. to differentiate between important messages, titles, comments).

.. note::

Expand Down
4 changes: 2 additions & 2 deletions contributing/code/bc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Our Backward Compatibility Promise
Ensuring smooth upgrades of your projects is our first priority. That's why
we promise you backward compatibility (BC) for all minor Symfony releases.
You probably recognize this strategy as `Semantic Versioning`_. In short,
Semantic Versioning means that only major releases (such as 5.0, 6.0 etc.) are
allowed to break backward compatibility. Minor releases (such as 5.1, 5.2 etc.)
Semantic Versioning means that only major releases (such as 5.0, 6.0, etc.) are
allowed to break backward compatibility. Minor releases (such as 5.1, 5.2, etc.)
may introduce new features, but must do so without breaking the existing API of
that release branch (5.x in the previous example).

Expand Down
2 changes: 1 addition & 1 deletion contributing/code/pull_requests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ work:
(5.0, 6.0, etc.) comes out every two years. Because of the
:ref:`special development process <major-version-development>` of those versions,
you need to use the previous minor version for the features (e.g. use ``5.4``
instead of ``6.0``, use ``6.4`` instead of ``7.0``, etc.)
instead of ``6.0``, use ``6.4`` instead of ``7.0``)

.. note::

Expand Down
2 changes: 1 addition & 1 deletion contributing/code/reproducer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ a PHP script, it's better to reproduce the bug by creating a new project. To do
#. Add a comment in your original issue report to share the URL of your forked
project (e.g. ``https://github.com/YOUR-GITHUB-USERNAME/symfony_issue_23567``)
and, if necessary, explain the steps to reproduce (e.g. "browse this URL",
"fill in this data in the form and submit it", etc.)
"fill in this data in the form and submit it").

Adding the Minimum Amount of Code Possible
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
4 changes: 2 additions & 2 deletions contributing/code/standards.rst
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,10 @@ Naming Conventions
* Suffix exceptions with ``Exception``;

* Prefix PHP attributes that relate to service configuration with ``As``
(e.g. ``#[AsCommand]``, ``#[AsEventListener]``, etc.);
(e.g. ``#[AsCommand]``, ``#[AsEventListener]``);

* Prefix PHP attributes that relate to controller arguments with ``Map``
(e.g. ``#[MapEntity]``, ``#[MapCurrentUser]``, etc.);
(e.g. ``#[MapEntity]``, ``#[MapCurrentUser]``);

* Use UpperCamelCase for naming PHP files (e.g. ``EnvVarProcessor.php``) and
snake case for naming Twig templates and web assets (``section_layout.html.twig``,
Expand Down
2 changes: 1 addition & 1 deletion contributing/documentation/format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ For a deprecation use the ``.. deprecated:: 6.x`` directive:

... ... ... was deprecated in Symfony 6.2.

Whenever a new major version of Symfony is released (e.g. 6.0, 7.0, etc), a new
Whenever a new major version of Symfony is released (e.g. 6.0, 7.0), a new
branch of the documentation is created from the ``x.4`` branch of the previous
major version. At this point, all the ``versionadded`` and ``deprecated`` tags
for Symfony versions that have a lower major version will be removed. For
Expand Down
2 changes: 1 addition & 1 deletion form/data_mappers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ It is important to know the difference between
* **Data transformers** change the representation of a single value, e.g. from
``"2016-08-12"`` to a ``DateTime`` instance;
* **Data mappers** map data (e.g. an object or array) to one or many form fields, and vice versa,
e.g. using a single ``DateTime`` instance to populate the inner fields (e.g year, hour, etc.)
e.g. using a single ``DateTime`` instance to populate the inner fields (e.g. year, hour, etc.)
of a compound date type.

Creating a Data Mapper
Expand Down
6 changes: 3 additions & 3 deletions form/dynamic_form_modification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ the data that was submitted by the user. For example, imagine you have a registr
form for sports gatherings. Some events will allow you to specify your preferred
position on the field. This would be a ``choice`` field for example. However, the
possible choices will depend on each sport. Football will have attack, defense,
goalkeeper etc... Baseball will have a pitcher but will not have a goalkeeper. You
goalkeeper, etc. Baseball will have a pitcher but will not have a goalkeeper. You
will need the correct options in order for validation to pass.

The meetup is passed as an entity field to the form. So we can access each
Expand Down Expand Up @@ -487,7 +487,7 @@ The type would now look like::
$formModifier($event->getForm()->getParent(), $sport);
}
);

// by default, action does not appear in the <form> tag
// you can set this value by passing the controller route
$builder->setAction($options['action']);
Expand Down Expand Up @@ -529,7 +529,7 @@ your application. Assume that you have a sport meetup creation controller::
$form = $this->createForm(SportMeetupType::class, $meetup, ['action' => $this->generateUrl('app_meetup_create')]);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
// ... save the meetup, redirect etc.
// ... save the meetup, redirect, etc.
}

return $this->render('meetup/create.html.twig', [
Expand Down
2 changes: 1 addition & 1 deletion form/form_collections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ yet to add new tags or delete existing ones.
if you use Xdebug, you may receive a ``Maximum function nesting level of '100'
reached, aborting!`` error. To fix this, increase the ``xdebug.max_nesting_level``
PHP setting, or render each form field by hand using ``form_row()`` instead of
rendering the whole form at once (e.g ``form_widget(form)``).
rendering the whole form at once (e.g. ``form_widget(form)``).

.. _form-collections-new-prototype:

Expand Down
8 changes: 4 additions & 4 deletions form/form_themes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ Fragment Naming for All Fields of the Same Type

These fragment names follow the ``type_part`` pattern, where the ``type``
corresponds to the field *type* being rendered (e.g. ``textarea``, ``checkbox``,
``date``, etc) and the ``part`` corresponds to *what* is being rendered (e.g.
``label``, ``widget``, etc.)
``date``) and the ``part`` corresponds to *what* is being rendered (e.g.
``label``, ``widget``).

A few examples of fragment names are:

Expand All @@ -265,8 +265,8 @@ Fragment Naming for Individual Fields

These fragment names follow the ``_id_part`` pattern, where the ``id``
corresponds to the field ``id`` attribute (e.g. ``product_description``,
``user_age``, etc) and the ``part`` corresponds to *what* is being rendered
(e.g. ``label``, ``widget``, etc.)
``user_age``) and the ``part`` corresponds to *what* is being rendered
(e.g. ``label``, ``widget``)

The ``id`` attribute contains both the form name and the field name (e.g.
``product_price``). The form name can be set manually or generated automatically
Expand Down
2 changes: 1 addition & 1 deletion frontend/encore/advanced-config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ In Webpack Encore you can use this option via the ``addExternals()`` method:

// this won't include jQuery and React in the output bundles generated
// by Webpack Encore. You'll need to load those dependencies yourself
// (e.g with a `<script>` tag) to make the application or website work.
// (e.g. with a `<script>` tag) to make the application or website work.
Encore.addExternals({
jquery: 'jQuery',
react: 'react'
Expand Down
2 changes: 1 addition & 1 deletion frontend/encore/postcss.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Next, create a ``postcss.config.js`` file at the root of your project:
}
}

That's it! The ``postcss-loader`` will now be used for all CSS, Sass, etc files.
That's it! The ``postcss-loader`` will now be used for all CSS, Sass, etc. files.
You can also pass options to the `postcss-loader`_ by passing a callback:

.. code-block:: diff
Expand Down
2 changes: 1 addition & 1 deletion http_client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2114,7 +2114,7 @@ with some helper methods to test the request:
* ``getRequestMethod()`` - returns the HTTP method;
* ``getRequestUrl()`` - returns the URL the request would be sent to;
* ``getRequestOptions()`` - returns an array containing other information about
the request such as headers, query parameters, body content etc.
the request such as headers, query parameters, body content, etc.

Usage example::

Expand Down
2 changes: 1 addition & 1 deletion introduction/from_flat_php_to_symfony.rst
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ from being satisfied. For example, the routing system is fickle, and wouldn't
recognize that the list page - ``/index.php`` - should be accessible also via ``/``
(if Apache rewrite rules were added). Also, instead of developing the blog,
a lot of time is being spent working on the "architecture" of the code (e.g.
routing, calling controllers, templates, etc.). More time will need to be
routing, calling controllers, templates). More time will need to be
spent to handle form submissions, input validation, logging and security.
Why should you have to reinvent solutions to all these routine problems?

Expand Down
6 changes: 3 additions & 3 deletions introduction/http_fundamentals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Step 1: The Client Sends a Request
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Every conversation on the web starts with a *request*. The request is a text
message created by a client (e.g. a browser, a smartphone app, etc) in a
message created by a client (e.g. a browser, a smartphone app) in a
special format known as HTTP. The client sends that request to a server,
and then waits for the response.

Expand All @@ -61,7 +61,7 @@ resource the client is requesting. The first line of an HTTP request is the
most important, because it contains two important things: the HTTP method (GET)
and the URI (``/``).

The URI (e.g. ``/``, ``/contact``, etc) is the unique address or location
The URI (e.g. ``/``, ``/contact``) is the unique address or location
that identifies the resource the client wants. The HTTP method (e.g. ``GET``)
defines what the client wants to *do* with the resource. The HTTP methods (also
known as verbs) define the few common ways that the client can act upon the
Expand Down Expand Up @@ -297,7 +297,7 @@ The Front Controller
~~~~~~~~~~~~~~~~~~~~

Traditionally, applications were built so that each "page" of a site was
its own physical file (e.g. ``index.php``, ``contact.php``, etc.).
its own physical file (e.g. ``index.php``, ``contact.php``).

There are several problems with this approach, including the inflexibility
of the URLs (what if you wanted to change ``blog.php`` to ``news.php`` without
Expand Down
2 changes: 1 addition & 1 deletion logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Handlers: Writing Logs to different Locations
---------------------------------------------

The logger has a stack of *handlers*, and each can be used to write the log entries
to different locations (e.g. files, database, Slack, etc).
to different locations (e.g. files, database, Slack).

.. tip::

Expand Down
4 changes: 2 additions & 2 deletions mailer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,7 @@ Draft Emails

:class:`Symfony\\Component\\Mime\\DraftEmail` is a special instance of
:class:`Symfony\\Component\\Mime\\Email`. Its purpose is to build up an email
(with body, attachments, etc) and make available to download as an ``.eml`` with
(with body, attachments, etc.) and make available to download as an ``.eml`` with
the ``X-Unsent`` header. Many email clients can open these files and interpret
them as *draft emails*. You can use these to create advanced ``mailto:`` links.

Expand Down Expand Up @@ -1722,7 +1722,7 @@ FailedMessageEvent

public function onMessage(FailedMessageEvent $event): void
{
// e.g you can get more information on this error when sending an email
// e.g. you can get more information on this error when sending an email
$event->getError();

// do something with the message
Expand Down
2 changes: 1 addition & 1 deletion messenger.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1316,7 +1316,7 @@ The AMQP transport DSN may looks like this:
If you want to use TLS/SSL encrypted AMQP, you must also provide a CA certificate.
Define the certificate path in the ``amqp.cacert`` PHP.ini setting
(e.g. ``amqp.cacert = /etc/ssl/certs``) or in the ``cacert`` parameter of the
DSN (e.g ``amqps://localhost?cacert=/etc/ssl/certs/``).
DSN (e.g. ``amqps://localhost?cacert=/etc/ssl/certs/``).

The default port used by TLS/SSL encrypted AMQP is 5671, but you can overwrite
it in the ``port`` parameter of the DSN (e.g. ``amqps://localhost?cacert=/etc/ssl/certs/&port=12345``).
Expand Down
2 changes: 1 addition & 1 deletion quick_tour/the_architecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Creating Services
-----------------

To keep your code organized, you can even create your own services! Suppose you
want to generate a random greeting (e.g. "Hello", "Yo", etc). Instead of putting
want to generate a random greeting (e.g. "Hello", "Yo"). Instead of putting
this code directly in your controller, create a new class::

// src/GreetingGenerator.php
Expand Down
Loading