Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Smarty & PHP 7?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
emt
Smarty Regular


Joined: 10 Dec 2009
Posts: 43

PostPosted: Sat Oct 24, 2015 11:01 am    Post subject: Smarty & PHP 7? Reply with quote

Hi,

Is Smarty fully PHP 7 compatible?

When running https://github.com/sstalle/php7cc on it, I am getting the following messages:

Code:
\vendor\smarty\smarty\libs\sysplugins\smarty_internal_data.php
> Line 194: Possible array element creation during by-reference assignment
    $this->tpl_vars[$tpl_var]->value[$_key] =& $value[$_key];

Code:
\vendor\smarty\smarty\libs\sysplugins\smarty_internal_template.php
> Line 491: Possible object property creation during by-reference assignment
    $tpl->tpl_vars =& $this->tpl_vars;
> Line 495: Possible object property creation during by-reference assignment
    $tpl->tpl_vars =& $this->tpl_vars;
> Line 497: Possible object property creation during by-reference assignment
    $tpl->tpl_vars =& $scope_ptr->tpl_vars;

Code:
\vendor\smarty\smarty\libs\sysplugins\smarty_internal_templatecompilerbase.php
> Line 555: Indirect variable, property or method access
    $this->smarty->registered_plugins[$plugin_type][$tag][0][0]->{$function[1]}($new_args, $this);
> Line 627: Indirect variable, property or method access
    $this->default_handler_plugins[$plugin_type][$tag][0][0]->{$function[1]}($new_args, $this);
> Line 668: Indirect variable, property or method access
    $this->smarty->registered_plugins[\Smarty::PLUGIN_COMPILER][$tag][0][0]->{$function[1]}($args, $this);
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Sat Oct 24, 2015 6:49 pm    Post subject: Reply with quote

If I read it right, these are mostly harmless notices.
Some of the "=&" are of course redundant, but none of them are harmful from a first glance.
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Sat Oct 24, 2015 9:36 pm    Post subject: Reply with quote

Smarty does use some reference assignments which can't be remove easy at this point of the design. However these are just warnings.


The Smarty dev-master version does pass all PHPUnit test under PHP 7 and HHVM.

See https://travis-ci.org/
Back to top
View user's profile Send private message
emt
Smarty Regular


Joined: 10 Dec 2009
Posts: 43

PostPosted: Sun Oct 25, 2015 1:02 am    Post subject: Reply with quote

Thanks for the feedback; much appreciated.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP