Skip to content

[ExpressionLanguage] Document ExpressionFunction::fromPhp #7517

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 6 commits into from
Feb 28, 2017

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

Result:

screenshot from 2017-02-21 19-06-31

link to temp doc

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 :)

@@ -90,6 +90,21 @@ register.
}
}

.. 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants