Aggiornato Composer
This commit is contained in:
11
vendor/vlucas/phpdotenv/composer.json
vendored
11
vendor/vlucas/phpdotenv/composer.json
vendored
@@ -24,7 +24,7 @@
|
||||
"ext-filter": "*",
|
||||
"ext-pcre": "*",
|
||||
"bamarni/composer-bin-plugin": "^1.4.1",
|
||||
"phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.21"
|
||||
"phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.30"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@@ -41,11 +41,18 @@
|
||||
"ext-pcre": "Required to use most of the library."
|
||||
},
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
"bamarni/composer-bin-plugin": true
|
||||
},
|
||||
"preferred-install": "dist"
|
||||
},
|
||||
"extra": {
|
||||
"bamarni-bin": {
|
||||
"bin-links": true,
|
||||
"forward-command": true
|
||||
},
|
||||
"branch-alias": {
|
||||
"dev-master": "4.2-dev"
|
||||
"dev-master": "4.3-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
6
vendor/vlucas/phpdotenv/src/Loader/Lines.php
vendored
6
vendor/vlucas/phpdotenv/src/Loader/Lines.php
vendored
@@ -41,15 +41,17 @@ class Lines
|
||||
*/
|
||||
private static function multilineProcess($multiline, $line, array $buffer)
|
||||
{
|
||||
$startsOnCurrentLine = $multiline ? false : self::looksLikeMultilineStart($line);
|
||||
|
||||
// check if $line can be multiline variable
|
||||
if ($started = self::looksLikeMultilineStart($line)) {
|
||||
if ($startsOnCurrentLine) {
|
||||
$multiline = true;
|
||||
}
|
||||
|
||||
if ($multiline) {
|
||||
array_push($buffer, $line);
|
||||
|
||||
if (self::looksLikeMultilineStop($line, $started)) {
|
||||
if (self::looksLikeMultilineStop($line, $startsOnCurrentLine)) {
|
||||
$multiline = false;
|
||||
$line = implode("\n", $buffer);
|
||||
$buffer = [];
|
||||
|
||||
2
vendor/vlucas/phpdotenv/src/Regex/Regex.php
vendored
2
vendor/vlucas/phpdotenv/src/Regex/Regex.php
vendored
@@ -88,9 +88,11 @@ class Regex
|
||||
$result = $operation($subject);
|
||||
|
||||
if (($e = preg_last_error()) !== PREG_NO_ERROR) {
|
||||
/** @var Result<V,string> */
|
||||
return Error::create(self::lookupError($e));
|
||||
}
|
||||
|
||||
/** @var Result<V,string> */
|
||||
return Success::create($result);
|
||||
}
|
||||
|
||||
|
||||
@@ -46,8 +46,8 @@ abstract class AbstractRepository implements RepositoryInterface
|
||||
*/
|
||||
public function get($name)
|
||||
{
|
||||
if (!is_string($name)) {
|
||||
throw new InvalidArgumentException('Expected name to be a string.');
|
||||
if (!is_string($name) || '' === $name) {
|
||||
throw new InvalidArgumentException('Expected name to be a non-empty string.');
|
||||
}
|
||||
|
||||
return $this->getInternal($name);
|
||||
@@ -56,7 +56,7 @@ abstract class AbstractRepository implements RepositoryInterface
|
||||
/**
|
||||
* Get an environment variable.
|
||||
*
|
||||
* @param string $name
|
||||
* @param non-empty-string $name
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
@@ -74,8 +74,8 @@ abstract class AbstractRepository implements RepositoryInterface
|
||||
*/
|
||||
public function set($name, $value = null)
|
||||
{
|
||||
if (!is_string($name)) {
|
||||
throw new InvalidArgumentException('Expected name to be a string.');
|
||||
if (!is_string($name) || '' === $name) {
|
||||
throw new InvalidArgumentException('Expected name to be a non-empty string.');
|
||||
}
|
||||
|
||||
// Don't overwrite existing environment variables if we're immutable
|
||||
@@ -91,8 +91,8 @@ abstract class AbstractRepository implements RepositoryInterface
|
||||
/**
|
||||
* Set an environment variable.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string|null $value
|
||||
* @param non-empty-string $name
|
||||
* @param string|null $value
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -109,8 +109,8 @@ abstract class AbstractRepository implements RepositoryInterface
|
||||
*/
|
||||
public function clear($name)
|
||||
{
|
||||
if (!is_string($name)) {
|
||||
throw new InvalidArgumentException('Expected name to be a string.');
|
||||
if (!is_string($name) || '' === $name) {
|
||||
throw new InvalidArgumentException('Expected name to be a non-empty string.');
|
||||
}
|
||||
|
||||
// Don't clear anything if we're immutable.
|
||||
@@ -124,7 +124,7 @@ abstract class AbstractRepository implements RepositoryInterface
|
||||
/**
|
||||
* Clear an environment variable.
|
||||
*
|
||||
* @param string $name
|
||||
* @param non-empty-string $name
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -139,7 +139,7 @@ abstract class AbstractRepository implements RepositoryInterface
|
||||
*/
|
||||
public function has($name)
|
||||
{
|
||||
return is_string($name) && $this->get($name) !== null;
|
||||
return is_string($name) && $name !== '' && $this->get($name) !== null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,7 +24,7 @@ class ApacheAdapter implements AvailabilityInterface, ReaderInterface, WriterInt
|
||||
* This is intentionally not implemented, since this adapter exists only as
|
||||
* a means to overwrite existing apache environment variables.
|
||||
*
|
||||
* @param string $name
|
||||
* @param non-empty-string $name
|
||||
*
|
||||
* @return \PhpOption\Option<string|null>
|
||||
*/
|
||||
@@ -38,22 +38,24 @@ class ApacheAdapter implements AvailabilityInterface, ReaderInterface, WriterInt
|
||||
*
|
||||
* Only if an existing apache variable exists do we overwrite it.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string|null $value
|
||||
* @param non-empty-string $name
|
||||
* @param string|null $value
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function set($name, $value = null)
|
||||
{
|
||||
if (apache_getenv($name) !== false) {
|
||||
apache_setenv($name, (string) $value);
|
||||
if (apache_getenv($name) === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
apache_setenv($name, (string) $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear an environment variable.
|
||||
*
|
||||
* @param string $name
|
||||
* @param non-empty-string $name
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -10,7 +10,7 @@ class ArrayAdapter implements AvailabilityInterface, ReaderInterface, WriterInte
|
||||
/**
|
||||
* The variables and their values.
|
||||
*
|
||||
* @var array<string,string|null>
|
||||
* @var array<non-empty-string,string|null>
|
||||
*/
|
||||
private $variables = [];
|
||||
|
||||
@@ -27,24 +27,24 @@ class ArrayAdapter implements AvailabilityInterface, ReaderInterface, WriterInte
|
||||
/**
|
||||
* Get an environment variable, if it exists.
|
||||
*
|
||||
* @param string $name
|
||||
* @param non-empty-string $name
|
||||
*
|
||||
* @return \PhpOption\Option<string|null>
|
||||
*/
|
||||
public function get($name)
|
||||
{
|
||||
if (array_key_exists($name, $this->variables)) {
|
||||
return Some::create($this->variables[$name]);
|
||||
if (!array_key_exists($name, $this->variables)) {
|
||||
return None::create();
|
||||
}
|
||||
|
||||
return None::create();
|
||||
return Some::create($this->variables[$name]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set an environment variable.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string|null $value
|
||||
* @param non-empty-string $name
|
||||
* @param string|null $value
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -56,7 +56,7 @@ class ArrayAdapter implements AvailabilityInterface, ReaderInterface, WriterInte
|
||||
/**
|
||||
* Clear an environment variable.
|
||||
*
|
||||
* @param string $name
|
||||
* @param non-empty-string $name
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -20,14 +20,26 @@ class EnvConstAdapter implements AvailabilityInterface, ReaderInterface, WriterI
|
||||
/**
|
||||
* Get an environment variable, if it exists.
|
||||
*
|
||||
* @param string $name
|
||||
* @param non-empty-string $name
|
||||
*
|
||||
* @return \PhpOption\Option<string|null>
|
||||
*/
|
||||
public function get($name)
|
||||
{
|
||||
if (array_key_exists($name, $_ENV)) {
|
||||
return Some::create($_ENV[$name]);
|
||||
if (!array_key_exists($name, $_ENV)) {
|
||||
return None::create();
|
||||
}
|
||||
|
||||
$value = $_ENV[$name];
|
||||
|
||||
if (is_scalar($value)) {
|
||||
/** @var \PhpOption\Option<string|null> */
|
||||
return Some::create((string) $value);
|
||||
}
|
||||
|
||||
if (null === $value) {
|
||||
/** @var \PhpOption\Option<string|null> */
|
||||
return Some::create(null);
|
||||
}
|
||||
|
||||
return None::create();
|
||||
@@ -36,8 +48,8 @@ class EnvConstAdapter implements AvailabilityInterface, ReaderInterface, WriterI
|
||||
/**
|
||||
* Set an environment variable.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string|null $value
|
||||
* @param non-empty-string $name
|
||||
* @param string|null $value
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -49,7 +61,7 @@ class EnvConstAdapter implements AvailabilityInterface, ReaderInterface, WriterI
|
||||
/**
|
||||
* Clear an environment variable.
|
||||
*
|
||||
* @param string $name
|
||||
* @param non-empty-string $name
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -19,7 +19,7 @@ class PutenvAdapter implements AvailabilityInterface, ReaderInterface, WriterInt
|
||||
/**
|
||||
* Get an environment variable, if it exists.
|
||||
*
|
||||
* @param string $name
|
||||
* @param non-empty-string $name
|
||||
*
|
||||
* @return \PhpOption\Option<string|null>
|
||||
*/
|
||||
@@ -32,8 +32,8 @@ class PutenvAdapter implements AvailabilityInterface, ReaderInterface, WriterInt
|
||||
/**
|
||||
* Set an environment variable.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string|null $value
|
||||
* @param non-empty-string $name
|
||||
* @param string|null $value
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -45,7 +45,7 @@ class PutenvAdapter implements AvailabilityInterface, ReaderInterface, WriterInt
|
||||
/**
|
||||
* Clear an environment variable.
|
||||
*
|
||||
* @param string $name
|
||||
* @param non-empty-string $name
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -7,7 +7,7 @@ interface ReaderInterface extends AvailabilityInterface
|
||||
/**
|
||||
* Get an environment variable, if it exists.
|
||||
*
|
||||
* @param string $name
|
||||
* @param non-empty-string $name
|
||||
*
|
||||
* @return \PhpOption\Option<string|null>
|
||||
*/
|
||||
|
||||
@@ -20,14 +20,26 @@ class ServerConstAdapter implements AvailabilityInterface, ReaderInterface, Writ
|
||||
/**
|
||||
* Get an environment variable, if it exists.
|
||||
*
|
||||
* @param string $name
|
||||
* @param non-empty-string $name
|
||||
*
|
||||
* @return \PhpOption\Option<string|null>
|
||||
*/
|
||||
public function get($name)
|
||||
{
|
||||
if (array_key_exists($name, $_SERVER)) {
|
||||
return Some::create($_SERVER[$name]);
|
||||
if (!array_key_exists($name, $_SERVER)) {
|
||||
return None::create();
|
||||
}
|
||||
|
||||
$value = $_SERVER[$name];
|
||||
|
||||
if (is_scalar($value)) {
|
||||
/** @var \PhpOption\Option<string|null> */
|
||||
return Some::create((string) $value);
|
||||
}
|
||||
|
||||
if (null === $value) {
|
||||
/** @var \PhpOption\Option<string|null> */
|
||||
return Some::create(null);
|
||||
}
|
||||
|
||||
return None::create();
|
||||
@@ -36,8 +48,8 @@ class ServerConstAdapter implements AvailabilityInterface, ReaderInterface, Writ
|
||||
/**
|
||||
* Set an environment variable.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string|null $value
|
||||
* @param non-empty-string $name
|
||||
* @param string|null $value
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -49,7 +61,7 @@ class ServerConstAdapter implements AvailabilityInterface, ReaderInterface, Writ
|
||||
/**
|
||||
* Clear an environment variable.
|
||||
*
|
||||
* @param string $name
|
||||
* @param non-empty-string $name
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -7,8 +7,8 @@ interface WriterInterface extends AvailabilityInterface
|
||||
/**
|
||||
* Set an environment variable.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string|null $value
|
||||
* @param non-empty-string $name
|
||||
* @param string|null $value
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -17,7 +17,7 @@ interface WriterInterface extends AvailabilityInterface
|
||||
/**
|
||||
* Clear an environment variable.
|
||||
*
|
||||
* @param string $name
|
||||
* @param non-empty-string $name
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -39,7 +39,7 @@ class AdapterRepository extends AbstractRepository
|
||||
*
|
||||
* We do this by querying our readers sequentially.
|
||||
*
|
||||
* @param string $name
|
||||
* @param non-empty-string $name
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
@@ -58,8 +58,8 @@ class AdapterRepository extends AbstractRepository
|
||||
/**
|
||||
* Set an environment variable.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string|null $value
|
||||
* @param non-empty-string $name
|
||||
* @param string|null $value
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -73,7 +73,7 @@ class AdapterRepository extends AbstractRepository
|
||||
/**
|
||||
* Clear an environment variable.
|
||||
*
|
||||
* @param string $name
|
||||
* @param non-empty-string $name
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user