Symfony - PHP-Intl Extension


Symfony - PHP-Intl Extension

我的问题是:

我正在重新设计一个客户网站。之前它没有使用任何框架。现在我使用Symfony2作为后端。我的客户在strato.de有他的网站空间,没有安装php-intl扩展,这是Symfony2.3或更高版本所必需的。

是否有可能安装symfony没有这个扩展-如果是,如何?

composer.json:

{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The '"Symfony Standard Edition'" distribution",
"autoload": {
    "psr-0": { "": "src/", "SymfonyStandard": "app/" }
},
"require": {
    "php": ">=5.3.3",
    "symfony/symfony": "2.5.*",
    "symfony/icu": "1.0.*",
    "doctrine/orm": "~2.2,>=2.2.3",
    "doctrine/doctrine-bundle": "~1.2",
    "twig/extensions": "~1.0",
    "symfony/assetic-bundle": "~2.3",
    "symfony/swiftmailer-bundle": "~2.3",
    "symfony/monolog-bundle": "~2.4",
    "sensio/distribution-bundle": "~3.0",
    "sensio/framework-extra-bundle": "~3.0",
    "incenteev/composer-parameter-handler": "~2.0"
},
"require-dev": {
    "sensio/generator-bundle": "~2.3"
},
"scripts": {
    "post-root-package-install": [
        "SymfonyStandard''Composer::hookRootPackageInstall"
    ],
    "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::removeSymfonyStandardFiles"
    ],
    "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::removeSymfonyStandardFiles"
    ]
},
"config": {
    "bin-dir": "bin"
},
"extra": {
    "symfony-app-dir": "app",
    "symfony-web-dir": "web",
    "incenteev-parameters": {
        "file": "app/config/parameters.yml"
    },
    "branch-alias": {
        "dev-master": "2.5-dev"
    }
}

}

作曲家。Phar install给出如下错误:

Problem 1
- The requested package symfony/icu could not be found in any version, there may be a typo in the package name.
Problem 2
- symfony/symfony v2.5.3 requires symfony/icu ~1.0 -> no matching package found.
- symfony/symfony v2.5.3 requires symfony/icu ~1.0 -> no matching package found.
- Installation request for symfony/symfony v2.5.3 -> satisfiable by symfony/symfony[v2.5.3].
Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

这对你有帮助:

http://symfony.com/doc/current/components/intl.html

"require: {
    "symfony/icu": "1.1.*"
}

将版本设置为

"1.0.*" if the server does not have the intl extension installed;
"1.1.*" if the server is compiled with ICU 4.2 or lower.
编辑:

基于你的需求块。

Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing jdorn/sql-formatter (v1.2.17)
    Loading from cache
  - Installing psr/log (1.0.0)
    Loading from cache
  - Installing twig/twig (v1.16.0)
    Loading from cache
  - Installing doctrine/lexer (v1.0)
    Loading from cache
  - Installing doctrine/annotations (v1.2.0)
    Loading from cache
  - Installing doctrine/collections (v1.2)
    Loading from cache
  - Installing doctrine/cache (v1.3.0)
    Loading from cache
  - Installing doctrine/inflector (v1.0)
    Loading from cache
  - Installing doctrine/common (v2.4.2)
    Loading from cache
  - Removing symfony/finder (v2.5.3)
  - Installing symfony/symfony (v2.5.3)
    Loading from cache
  - Installing symfony/icu (v1.0.1)
    Downloading: 100%         
  - Installing doctrine/dbal (v2.4.2)
    Loading from cache
  - Installing doctrine/doctrine-bundle (v1.2.0)
    Loading from cache
  - Installing kriswallsmith/assetic (v1.1.2)
    Loading from cache
  - Installing symfony/assetic-bundle (v2.3.0)
    Loading from cache
  - Installing doctrine/orm (v2.4.4)
    Loading from cache
  - Installing twig/extensions (v1.1.0)
    Loading from cache
  - Installing swiftmailer/swiftmailer (v5.2.1)
    Loading from cache
  - Installing symfony/swiftmailer-bundle (v2.3.7)
    Loading from cache
  - Installing monolog/monolog (1.10.0)
    Loading from cache
  - Installing symfony/monolog-bundle (v2.6.1)
    Loading from cache
  - Installing sensiolabs/security-checker (v2.0.0)
    Loading from cache
  - Installing sensio/distribution-bundle (v3.0.4)
    Loading from cache
  - Installing sensio/framework-extra-bundle (v3.0.1)
    Loading from cache
  - Installing incenteev/composer-parameter-handler (v2.1.0)
    Loading from cache