From bce4c1689092125f09d340d02cf7bd0c743af5dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?W=C5=82odzimierz=20Gajda?= Date: Sat, 13 Dec 2014 10:11:57 +0100 Subject: [PATCH 1/3] How to override vendor directory location --- .../configuration/override_dir_structure.rst | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/cookbook/configuration/override_dir_structure.rst b/cookbook/configuration/override_dir_structure.rst index c24c39e429b..2fcc258db25 100644 --- a/cookbook/configuration/override_dir_structure.rst +++ b/cookbook/configuration/override_dir_structure.rst @@ -154,3 +154,40 @@ the ``extra.symfony-web-dir`` option in the ``composer.json`` file: $ php app/console cache:clear --env=prod $ php app/console assetic:dump --env=prod --no-debug + +Override the ``vendor`` Directory +--------------------------------- + +To override the ``vendor`` directory you have to introduce changes in the +following files: + +* ``app/autoload.php`` +* ``composer.json`` + +The change in the ``composer.json`` takes the form: + +.. code-block:: json + + { + ... + "config": { + "bin-dir": "bin", + "vendor-dir": "/some/dir/vendor" + }, + ... + } + +In ``app/autoload.php`` you need to modify the path leading to ``vendor/autoload.php`` +file:: + + // app/autoload.php + /** + * @var ClassLoader $loader + */ + $loader = require '/some/dir/vendor/autoload.php'; + +.. tip:: + + This modification can be of interest if you work using virtual environment + and cannot use NFS. For example, when running Symfony app using Vagrant/VirtualBox + guest operating system. From 07f68430a57b05f3f0a11986fa7113e3f51e5362 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?W=C5=82odzimierz=20Gajda?= Date: Sun, 14 Dec 2014 16:32:06 +0100 Subject: [PATCH 2/3] How to override vendor directory location - fix --- cookbook/configuration/override_dir_structure.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cookbook/configuration/override_dir_structure.rst b/cookbook/configuration/override_dir_structure.rst index 2fcc258db25..8a701d299c4 100644 --- a/cookbook/configuration/override_dir_structure.rst +++ b/cookbook/configuration/override_dir_structure.rst @@ -181,9 +181,7 @@ In ``app/autoload.php`` you need to modify the path leading to ``vendor/autoload file:: // app/autoload.php - /** - * @var ClassLoader $loader - */ + $loader = require '/some/dir/vendor/autoload.php'; .. tip:: From 0875bd8acff7d4818e7871dde7185bd7373610b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?W=C5=82odzimierz=20Gajda?= Date: Mon, 15 Dec 2014 07:52:03 +0100 Subject: [PATCH 3/3] How to override vendor directory location - fix --- cookbook/configuration/override_dir_structure.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/configuration/override_dir_structure.rst b/cookbook/configuration/override_dir_structure.rst index 8a701d299c4..abfe379bd89 100644 --- a/cookbook/configuration/override_dir_structure.rst +++ b/cookbook/configuration/override_dir_structure.rst @@ -181,7 +181,7 @@ In ``app/autoload.php`` you need to modify the path leading to ``vendor/autoload file:: // app/autoload.php - + // ... $loader = require '/some/dir/vendor/autoload.php'; .. tip:: pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy