2017-03-22 14:54
浏览 66

CakePHP 3 transliterator_transliterate PHP关于全新安装的警告

I have installed CakePHP 3.4.3 using Composer (their recommended way) and my system meets all of the requirements. Upon installation and basic configuration everything is ticked green.

I've used bin/bake to bake the files for 1 very simple table which only has 5 columns: id, name, url, created, modified

When I go to insert a new record it's giving the following error message:

Warning (2): transliterator_transliterate(): Could not create transliterator with ID "Any-Latin; Latin-ASCII; [\u0080-\u7fff] remove" (transliterator_create: unable to open ICU transliterator with id "Any-Latin; Latin-ASCII; [\u0080-\u7fff] remove": U_INVALID_ID) [CORE/src/Utility/Text.php, line 1070]

I've Googled this but can't find any information I can understand about transliterator_transliterate() (never heard of this either).

As the file this is originating from src/Utility/Text.php is part of the Cake core I feel it's unwise to delve into this or modify it.

Why is this error being shown, what does it mean, and how can I fix it?

If I switch the debug setting to false in config/app.php this hides the message, but I don't feel that's a valid solution as it's complaining about something.

As I say, my system meets all their requirements: PHP 7, centOS, Apache and hasn't had any other errors during installation.

图片转代码服务由CSDN问答提供 功能建议

我使用Composer安装了CakePHP 3.4.3(推荐方式),我的系统满足所有要求。 在安装和基本配置时,所有内容都勾选为绿色。

我使用 bin / bake 来烘焙1个非常简单的表的文件,该表只有5列: id,name,url,created,modified


警告(2):transliterator_transliterate():无法创建带有ID&amp; quot-Any-Latin的音译器; 拉丁-ASCII; [\ u0080- \ u7fff]删除&amp; quot; (transliterator_create:无法打开ICU音译器,ID为&amp; quot; Any-Latin; Latin-ASCII; [\ u0080- \ u7fff] remove&amp; quot;:U_INVALID_ID)[ CORE / src / Utility / Text.php < / b>,行 1070 ]

我用Google搜索了这个,但找不到任何我能理解的有关 transliterator_transliterate()(从未听说过这个)。

由于源自 src / Utility / Text.php 的文件是Cake核心的一部分,我觉得深入研究或修改它是不明智的。


如果我将调试设置切换为false config / app.php 这会隐藏消息,但我觉得这不是一个有效的解决方案,因为它抱怨某事。

正如我所说,我的系统 满足他们的所有要求:PHP 7,centOS,Apache,并且在安装过程中没有任何其他错误。

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

  • douxian3828 2017-03-23 14:09

    The solution is to install/update the ICU library, which seems to be either missing or too old.

    The requirement for the library was removed from the composer definition lately, and turned into a suggestion, as it caused a lot of trouble for many people with outdated setups. While removing requirements isn't ideal, the fact that only two methods in the core require it seems to have been the justification for it being moved to a suggestion.

    The suggest description makes it rather clear when this library is needed:

    The intl PHP library, to use Text::transliterate() or Text::slug()

    However it doesn't make any statements regarding the required version, which is something that surely could be improved.

    解决 无用
    打赏 举报

相关推荐 更多相似问题