*/
public $maintainer = NULL;
+ /**
+ * @var string|null
+ * The name of a class which handles the install/upgrade lifecycle.
+ * @see \CRM_Extension_Upgrader_Interface
+ */
+ public $upgrader = NULL;
+
/**
* Load extension info an XML file.
*
$this->type = (string) $info->attributes()->type;
$this->file = (string) $info->file;
$this->label = (string) $info->name;
+ $this->upgrader = (string) $info->upgrader;
// Convert first level variables to CRM_Core_Extension properties
// and deeper into arrays. An exception for URLS section, since
$this->assertEquals('test.foo', $info->key);
$this->assertEquals('foo', $info->file);
$this->assertEquals('zamboni', $info->typeInfo['extra']);
+ $this->assertEquals(NULL, $info->upgrader);
$this->assertEquals([], $info->requires);
}
<psr4 prefix=\"Civi\\\" path=\"Civi\"/>
<psr0 prefix=\"CRM_\" path=\"\"/>
</classloader>
+ <upgrader>CRM_Foo_Upgrader</upgrader>
<requires><ext>org.civicrm.a</ext><ext>org.civicrm.b</ext></requires>
</extension>
";
$this->assertEquals('CRM_', $info->classloader[1]['prefix']);
$this->assertEquals('', $info->classloader[1]['path']);
$this->assertEquals('psr0', $info->classloader[1]['type']);
+ $this->assertEquals('CRM_Foo_Upgrader', $info->upgrader);
$this->assertEquals(['org.civicrm.a', 'org.civicrm.b'], $info->requires);
}