How to run Symfony2 application on Vagrant without nfs (on Windows, for example)?

ⅰ亾dé卋堺 提交于 2019-12-06 15:31:10

The best solution that I have found so far is to move vendor/ outside shared folder.

It doesn't require nfs and can be done easily with two simple changes.

One change in composer.json:

//filename: composer.json
{
    ...
    "config": {
        "bin-dir": "bin",
        "vendor-dir": "/home/vagrant/symfony2app/vendor"
    },
    ...
}

and one change in app/autoload.php:

//filename: app/autoload.php
/**
 * @var ClassLoader $loader
 */
$loader = require '/home/vagrant/symfony2app/vendor/autoload.php';

The results are truly amazing. Esspecially on Windows.

More details here: http://by-examples.net/2014/12/09/symfony2-on-vagrant.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!