Skip to content

Commit

Permalink
Add composer detection. (Administrator)
Browse files Browse the repository at this point in the history
I know a lot of you don't use composer but this 4 lines of code would help me. First of all I could get dependencies from packagist.org or my own private packages. Packages don't have to be extensions a lot of them are utilities that help.
  • Loading branch information
Bradley Weston committed Jun 30, 2014
1 parent 89f62d9 commit 9caf5f4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions administrator/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
die('Your host needs to use PHP 5.3.10 or higher to run this version of Joomla!');
}

if (file_exists($composer = __DIR__ . '/../vendor/autoload.php'))
{
require $composer;
}

/**
* Constant that is checked in included files to prevent direct access.
* define() is used in the installation folder rather than "const" to not error for PHP 5.2 and lower
Expand Down

0 comments on commit 9caf5f4

Please sign in to comment.