Skip to content

Commit

Permalink
Remove double call to COMPOSER_PATH in bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalandan committed Mar 28, 2022
1 parent 4c58242 commit 85f7e69
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
5 changes: 0 additions & 5 deletions system/Test/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@ class_alias('Config\Services', 'CodeIgniter\Services');
// Initialize and register the loader with the SPL autoloader stack.
Services::autoloader()->initialize(new Autoload(), new Modules())->register();

// Now load Composer's if it's available
if (is_file(COMPOSER_PATH)) {
require_once COMPOSER_PATH;
}

// Load environment settings from .env files into $_SERVER and $_ENV
require_once SYSTEMPATH . 'Config/DotEnv.php';

Expand Down
19 changes: 7 additions & 12 deletions system/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,13 @@ class_alias('Config\Services', 'CodeIgniter\Services');
// Initialize and register the loader with the SPL autoloader stack.
Services::autoloader()->initialize(new Autoload(), new Modules())->register();

// Now load Composer's if it's available
if (is_file(COMPOSER_PATH)) {
/*
* The path to the vendor directory.
*
* We do not want to enforce this, so set the constant if Composer was used.
*/
if (! defined('VENDORPATH')) {
define('VENDORPATH', dirname(COMPOSER_PATH) . DIRECTORY_SEPARATOR);
}

require_once COMPOSER_PATH;
/*
* The path to the vendor directory.
*
* We do not want to enforce this, so set the constant if Composer was used.
*/
if (is_file(COMPOSER_PATH) && ! defined('VENDORPATH')) {
define('VENDORPATH', dirname(COMPOSER_PATH) . DIRECTORY_SEPARATOR);
}

// Load environment settings from .env files into $_SERVER and $_ENV
Expand Down

0 comments on commit 85f7e69

Please sign in to comment.