Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CMS PR 40768] Test 2: Uninstall with calling a migration function #38

Closed
15 changes: 15 additions & 0 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ protected function uninstallExtensions()
* 'pre_function' => Name of an optional migration function to be called before
* uninstalling, `null` if not used.
*/
['type' => 'plugin', 'element' => 'demotasks', 'folder' => 'task', 'client_id' => 0, 'pre_function' => 'testPreFunction'],
];

$db = Factory::getDbo();
Expand Down Expand Up @@ -283,6 +284,20 @@ protected function uninstallExtensions()
}
}

/**
* This method is just for testing.
*
* @param \stdClass $data Object with `extension_id` and `params` of the extension
*
* @return void
*
* @since __DEPLOY_VERSION__
*/
private function testPreFunction($data)
{
error_log('Hello from testPreFunction.');
}

/**
* Update the manifest caches
*
Expand Down