Skip to content
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

Add the apply tag #2977

Merged
merged 1 commit into from Apr 24, 2019

Conversation

2 participants
@fabpot
Copy link
Contributor

commented Apr 24, 2019

The apply tag replaces the filter tag to be able to fix #2929 without a BC break. The two tags do the same thing except that the apply tag does not create a new scope.

@fabpot fabpot changed the base branch from 3.x to 1.x Apr 24, 2019

@fabpot fabpot force-pushed the fabpot:apply-tag branch 2 times, most recently from eebc0c4 to e243a4b Apr 24, 2019

Show resolved Hide resolved doc/advanced.rst
Show resolved Hide resolved src/TokenParser/ApplyTokenParser.php

@fabpot fabpot force-pushed the fabpot:apply-tag branch from e243a4b to 619bc12 Apr 24, 2019

@fabpot fabpot merged commit 619bc12 into twigphp:1.x Apr 24, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

fabpot added a commit that referenced this pull request Apr 24, 2019

feature #2977 Add the apply tag (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

Add the apply tag

The `apply` tag replaces the `filter` tag to be able to fix #2929 without a BC break. The two tags do the same thing except that the `apply` tag does not create a new scope.

Commits
-------

619bc12 added the apply tag
@@ -111,6 +111,7 @@ protected function doLeaveNode(Node $node, Environment $env)
if (!$expression && 'Twig_Node' !== \get_class($node) && $prependedNodes = array_shift($this->prependedNodes)) {
$nodes = [];
foreach (array_unique($prependedNodes) as $name) {
die();

This comment has been minimized.

Copy link
@fabpot

fabpot Apr 24, 2019

Author Contributor

oops, fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.