if ( !isset( $this->loaded[$dependencyName]['version'] ) ) {
// If we depend upon any version, and none is set, that's fine.
if ( $constraint === '*' ) {
- wfDebug( "{$dependencyName} does not expose it's version, but {$checkedExt}
- mentions it with constraint '*'. Assume it's ok so." );
+ wfDebug( "{$dependencyName} does not expose its version, but {$checkedExt}"
+ . " mentions it with constraint '*'. Assume it's ok so." );
return false;
} else {
// Otherwise, mark it as incompatible.
- return "{$dependencyName} does not expose it's version, but {$checkedExt}
- requires: {$constraint}.";
+ return "{$dependencyName} does not expose its version, but {$checkedExt}"
+ . " requires: {$constraint}.";
}
} else {
// Try to get a constraint for the dependency version
'FakeDependency' => [
'version' => '1.0.0',
],
+ 'NoVersionGiven' => [],
] );
$this->assertEquals( $expected, $checker->checkArray( [
'FakeExtension' => $given,
],
[]
],
+ [
+ [
+ 'extensions' => [
+ 'NoVersionGiven' => '*'
+ ]
+ ],
+ [],
+ ],
+ [
+ [
+ 'extensions' => [
+ 'NoVersionGiven' => '1.0',
+ ]
+ ],
+ [ 'NoVersionGiven does not expose its version, but FakeExtension requires: 1.0.' ],
+ ],
+ [
+ [
+ 'extensions' => [
+ 'Missing' => '*',
+ ]
+ ],
+ [ 'FakeExtension requires Missing to be installed.' ],
+ ],
+ [
+ [
+ 'extensions' => [
+ 'FakeDependency' => '2.0.0',
+ ]
+ ],
+ // phpcs:ignore Generic.Files.LineLength.TooLong
+ [ 'FakeExtension is not compatible with the current installed version of FakeDependency (1.0.0), it requires: 2.0.0.' ],
+ ]
];
}