|
34 | 34 | use Config\App; |
35 | 35 | use Config\Cache; |
36 | 36 | use Config\Feature; |
37 | | -use Config\Kint as KintConfig; |
38 | 37 | use Config\Services; |
39 | 38 | use Exception; |
40 | | -use Kint; |
41 | | -use Kint\Renderer\CliRenderer; |
42 | | -use Kint\Renderer\RichRenderer; |
43 | 39 | use Locale; |
44 | 40 | use Throwable; |
45 | 41 |
|
@@ -192,89 +188,6 @@ public function initialize() |
192 | 188 | date_default_timezone_set($this->config->appTimezone ?? 'UTC'); |
193 | 189 | } |
194 | 190 |
|
195 | | - /** |
196 | | - * Initializes Kint |
197 | | - * |
198 | | - * @return void |
199 | | - * |
200 | | - * @deprecated 4.5.0 Moved to Autoloader. |
201 | | - */ |
202 | | - protected function initializeKint() |
203 | | - { |
204 | | - if (CI_DEBUG) { |
205 | | - $this->autoloadKint(); |
206 | | - $this->configureKint(); |
207 | | - } elseif (class_exists(Kint::class)) { |
208 | | - // In case that Kint is already loaded via Composer. |
209 | | - Kint::$enabled_mode = false; |
210 | | - // @codeCoverageIgnore |
211 | | - } |
212 | | - |
213 | | - helper('kint'); |
214 | | - } |
215 | | - |
216 | | - /** |
217 | | - * @deprecated 4.5.0 Moved to Autoloader. |
218 | | - */ |
219 | | - private function autoloadKint(): void |
220 | | - { |
221 | | - // If we have KINT_DIR it means it's already loaded via composer |
222 | | - if (! defined('KINT_DIR')) { |
223 | | - spl_autoload_register(function ($class): void { |
224 | | - $class = explode('\\', $class); |
225 | | - |
226 | | - if (array_shift($class) !== 'Kint') { |
227 | | - return; |
228 | | - } |
229 | | - |
230 | | - $file = SYSTEMPATH . 'ThirdParty/Kint/' . implode('/', $class) . '.php'; |
231 | | - |
232 | | - if (is_file($file)) { |
233 | | - require_once $file; |
234 | | - } |
235 | | - }); |
236 | | - |
237 | | - require_once SYSTEMPATH . 'ThirdParty/Kint/init.php'; |
238 | | - } |
239 | | - } |
240 | | - |
241 | | - /** |
242 | | - * @deprecated 4.5.0 Moved to Autoloader. |
243 | | - */ |
244 | | - private function configureKint(): void |
245 | | - { |
246 | | - $config = new KintConfig(); |
247 | | - |
248 | | - Kint::$depth_limit = $config->maxDepth; |
249 | | - Kint::$display_called_from = $config->displayCalledFrom; |
250 | | - Kint::$expanded = $config->expanded; |
251 | | - |
252 | | - if (isset($config->plugins) && is_array($config->plugins)) { |
253 | | - Kint::$plugins = $config->plugins; |
254 | | - } |
255 | | - |
256 | | - $csp = Services::csp(); |
257 | | - if ($csp->enabled()) { |
258 | | - RichRenderer::$js_nonce = $csp->getScriptNonce(); |
259 | | - RichRenderer::$css_nonce = $csp->getStyleNonce(); |
260 | | - } |
261 | | - |
262 | | - RichRenderer::$theme = $config->richTheme; |
263 | | - RichRenderer::$folder = $config->richFolder; |
264 | | - |
265 | | - if (isset($config->richObjectPlugins) && is_array($config->richObjectPlugins)) { |
266 | | - RichRenderer::$value_plugins = $config->richObjectPlugins; |
267 | | - } |
268 | | - if (isset($config->richTabPlugins) && is_array($config->richTabPlugins)) { |
269 | | - RichRenderer::$tab_plugins = $config->richTabPlugins; |
270 | | - } |
271 | | - |
272 | | - CliRenderer::$cli_colors = $config->cliColors; |
273 | | - CliRenderer::$force_utf8 = $config->cliForceUTF8; |
274 | | - CliRenderer::$detect_width = $config->cliDetectWidth; |
275 | | - CliRenderer::$min_terminal_width = $config->cliMinWidth; |
276 | | - } |
277 | | - |
278 | 191 | /** |
279 | 192 | * Launch the application! |
280 | 193 | * |
|
0 commit comments