🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@fabpot
Copy link
Contributor

@fabpot fabpot commented Sep 19, 2016

No description provided.

fabpot added a commit to symfony/symfony that referenced this pull request Sep 19, 2016
…g 1.25) (fabpot)

This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBridge] removed Twig null nodes (deprecated as of Twig 1.25)

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes (more about removing deprecation notices from newer versions of Twig)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a (see twigphp/Twig#2123)
| License       | MIT
| Doc PR        | n/a

Commits
-------

12350c2 [TwigBridge] removed Twig null nodes (deprecated as of Twig 1.25)
@fabpot fabpot force-pushed the nodes-should-not-be-null branch from a1543a1 to 03f18b4 Compare September 19, 2016 20:33
@fabpot fabpot merged commit 03f18b4 into twigphp:1.x Sep 19, 2016
fabpot added a commit that referenced this pull request Sep 19, 2016
…ode::$nodes (fabpot)

This PR was merged into the 1.x branch.

Discussion
----------

deprecated the ability to store non Node instances in Node::$nodes

Commits
-------

03f18b4 enforced Node:: to only contain node instances
@fabpot fabpot deleted the nodes-should-not-be-null branch September 19, 2016 22:59
public function __construct(array $nodes = array(), array $attributes = array(), $lineno = 0, $tag = null)
{
foreach ($nodes as $name => $node) {
if (!$node instanceof Twig_NodeInterface) {
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't you check for Twig_Node as the interface is deprecated ?

Copy link
Member

Choose a reason for hiding this comment

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

The getNode method already says it returns a Twig_Node, not a Twig_NodeInterface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants