[英]Symfony 3 PHP Warning: Module 'intl' already loaded in Unknown on line 0
我最近安裝了symfony 3,雖然看起來可以正常工作,但我注意到我的錯誤日志中不斷出現以下消息。
[10-Jan-2016 01:03:11 America/Chicago] PHP Warning: Module 'intl' already loaded in Unknown on line 0
研究完之后,我將它們設置在composer.json文件中以查看是否有幫助。
"symfony/intl": "^3.0.1",
"symfony/polyfill-intl-icu": "^1.0"
但在對頁面執行任何操作(如刷新頁面或嘗試輸入登錄名等)后,我仍然看到錯誤。
出於安全原因,下面是完整的composer.json,其中我的域名替換為example.com。
{
"name": "root/example.com",
"license": "proprietary",
"type": "project",
"autoload": {
"psr-4": {
"": "src/"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"require": {
"php": ">=5.5.9",
"symfony/symfony": "3.0.*",
"doctrine/orm": "^2.5",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"symfony/swiftmailer-bundle": "^2.3",
"symfony/monolog-bundle": "^2.8",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "^2.0",
"symfony/intl": "^3.0.1",
"symfony/polyfill-intl-icu": "^1.0"
},
"require-dev": {
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^2.7"
},
"scripts": {
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
],
"post-update-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
]
},
"extra": {
"symfony-app-dir": "app",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
}
}
}
我也嘗試遵循與我的問題類似的建議( 安裝Symfony 2.4.1 lib-icu 4.4依賴的問題 ),但是當我嘗試設置“ symfony / icu”:“ 1.1。*”時,作曲家拒絕這樣做因為我正在使用symfony 3 ...
我什至不確定我的問題是否與他的相同。
我在Centos Linux服務器上使用WHM / Cpanel,以防需要運行任何UNIX命令來解決此問題。
我相信我也已經通過WHM控制面板安裝了intl擴展名,但是我也不是100%肯定我也正確地做到了。 我已經在控制面板中附加了一張圖像的外觀。
我也嘗試過按照以下說明進行操作( http://symfony.com/doc/current/components/intl.html )
我如何擺脫錯誤消息?
我相信這與Symfony無關。
通常情況是您安裝的PHP版本使用--with-intl
選項編譯(內置intl
),並且還安裝了intl
擴展名。
嘗試禁用/卸載intl
擴展,並測試您是否仍然可以使用symfony/intl
功能而不會出現問題。
與Composer v1.3一起使用時,v5.0.17之前的SensioDistributionBundle會產生此類錯誤( 更多詳細信息 )。
檢查您是否會受到影響:
composer --version && composer show | grep distribution-bundle
如果是這樣,請通過將SensioDistributionBundle更新到最新版本來解決該問題:
composer update sensio/distribution-bundle
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.