Skip to content

Commit 577768c

Browse files
committed
smarty/4-PHP8-compatible-code-fixes
1 parent 527293c commit 577768c

File tree

141 files changed

+312
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+312
-0
lines changed

libs/Smarty.class.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@
102102
* @method int compileAllConfig(string $extension = '.conf', bool $force_compile = false, int $time_limit = 0, $max_errors = null)
103103
* @method int clearCompiledTemplate($resource_name = null, $compile_id = null, $exp_time = null)
104104
*/
105+
// PHP 8.2+: Allow dynamic properties for user extensibility and configuration
106+
#[\AllowDynamicProperties]
105107
class Smarty extends Smarty_Internal_TemplateBase
106108
{
107109
/**

libs/sysplugins/smarty_cacheresource.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* @subpackage Cacher
1414
* @author Rodney Rehm
1515
*/
16+
// PHP 8.2+: Allow dynamic properties for internal state and extensibility
17+
#[\AllowDynamicProperties]
1618
abstract class Smarty_CacheResource
1719
{
1820
/**

libs/sysplugins/smarty_cacheresource_custom.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* @subpackage Cacher
1414
* @author Rodney Rehm
1515
*/
16+
// PHP 8.2+: Allow dynamic properties for internal state and extensibility
17+
#[\AllowDynamicProperties]
1618
abstract class Smarty_CacheResource_Custom extends Smarty_CacheResource
1719
{
1820
/**

libs/sysplugins/smarty_cacheresource_keyvaluestore.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
* @subpackage Cacher
2929
* @author Rodney Rehm
3030
*/
31+
// PHP 8.2+: Allow dynamic properties for internal state and extensibility
32+
#[\AllowDynamicProperties]
3133
abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource
3234
{
3335
/**

libs/sysplugins/smarty_data.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* @package Smarty
1616
* @subpackage Template
1717
*/
18+
// PHP 8.2+: Allow dynamic properties for data object flexibility (inherits from Smarty_Internal_Data)
19+
#[\AllowDynamicProperties]
1820
class Smarty_Data extends Smarty_Internal_Data
1921
{
2022
/**

libs/sysplugins/smarty_internal_cacheresource_file.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* @package Smarty
1616
* @subpackage Cacher
1717
*/
18+
// PHP 8.2+: Allow dynamic properties for internal state and extensibility
19+
#[\AllowDynamicProperties]
1820
class Smarty_Internal_CacheResource_File extends Smarty_CacheResource
1921
{
2022
/**

libs/sysplugins/smarty_internal_compile_append.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* @package Smarty
1515
* @subpackage Compiler
1616
*/
17+
// PHP 8.2+: Allow dynamic properties for compiler state and tag-specific data
18+
#[\AllowDynamicProperties]
1719
class Smarty_Internal_Compile_Append extends Smarty_Internal_Compile_Assign
1820
{
1921
/**

libs/sysplugins/smarty_internal_compile_assign.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* @package Smarty
1515
* @subpackage Compiler
1616
*/
17+
// PHP 8.2+: Allow dynamic properties for compiler state and tag-specific data
18+
#[\AllowDynamicProperties]
1719
class Smarty_Internal_Compile_Assign extends Smarty_Internal_CompileBase
1820
{
1921
/**

libs/sysplugins/smarty_internal_compile_block.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
*
1414
* @author Uwe Tews <[email protected]>
1515
*/
16+
// PHP 8.2+: Allow dynamic properties for compiler state and tag-specific data
17+
#[\AllowDynamicProperties]
1618
class Smarty_Internal_Compile_Block extends Smarty_Internal_Compile_Shared_Inheritance
1719
{
1820
/**
@@ -94,6 +96,8 @@ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $
9496
/**
9597
* Smarty Internal Plugin Compile BlockClose Class
9698
*/
99+
// PHP 8.2+: Allow dynamic properties for compiler state and tag-specific data
100+
#[\AllowDynamicProperties]
97101
class Smarty_Internal_Compile_Blockclose extends Smarty_Internal_Compile_Shared_Inheritance
98102
{
99103
/**

libs/sysplugins/smarty_internal_compile_block_child.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
*
1414
* @author Uwe Tews <[email protected]>
1515
*/
16+
// PHP 8.2+: Allow dynamic properties for compiler state and tag-specific data
17+
#[\AllowDynamicProperties]
1618
class Smarty_Internal_Compile_Block_Child extends Smarty_Internal_Compile_Child
1719
{
1820
/**

0 commit comments

Comments
 (0)