Skip to content

Commit

Permalink
CRM-16243 - CRM_Extension_Manager::install() - Refresh class-loader i…
Browse files Browse the repository at this point in the history
…ncrementally

This allows an extension's installation logic to use a class defined by one
of the (upstream) requirements.
  • Loading branch information
totten authored and JohnFF committed Oct 9, 2017
1 parent 4827c43 commit 34ba82e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CRM/Extension/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,23 @@ public function install($keys) {
$typeManager->onPreEnable($info);
$this->_setExtensionActive($info, 1);
$typeManager->onPostEnable($info);

// A full refresh would be preferrable but very slow. This at least allows
// later extensions to access classes from earlier extensions.
$this->statuses = NULL;
$this->mapper->refresh();
break;

case self::STATUS_UNINSTALLED:
// install anew
$typeManager->onPreInstall($info);
$this->_createExtensionEntry($info);
$typeManager->onPostInstall($info);

// A full refresh would be preferrable but very slow. This at least allows
// later extensions to access classes from earlier extensions.
$this->statuses = NULL;
$this->mapper->refresh();
break;

case self::STATUS_UNKNOWN:
Expand Down

0 comments on commit 34ba82e

Please sign in to comment.