diff options
Diffstat (limited to 'vendor/illuminate')
| -rwxr-xr-x | vendor/illuminate/cache/CacheManager.php | 1 | ||||
| -rw-r--r-- | vendor/illuminate/cache/DynamoDbStore.php | 2 | ||||
| -rwxr-xr-x | vendor/illuminate/cache/FileStore.php | 8 | ||||
| -rw-r--r-- | vendor/illuminate/contracts/Auth/Guard.php | 2 | ||||
| -rw-r--r-- | vendor/illuminate/database/ConfigurationUrlParser.php | 186 | ||||
| -rwxr-xr-x | vendor/illuminate/database/DatabaseManager.php | 1 | ||||
| -rwxr-xr-x | vendor/illuminate/database/Eloquent/Builder.php | 6 | ||||
| -rwxr-xr-x | vendor/illuminate/database/Query/Builder.php | 2 | ||||
| -rwxr-xr-x | vendor/illuminate/support/Arr.php | 10 | ||||
| -rw-r--r-- | vendor/illuminate/support/ConfigurationUrlParser.php | 189 | ||||
| -rwxr-xr-x | vendor/illuminate/support/Facades/Response.php | 2 | ||||
| -rwxr-xr-x | vendor/illuminate/support/Facades/URL.php | 6 | ||||
| -rw-r--r-- | vendor/illuminate/support/Testing/Fakes/BusFake.php | 2 | ||||
| -rw-r--r-- | vendor/illuminate/support/Testing/Fakes/MailFake.php | 2 |
14 files changed, 223 insertions, 196 deletions
diff --git a/vendor/illuminate/cache/CacheManager.php b/vendor/illuminate/cache/CacheManager.php index ecd51eeaaa..8c72c8146e 100755 --- a/vendor/illuminate/cache/CacheManager.php +++ b/vendor/illuminate/cache/CacheManager.php @@ -229,6 +229,7 @@ class CacheManager implements FactoryContract $dynamoConfig = [ 'region' => $config['region'], 'version' => 'latest', + 'endpoint' => $config['endpoint'] ?? null, ]; if ($config['key'] && $config['secret']) { diff --git a/vendor/illuminate/cache/DynamoDbStore.php b/vendor/illuminate/cache/DynamoDbStore.php index de55d2ec15..d5c84d6af4 100644 --- a/vendor/illuminate/cache/DynamoDbStore.php +++ b/vendor/illuminate/cache/DynamoDbStore.php @@ -390,7 +390,7 @@ class DynamoDbStore implements Store, LockProvider */ public function forever($key, $value) { - return $this->put($key, $value, now()->addYears(5)); + return $this->put($key, $value, now()->addYears(5)->getTimestamp()); } /** diff --git a/vendor/illuminate/cache/FileStore.php b/vendor/illuminate/cache/FileStore.php index f48ebc2b19..228d69976e 100755 --- a/vendor/illuminate/cache/FileStore.php +++ b/vendor/illuminate/cache/FileStore.php @@ -186,7 +186,13 @@ class FileStore implements Store return $this->emptyPayload(); } - $data = unserialize(substr($contents, 10)); + try { + $data = unserialize(substr($contents, 10)); + } catch (Exception $e) { + $this->forget($key); + + return $this->emptyPayload(); + } // Next, we'll extract the number of seconds that are remaining for a cache // so that we can properly retain the time for things like the increment diff --git a/vendor/illuminate/contracts/Auth/Guard.php b/vendor/illuminate/contracts/Auth/Guard.php index 2a2ed3d9a5..2a27fb5f50 100644 --- a/vendor/illuminate/contracts/Auth/Guard.php +++ b/vendor/illuminate/contracts/Auth/Guard.php @@ -28,7 +28,7 @@ interface Guard /** * Get the ID for the currently authenticated user. * - * @return int|null + * @return int|string|null */ public function id(); diff --git a/vendor/illuminate/database/ConfigurationUrlParser.php b/vendor/illuminate/database/ConfigurationUrlParser.php index 2b2430c113..bc7c624a28 100644 --- a/vendor/illuminate/database/ConfigurationUrlParser.php +++ b/vendor/illuminate/database/ConfigurationUrlParser.php @@ -2,189 +2,9 @@ namespace Illuminate\Database; -use Illuminate\Support\Arr; -use InvalidArgumentException; +use Illuminate\Support\ConfigurationUrlParser as BaseConfigurationUrlParser; -class ConfigurationUrlParser +class ConfigurationUrlParser extends BaseConfigurationUrlParser { - /** - * The drivers aliases map. - * - * @var array - */ - protected static $driverAliases = [ - 'mssql' => 'sqlsrv', - 'mysql2' => 'mysql', // RDS - 'postgres' => 'pgsql', - 'postgresql' => 'pgsql', - 'sqlite3' => 'sqlite', - ]; - - /** - * Parse the database configuration, hydrating options using a database configuration URL if possible. - * - * @param array|string $config - * @return array - */ - public function parseConfiguration($config) - { - if (is_string($config)) { - $config = ['url' => $config]; - } - - $url = $config['url'] ?? null; - - $config = Arr::except($config, 'url'); - - if (! $url) { - return $config; - } - - $parsedUrl = $this->parseUrl($url); - - return array_merge( - $config, - $this->getPrimaryOptions($parsedUrl), - $this->getQueryOptions($parsedUrl) - ); - } - - /** - * Get the primary database connection options. - * - * @param array $url - * @return array - */ - protected function getPrimaryOptions($url) - { - return array_filter([ - 'driver' => $this->getDriver($url), - 'database' => $this->getDatabase($url), - 'host' => $url['host'] ?? null, - 'port' => $url['port'] ?? null, - 'username' => $url['user'] ?? null, - 'password' => $url['pass'] ?? null, - ], function ($value) { - return ! is_null($value); - }); - } - - /** - * Get the database driver from the URL. - * - * @param array $url - * @return string|null - */ - protected function getDriver($url) - { - $alias = $url['scheme'] ?? null; - - if (! $alias) { - return; - } - - return static::$driverAliases[$alias] ?? $alias; - } - - /** - * Get the database name from the URL. - * - * @param array $url - * @return string|null - */ - protected function getDatabase($url) - { - $path = $url['path'] ?? null; - - return $path ? substr($path, 1) : null; - } - - /** - * Get all of the additional database options from the query string. - * - * @param array $url - * @return array - */ - protected function getQueryOptions($url) - { - $queryString = $url['query'] ?? null; - - if (! $queryString) { - return []; - } - - $query = []; - - parse_str($queryString, $query); - - return $this->parseStringsToNativeTypes($query); - } - - /** - * Parse the string URL to an array of components. - * - * @param string $url - * @return array - */ - protected function parseUrl($url) - { - $url = preg_replace('#^(sqlite3?):///#', '$1://null/', $url); - - $parsedUrl = parse_url($url); - - if ($parsedUrl === false) { - throw new InvalidArgumentException('The database configuration URL is malformed.'); - } - - return $this->parseStringsToNativeTypes( - array_map('rawurldecode', $parsedUrl) - ); - } - - /** - * Convert string casted values to their native types. - * - * @param mixed $value - * @return mixed - */ - protected function parseStringsToNativeTypes($value) - { - if (is_array($value)) { - return array_map([$this, 'parseStringsToNativeTypes'], $value); - } - - if (! is_string($value)) { - return $value; - } - - $parsedValue = json_decode($value, true); - - if (json_last_error() === JSON_ERROR_NONE) { - return $parsedValue; - } - - return $value; - } - - /** - * Get all of the current drivers aliases. - * - * @return array - */ - public static function getDriverAliases() - { - return static::$driverAliases; - } - - /** - * Add the given driver alias to the driver aliases array. - * - * @param string $alias - * @param string $driver - * @return void - */ - public static function addDriverAlias($alias, $driver) - { - static::$driverAliases[$alias] = $driver; - } + // } diff --git a/vendor/illuminate/database/DatabaseManager.php b/vendor/illuminate/database/DatabaseManager.php index 05d8cf0d45..a5993066eb 100755 --- a/vendor/illuminate/database/DatabaseManager.php +++ b/vendor/illuminate/database/DatabaseManager.php @@ -6,6 +6,7 @@ use PDO; use Illuminate\Support\Arr; use Illuminate\Support\Str; use InvalidArgumentException; +use Illuminate\Support\ConfigurationUrlParser; use Illuminate\Database\Connectors\ConnectionFactory; /** diff --git a/vendor/illuminate/database/Eloquent/Builder.php b/vendor/illuminate/database/Eloquent/Builder.php index e827f4cc31..b4825a489a 100755 --- a/vendor/illuminate/database/Eloquent/Builder.php +++ b/vendor/illuminate/database/Eloquent/Builder.php @@ -870,7 +870,11 @@ class Builder $values ); - $values[$this->qualifyColumn($column)] = $values[$column]; + $segments = preg_split('/\s+as\s+/i', $this->query->from); + + $qualifiedColumn = end($segments).'.'.$column; + + $values[$qualifiedColumn] = $values[$column]; unset($values[$column]); diff --git a/vendor/illuminate/database/Query/Builder.php b/vendor/illuminate/database/Query/Builder.php index 3311c1ad6e..670ea25d5f 100755 --- a/vendor/illuminate/database/Query/Builder.php +++ b/vendor/illuminate/database/Query/Builder.php @@ -2078,7 +2078,7 @@ class Builder /** * Execute a query for a single record by ID. * - * @param int $id + * @param int|string $id * @param array $columns * @return mixed|static */ diff --git a/vendor/illuminate/support/Arr.php b/vendor/illuminate/support/Arr.php index 0f0b6fcf8e..31824b60c9 100755 --- a/vendor/illuminate/support/Arr.php +++ b/vendor/illuminate/support/Arr.php @@ -213,10 +213,14 @@ class Arr if (! is_array($item)) { $result[] = $item; - } elseif ($depth === 1) { - $result = array_merge($result, array_values($item)); } else { - $result = array_merge($result, static::flatten($item, $depth - 1)); + $values = $depth === 1 + ? array_values($item) + : static::flatten($item, $depth - 1); + + foreach ($values as $value) { + $result[] = $value; + } } } diff --git a/vendor/illuminate/support/ConfigurationUrlParser.php b/vendor/illuminate/support/ConfigurationUrlParser.php new file mode 100644 index 0000000000..308ff8f890 --- /dev/null +++ b/vendor/illuminate/support/ConfigurationUrlParser.php @@ -0,0 +1,189 @@ +<?php + +namespace Illuminate\Support; + +use InvalidArgumentException; + +class ConfigurationUrlParser +{ + /** + * The drivers aliases map. + * + * @var array + */ + protected static $driverAliases = [ + 'mssql' => 'sqlsrv', + 'mysql2' => 'mysql', // RDS + 'postgres' => 'pgsql', + 'postgresql' => 'pgsql', + 'sqlite3' => 'sqlite', + ]; + + /** + * Parse the database configuration, hydrating options using a database configuration URL if possible. + * + * @param array|string $config + * @return array + */ + public function parseConfiguration($config) + { + if (is_string($config)) { + $config = ['url' => $config]; + } + + $url = $config['url'] ?? null; + + $config = Arr::except($config, 'url'); + + if (! $url) { + return $config; + } + + $parsedUrl = $this->parseUrl($url); + + return array_merge( + $config, + $this->getPrimaryOptions($parsedUrl), + $this->getQueryOptions($parsedUrl) + ); + } + + /** + * Get the primary database connection options. + * + * @param array $url + * @return array + */ + protected function getPrimaryOptions($url) + { + return array_filter([ + 'driver' => $this->getDriver($url), + 'database' => $this->getDatabase($url), + 'host' => $url['host'] ?? null, + 'port' => $url['port'] ?? null, + 'username' => $url['user'] ?? null, + 'password' => $url['pass'] ?? null, + ], function ($value) { + return ! is_null($value); + }); + } + + /** + * Get the database driver from the URL. + * + * @param array $url + * @return string|null + */ + protected function getDriver($url) + { + $alias = $url['scheme'] ?? null; + + if (! $alias) { + return; + } + + return static::$driverAliases[$alias] ?? $alias; + } + + /** + * Get the database name from the URL. + * + * @param array $url + * @return string|null + */ + protected function getDatabase($url) + { + $path = $url['path'] ?? null; + + return $path ? substr($path, 1) : null; + } + + /** + * Get all of the additional database options from the query string. + * + * @param array $url + * @return array + */ + protected function getQueryOptions($url) + { + $queryString = $url['query'] ?? null; + + if (! $queryString) { + return []; + } + + $query = []; + + parse_str($queryString, $query); + + return $this->parseStringsToNativeTypes($query); + } + + /** + * Parse the string URL to an array of components. + * + * @param string $url + * @return array + */ + protected function parseUrl($url) + { + $url = preg_replace('#^(sqlite3?):///#', '$1://null/', $url); + + $parsedUrl = parse_url($url); + + if ($parsedUrl === false) { + throw new InvalidArgumentException('The database configuration URL is malformed.'); + } + + return $this->parseStringsToNativeTypes( + array_map('rawurldecode', $parsedUrl) + ); + } + + /** + * Convert string casted values to their native types. + * + * @param mixed $value + * @return mixed + */ + protected function parseStringsToNativeTypes($value) + { + if (is_array($value)) { + return array_map([$this, 'parseStringsToNativeTypes'], $value); + } + + if (! is_string($value)) { + return $value; + } + + $parsedValue = json_decode($value, true); + + if (json_last_error() === JSON_ERROR_NONE) { + return $parsedValue; + } + + return $value; + } + + /** + * Get all of the current drivers aliases. + * + * @return array + */ + public static function getDriverAliases() + { + return static::$driverAliases; + } + + /** + * Add the given driver alias to the driver aliases array. + * + * @param string $alias + * @param string $driver + * @return void + */ + public static function addDriverAlias($alias, $driver) + { + static::$driverAliases[$alias] = $driver; + } +} diff --git a/vendor/illuminate/support/Facades/Response.php b/vendor/illuminate/support/Facades/Response.php index 11161c2737..ab8576b18b 100755 --- a/vendor/illuminate/support/Facades/Response.php +++ b/vendor/illuminate/support/Facades/Response.php @@ -6,12 +6,14 @@ use Illuminate\Contracts\Routing\ResponseFactory as ResponseFactoryContract; /** * @method static \Illuminate\Http\Response make(string $content = '', int $status = 200, array $headers = []) + * @method static \Illuminate\Http\Response noContent($status = 204, array $headers = []) * @method static \Illuminate\Http\Response view(string $view, array $data = [], int $status = 200, array $headers = []) * @method static \Illuminate\Http\JsonResponse json(string|array $data = [], int $status = 200, array $headers = [], int $options = 0) * @method static \Illuminate\Http\JsonResponse jsonp(string $callback, string|array $data = [], int $status = 200, array $headers = [], int $options = 0) * @method static \Symfony\Component\HttpFoundation\StreamedResponse stream(\Closure $callback, int $status = 200, array $headers = []) * @method static \Symfony\Component\HttpFoundation\StreamedResponse streamDownload(\Closure $callback, string|null $name = null, array $headers = [], string|null $disposition = 'attachment') * @method static \Symfony\Component\HttpFoundation\BinaryFileResponse download(\SplFileInfo|string $file, string|null $name = null, array $headers = [], string|null $disposition = 'attachment') + * @method static \Symfony\Component\HttpFoundation\BinaryFileResponse file($file, array $headers = []) * @method static \Illuminate\Http\RedirectResponse redirectTo(string $path, int $status = 302, array $headers = [], bool|null $secure = null) * @method static \Illuminate\Http\RedirectResponse redirectToRoute(string $route, array $parameters = [], int $status = 302, array $headers = []) * @method static \Illuminate\Http\RedirectResponse redirectToAction(string $action, array $parameters = [], int $status = 302, array $headers = []) diff --git a/vendor/illuminate/support/Facades/URL.php b/vendor/illuminate/support/Facades/URL.php index 2dd66e7d79..baa2356966 100755 --- a/vendor/illuminate/support/Facades/URL.php +++ b/vendor/illuminate/support/Facades/URL.php @@ -12,9 +12,9 @@ namespace Illuminate\Support\Facades; * @method static string route(string $name, $parameters = [], bool $absolute = true) * @method static string action(string $action, $parameters = [], bool $absolute = true) * @method static \Illuminate\Contracts\Routing\UrlGenerator setRootControllerNamespace(string $rootNamespace) - * @method static string signedRoute(string $name, array $parameters = [], \DateTimeInterface|\DateInterval|int $expiration = null) - * @method static string temporarySignedRoute(string $name, \DateTimeInterface|\DateInterval|int $expiration, array $parameters = []) - * @method static string hasValidSignature(\Illuminate\Http\Request $request, bool $absolute) + * @method static string signedRoute(string $name, array $parameters = [], \DateTimeInterface|\DateInterval|int $expiration = null, bool $absolute = true) + * @method static string temporarySignedRoute(string $name, \DateTimeInterface|\DateInterval|int $expiration, array $parameters = [], bool $absolute = true) + * @method static string hasValidSignature(\Illuminate\Http\Request $request, bool $absolute = true) * @method static void defaults(array $defaults) * * @see \Illuminate\Routing\UrlGenerator diff --git a/vendor/illuminate/support/Testing/Fakes/BusFake.php b/vendor/illuminate/support/Testing/Fakes/BusFake.php index b42491e4c0..4cd6deb26e 100644 --- a/vendor/illuminate/support/Testing/Fakes/BusFake.php +++ b/vendor/illuminate/support/Testing/Fakes/BusFake.php @@ -127,7 +127,7 @@ class BusFake implements Dispatcher */ public function pipeThrough(array $pipes) { - // + return $this; } /** diff --git a/vendor/illuminate/support/Testing/Fakes/MailFake.php b/vendor/illuminate/support/Testing/Fakes/MailFake.php index e0a886f01e..b93c0d2460 100644 --- a/vendor/illuminate/support/Testing/Fakes/MailFake.php +++ b/vendor/illuminate/support/Testing/Fakes/MailFake.php @@ -331,6 +331,6 @@ class MailFake implements Mailer, MailQueue */ public function failures() { - // + return []; } } |
