/**
* Remove one plugin per run call, as this action can take some time we make a new request for each plugin
*/
public function run(int
$offset): ValidResult
{ $extensions =
$this->pluginCompatibility->
getExtensionsToDeactivate($this->toVersion,
$this->context,
$this->deactivationFilter
);
$extensionCount = \
count($extensions);
if ($extensionCount === 0
) { return new ValidResult($offset,
$offset);
} $extension =
$extensions[0
];
++
$offset;
$this->extensionLifecycleService->
deactivate($extension->
getType(),
$extension->
getName(),
$this->context
);
$deactivatedPlugins =
(array) $this->systemConfigService->
get(self::UPDATE_DEACTIVATED_PLUGINS
) ?:
[];
$deactivatedPlugins[] =
$extension->
getId();
$this->systemConfigService->
set(self::UPDATE_DEACTIVATED_PLUGINS,
$deactivatedPlugins);
if ($extensionCount === 1
) {