composer update
This commit is contained in:
16
vendor/vlucas/phpdotenv/composer.json
vendored
16
vendor/vlucas/phpdotenv/composer.json
vendored
@@ -2,8 +2,8 @@
|
||||
"name": "vlucas/phpdotenv",
|
||||
"description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.",
|
||||
"keywords": ["env", "dotenv", "environment"],
|
||||
"license" : "BSD-3-Clause",
|
||||
"authors" : [
|
||||
"license": "BSD-3-Clause",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Graham Campbell",
|
||||
"email": "graham@alt-three.com",
|
||||
@@ -16,11 +16,13 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "^5.4 || ^7.0",
|
||||
"php": "^5.4 || ^7.0 || ^8.0",
|
||||
"phpoption/phpoption": "^1.5",
|
||||
"symfony/polyfill-ctype": "^1.9"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-filter": "*",
|
||||
"ext-pcre": "*",
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0"
|
||||
},
|
||||
"autoload": {
|
||||
@@ -28,6 +30,14 @@
|
||||
"Dotenv\\": "src/"
|
||||
}
|
||||
},
|
||||
"suggest": {
|
||||
"ext-filter": "Required to use the boolean validator.",
|
||||
"ext-pcre": "Required to use most of the library."
|
||||
},
|
||||
"config": {
|
||||
"preferred-install": "dist",
|
||||
"platform-check": false
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.6-dev"
|
||||
|
||||
@@ -64,7 +64,7 @@ abstract class AbstractVariables implements VariablesInterface
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
protected abstract function getInternal($name);
|
||||
abstract protected function getInternal($name);
|
||||
|
||||
/**
|
||||
* Set an environment variable.
|
||||
@@ -100,7 +100,7 @@ abstract class AbstractVariables implements VariablesInterface
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected abstract function setInternal($name, $value = null);
|
||||
abstract protected function setInternal($name, $value = null);
|
||||
|
||||
/**
|
||||
* Clear an environment variable.
|
||||
@@ -132,7 +132,7 @@ abstract class AbstractVariables implements VariablesInterface
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected abstract function clearInternal($name);
|
||||
abstract protected function clearInternal($name);
|
||||
|
||||
/**
|
||||
* Determine if the environment is immutable.
|
||||
|
||||
22
vendor/vlucas/phpdotenv/src/Lines.php
vendored
22
vendor/vlucas/phpdotenv/src/Lines.php
vendored
@@ -22,7 +22,7 @@ class Lines
|
||||
foreach ($lines as $line) {
|
||||
list($multiline, $line, $multilineBuffer) = self::multilineProcess($multiline, $line, $multilineBuffer);
|
||||
|
||||
if (!$multiline && !self::isComment($line) && self::isSetter($line)) {
|
||||
if (!$multiline && !self::isCommentOrWhitespace($line)) {
|
||||
$output[] = $line;
|
||||
}
|
||||
}
|
||||
@@ -115,28 +115,20 @@ class Lines
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the line in the file is a comment, e.g. begins with a #.
|
||||
* Determine if the line in the file is a comment or whitespace.
|
||||
*
|
||||
* @param string $line
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private static function isComment($line)
|
||||
private static function isCommentOrWhitespace($line)
|
||||
{
|
||||
if (trim($line) === '') {
|
||||
return true;
|
||||
}
|
||||
|
||||
$line = ltrim($line);
|
||||
|
||||
return isset($line[0]) && $line[0] === '#';
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the given line looks like it's setting a variable.
|
||||
*
|
||||
* @param string $line
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private static function isSetter($line)
|
||||
{
|
||||
return strpos($line, '=') !== false;
|
||||
}
|
||||
}
|
||||
|
||||
2
vendor/vlucas/phpdotenv/src/Parser.php
vendored
2
vendor/vlucas/phpdotenv/src/Parser.php
vendored
@@ -135,7 +135,7 @@ class Parser
|
||||
if ($char === $value[0] || $char === '\\') {
|
||||
return [$data[0].$char, self::QUOTED_STATE];
|
||||
} elseif (in_array($char, ['f', 'n', 'r', 't', 'v'], true)) {
|
||||
return [$data[0].stripcslashes('\\' . $char), self::QUOTED_STATE];
|
||||
return [$data[0].stripcslashes('\\'.$char), self::QUOTED_STATE];
|
||||
} else {
|
||||
throw new InvalidFileException(
|
||||
self::getErrorMessage('an unexpected escape sequence', $value)
|
||||
|
||||
10
vendor/vlucas/phpdotenv/src/Validator.php
vendored
10
vendor/vlucas/phpdotenv/src/Validator.php
vendored
@@ -50,7 +50,6 @@ class Validator
|
||||
'is missing'
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -133,6 +132,10 @@ class Validator
|
||||
{
|
||||
return $this->assertCallback(
|
||||
function ($value) use ($choices) {
|
||||
if ($value === null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return in_array($value, $choices, true);
|
||||
},
|
||||
sprintf('is not one of [%s]', implode(', ', $choices))
|
||||
@@ -151,15 +154,14 @@ class Validator
|
||||
public function allowedRegexValues($regex)
|
||||
{
|
||||
return $this->assertCallback(
|
||||
function ($value) use ($regex)
|
||||
{
|
||||
function ($value) use ($regex) {
|
||||
if ($value === null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return Regex::match($regex, $value)->success()->getOrElse(0) === 1;
|
||||
},
|
||||
sprintf('does not match "%s"' , $regex)
|
||||
sprintf('does not match "%s"', $regex)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user