isManagedByComposer example

public function deleteApp(string $technicalName): void
    {
        $apps = $this->load();

        if (!isset($apps[$technicalName])) {
            return;
        }

        $manifest = $apps[$technicalName];

        if ($manifest->isManagedByComposer()) {
            throw AppException::cannotDeleteManaged($technicalName);
        }

        (new Filesystem())->remove($manifest->getPath());
    }

    public function loadFile(string $appPath, string $filePath): ?string
    {
        $path = Path::join($appPath$filePath);

        if ($path[0] !== \DIRECTORY_SEPARATOR) {
            
__DIR__,
            __DIR__,
            new ConfigReader()
        );

        $apps = $appLoader->load();
        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(
            
Home | Imprint | This part of the site doesn't use cookies.