'mapRunner' ]; } /** * In previous releases, the task could specify 'php-method' or 'shell'. * These have been consolidated as 'run'. * * This function maps the old notation to the new notation. * * @param \Civi\CompilePlugin\Event\CompileListEvent $e */ public function mapRunner(CompileListEvent $e) { $defns = $e->getTasksSpecs(); foreach ($defns as &$defn) { $defn['run'] = $defn['run'] ?? []; if (isset($defn['php-method'])) { $phpMethods = (array)$defn['php-method']; foreach ($phpMethods as $phpMethod) { // TODO Maybe move the validation bit elsewhere if (PhpMethodHandler::isWellFormedMethod($phpMethod)) { $defn['run'][] = '@php-method ' . $phpMethod; } else { throw new \InvalidArgumentException("Malformed php-method: " . json_encode($phpMethod, JSON_UNESCAPED_SLASHES)); } } } if (isset($defn['shell'])) { $shellCmds = (array)$defn['shell']; foreach ($shellCmds as $shellCmd) { $defn['run'][] = '@sh ' . $shellCmd; } } } $e->setTasksSpecs($defns); } } __halt_compiler();----SIGNATURE:----ZYDSKo5f3MzuWz/QKnL/JZEbeOpgNpsZu42u7z2UhGAzHfVCMC+iyQ5Ongit/un9XDje0iNDXg3hHnOKYRSDSB83HyWcHg/T+7AXbByCXGYpRfaqE27Z33BX1R6iOQTuUCN3Z7s1AAnTldIMurySqbALS/jAn4QLdr7dLVohcrslotIq0gvFMI0ughMJ5caz6HaSGiEwLkmg4NH+viexTxmKt0X5q9gT1lP0mk3sWn95NlR6fHRZ+MqUAAZr2SwCoGrLVD27efI9y6+zfebljaKUZTNYS/UeOasygahHEoGjUfR5NPLAojHmJQoNHSaLsf9/4YL+FIDJWktl0Y3/81M+VLTtM5PyY02uHn5kvYik2o7cuAW+Eue2nv+YvSQrybo4SK8a+nJVYn990NoDkSW9wTFMb/rNH5uVu6zvtgYh8GHyIS3JBWYKuuofSIU/9Jx8l3fW4YncKuadNJVcyfXQRZsnNtsdXQ0+hZSZjhGG0v8fLsK2L0hq2NI1QaB0Vy4FDABfuQlQEWEoTQF6e8qK2/+zmCOqiBxQ51H3oNVOyAX6PDl4hqI2vvSE+fYiZvatRS4zCzyuv56Tu89u2Pi7MmWJVrSMAfrSpBDS+ObrGysjB05nc7fVbNT8vtez6N8uniEbrj+RSoOEtDYtittTbkAuK0Vxo56qGmalmwo=----ATTACHMENT:----NDk0MzQzMzc1NTg2MzY1NSAyMzE2NTUyMTYwOTU5MjgwIDY5MTg5MTE0MjMxMTQwNjY=