diff --git a/.gitignore b/.gitignore index 6fc14647d..faaac7a00 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /.php-cs-fixer.php /.php-cs-fixer.cache /google-cloud-service-account.json +.idea \ No newline at end of file diff --git a/bin/check-versions.php b/bin/check-versions.php index f98bb05ee..095108b26 100644 --- a/bin/check-versions.php +++ b/bin/check-versions.php @@ -8,7 +8,7 @@ * - All required dependencies of the extracted packages MUST be * present in the main composer.json's require(-dev) section. * - Dependency constraints of extracted packages may not exclude - * the constrains of the main package and visa versa. + * the constraints of the main package and visa versa. * - The provided target release argument must be satisfiable by * all of the extracted packages' core dependency constraint. */ @@ -21,7 +21,7 @@ use League\Flysystem\Local\LocalFilesystemAdapter; use League\Flysystem\StorageAttributes; -include_once __DIR__.'/tools.php'; +include_once __DIR__ . '/tools.php'; function constraint_has_conflict(string $mainConstraint, string $packageConstraint): bool @@ -53,7 +53,7 @@ function constraint_has_conflict(string $mainConstraint, string $packageConstrai write_line("🔎 Inspecting composer dependency incompatibilities."); $mainVersion = $argv[1]; -$filesystem = new Filesystem(new LocalFilesystemAdapter(__DIR__.'/../')); +$filesystem = new Filesystem(new LocalFilesystemAdapter(__DIR__ . '/../')); $mainComposer = $filesystem->read('composer.json'); /** @var string[] $otherComposers */ @@ -69,7 +69,7 @@ function constraint_has_conflict(string $mainConstraint, string $packageConstrai $information = json_decode($filesystem->read($composerFile), true); foreach ($information['require'] as $dependency => $constraint) { - if (strpos($dependency, 'ext-') === 0 || $dependency === 'phpseclib/phpseclib') { + if (str_starts_with($dependency, 'ext-') || $dependency === 'phpseclib/phpseclib') { continue; } @@ -79,6 +79,7 @@ function constraint_has_conflict(string $mainConstraint, string $packageConstrai } else { write_line("Composer file {$composerFile} allows league/flysystem:{$mainVersion} with {$constraint}"); } + continue; } diff --git a/bin/set-flysystem-version.php b/bin/set-flysystem-version.php index 7f25df7fc..1036e08b4 100644 --- a/bin/set-flysystem-version.php +++ b/bin/set-flysystem-version.php @@ -5,7 +5,7 @@ use League\Flysystem\Local\LocalFilesystemAdapter; use League\Flysystem\StorageAttributes; -include_once __DIR__.'/tools.php'; +include_once __DIR__ . '/tools.php'; if ( ! isset($argv[1])) { panic('No base version provided'); @@ -15,7 +15,7 @@ write_line("☝️ Setting all flysystem constraints to {$mainVersion}."); -$filesystem = new Filesystem(new LocalFilesystemAdapter(__DIR__.'/../')); +$filesystem = new Filesystem(new LocalFilesystemAdapter(__DIR__ . '/../')); /** @var string[] $otherComposers */ $composerFiles = $filesystem->listContents('src', true) diff --git a/bin/tools.php b/bin/tools.php index add416899..b114a30da 100644 --- a/bin/tools.php +++ b/bin/tools.php @@ -1,6 +1,6 @@