'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:----TyClDtWQq16bukOpCQa4wmvVP74TJCJUg1p1W24MNRfeABe9TsqMVnUwSvtQV8zWnLzCkHYSPuY6SmcLZEXoRLIS+53KPbGhpETejagQMS+r0j9CE3rIyxEx6pyjK4XgKngaaLE0eUU85FxA9pSA+5ImYJuIkX6Z/SRcZyt8+zUsbRylIg4qDQVnDqlW3oMSKcUcjvrDQi6eXSZ6n8noJxlvzxeWc495o4WfCVwWW7+b2mdX8R1DcbaORa1ns7Od0RdwW6CoSX4VgX08Zexv9u9BmaoGwKUuR7NOHvYUL/krst3Tktez3yvaIB3ZVJH439OLOWYPzy4tDA9BkFS3XribMlZ72lrQFOCHkJJFziuRxGStAkIYGe9AYSOIdrg/qptLpmkjz1m4CeVeUHDp1xmxmujxWwxZucRblWzSOOGSeuY2SL7q8IhlEGLGJik1KVVMphxdgJmEwztoN53fsCnGnbnfCGGIO9cs5q6F8tMzdrV7NIdrjsdw3xaIagvpClgTu/FPReIq6cnhjltsVba9kuA1MrlXuKgLF7UDakh1BrbbXMWfwlQ7tx0synEZ0knr9izdKFc5mf8apHEhqh5+Hve8Yz5hI7GwK1BDOgX7r2L11tCGti/0skf19gHufaaJcrPuKGlfFLnNJj/OjkZP9EWqtE11tdaI3s2TweI=----ATTACHMENT:----NzUzNzk5NjM1OTU5NjkxOSAyNTQ1NTIxNTY3NDIyMTc5IDQzNzA0Mjg3NzY5MjM4MjY=