-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Bug: Kint 4.1 breaking change VT100 support #5522
Comments
First of all, CI 4.1.5 does not support PHP 8.1. I have confirmed this error with
Is this a bug of CI4? Or is there any use case to use --- a/system/CodeIgniter.php
+++ b/system/CodeIgniter.php
@@ -269,10 +269,12 @@ class CodeIgniter
RichRenderer::$tab_plugins = $config->richTabPlugins;
}
- CliRenderer::$cli_colors = $config->cliColors;
- CliRenderer::$force_utf8 = $config->cliForceUTF8;
- CliRenderer::$detect_width = $config->cliDetectWidth;
- CliRenderer::$min_terminal_width = $config->cliMinWidth;
+ if (is_cli()) {
+ CliRenderer::$cli_colors = $config->cliColors;
+ CliRenderer::$force_utf8 = $config->cliForceUTF8;
+ CliRenderer::$detect_width = $config->cliDetectWidth;
+ CliRenderer::$min_terminal_width = $config->cliMinWidth;
+ }
}
/** |
It seems this is a bug of Kint. I'm going to report to the Kint repository. |
@xbotkaj As a workaround, I recommend to fix Kint version. --- a/composer.json
+++ b/composer.json
@@ -10,7 +10,7 @@
"ext-intl": "*",
"ext-json": "*",
"ext-mbstring": "*",
- "kint-php/kint": "^4.0",
+ "kint-php/kint": "4.0",
"laminas/laminas-escaper": "^2.9",
"psr/log": "^1.1"
}, |
@xbotkaj I'd like to chime in and apologize for the breaking change, I had asked for some changes to better support Windows CLI -- this ended up with the undefined
@kenjis There is, although not a general use case. Here's an example of how it could be beneficial using the built-in web server: kint-php/kint#380 (comment) (This is a relative niche use case, and I'm not sure if there would be other use cases for such functionality.) Of course, thanks to jnvsor this issue was quickly patched in Kint. Hopefully there wouldn't be other breaking changes in the future. |
@DRSDavidSoft Thank you for your info. |
@DRSDavidSoft No problem at all. It was not in production so fine for me :) Thank You for super fast fix. |
PHP Version
8.1
CodeIgniter4 Version
4.1.5
CodeIgniter4 Installation Method
Git
Which operating systems have you tested for this bug?
Windows
Which server did you use?
apache
Database
No response
What happened?
Not sure if this should be targeted here or in the Kint repository. But release 4.1 has change -> 71a80e0. This change causes in CI error:
CRITICAL - 2022-01-01 14:03:30 --> Undefined constant "Kint\Renderer\STDOUT"
#0 C:\WebRoot\x\system\CodeIgniter.php(186): CodeIgniter\CodeIgniter->initializeKint()
#1 C:\WebRoot\x\system\bootstrap.php(146): CodeIgniter\CodeIgniter->initialize()
#2 C:\WebRoot\x\public\index.php(28): require('C:\WebRoot\x...')
#3 {main}
Steps to Reproduce
Update composer to latest packages so Kint will be 4.1 and use for OS Windows.
Expected Output
Normal bootstrap of application.
Anything else?
No response
The text was updated successfully, but these errors were encountered: