【发布时间】:2017-12-07 07:20:03
【问题描述】:
我正在尝试针对 PHP 7.1.6 使用 xdebug 来解决我的 CakePHP v3.3.6 项目中失败的单元测试。我使用以下设置设置了 xdebug:
[xdebug]
xdebug.remote_enable = on
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 9000
xdebug.remote_autostart = 1
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "c:/wamp/tmp"
xdebug.show_local_vars=0
xdebug.max_nesting_level=256
PHP 现在连接到我的 xdebug 客户端(VisualStudio 代码),但只要我运行 phpunit ./vendor/phpunit/phpunit/phpunit 或 Cake 控制台 ./bin/cake.php,就会立即出现异常:
类型: Aura\Intl\Exception
消息:“区域设置为 'en_US' 的包 'cake' 未注册。”
我在网上查了一下,找到了one other person encountering the same issue,但他们最终的解决方案只是禁用 xdebug,这不是我想要的。我想知道启用 xdebug 会如何导致此问题,以及如何解决它。
谢谢!
编辑:值得注意的是,我尝试通过将以下内容放入我的 bootstrap.php 来禁用缓存
// Disable all cache reads, and cache writes.
Cache::disable();
这没有帮助。
【问题讨论】:
标签: php cakephp cakephp-3.0 xdebug intl