What is the right place for the vendor folder created by composer |
Hi,
thats my folder structure: Code: - application I installed some packages through composer. After that, composer creates a folder named vendor in the root of my project. Could the vendor-folder be created also in the application folder or should the vendor-folder where it is now? what is the best place? There is also a third_party folder in application. What is this folder for?
If you set CI3's 'composer_autoload' config value to TRUE, it will look for /application/vendor/autoload.php. However, you can choose to set it to a string containing the path to your autoloader, so your directory structure would work as well if you set the value to either the absolute path or '../vendor/autoload.php'.
Of course, if you're using another method to load the Composer autoloader, it won't really matter. The /application/third_party/ directory is often used by developers who wish to distribute their code/packages for use by other developers. Then the code supplied by those developers is in a location somewhat isolated from your application. |
Welcome Guest, Not a member yet? Register Sign In |