8000 Wrap the instantiation in parenthesis, and chain away by yceruto · Pull Request #8068 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Wrap the instantiation in parenthesis, and chain away #8068

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, 2017

Conversation

yceruto
Copy link
Member
@yceruto yceruto commented Jun 20, 2017

No description provided.

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.

This doesn't work in old PHP versions, right? If I'm right, we still use old PHP in the docs. Maybe we should discuss about this and start using more modern PHP features?

@xabbuh
Copy link
Member
xabbuh commented Jun 21, 2017

Javier is right. This does not work for PHP 5.3: https://3v4l.org/BdRT4

But I am not sure if we should really care about that. I mean we already started to use the class constant for example.

@yceruto
Copy link
Member Author
yceruto commented Jun 21, 2017

Yep this works for PHP 5.4+ but this is a bugfix for the previous code that doesn't works for neither PHP versions though 😜 hence any decision taken here involves changes in these examples.

@xabbuh xabbuh mentioned this pull request Jul 1, 2017
@xabbuh xabbuh merged commit 10bd80b into symfony:2.7 Jul 1, 2017
xabbuh added a commit that referenced this pull request Jul 1, 2017
…eruto)

This PR was merged into the 2.7 branch.

Discussion
----------

Wrap the instantiation in parenthesis, and chain away

Commits
-------

10bd80b Wrap the instantiation in parenthesis, and chain away
@xabbuh
Copy link
Member
xabbuh commented Jul 1, 2017

Thanks @yceruto. I have merged this as having a solution for PHP 5.4+ is better than invalid code. :) If someone thinks, we should show PHP 5.3 compatible examples, I'll happily merge such a PR.

@yceruto yceruto deleted the missing_wrap_instantiation branch July 1, 2017 11:46
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
0