public function __construct( private readonly AbstractExtensionLifecycle
$extensionLifecycleService,
private readonly ExtensionDownloader
$extensionDownloader,
private readonly PluginService
$pluginService,
private readonly PluginManagementService
$pluginManagementService ) { } #[Route(path: '/api/_action/extension/refresh', name: 'api.extension.refresh', methods: ['POST'])]
public function refreshExtensions(Context
$context): Response
{ $this->pluginService->
refreshPlugins($context,
new NullIO());
return new Response('', Response::HTTP_NO_CONTENT
);
} #[Route(path: '/api/_action/extension/upload', name: 'api.extension.upload', methods: ['POST'], defaults: ['_acl' => ['system.plugin_upload']])]
public function uploadExtensions(Request
$request, Context
$context): Response
{ /** @var UploadedFile|null $file */
$file =
$request->files->
get('file'
);
if (!
$file) {