Symfony Composer安装 - 命令“app”未定义

时间:2014-07-16 13:08:45

标签: symfony composer-php

我刚刚从一位前同事那里继承了一堆用Symfony2构建的php应用程序。我很难让他们继续前进,但我觉得我非常接近。

我正在使用Composer使用composer install安装供应商/和bin /目录。我删除了(真正重命名)原始的composer.lock文件,因为他有一些使用本地机器目录的bundle路径。

运行composer install让我一直到composer.json文件的末尾,然后它开始“写入锁定文件”我收到Command "app" is not defined错误。那是怎么回事?我无法运行php app/console server:run或其他任何东西,因为基本上我还没有创建bootstrap.php.cache文件。

我觉得我太近了!有没有人遇到过这个?下面是我从控制台获得的输出。我对Symfony还很新,非常感谢任何帮助!

Writing lock file
Generating autoload files



  [InvalidArgumentException]     
  Command "app" is not defined.  



Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap handling the post-install-cmd event terminated with an exception



  [RuntimeException]                                     
  An error occurred when generating the bootstrap file.  

使用composer.json文件更新。

{
    "name": "symfony/framework-standard-edition",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-0": { "": "src/" },
        "files": [
            "vendor/tobie/ua-parser/php/bin/uaparser.php",
            "vendor/simplehtmldom_1_5/simple_html_dom.php"
        ]
    },

    "repositories": [
        {
            "type": "vcs",
            "url":  "ssh://git@sourcecode.ts.vcu.edu:22/~git/vcu-cas-bundle.git"
        }
    ],
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.3.*",
        "doctrine/orm": ">=2.2.3,<2.4-dev",
        "doctrine/doctrine-bundle": "1.2.*",
        "twig/extensions": "1.0.*",
        "symfony/assetic-bundle": "2.3.*",
        "symfony/swiftmailer-bundle": "2.3.*",
        "symfony/monolog-bundle": "2.3.*",
        "sensio/distribution-bundle": "2.3.*",
        "sensio/framework-extra-bundle": "2.3.*",
        "sensio/generator-bundle": "2.3.*",
        "jms/serializer-bundle": "0.12.*@dev",
        "incenteev/composer-parameter-handler": "~2.0",
        "beberlei/DoctrineExtensions": "dev-master",
        "vcu/cas-bundle": "dev-master",
        "tobie/ua-parser": "dev-master"
    },
    "scripts": {
        "post-install-cmd": [
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
        ],
        "post-update-cmd": [
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
        ]
    },
    "config": {
        "bin-dir": "bin"
    },
    "minimum-stability": "alpha",
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "branch-alias": {
            "dev-master": "2.2-dev"
        }
    }
}

0 个答案:

没有答案