composer-update-patch

This commit is contained in:
Manish Verma
2016-11-03 05:44:29 +05:30
parent 2dca47f5a4
commit 5d49d384a0
5118 changed files with 51603 additions and 122575 deletions

View File

@@ -6,6 +6,7 @@ use DateTime;
use League\Flysystem\AdapterInterface;
use League\Flysystem\Config;
use League\Flysystem\NotSupportedException;
use League\Flysystem\SafeStorage;
use RuntimeException;
abstract class AbstractFtpAdapter extends AbstractAdapter
@@ -25,16 +26,6 @@ abstract class AbstractFtpAdapter extends AbstractAdapter
*/
protected $port = 21;
/**
* @var string|null
*/
protected $username;
/**
* @var string|null
*/
protected $password;
/**
* @var bool
*/
@@ -85,6 +76,11 @@ abstract class AbstractFtpAdapter extends AbstractAdapter
*/
protected $alternativeRecursion = false;
/**
* @var SafeStorage
*/
protected $safeStorage;
/**
* Constructor.
*
@@ -92,6 +88,7 @@ abstract class AbstractFtpAdapter extends AbstractAdapter
*/
public function __construct(array $config)
{
$this->safeStorage = new SafeStorage();
$this->setConfig($config);
}
@@ -226,7 +223,7 @@ abstract class AbstractFtpAdapter extends AbstractAdapter
*/
public function getUsername()
{
return empty($this->username) ? 'anonymous' : $this->username;
return $this->safeStorage->retrieveSafely('username') ?: 'anonymous';
}
/**
@@ -238,7 +235,7 @@ abstract class AbstractFtpAdapter extends AbstractAdapter
*/
public function setUsername($username)
{
$this->username = $username;
$this->safeStorage->storeSafely('username', $username);
return $this;
}
@@ -250,7 +247,7 @@ abstract class AbstractFtpAdapter extends AbstractAdapter
*/
public function getPassword()
{
return $this->password;
return $this->safeStorage->retrieveSafely('password');
}
/**
@@ -262,7 +259,7 @@ abstract class AbstractFtpAdapter extends AbstractAdapter
*/
public function setPassword($password)
{
$this->password = $password;
$this->safeStorage->storeSafely('password', $password);
return $this;
}

View File

@@ -73,13 +73,13 @@ class Local extends AbstractAdapter
{
$root = is_link($root) ? realpath($root) : $root;
$this->permissionMap = array_replace_recursive(static::$permissions, $permissions);
$realRoot = $this->ensureDirectory($root);
$this->ensureDirectory($root);
if ( ! is_dir($realRoot) || ! is_readable($realRoot)) {
if ( ! is_dir($root) || ! is_readable($root)) {
throw new LogicException('The root path ' . $root . ' is not readable.');
}
$this->setPathPrefix($realRoot);
$this->setPathPrefix($root);
$this->writeFlags = $writeFlags;
$this->linkHandling = $linkHandling;
}
@@ -89,7 +89,7 @@ class Local extends AbstractAdapter
*
* @param string $root root directory path
*
* @return string real path to root
* @return void
*
* @throws Exception in case the root directory can not be created
*/
@@ -104,8 +104,6 @@ class Local extends AbstractAdapter
throw new Exception(sprintf('Impossible to create the root directory "%s".', $root));
}
}
return realpath($root);
}
/**
@@ -258,7 +256,7 @@ class Local extends AbstractAdapter
public function listContents($directory = '', $recursive = false)
{
$result = [];
$location = $this->applyPathPrefix($directory) . $this->pathSeparator;
$location = $this->applyPathPrefix($directory);
if ( ! is_dir($location)) {
return [];