diff --git a/.github/workflows/exported_files.yml b/.github/workflows/exported_files.yml index d9d2e17..9669eea 100644 --- a/.github/workflows/exported_files.yml +++ b/.github/workflows/exported_files.yml @@ -12,7 +12,7 @@ jobs: - name: "Check exported files" run: | EXPECTED="LICENSE,README.md,RELEASES.md,SECURITY.md,composer.json" - CURRENT="$(git archive HEAD | tar --list --exclude="assets" --exclude="assets/*" --exclude="src" --exclude="src/*" | paste -s -d ",")" + CURRENT="$(git archive HEAD | tar --list --exclude="assets" --exclude="assets/*" --exclude="src" --exclude="src/*" --exclude="templates" --exclude="templates/*" | paste -s -d ",")" echo "CURRENT =${CURRENT}" echo "EXPECTED=${EXPECTED}" test "${CURRENT}" == "${EXPECTED}" diff --git a/src/DataCollector/PwaCollector.php b/src/DataCollector/PwaCollector.php index 6711c23..5af21b4 100644 --- a/src/DataCollector/PwaCollector.php +++ b/src/DataCollector/PwaCollector.php @@ -17,6 +17,7 @@ use Symfony\Component\Serializer\Encoder\JsonEncode; use Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer; use Symfony\Component\Serializer\SerializerInterface; +use Symfony\Component\VarDumper\Cloner\Data; use Throwable; use function count; use function in_array; @@ -61,11 +62,12 @@ public function collect(Request $request, Response $response, Throwable $excepti 'installable' => $this->isInstallable(), 'output' => $this->serializer->serialize($this->manifest, 'json', $jsonOptions), ]; - - dump($this->data); } - public function getData(): array + /** + * @return array|Data + */ + public function getData(): array|Data { return $this->data; } @@ -94,7 +96,7 @@ public function getName(): string } /** - * @return array{status: bool, reasons: string[]} + * @return array{status: bool, reasons: array} */ private function isInstallable(): array { @@ -107,9 +109,7 @@ private function isInstallable(): array ['standalone', 'fullscreen', 'minimal-ui'], true ), - 'The manifest must have at least one icon' => $this->manifest->icons === null || count( - $this->manifest->icons - ) === 0, + 'The manifest must have at least one icon' => count($this->manifest->icons) === 0, 'The manifest must have the "prefer_related_applications" property set to a value other than "true"' => $this->manifest->preferRelatedApplications === true, ];