Skip to content

Commit

Permalink
Allow extensions access to the composer autoloader at the earliest po…
Browse files Browse the repository at this point in the history
…ssible moment.
  • Loading branch information
Rowan Lewis authored and brendo committed Jun 28, 2016
1 parent 3ae0257 commit ff2da53
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.php
Expand Up @@ -12,7 +12,7 @@
chdir(DOCROOT);

// Include autoloader:
require_once DOCROOT . '/vendor/autoload.php';
$autoloader = require_once DOCROOT . '/vendor/autoload.php';

// Include the boot script:
require_once DOCROOT . '/symphony/lib/boot/bundle.php';
Expand Down
14 changes: 14 additions & 0 deletions symphony/lib/boot/bundle.php
Expand Up @@ -27,6 +27,20 @@
Symphony::initialiseDatabase();
Symphony::initialiseExtensionManager();

/**
* When the composer autoloader has been loaded.
* @delegate ComposerReady
* @param string $context
* '/all/'
* @param Composer\Autoload\ClassLoader $autoloader
* The Composer autoloader.
*/
Symphony::ExtensionManager()->notifyMembers(
'ComposerReady', '/all/', array(
'autoloader' => $autoloader
)
);

// Handle custom admin paths, #702
$adminPath = Symphony::Configuration()->get('admin-path', 'symphony');
$adminPath = (is_null($adminPath)) ? 'symphony' : $adminPath;
Expand Down

0 comments on commit ff2da53

Please sign in to comment.