• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Vendor folder composer location

#1
Hi.

The default path of the folder "Vendor" is the root of the project
In .gitignore file exist the line "/vendor/".

In application/config/config.php says: Enabling this setting will tell CodeIgniter to look for a Composer
| package auto-loader script in application/vendor/autoload.php.

If I change $config['composer_autoload'] = TRUE by default CodeIgniter 3 search inside of application Folder.


System/core/Codeigniter.php:165
......
if ($composer_autoload === TRUE)
{
file_exists(APPPATH.'vendor/autoload.php')
? require_once(APPPATH.'vendor/autoload.php')
: log_message('error', '$config[\'composer_autoload\'] is set to TRUE but '.APPPATH.'vendor/autoload.php was not found.');
}

In System/core/Codeigniter.php the APPPATH is incorrect? By default would be FCPATH?
Reply

#2
It's not incorrect.

https://github.com/bcit-ci/CodeIgniter/pull/3636
Reply

#3
The solution:

In application/config/config.php
$config['composer_autoload'] = FCPATH.'vendor/autoload.php';
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.