deleteApp example

public function removeExtensionAndCancelSubscription(int $licenseId, string $technicalName, string $id, Context $context): void
    {
        $this->validateExtensionCanBeRemoved($technicalName$id$context);
        $app = $this->getAppById($id$context);
        $this->storeClient->cancelSubscription($licenseId$context);
        $this->appLifecycle->delete($technicalName['id' => $id, 'roleId' => $app->getAclRoleId()]$context);
        $this->deleteExtension($technicalName);
    }

    public function deleteExtension(string $technicalName): void
    {
        $this->appLoader->deleteApp($technicalName);
    }

    public function activateExtension(string $technicalName, Context $context): void
    {
        $id = $this->getAppByName($technicalName$context)->getId();
        $this->appStateService->activateApp($id$context);
    }

    public function deactivateExtension(string $technicalName, Context $context): void
    {
        $id = $this->getAppByName($technicalName$context)->getId();
        
static::assertCount(1, $apps);
        static::assertArrayHasKey('test', $apps);

        $app = $apps['test'];

        static::assertTrue($app->isManagedByComposer());

        static::assertEquals('test', $app->getMetadata()->getName());
        static::assertEquals('1.0.0', $app->getMetadata()->getVersion());

        static::expectException(AppException::class);
        $appLoader->deleteApp('test');
    }

    public function testGetFlowActions(): void
    {
        $appLoader = new AppLoader(
            __DIR__,
            __DIR__,
            new ConfigReader()
        );

        $appEntity = new AppEntity();
        
Home | Imprint | This part of the site doesn't use cookies.