From 07c5efd711ae717c2df1da69db4f5968dedd62a9 Mon Sep 17 00:00:00 2001 From: Sem Schilder Date: Mon, 18 Dec 2023 13:10:53 +0100 Subject: [PATCH] Add debug line --- .github/workflows/phpunit-tests.yml | 6 +++--- .../PackageSynchronizer/ComposerPackageSynchronizer.php | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index be75fd3d..721c4234 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -31,7 +31,7 @@ jobs: with: php-version: ${{ matrix.php-version }} tools: phpunit-bridge - extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, pgsql + extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, pgsql, zip coverage: xdebug - name: Get composer cache directory @@ -65,6 +65,6 @@ jobs: DATABASE_URL: postgres://postgres:postgres@127.0.0.1:${{ job.services.postgres.ports[5432] }}/postgres?charset=UTF-8 - name: Run tests - run: php vendor/bin/phpunit --coverage-text + run: git status && php vendor/bin/phpunit tests/Unit/Service/PackageSynchronizer/ComposerPackageSynchronizerTest.php --testdox --filter testSynchronizePackageWithGitLabToken env: - DATABASE_URL: postgres://postgres:postgres@127.0.0.1:${{ job.services.postgres.ports[5432] }}/postgres?charset=UTF-8 + DATABASE_URL: postgres://postgres:postgres@127.0.0.1:${{ job.services.postgres.ports[5432] }}/postgres?charset=UTF-8 diff --git a/src/Service/PackageSynchronizer/ComposerPackageSynchronizer.php b/src/Service/PackageSynchronizer/ComposerPackageSynchronizer.php index eda1d6bd..034a60cb 100644 --- a/src/Service/PackageSynchronizer/ComposerPackageSynchronizer.php +++ b/src/Service/PackageSynchronizer/ComposerPackageSynchronizer.php @@ -62,6 +62,7 @@ public function synchronize(Package $package): void $io = $this->createIO($package); /** @var RepositoryInterface $repository */ $repository = current(RepositoryFactory::defaultRepos($io, $this->createConfig($package, $io))); + dump($repository); $json = ['packages' => []]; $packages = $repository->getPackages(); @@ -218,6 +219,8 @@ public function synchronize(Package $package): void $this->packageManager->saveProvider($json, $package->organizationAlias(), $name); } catch (\Throwable $exception) { + // TODO: Remove debug line + throw $exception; $package->syncFailure(sprintf('Error: %s%s', $exception->getMessage(), isset($io) && strlen($io->getOutput()) > 1 ? "\nLogs:\n".$io->getOutput() : ''