Skip to content

Another collection of fixes: Typos, Formatting, Logic, Links #3174

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
merged 2 commits into from
Nov 13, 2013
Merged

Another collection of fixes: Typos, Formatting, Logic, Links #3174

merged 2 commits into from
Nov 13, 2013

Conversation

bicpi
Copy link
Contributor

@bicpi bicpi commented Nov 9, 2013

Q A
Doc fix? yes
New docs? -
Applies to 2.2+
Fixed tickets -

Another summary of some minor issues in this PR.

Please comment if something is wrong - I'll do an update then.

.. caution::

When using YAML, be sure to surround ``Null`` with quotes (``"Null"``)
or else YAML will convert this into a Null value.
Copy link
Contributor

Choose a reason for hiding this comment

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

null

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean like ...or else YAML will convert this into a null value?

@@ -45,7 +45,7 @@ method returns **false**:
Acme\BlogBundle\Entity\Author
getters:
stateInvalid:
- "False":
- 'False':
Copy link
Member

Choose a reason for hiding this comment

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

Is this a standard? I'm more accustomed to seeing double-quotes in YAML. Or is it that double-quotes in YAML makes this still equate to a boolean (instead of the string)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Me too, I'm more used to double quotes in this context. It is just to make it consistent between the True, False and Null validator descriptions. And no, a double quoted string does not evaluate to the Boolean value.

Copy link
Member

Choose a reason for hiding this comment

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

👍 for using double quoted YAML strings here. The True and Null validators can be changed alike if this was necessary.

Copy link
Member

Choose a reason for hiding this comment

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

the Yaml component uses single quotes to escape the reserved names in Yaml. I think we should use that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@wouterj Just wanted to check what the Yaml component does for reference ;-)

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Weird, what's the reason for using single quotes?

Copy link
Member

Choose a reason for hiding this comment

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

And you can see both in core :)

https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/full.yml#L6

https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/full.yml#L40

The same is true of config.yml in the standard edition. So, since it doesn't matter, let's just be as consistent as we can. Since True and Null are using single quotes, let's just keep this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently, True and False are using double quotes - Null was not. So in the first version I changed Null to use double quotes. Now, in this PR, everything is updated to single quote. Since it doesn't matter, we can go ahead with single quotes.

weaverryan added a commit that referenced this pull request Nov 13, 2013
…ogic_collection

Another collection of fixes: Typos, Formatting, Logic, Links
@weaverryan weaverryan merged commit 0eb2531 into symfony:2.2 Nov 13, 2013
@bicpi bicpi deleted the another_fixing_typos_formatting_logic_collection branch January 5, 2014 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants