Skip to content

Commit c024651

Browse files
committed
Add support shipmonk/composer-dependency-analyser
Signed-off-by: sasezaki <sasezaki@gmail.com>
1 parent 12b9775 commit c024651

File tree

7 files changed

+37
-1
lines changed

7 files changed

+37
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Currently, it identifies the following:
2828
- Psalm checks based on the presence of `psalm.xml.dist` or `psalm.xml` files.
2929
- PHPStan checks based on the presence of `phpstan.neon`, `phpstan.neon.dist` or `phpstan.dist.neon` files.
3030
- ComposerRequireChecker checks based on the presence of `composer-require-checker.json` file.
31+
- composer-dependency-analyser checks based on the presence of `composer-dependency-analyser.php` file.
3132
- phpbench benchmarks based on the presence of a `phpbench.json`.
3233
- Infection mutation tests based on the presence of `infection.json` or `infection.json.dist`. In case that `roave/infection-static-analysis-plugin` is installed, this will be used instead.
3334
- Markdown documentation based on the presence of a `mkdocs.yml` and/or markdown files in the `doc/book/` or `doc/books/` trees.

src/tools.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {InfectionTool} from './tools/infection';
66
import {PhpCodeSnifferTool} from './tools/codesniffer';
77
import {PsalmTool} from './tools/psalm';
88
import {ComposerRequireCheckerTool} from './tools/composerRequireChecker';
9+
import {ComposerDependencyAnalyser} from './tools/composerDependencyAnalyser';
910
import {PhpBenchTool} from './tools/phpbench';
1011
import {CodeceptionTool} from './tools/codeception';
1112
import {PhpCsFixerTool} from './tools/phpCsFixer';
@@ -80,6 +81,7 @@ export default function createTools(config: Config): Array<Tool> {
8081
PhpCodeSnifferTool,
8182
PsalmTool,
8283
ComposerRequireCheckerTool,
84+
ComposerDependencyAnalyser,
8385
PhpBenchTool,
8486
CodeceptionTool,
8587
PhpCsFixerTool,
@@ -106,4 +108,4 @@ export function removeNonExistentFilesToCheck(tool: Tool): Tool {
106108

107109
export function isToolRunningContainerDefaultPhpVersion(tool: Tool): tool is ToolRunningContainerDefaultPhpVersion {
108110
return (tool as ToolRunningContainerDefaultPhpVersion).php === CONTAINER_DEFAULT_PHP_VERSION;
109-
}
111+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { ToolType } from '../enum/toolType';
2+
import { ToolExecutionType } from '../enum/toolExecutionType';
3+
4+
export const ComposerDependencyAnalyser = {
5+
executionType: ToolExecutionType.STATIC,
6+
name: 'Composer Dependency Analyser',
7+
command: './vendor/bin/composer-dependency-analyser',
8+
filesToCheck: ['composer-dependency-analyser.php'],
9+
toolType: ToolType.CODE_CHECK,
10+
};
11+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"stablePHP": "7.4"
3+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use ShipMonk\ComposerDependencyAnalyser\Config\Configuration;
6+
7+
$config = new Configuration();
8+
9+
return $config;
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"include": [
3+
{
4+
"name": "Composer Dependency Analyser [7.4, latest]",
5+
"job": "{\"command\":\"./vendor/bin/composer-dependency-analyser\",\"php\":\"7.4\",\"extensions\":[],\"ini\":[],\"dependencies\":\"latest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[]}",
6+
"operatingSystem": "ubuntu-latest",
7+
"action": "laminas/laminas-continuous-integration-action@v1"
8+
}
9+
]
10+
}

tests/code-check-composer-dependency-analyser/test.env

Whitespace-only changes.

0 commit comments

Comments
 (0)