Skip to content

[Routing] rename boolean and integer to bool and int #19157

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 1 commit into from
Jul 1, 2016

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Jun 23, 2016

Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #11394 (comment)
License MIT
Doc PR

This addresses @Tobion's comment in #11394 (comment).

@symfony/deciders What do you think? Should we change the element names to how we use the types in PHP code or should we stick with XML element names that rather match the types as defined by the XML schema?

@xabbuh xabbuh changed the title rename boolean and integer to bool and int [Routing] rename boolean and integer to bool and int Jun 23, 2016
@xabbuh xabbuh added the Routing label Jun 23, 2016
@stof
Copy link
Member

stof commented Jun 23, 2016

I would stick to full names here. We already use map and list which are not names of PHP types either

@fabpot
Copy link
Member

fabpot commented Jun 24, 2016

I also prefer the full names.

@javiereguiluz
Copy link
Member

javiereguiluz commented Jun 24, 2016

👍 I agree with @xabbuh here. int and bool are the only future-proof values according to PHP. If we use the same values in PHP and in this XML thing, people won't have to think what to use, so the learning curve will be lower.

@nicolas-grekas
Copy link
Member

👍 since I tend to agree for the short version also because of PHP types

<xsd:element name="boolean" nillable="true" type="map-boolean-entry" />
<xsd:element name="integer" nillable="true" type="map-integer-entry" />
<xsd:element name="bool" nillable="true" type="map-bool-entry" />
<xsd:element name="int" nillable="true" type="map-integer-entry" />
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't it be renamed to map-int-entry as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

If we agree on renaming the types, we can do that here too (even if these are internal details that are not exposed to the end user).

@sstok
Copy link
Contributor

sstok commented Jun 25, 2016

Will this is not break for people that are already using this? It seems the XSD is updated, but no longer supports the other tags.

@Tobion
Copy link
Contributor

Tobion commented Jun 25, 2016

@sstok if you follow the linked PR you'll see that this feature was just merged before.

@sstok
Copy link
Contributor

sstok commented Jun 26, 2016

Hihi 😄 I looked at the initial date, not the date of the merge 😊

I'm 👍 on the full names, it's also what is used in the DependencyInjection XML schema.

@fabpot
Copy link
Member

fabpot commented Jun 29, 2016

So, there is no consensus. What do we do? I don't care that much, so this PR is 👍 for me.

@fabpot
Copy link
Member

fabpot commented Jul 1, 2016

@xabbuh Can you finish this one so that we can merge it?

@xabbuh
Copy link
Member Author

xabbuh commented Jul 1, 2016

@fabpot done

@fabpot
Copy link
Member

fabpot commented Jul 1, 2016

Thank you @xabbuh.

@fabpot fabpot merged commit 808dcc8 into symfony:master Jul 1, 2016
fabpot added a commit that referenced this pull request Jul 1, 2016
…bbuh)

This PR was merged into the 3.2-dev branch.

Discussion
----------

[Routing] rename boolean and integer to bool and int

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #11394 (comment)
| License       | MIT
| Doc PR        |

This addresses @Tobion's comment in #11394 (comment).

@symfony/deciders What do you think? Should we change the element names to how we use the types in PHP code or should we stick with XML element names that rather match the types as defined by the XML schema?

Commits
-------

808dcc8 rename boolean and integer to bool and int
@xabbuh xabbuh deleted the pr-11394 branch July 1, 2016 12:05
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.

8 participants