Skip to content

Commit

Permalink
feature #4643 How to override vendor directory location (gajdaw)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.3 branch.

Discussion
----------

How to override vendor directory location

| Q             | A
| ------------- | ---
| Doc fix?      | [no]
| New docs?     | [no]
| Applies to    | [Symfony 2.3]
| Fixed tickets | [#4642]

Commits
-------

0875bd8 How to override vendor directory location - fix
07f6843 How to override vendor directory location - fix
bce4c16 How to override vendor directory location
  • Loading branch information
weaverryan committed Jan 16, 2015
2 parents f9c1389 + 0875bd8 commit a23e7d2
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions cookbook/configuration/override_dir_structure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,38 @@ 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
// ...
$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.

0 comments on commit a23e7d2

Please sign in to comment.