Skip to content

Commit 9018343

Browse files
authored
Fix deprecated dynamic property creation in CI_Profiler Library.
Due to PHP 8.2 deprecation of dynamic property creation, we can explicitly declare all _compile_* properties in the CI_Profiler class. These properties are known as they are created based on the $_available_sections array. This would be a clearer approach than just using #[AllowDynamicProperties]
1 parent d264c2d commit 9018343

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

system/libraries/Profiler.php

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,76 @@ class CI_Profiler {
7373
'config'
7474
);
7575

76+
/**
77+
* Compile benchmarks
78+
*
79+
* @var bool
80+
*/
81+
protected $_compile_benchmarks;
82+
83+
/**
84+
* Compile GET data
85+
*
86+
* @var bool
87+
*/
88+
protected $_compile_get;
89+
90+
/**
91+
* Compile memory usage
92+
*
93+
* @var bool
94+
*/
95+
protected $_compile_memory_usage;
96+
97+
/**
98+
* Compile POST data
99+
*
100+
* @var bool
101+
*/
102+
protected $_compile_post;
103+
104+
/**
105+
* Compile URI string
106+
*
107+
* @var bool
108+
*/
109+
protected $_compile_uri_string;
110+
111+
/**
112+
* Compile controller info
113+
*
114+
* @var bool
115+
*/
116+
protected $_compile_controller_info;
117+
118+
/**
119+
* Compile queries
120+
*
121+
* @var bool
122+
*/
123+
protected $_compile_queries;
124+
125+
/**
126+
* Compile HTTP headers
127+
*
128+
* @var bool
129+
*/
130+
protected $_compile_http_headers;
131+
132+
/**
133+
* Compile session data
134+
*
135+
* @var bool
136+
*/
137+
protected $_compile_session_data;
138+
139+
/**
140+
* Compile config data
141+
*
142+
* @var bool
143+
*/
144+
protected $_compile_config;
145+
76146
/**
77147
* Number of queries to show before making the additional queries togglable
78148
*

0 commit comments

Comments
 (0)