<?php
namespace wcf\data\devtools\project;
-use wcf\data\DatabaseObject;
use wcf\data\package\installation\plugin\PackageInstallationPluginList;
use wcf\data\package\Package;
use wcf\data\package\PackageCache;
+use wcf\data\DatabaseObject;
use wcf\system\devtools\package\DevtoolsPackageArchive;
use wcf\system\devtools\pip\DevtoolsPip;
use wcf\system\package\validation\PackageValidationException;
<?php
namespace wcf\data\package\installation\plugin;
-use wcf\data\AbstractDatabaseObjectAction;
use wcf\data\devtools\project\DevtoolsProject;
+use wcf\data\AbstractDatabaseObjectAction;
use wcf\system\cache\CacheHandler;
use wcf\system\devtools\pip\DevtoolsPackageInstallationDispatcher;
use wcf\system\devtools\pip\DevtoolsPip;
*/
public $project;
+ /**
+ * Validates parameters to invoke a single PIP.
+ *
+ * @throws PermissionDeniedException
+ * @throws UserInputException
+ */
public function validateInvoke() {
if (!ENABLE_DEVELOPER_TOOLS || !WCF::getSession()->getPermission('admin.configuration.package.canInstallPackage')) {
throw new PermissionDeniedException();
}
}
+ /**
+ * Invokes a single PIP and returns the time needed to process it.
+ *
+ * @return string[]
+ */
public function invoke() {
$dispatcher = new DevtoolsPackageInstallationDispatcher($this->project);
/** @var IIdempotentPackageInstallationPlugin $pip */
CacheHandler::getInstance()->flushAll();
-
return [
'pluginName' => $this->packageInstallationPlugin->pluginName,
'target' => $this->parameters['target'],