404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.137.171.71: ~ $
<?php

use League\Flysystem\FileAttributes;
use League\Flysystem\Filesystem;
use League\Flysystem\Local\LocalFilesystemAdapter;
use League\Flysystem\StorageAttributes;

include_once __DIR__ . '/tools.php';

if ( ! isset($argv[1])) {
    panic('No base version provided');
}

$mainVersion = $argv[1];

write_line("☝️ Setting all flysystem constraints to {$mainVersion}.");

$filesystem = new Filesystem(new LocalFilesystemAdapter(__DIR__ . '/../'));

/** @var string[] $otherComposers */
$composerFiles = $filesystem->listContents('src', true)
    ->filter(function (StorageAttributes $item) {
        return $item->isFile();
    })
    ->filter(function (FileAttributes $item) {
        return substr($item->path(), -5) === '.json';
    })
    ->map(function (FileAttributes $item) {
        return $item->path();
    })
    ->toArray();

foreach ($composerFiles as $composerFile) {
    $contents = $filesystem->read($composerFile);
    $mainVersionRegex = preg_quote($mainVersion, '~');
    $updated = preg_replace('~("league/flysystem": "\\^[a-zA-Z0-9\\.-]+")~ms', '"league/flysystem": "^' . $mainVersion . '"', $contents);
    $filesystem->write($composerFile, $updated);
}

Filemanager

Name Type Size Permission Actions
.gitignore File 17 B 0644
check-versions.php File 3.96 KB 0644
close-subsplit-prs.yml File 726 B 0644
set-flysystem-version.php File 1.19 KB 0644
tools.php File 227 B 0644
update-subsplit-closers.php File 597 B 0644