| Total Lines | 30 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | public function test(): void |
||
| 10 | { |
||
| 11 | $data1 = new class { |
||
| 12 | public $data = 1; |
||
| 13 | }; |
||
| 14 | |||
| 15 | $data2 = new class { |
||
| 16 | public $data = 2; |
||
| 17 | }; |
||
| 18 | |||
| 19 | $dependency1 = new CallbackDependency(static function () use ($data1) { |
||
| 20 | return $data1->data; |
||
| 21 | }); |
||
| 22 | |||
| 23 | $dependency2 = new CallbackDependency(static function () use ($data2) { |
||
| 24 | return $data2->data; |
||
| 25 | }); |
||
| 26 | |||
| 27 | $anyDependency = new AllDependencies([$dependency1, $dependency2]); |
||
| 28 | $anyDependency->evaluateDependency($this->getCache()); |
||
| 29 | |||
| 30 | $this->assertDependencyNotChanged($anyDependency); |
||
| 31 | |||
| 32 | $data1->data = 42; |
||
| 33 | |||
| 34 | $this->assertDependencyNotChanged($anyDependency); |
||
| 35 | |||
| 36 | $data2->data = 42; |
||
| 37 | |||
| 38 | $this->assertDependencyChanged($anyDependency); |
||
| 39 | } |
||
| 41 |
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