Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add a placeholder comment (// ...) after this line to indicate that we don't show the complete file.


.. 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.