From 54eaaf6072a46b4353859717b28142d489cc1ca0 Mon Sep 17 00:00:00 2001 From: Manuele Menozzi Date: Sun, 27 Feb 2022 10:08:48 +0100 Subject: [PATCH] Introduce composer-unused check --- .github/workflows/build.yml | 6 +++++- composer-unused.php | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 composer-unused.php diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7649c4c189..7746f24f90 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,7 +42,7 @@ jobs: with: php-version: "${{ matrix.php }}" extensions: intl - tools: symfony + tools: symfony, composer-unused coverage: none - @@ -101,6 +101,10 @@ jobs: name: Install PHP dependencies run: composer install --no-interaction + - + name: Check for unused dependencies + run: composer-unused -o github + - name: Get Yarn cache directory id: yarn-cache diff --git a/composer-unused.php b/composer-unused.php new file mode 100644 index 0000000000..96c6ec4b10 --- /dev/null +++ b/composer-unused.php @@ -0,0 +1,18 @@ +addNamedFilter(NamedFilter::fromString('symfony/flex')) + ->setAdditionalFilesFor( + 'sylius/sylius-standard', + [__DIR__ . '/config/bundles.php', __DIR__ . '/config/bootstrap.php'] + ) + ; +};