Symfony2 供应商安装

发布于 2024-12-07 06:25:56 字数 441 浏览 3 评论 0原文

我正在尝试使用 symfony2 设置和创建新的捆绑包,但几乎每一步都会出现很多错误。

我正在下载 symfony 并运行此命令;

php bin/vendors install

>安装/更新 swiftmailer 克隆到 /var/www/Symfony/vendor/swiftmailer...
...
...
...
[错误异常]
警告:constant():在 /var/www/Symfony/vendor/symfony/src/Symfony/Bundle/MonologBu​​ndle/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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

GRAY°灰色天空 2024-12-14 06:25:56

错误原因是土耳其语系统语言。因此,在土耳其语中,“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.

傲鸠 2024-12-14 06:25:56

将处理程序级别写入大写以绕过此代码
strtoupper($handler['level']))
例如
级别:信息

write handler level uppercased to bypass this code
strtoupper($handler['level']))
for example
level: INFO

梦境 2024-12-14 06:25:56

这听起来非常非常奇怪。 MonologExtension 在某一时刻使用了constant(),它是这样做的:

constant('Monolog\Logger::'.strtoupper($handler['level']))

所以基本上,它把给定的级别大写。看到有关 ::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:

constant('Monolog\Logger::'.strtoupper($handler['level']))

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 the mbstring.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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文