Skip to content

Update page_creation.rst #16347

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 3 commits into from
Closed

Update page_creation.rst #16347

wants to merge 3 commits into from

Conversation

94noni
Copy link
Contributor

@94noni 94noni commented Dec 29, 2021

We concat strings :) 🪄
Used to screenshot #16346

@carsonbot carsonbot added this to the 4.4 milestone Dec 29, 2021
@94noni 94noni changed the base branch from 4.4 to 5.4 December 29, 2021 14:18
@javiereguiluz
Copy link
Member

javiereguiluz commented Dec 29, 2021

I'm not sure about this. If PHP doesn't trigger a warning/notice/error, I think we shouldn't add this change (because it makes code slightly more noisy). I've checked and apparently it works with all current and past PHP versions --> https://3v4l.org/7tSBK

@symfony/team-symfony-docs what do you think about this proposal? Thanks!

@94noni
Copy link
Contributor Author

94noni commented Dec 29, 2021

Yes, i know it works under the hood :)

But if we push the logic/reflexion of types, we are concatenating an int with 2 strings and concat is for strings

Feel free to close this was mainly to have a screenshot for related PR :)

@javiereguiluz
Copy link
Member

Let's close this one because it's not strictly necessary and it slightly complicates the code example. Thanks!

@94noni 94noni deleted the patch-13 branch January 7, 2022 14:00
@wouterj
Copy link
Member

wouterj commented Jan 7, 2022

Agreed with this decision btw. In docs, the primary function of a code example is to show the feature we are talking about. All things that are not about the feature should be kept to a minimum (but often required to give some sense of context for the code snippet).

So while it's strictly better to explicitly cast to a string here, let's not do it.

@94noni
Copy link
Contributor Author

94noni commented Jan 7, 2022

Thx for explanations both of you :)

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.

4 participants