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

Allow more dynamic properties #379

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@
* @property Smarty_Internal_Method_RegisterPlugin $registerPlugin
* @property mixed|\Smarty_Template_Cached configLoad
*/
/*
* Later versions of PHP deprecate dynamic properties in a class. Since it is
* possible, without a detailed knowledge of the code, that a variable we
* haven't declared might be a different class depending on the context,
* we add this line. See
* https://deycode.com/posts/
* how-to-fix-php-warning-deprecated-creation-of-dynamic-property-is-deprecated
*/

#[\AllowDynamicProperties]
class Smarty_Internal_Extension_Handler
{
public $objType = null;
Expand All @@ -51,7 +61,6 @@ class Smarty_Internal_Extension_Handler
'DebugTemplate' => 0, 'RegisteredObject' => 0, 'StreamVariable' => 0,
'TemplateVars' => 0, 'Literals' => 'Literals',
);//

private $resolvedProperties = array();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@
*
* @method bool mustCompile()
*/
/*
* Later versions of PHP deprecate dynamic properties in a class. Since it is
* possible, without a detailed knowledge of the code, that a variable we
* haven't declared might be a different class depending on the context,
* we add this line. See
* https://deycode.com/posts/
* how-to-fix-php-warning-deprecated-creation-of-dynamic-property-is-deprecated
*/

#[\AllowDynamicProperties]
class Smarty_Internal_Template extends Smarty_Internal_TemplateBase
{
/**
Expand Down Expand Up @@ -125,7 +135,6 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase
* @var callback[]
*/
public $endRenderCallbacks = array();

/**
* Create template data object
* Some of the global Smarty settings copied to template scope
Expand Down
10 changes: 10 additions & 0 deletions smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_variable.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@
* @package Smarty
* @subpackage Template
*/
/*
* Later versions of PHP deprecate dynamic properties in a class. Since it is
* possible, without a detailed knowledge of the code, that a variable we
* haven't declared might be a different class depending on the context,
* we add this line. See
* https://deycode.com/posts/
* how-to-fix-php-warning-deprecated-creation-of-dynamic-property-is-deprecated
*/

#[\AllowDynamicProperties]
class Smarty_Variable
{
/**
Expand Down