!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.68 (Linux) PHP/7.4.33. PHP/7.4.33 

uname -a: Linux bjb2293782.nichost.ru 6.6.151-1.el8.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Aug 10
11:16:02 MSK 2026 x86_64
 

uid=12584(bjb2293782) gid=12584(bjb2293782) groups=12584(bjb2293782)  

Safe-mode: OFF (not secure)

/usr/share/php/Composer/Package/Version/   drwxr-xr-x
Free 60.32 GB of 99.95 GB (60.35%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     VersionBumper.php (4.44 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php declare(strict_types=1);

/*
 * This file is part of Composer.
 *
 * (c) Nils Adermann <naderman@naderman.de>
 *     Jordi Boggiano <j.boggiano@seld.be>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Composer\Package\Version;

use 
Composer\Package\PackageInterface;
use 
Composer\Package\Loader\ArrayLoader;
use 
Composer\Package\Dumper\ArrayDumper;
use 
Composer\Pcre\Preg;
use 
Composer\Semver\Constraint\Constraint;
use 
Composer\Semver\Constraint\ConstraintInterface;
use 
Composer\Semver\Intervals;
use 
Composer\Util\Platform;

/**
 * @author Jordi Boggiano <j.boggiano@seld.be>
 * @internal
 */
class VersionBumper
{
    
/**
     * Given a constraint, this returns a new constraint with
     * the lower bound bumped to match the given package's version.
     *
     * For example:
     *  * ^1.0 + 1.2.1            -> ^1.2.1
     *  * ^1.2 + 1.2.0            -> ^1.2
     *  * ^1.2.0 + 1.3.0          -> ^1.3.0
     *  * ^1.2 || ^2.3 + 1.3.0    -> ^1.3 || ^2.3
     *  * ^1.2 || ^2.3 + 2.4.0    -> ^1.2 || ^2.4
     *  * ^3@dev + 3.2.99999-dev  -> ^3.2@dev
     *  * ~2 + 2.0-beta.1         -> ~2
     *  * dev-master + dev-master -> dev-master
     */
    
public function bumpRequirement(ConstraintInterface $constraintPackageInterface $package): string
    
{
        
$parser = new VersionParser();
        
$prettyConstraint $constraint->getPrettyString();
        if (
str_starts_with($constraint->getPrettyString(), 'dev-')) {
            return 
$prettyConstraint;
        }

        
$version $package->getVersion();
        if (
str_starts_with($package->getVersion(), 'dev-')) {
            
$loader = new ArrayLoader($parser);
            
$dumper = new ArrayDumper();
            
$extra $loader->getBranchAlias($dumper->dump($package));

            
// dev packages without branch alias cannot be processed
            
if (null === $extra || $extra === VersionParser::DEFAULT_BRANCH_ALIAS) {
                return 
$prettyConstraint;
            }

            
$version $extra;
        }

        
$intervals Intervals::get($constraint);

        
// complex constraints with branch names are not bumped
        
if (\count($intervals['branches']['names']) > 0) {
            return 
$prettyConstraint;
        }

        
$major Preg::replace('{^(\d+).*}''$1'$version);
        
$versionWithoutSuffix Preg::replace('{(?:\.(?:0|9999999))+(-dev)?$}'''$version);
        
$newPrettyConstraint '^'.$versionWithoutSuffix;

        
// not a simple stable version, abort
        
if (!Preg::isMatch('{^\^\d+(\.\d+)*$}'$newPrettyConstraint)) {
            return 
$prettyConstraint;
        }

        
$pattern '{
            (?<=,|\ |\||^) # leading separator
            (?P<constraint>
                \^'
.$major.'(?:\.\d+)* # e.g. ^2.anything
                | ~'
.$major.'(?:\.\d+){0,2} # e.g. ~2 or ~2.2 or ~2.2.2 but no more
                | '
.$major.'(?:\.[*x])+ # e.g. 2.* or 2.*.* or 2.x.x.x etc
                | >=\d(?:\.\d+)* # e.g. >=2 or >=1.2 etc
            )
            (?=,|$|\ |\||@) # trailing separator
        }x'
;
        if (
Preg::isMatchAllWithOffsets($pattern$prettyConstraint$matches)) {
            
$modified $prettyConstraint;
            foreach (
array_reverse($matches['constraint']) as $match) {
                
assert(is_string($match[0]));
                
$suffix '';
                if (
substr_count($match[0], '.') === && substr_count($versionWithoutSuffix'.') === 1) {
                    
$suffix '.0';
                }
                if (
str_starts_with($match[0], '~') && substr_count($match[0], '.') === 2) {
                    
$replacement '~'.$versionWithoutSuffix.$suffix;
                } elseif (
str_starts_with($match[0], '>=')) {
                    
$replacement '>='.$versionWithoutSuffix.$suffix;
                } else {
                    
$replacement $newPrettyConstraint.$suffix;
                }
                
$modified substr_replace($modified$replacement$match[1], Platform::strlen($match[0]));
            }

            
// if it is strictly equal to the previous one then no need to change anything
            
$newConstraint $parser->parseConstraints($modified);
            if (
Intervals::isSubsetOf($newConstraint$constraint) && Intervals::isSubsetOf($constraint$newConstraint)) {
                return 
$prettyConstraint;
            }

            return 
$modified;
        }

        return 
$prettyConstraint;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0045 ]--