Skip to content

Conversation

greg0ire
Copy link
Contributor

It's part of the standard

Copy link
Member

@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

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

@greg0ire thanks for taking care of this. I'm sorry for the amount of review comments (35!) but I wanted to mark all the places where we can get rid of ::.

By the way, I'm not sure I like replacing .. code-block:: php by :: when there's no previous line of text. The problem with :: is that it looks strange and it's not easy to understand, whereas .. code-block:: php is beautiful and self-explanatory. Ping @xabbuh what do you think?

A lock can be used, for example, to allow only one instance of a command to run.

.. code-block:: php
::
Copy link
Member

Choose a reason for hiding this comment

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

Can we move this to the end of the previous line? Thanks!

Copy link
Member

Choose a reason for hiding this comment

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

While reading this comment there is at least one important difference to point out that we did not discuss on Slack: The colon of the short-hand notation will be rendered in the final document. So we need to check too if that really makes sense with each example.

register.

.. code-block:: php
::
Copy link
Member

Choose a reason for hiding this comment

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

Let's move this to the end of the previous line.

:method:`Symfony\\Component\\Process\\Process::getPid` method.

.. code-block:: php
::
Copy link
Member

Choose a reason for hiding this comment

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

Merge with the previous line, please.

method is used.

.. code-block:: php
::
Copy link
Member

Choose a reason for hiding this comment

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

Merge with previous line, please.

The constructor of the ``Translator`` class needs one argument: The locale.

.. code-block:: php
::
Copy link
Member

Choose a reason for hiding this comment

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

Merge with previous line, please.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This one will look a bit weird I think

in order to put it to use.

.. code-block:: php
::
Copy link
Member

Choose a reason for hiding this comment

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

Merge with previous line, please.

The listener implementation assumes your ``User`` entity has a ``getLocale()`` method.

.. code-block:: php
::
Copy link
Member

Choose a reason for hiding this comment

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

Merge with previous line, please.

``IS_AUTHENTICATED_FULLY`` role.

.. code-block:: php
::
Copy link
Member

Choose a reason for hiding this comment

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

Merge with previous line, please.

which makes creating a voter even easier.

.. code-block:: php
::
Copy link
Member

Choose a reason for hiding this comment

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

Merge with previous line, please.

event:

.. code-block:: php
::
Copy link
Member

Choose a reason for hiding this comment

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

Merge with previous line, please.

@xabbuh xabbuh added this to the 2.7 milestone Feb 26, 2018
The constructor of the ``Translator`` class needs one argument: The locale.

.. code-block:: php
The constructor of the ``Translator`` class needs one argument: The locale::
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@javiereguiluz @xabbuh that one will look a bit weird, won't it?

Copy link
Member

Choose a reason for hiding this comment

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

I would stick with the explicit code block here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The problem with :: is that it looks strange and it's not easy to understand, whereas .. code-block:: php is beautiful and self-explanatory. Ping @xabbuh what do you think?

I would stick with the explicit code block here

I'll extrapolate and take this as an agreement with @javiereguiluz 's feelings about :: at the beginning of a line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But that probably means I should amend the standard.

@javiereguiluz
Copy link
Member

@greg0ire please, tell me when you consider this ready for merge. Thanks!

@greg0ire
Copy link
Contributor Author

greg0ire commented Feb 28, 2018

I believe it's ready, but warning, I amended the standard

code block (read `the Sphinx documentation`_ to see when you should use the
shorthand);
code block unless it results in the marker being on its own line (read
`the Sphinx documentation`_ to see when you should use the shorthand);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@javiereguiluz here is the part I amended, please tell me what you think

Copy link
Member

Choose a reason for hiding this comment

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

Looks good to me!

@javiereguiluz
Copy link
Member

Let's merge this PR too ... and let's wish there are not too many conflicts. Thanks for working on this @greg0ire.

javiereguiluz added a commit that referenced this pull request Mar 1, 2018
This PR was squashed before being merged into the 2.7 branch (closes #9339).

Discussion
----------

Use the shorthand notation when applicable

It's part of the standard

Commits
-------

d8faa39 Use the shorthand notation when applicable
@javiereguiluz
Copy link
Member

This has been merged up to master branch. As said in other PR, if you want to do this for the other branches, you should do it in 2.8, wait for merge, then 3.4 and wait for merge, then 4.0 and wait for merge and finally, master and wait for merger. Thanks!

@greg0ire greg0ire deleted the shorthand branch March 1, 2018 17:16
</container>
.. code-block:: php
::
Copy link
Member

Choose a reason for hiding this comment

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

This change is wrong as this is part of a configuration-block block. Reverted in #9368.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Woops, sorry for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants