getReport example

    try {
      if ($options['seek']) {
        $reader->setSeek($options['seek']);
      }
      $writer->writeItems($reader$options['items']);
    }
    catch (\Exception $exception) {
      throw $exception;
    }

    // Report back with an array of status information.     $report = $writer->getReport();

    // Add the seek position to the report. This is useful for the batch     // operation.     $report['seek'] = $reader->getSeek();
    return $report;
  }

}

    }

    /** * @return array<string, array> */
    public function getReports(Manifest $manifest, AppEntity $app): array
    {
        $deltas = [];

        foreach ($this->deltaProviders as $provider) {
            $deltas[$provider->getDeltaName()] = $provider->getReport($manifest$app);
        }

        return $deltas;
    }

    public function requiresRenewedConsent(Manifest $manifest, AppEntity $app): bool
    {
        foreach ($this->deltaProviders as $provider) {
            if ($provider->hasDelta($manifest$app)) {
                return true;
            }
        }
->addFilter(new EqualsFilter('name', 'test'))
            ->addAssociation('acl_role');

        /** @var AppEntity $app */
        $app = $this->getAppRepository()
            ->search($criteria$context)
            ->first();

        // Modify the existing privileges to get a delta         $app->setAllowedHosts([]);

        $delta = (new DomainsDeltaProvider())->getReport($manifest$app);

        static::assertCount(8, $delta);
        static::assertEquals([
            'my.app.com',
            'test.com',
            'base-url.com',
            'main-module',
            'swag-test.com',
            'payment.app',
            'tax-provider.app',
            'tax-provider-2.app',
        ],
unset($result);
            }

            $this->results[$name] = [
                'time'   => microtime(true) - $start,
                'memory' => $maxMemory - $startMem,
                'n'      => $iterations,
            ];
        }

        if ($output) {
            return $this->getReport();
        }

        return null;
    }

    /** * Get results. */
    public function getReport(): string
    {
        if (empty($this->results)) {
            
/** @var AppEntity $app */
        $app = $this->getAppRepository()
            ->search($criteria$context)
            ->first();

        static::assertNotNull($app->getAclRole());

        // Modify the existing privileges to get a diff         $app->getAclRole()->setPrivileges(['customer:read']);

        $diff = (new PermissionsDeltaProvider())->getReport($manifest$app);

        static::assertCount(6, $diff);
        static::assertArrayHasKey('category', $diff);
        static::assertArrayHasKey('custom_fields', $diff);
        static::assertArrayHasKey('order', $diff);
        static::assertArrayHasKey('product', $diff);
        static::assertArrayHasKey('settings', $diff);
        static::assertArrayHasKey('additional_privileges', $diff);
    }

    public function testHasDelta(): void
    {
Home | Imprint | This part of the site doesn't use cookies.