Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions src/Template/.github/workflows/unused.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,6 @@ jobs:
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Create PHPStan cache directory
run: mkdir -p build/phpstan

- name: Cache PHPStan results
uses: actions/cache@v2
with:
path: build/phpstan
key: ${{ runner.os }}-phpstan-${{ github.sha }}
restore-keys: ${{ runner.os }}-phpstan-

- name: Install dependencies
run: |
composer -q config -g github-oauth.github.com "${{ secrets.GITHUB_TOKEN }}"
Expand All @@ -67,4 +57,4 @@ jobs:
fi

- name: Detect unused packages
run: composer-unused -vvv --ansi --no-interaction --no-progress --excludePackage=php
run: composer-unused -vvv --output-format=github --ansi --no-interaction --no-progress
17 changes: 17 additions & 0 deletions src/Template/composer-unused.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

declare(strict_types=1);

use ComposerUnused\ComposerUnused\Configuration\Configuration;
use ComposerUnused\ComposerUnused\Configuration\NamedFilter;
use ComposerUnused\ComposerUnused\Configuration\PatternFilter;
use Webmozart\Glob\Glob;

return static function (Configuration $config): Configuration {
return $config
// ->addNamedFilter(NamedFilter::fromString('symfony/config'))
// ->addPatternFilter(PatternFilter::fromString('/symfony-.*/'))
->setAdditionalFilesFor('codeigniter4/framework', [
...Glob::glob(__DIR__ . '/vendor/codeigniter4/framework/system/Helpers/*.php'),
]);
};