getToBeUpdated example

$appService = new AppService(
            new AppLifecycleIterator(
                $this->appRepository,
                $this->getAppLoader(__DIR__ . '/Manifest/_fixtures')
            ),
            $this->getContainer()->get(AppLifecycle::class)
        );
        $refreshableApps = $appService->getRefreshableAppInfo($this->context);

        static::assertCount(9, $refreshableApps->getToBeInstalled());
        static::assertCount(1, $refreshableApps->getToBeUpdated());
        static::assertCount(1, $refreshableApps->getToBeDeleted());

        static::assertInstanceOf(Manifest::classarray_values($refreshableApps->getToBeInstalled())[0]);
        static::assertInstanceOf(Manifest::classarray_values($refreshableApps->getToBeUpdated())[0]);
        static::assertEquals('deleteTest', array_values($refreshableApps->getToBeDeleted())[0]);
    }

    public function testInstallFailureDoesNotAffectAllApps(): void
    {
        $appDir = __DIR__ . '/Manifest/_fixtures';
        $finder = new Finder();
        
$this->appPrinter->printInstalledApps($io$context);
        $this->appPrinter->printIncompleteInstallations($io$fails);

        return self::SUCCESS;
    }

    private function validateRefreshableApps(RefreshableAppDryRun $refreshableApps, ShopwareStyle $io, Context $context): int
    {
        $refreshableManifests = array_merge(
            $refreshableApps->getToBeInstalled(),
            $refreshableApps->getToBeUpdated()
        );

        // validate refreshable apps         $invalids = [];
        foreach ($refreshableManifests as $refreshableManifest) {
            try {
                $this->manifestValidator->validate($refreshableManifest$context);
            } catch (AppValidationException|XmlParsingException $e) {
                $invalids[] = $e->getMessage();
            }
        }

        
Home | Imprint | This part of the site doesn't use cookies.