Skip to content

Conversation

@maidmaid
Copy link
Contributor

@xabbuh xabbuh added this to the 3.3 milestone Feb 21, 2017

ExpressionFunction::fromPhp('strtoupper');

It allows namespaced PHP function where second parameter must be defined to name expression::
Copy link
Member

Choose a reason for hiding this comment

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

[...] where the second [...]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@xabbuh
Copy link
Member

xabbuh commented Feb 21, 2017

Please also add a versionadded directive:

.. versionadded:: 3.3 The ``ExpressionFunction::fromPhp()`` method was introduced in Symfony 3.3.
@xabbuh
Copy link
Member

xabbuh commented Feb 21, 2017

👍

Status: Reviewed

@maidmaid
Copy link
Contributor Author

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.

👍

@xabbuh
Copy link
Member

xabbuh commented Feb 22, 2017

@maidmaid This should work. The template used to render the preview is not exactly the same as the one used on symfony.com (we don't update it every time small changes are made to the website).

@maidmaid
Copy link
Contributor Author

Cool, thank you for your reviews :)

.. tip::

You can create an expression function from a PHP function with the
Copy link
Contributor

Choose a reason for hiding this comment

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

"You can create ..." => "To create ..."

Copy link
Contributor

@HeahDude HeahDude left a comment

Choose a reason for hiding this comment

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

👍

@xabbuh
Copy link
Member

xabbuh commented Feb 28, 2017

Thank you @maidmaid.

@xabbuh xabbuh merged commit 415c4ec into symfony:master Feb 28, 2017
xabbuh added a commit that referenced this pull request Feb 28, 2017
…hp (maidmaid, javiereguiluz) This PR was merged into the master branch. Discussion ---------- [ExpressionLanguage] Document ExpressionFunction::fromPhp cf symfony/symfony#21122 Commits ------- 415c4ec Update extending.rst 478400a Minor reword 059155f Add versionadded 6c9e09d Fix typo c70ea7f Fix typo 6d9af37 Add fromPhp tip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment