Skip to content

Commit

Permalink
Replace str_starts_with() with strpost() as build with `--prefer-…
Browse files Browse the repository at this point in the history
…lowest` fails
  • Loading branch information
maks-rafalko committed Aug 11, 2021
1 parent db88103 commit ade2833
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Command/ConfigureCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

use function count;
use function file_exists;
use function strpos;
use const GLOB_ONLYDIR;
use function implode;
use Infection\Config\ConsoleHelper;
Expand Down Expand Up @@ -245,7 +246,7 @@ private function getJsonSchemaPathOrUrl(): string
try {
$version = strstr(Versions::getVersion(Application::PACKAGE_NAME), '@', true);

if ($version === false || str_starts_with($version, 'dev-')) {
if ($version === false || strpos($version, 'dev-') === 0) {
$version = 'master';
}
} catch (OutOfBoundsException $e) {
Expand Down

0 comments on commit ade2833

Please sign in to comment.