Skip to content

Commit

Permalink
Add new dependency analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
loevgaard committed Aug 5, 2024
1 parent 4e2a97d commit 06ca456
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,13 @@ jobs:
coverage: "none"
extensions: "${{ env.PHP_EXTENSIONS }}"
php-version: "${{ matrix.php-version }}"
tools: "composer-require-checker, composer-unused, flex"
tools: "flex"

- name: "Remove require-dev section in composer.json"
run: "composer config --unset require-dev"

- name: "Add shipmonk/composer-dependency-analyser to composer.json"
run: "composer install --dev --no-update --no-plugins --no-scripts shipmonk/composer-dependency-analyser"

- name: "Install composer dependencies"
uses: "ramsey/composer-install@v3"
Expand All @@ -107,11 +110,8 @@ jobs:
with:
dependency-versions: "${{ matrix.dependencies }}"

- name: "Run maglnet/composer-require-checker"
run: "composer-require-checker check"

- name: "Run composer-unused/composer-unused"
run: "composer-unused"
- name: "Run dependency analysis"
run: "vendor/bin/composer-dependency-analyser"

static-code-analysis:
name: "Static Code Analysis (PHP${{ matrix.php-version }} | Deps: ${{ matrix.dependencies }} | SF${{ matrix.symfony }})"
Expand Down
7 changes: 7 additions & 0 deletions composer-dependency-analyser.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

use ShipMonk\ComposerDependencyAnalyser\Config\Configuration;

return (new Configuration())
->addPathToExclude(__DIR__ . '/tests')
;
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"phpunit/phpunit": "^9.6.17",
"psalm/plugin-phpunit": "^0.18.4",
"setono/code-quality-pack": "^2.7",
"shipmonk/composer-dependency-analyser": "^1.6",
"sylius/sylius": "~1.12.13",
"symfony/debug-bundle": "^5.4 || ^6.4 || ^7.0",
"symfony/dotenv": "^5.4 || ^6.4 || ^7.0",
Expand Down

0 comments on commit 06ca456

Please sign in to comment.