| Conditions | 3 |
| Paths | 2 |
| Total Lines | 36 |
| Code Lines | 21 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 28 | public function diff(PharInfo $pharInfoA, PharInfo $pharInfoB, IO $io): void |
||
| 29 | { |
||
| 30 | $gitDiff = ProcessCommandBasedDiffer::getDiff( |
||
| 31 | $pharInfoA, |
||
| 32 | $pharInfoB, |
||
| 33 | 'git diff --no-index', |
||
| 34 | ); |
||
| 35 | |||
| 36 | if (null === $gitDiff) { |
||
| 37 | $io->writeln(Differ::NO_DIFF_MESSAGE); |
||
| 38 | |||
| 39 | return; |
||
| 40 | } |
||
| 41 | |||
| 42 | $separator = 'diff --git '; |
||
| 43 | |||
| 44 | $diffLines = explode( |
||
| 45 | $separator, |
||
| 46 | $gitDiff, |
||
| 47 | ); |
||
| 48 | |||
| 49 | $pharMetaLine = sprintf( |
||
| 50 | 'a%2$s/%1$s b%3$s/%1$s', |
||
| 51 | Extract::PHAR_META_PATH, |
||
| 52 | $pharInfoA->getFileName(), |
||
| 53 | $pharInfoB->getFileName(), |
||
| 54 | ); |
||
| 55 | |||
| 56 | $filteredLines = array_filter( |
||
| 57 | $diffLines, |
||
| 58 | static fn (string $line) => !str_starts_with($line, $pharMetaLine) |
||
| 59 | ); |
||
| 60 | |||
| 61 | $filteredDiff = implode($separator, $filteredLines); |
||
| 62 | |||
| 63 | $io->writeln('' === $filteredDiff ? Differ::NO_DIFF_MESSAGE : $filteredDiff); |
||
| 64 | } |
||
| 66 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths