Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

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
Sep 19, 2016

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
@@ -37,6 +37,11 @@ class Twig_Node implements Twig_NodeInterface
*/
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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.