【问题标题】:Symfony CMF auto routing bundleSymfony CMF 自动路由包
【发布时间】:2015-04-22 11:31:05
【问题描述】:

我一直在尝试使用 symfony cmf routing auto bundle 来使我的路由动态化,并且我一直在尝试安装这个 bundle。

如果我对 cmf bundle 的实现是正确的,则需要 PHPCR,并且 phpcr 的实现将使用 jackalope Doctrine DBAL 进行。我正在尝试下载 jackalope 学说 DBAL 以使用 phpcr 捆绑包,但 jackalope 未安装并因错误而恢复。如果我弄错了,请纠正我,如果不是,Jackalope 学说 dbal 有什么问题。

这是我的 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.6.*",
    "doctrine/orm": "~2.2,>=2.2.3,<2.5",
    "doctrine/dbal": "<2.5",
    "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,>=3.0.12",
    "sensio/framework-extra-bundle": "~3.0,>=3.0.2",
    "incenteev/composer-parameter-handler": "~2.0",
    "friendsofsymfony/user-bundle": "~2.0@dev",
     "jackalope/jackalope-doctrine-dbal":" 1.2.*@dev",
     "phpcr/phpcr-utils": "1.2.*@dev",
    "knplabs/knp-menu-bundle": "dev-master",
    "symfony-cmf/routing-bundle": "1.4.*@dev",
    "symfony-cmf/routing-auto-bundle": "1.1.*@dev",
    "doctrine/doctrine-fixtures-bundle": "2.2.*@dev"


},
"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",
    "symfony-assets-install": "relative",
    "incenteev-parameters": {
        "file": "app/config/parameters.yml"
    },
    "branch-alias": {
        "dev-master": "2.6-dev"
    }
}

}

更新composer.json 时显示以下错误:

Your requirements could not be resolved to an installable set of packages.        

Problem 1                                                                       
  - jackalope/jackalope-doctrine-dbal 1.2.x-dev requires jackalope/jackalop     
e ~1.2.0 -> no matching package found.                                            
   - jackalope/jackalope-doctrine-dbal 1.2.0-RC1 requires doctrine/dbal ~2.5     
,>=2.5.0 -> no matching package found.                                            
 - Installation request for jackalope/jackalope-doctrine-dbal  1.2.*@dev -     
> satisfiable by jackalope/jackalope-doctrine-dbal[1.2.0-RC1, 1.2.x-dev].         

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.                                                               

Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further     common problems.                                                                     

访问我的项目包时出现以下错误:

InvalidConfigurationException in CmfRoutingAutoExtension.php line 72:
No adapter has been configured, you either need to enable a persistence   layer        or explicitly specify an adapter using the "adapter" configuration key.

“没有配置适配器”是什么意思?

【问题讨论】:

    标签: symfony


    【解决方案1】:

    错误提示找不到jackalope/jackalope ....

    所以只需安装jackalope/jackalope

    这里是打包链接: https://packagist.org/packages/jackalope/jackalope

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-02-07
      • 1970-01-01
      • 1970-01-01
      • 2016-01-16
      • 2014-03-16
      • 1970-01-01
      • 2019-03-21
      相关资源
      最近更新 更多