Skip to content

Commit

Permalink
Add new dependency analyser
Browse files Browse the repository at this point in the history
  • Loading branch information
loevgaard committed Sep 17, 2024
1 parent 028f991 commit 000b44e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
run: "composer check-style"

- name: "Rector"
run: "vendor/bin/rector process --dry-run || true" # todo readd this when we don't get errors like this: "Process "q4ldytsrn0" not found"
run: "vendor/bin/rector process --dry-run"

- name: "Lint yaml files"
run: "(cd tests/Application && bin/console lint:yaml ../../src/Resources)"
Expand Down Expand Up @@ -91,7 +91,7 @@ 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"
Expand All @@ -103,11 +103,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
9 changes: 9 additions & 0 deletions composer-dependency-analyser.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

use ShipMonk\ComposerDependencyAnalyser\Config\Configuration;
use ShipMonk\ComposerDependencyAnalyser\Config\ErrorType;

return (new Configuration())
->addPathToExclude(__DIR__ . '/tests')
->ignoreErrorsOnPackage('setono/client-bundle', ErrorType::DEV_DEPENDENCY_IN_PROD)
;
5 changes: 0 additions & 5 deletions composer-require-checker.json

This file was deleted.

1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"psalm/plugin-phpunit": "^0.18",
"setono/client-bundle": "^1.0@beta",
"setono/code-quality-pack": "^2.8.2",
"shipmonk/composer-dependency-analyser": "^1.7",
"sylius/sylius": "~1.12.19",
"symfony/debug-bundle": "^6.4 || ^7.0",
"symfony/dotenv": "^6.4 || ^7.0",
Expand Down

0 comments on commit 000b44e

Please sign in to comment.