Symfony2 供应商安装
我正在尝试使用 symfony2 设置和创建新的捆绑包,但几乎每一步都会出现很多错误。
我正在下载 symfony 并运行此命令;
php bin/vendors install
>安装/更新 swiftmailer 克隆到 /var/www/Symfony/vendor/swiftmailer...
...
...
...
[错误异常]
警告:constant():在 /var/www/Symfony/vendor/symfony/src/Symfony/Bundle/MonologBundle/DependencyInjection/MonologExtension.php 第 103 行中找不到常量 Monolog\Logger::iNFO
问题是什么?我应该怎么办?
I'm trying to setup and create new bundle with symfony2, but getting so much error almost every step.
I'm download symfony and run this command;
php bin/vendors install
> Installing/Updating swiftmailer
Cloning into /var/www/Symfony/vendor/swiftmailer...
...
...
...
[ErrorException]
Warning: constant(): Couldn't find constant Monolog\Logger::iNFO in /var/www/Symfony/vendor/symfony/src/Symfony/Bundle/MonologBundle/DependencyInjection/MonologExtension.php line 103
what is the problem? what should I do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
错误原因是土耳其语系统语言。因此,在土耳其语中,“i”为大写“ı”,“I”为小写“ı”。我将系统语言更改为英语并解决了问题。
Error reason is Turkish system language. so in Turkish language "i" upper case "İ" and "I" lowercase "ı". I'm change my system language to English and problem solved.
将处理程序级别写入大写以绕过此代码
strtoupper($handler['level']))
例如
级别:信息
write handler level uppercased to bypass this code
strtoupper($handler['level']))
for example
level: INFO
这听起来非常非常奇怪。 MonologExtension 在某一时刻使用了constant(),它是这样做的:
所以基本上,它把给定的级别大写。看到有关
::iNFO
未找到的异常是没有意义的,除非您可能还启用了 mbstring 扩展并启用了mbstring.func_overload
选项。你能检查一下
ini_get('mbstring.func_overload')
是否返回 0/null 吗?否则可能就是这个原因。我实在想不出别的什么了。This sounds very very strange. The MonologExtension uses constant() at one point, and it does it like that:
So basically, it uppercases the given level. Seeing the exception about
::iNFO
not being found does not make sense, unless perhaps you have the mbstring extension enabled with thembstring.func_overload
option enabled as well.Can you check if
ini_get('mbstring.func_overload')
returns 0/null? Otherwise that may be the cause. I really can't think of anything else.