使用路径自动加载文件 . include-path在composer.json上设置 . include-path附加到应用程序路径,而不是向列表添加另一个路径 . post-install-cmd设置为触发vendor / bin / phpunit . 它失败说明需要缺失 . 试图在bootstrap / autoload.php中有ini_set

PHP Fatal error:  require(): Failed opening required ) in /var/tmp/vendor/composer/autoload_real.php on line 58-d

试图设置php -d include_path =“/ path / required”composer.phar更新 .

这两种解决方案都没有奏效 . 可能我不能使用ini设置,因为在mock chroot中运行构建时无法设置它

这里是详细信息

生成优化的自动加载文件

post-install-cmd:vendor / bin / phpunit执行命令(CWD):vendor / bin / phpunit PHP警告:require(/builddir/build/BUILD/oapp-0.2/files/usr/local/stack/php/oapp /app/links/ConfigParser.inc):无法打开流:/builddir/build/BUILD/oapp-0.2/files/usr/local/stack/php/oapp/vendor/composer/autoload_real中没有此类文件或目录 . 第59行的PHP PHP堆栈跟踪:PHP 1. ()/ builddir/build/BUILD/oapp-0.2/files/usr/local/stack/php/oapp/vendor/phpunit/phpunit/phpunit:0 PHP 2 .require()/builddir/build/BUILD/oapp-0.2/files/usr/local/stack/php/oapp/vendor/phpunit/phpunit/phpunit:34 PHP 3. ComposerAutoloaderInit934d343510439f54bd62ad9094992368 :: getLoader()/ builddir / build / BUILD / oapp-0.2 / files / usr / local / stack / php / oapp / vendor / autoload.php:7 PHP 4. composerRequire934d343510439f54bd62ad9094992368()/ builddir/build/BUILD/oapp-0.2/files/usr/local/stack/ php / oapp / vendor / composer / autoload_real.php:50 PHP致命错误:require():无法打开所需的'/builddir/build/BUILD/oapp-0.2/files/ usr / local / stack / php / oapp / app / links / ConfigParser.inc'(include_path ='/ builddir / build / BUILD / oapp-0.2 / files / usr / local / stack / php / oapp / usr / local / stack /php:/builddir/build/BUILD/oapp-0.2/files/usr/local/stack/php/oapp/app/links:/builddir/build/BUILD/oapp-0.2/files/usr/local/stack/php在/builddir/build/BUILD/oapp-0.2/files/usr/local/stack/php/中的/oapp/vendor/phpseclib/phpseclib/phpseclib:.:/usr/share/pear:/usr/share/php')第59行的oapp / vendor / composer / autoload_real.php PHP堆栈跟踪:PHP 1. ()/ builddir/build/BUILD/oapp-0.2/files/usr/local/stack/php/oapp/vendor/phpunit / phpunit / phpunit:0 PHP 2. require()/ builddir/build/BUILD/oapp-0.2/files/usr/local/stack/php/oapp/vendor/phpunit/phpunit/phpunit:34 PHP 3. ComposerAutoloaderInit934d343510439f54bd62ad9094992368 :: getLoader()/ builddir/build/BUILD/oapp-0.2/files/usr/local/stack/php/oapp/vendor/autoload.php:7 PHP 4. composerRequire934d343510439f54bd62ad9094992368()/ builddir/build/BUILD/oapp-0.2/文件/ usr /本地/堆栈/ PHP / oapp /供应商/作曲家/autoload_real.php:50脚本vendor / bin / phpunit处理post-install-cmd事件,返回错误

[RuntimeException的]
错误输出:PHP警告:require(/builddir/build/BUILD/oapp-0.2/files/usr/local/stack/php/oapp/app/links/ConfigParser.inc):无法打开流:没有这样的文件或目录在第59行的/builddir/build/BUILD/oapp-0.2/files/usr/local/stack/php/oapp/vendor/composer/autoload_real.php

{
    "name": "opt/oapp",
    "include-path": ["/usr/local/stack/php/","/app/links/"],
    "license": "MIT",
    "require": {
            "laravel/framework": "4.1.*",
            "nesbot/carbon": "1.13.*",
            "bshaffer/oauth2-server-php": "~1.6",
            "bshaffer/oauth2-server-httpfoundation-bridge": "~1.1"
    },
    "require-dev": {
    "phpunit/phpunit": "4.6.*"
    },
    "autoload": {
            "classmap": [
                    "app/commands",
                    "app/controllers",
                    "app/models",
                    "app/database/migrations",
                    "app/database/seeds",
                    "app/tests/TestCase.php",
                    "app/libraries"
            ],
            "psr-4": {
                    "oapp\\": "app/oapp",
                    "oapp\\controllers\\": "app/oapp/controllers",
                    "oapp\\OAuth2\\": "app/oapp/OAuth2",
                    "oapp\\models\\": "app/oapp/models"
            },
            "files": [
                    "app/links/ConfigParser.inc"
            ]
    },
    "scripts": {
            "post-install-cmd": [
                    "vendor/bin/phpunit"
            ],
            "post-package-install": [
            ],
            "post-update-cmd": [
                    "vendor/bin/phpunit",
             "post-create-project-cmd": [
                    "php artisan key:generate"
            ]
    },
    "config": {
            "use-include-path": true,
            "preferred-install": "dist",
            "github-protocols": ["https"]


       },
        "minimum-stability": "stable"
  }