运行composer update时未设置GIT_DISCOVERY_ACROSS_FILESYSTEM

时间:2016-10-26 03:49:03

标签: git symfony vagrant composer-php

当我尝试做#34;作曲家更新"它返回以下错误。它是在流浪汉机器上运行的symfony项目。

enter image description here

  1. 我已经尝试移动/删除.git文件夹并通过git init重新启动它。
  2. 我试图摧毁流浪汉机器并重置它。

2 个答案:

答案 0 :(得分:1)

看起来您手动修改/删除了供应商目录中的内容。这通常是个坏主意。最佳操作方法(如果您有锁定文件)是rm -r vendor/然后执行composer install

答案 1 :(得分:0)

嗯,在最新的OSX Sierra更新后,流浪汉机器及其Symfony的配置停止了工作。最初我注意到客户端计算机停止将共享文件夹与主机同步,因此无论你在/ var / www / inside of vagrant中的任何内容都不会出现在你的主机上。包含供应商文件夹及其内容。我从以下位置更改了synced_folder vagrant配置后

config.vm.synced_folder ".", "/var/www", type: "rsync",
    rsync__exclude: ["app/", "bin/", "features/", "src/", "tests/", "vendor/", "web/"]
config.vm.synced_folder "app/", "/var/www/app", type: "nfs"
config.vm.synced_folder "bin/", "/var/www/bin", type: "nfs"
config.vm.synced_folder "features/", "/var/www/features", type: "nfs"
config.vm.synced_folder "src/", "/var/www/src", type: "nfs"
config.vm.synced_folder "tests/", "/var/www/tests", type: "nfs"
config.vm.synced_folder "vendor/", "/var/www/vendor", type: "nfs"
config.vm.synced_folder "web/", "/var/www/web", type: "nfs"

为:

    config.vm.synced_folder ".", "/var/www", type: 'nfs', mount_options: ['rw', 'vers=3', 'tcp', 'fsc', 'actimeo=2'], rsync__exclude: ["app/", "bin/", "src/", "tests/", "vendor/", "web/"]
    config.vm.synced_folder "app/", "/var/www/app", type: "nfs"
    config.vm.synced_folder "bin/", "/var/www/bin", type: "nfs"
    config.vm.synced_folder "src/", "/var/www/src", type: "nfs"
    config.vm.synced_folder "tests/", "/var/www/tests", type: "nfs"
    config.vm.synced_folder "web/", "/var/www/web", type: "nfs" 

同步开始正常工作,但是当您希望将composer update作为延迟调用运行时,似乎存在权限问题。当composer尝试删除任何包并安装它的较新版本时,会显示权限错误。

此问题仅影响使用Symfony自定义配置的vagrant / scotchbox安装。