composer update

This commit is contained in:
2019-07-02 01:51:56 +00:00
parent b4a728213d
commit ebb41422f3
616 changed files with 14708 additions and 612 deletions

View File

@@ -40,7 +40,7 @@ class RedisTaggedCache extends TaggedCache
* Increment the value of an item in the cache.
*
* @param string $key
* @param mixed $value
* @param mixed $value
* @return void
*/
public function increment($key, $value = 1)
@@ -54,7 +54,7 @@ class RedisTaggedCache extends TaggedCache
* Decrement the value of an item in the cache.
*
* @param string $key
* @param mixed $value
* @param mixed $value
* @return void
*/
public function decrement($key, $value = 1)
@@ -68,7 +68,7 @@ class RedisTaggedCache extends TaggedCache
* Store an item in the cache indefinitely.
*
* @param string $key
* @param mixed $value
* @param mixed $value
* @return bool
*/
public function forever($key, $value)

View File

@@ -85,7 +85,7 @@ class Repository implements CacheContract, ArrayAccess
* Retrieve an item from the cache by key.
*
* @param string $key
* @param mixed $default
* @param mixed $default
* @return mixed
*/
public function get($key, $default = null)
@@ -178,7 +178,7 @@ class Repository implements CacheContract, ArrayAccess
* Retrieve an item from the cache and delete it.
*
* @param string $key
* @param mixed $default
* @param mixed $default
* @return mixed
*/
public function pull($key, $default = null)
@@ -192,7 +192,7 @@ class Repository implements CacheContract, ArrayAccess
* Store an item in the cache.
*
* @param string $key
* @param mixed $value
* @param mixed $value
* @param \DateTimeInterface|\DateInterval|int|null $ttl
* @return bool
*/
@@ -290,7 +290,7 @@ class Repository implements CacheContract, ArrayAccess
* Store an item in the cache if the key does not exist.
*
* @param string $key
* @param mixed $value
* @param mixed $value
* @param \DateTimeInterface|\DateInterval|int|null $ttl
* @return bool
*/
@@ -628,7 +628,7 @@ class Repository implements CacheContract, ArrayAccess
* Handle dynamic calls into macros or pass missing methods to the store.
*
* @param string $method
* @param array $parameters
* @param array $parameters
* @return mixed
*/
public function __call($method, $parameters)

View File

@@ -51,7 +51,7 @@ class TaggedCache extends Repository
* Increment the value of an item in the cache.
*
* @param string $key
* @param mixed $value
* @param mixed $value
* @return void
*/
public function increment($key, $value = 1)
@@ -63,7 +63,7 @@ class TaggedCache extends Repository
* Decrement the value of an item in the cache.
*
* @param string $key
* @param mixed $value
* @param mixed $value
* @return void
*/
public function decrement($key, $value = 1)

View File

@@ -11,7 +11,7 @@ interface Repository extends CacheInterface
* Retrieve an item from the cache and delete it.
*
* @param string $key
* @param mixed $default
* @param mixed $default
* @return mixed
*/
public function pull($key, $default = null);
@@ -20,7 +20,7 @@ interface Repository extends CacheInterface
* Store an item in the cache.
*
* @param string $key
* @param mixed $value
* @param mixed $value
* @param \DateTimeInterface|\DateInterval|int|null $ttl
* @return bool
*/
@@ -30,7 +30,7 @@ interface Repository extends CacheInterface
* Store an item in the cache if the key does not exist.
*
* @param string $key
* @param mixed $value
* @param mixed $value
* @param \DateTimeInterface|\DateInterval|int|null $ttl
* @return bool
*/
@@ -58,7 +58,7 @@ interface Repository extends CacheInterface
* Store an item in the cache indefinitely.
*
* @param string $key
* @param mixed $value
* @param mixed $value
* @return bool
*/
public function forever($key, $value);

View File

@@ -31,7 +31,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
/**
* The connection name for the model.
*
* @var string
* @var string|null
*/
protected $connection;
@@ -1222,7 +1222,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
/**
* Get the current connection name for the model.
*
* @return string
* @return string|null
*/
public function getConnectionName()
{
@@ -1232,7 +1232,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
/**
* Set the connection associated with the model.
*
* @param string $name
* @param string|null $name
* @return $this
*/
public function setConnection($name)
@@ -1441,7 +1441,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
/**
* Get the queueable connection for the entity.
*
* @return mixed
* @return string|null
*/
public function getQueueableConnection()
{

View File

@@ -7,7 +7,7 @@ abstract class Migration
/**
* The name of the database connection to use.
*
* @var string
* @var string|null
*/
protected $connection;
@@ -21,7 +21,7 @@ abstract class Migration
/**
* Get the migration connection name.
*
* @return string
* @return string|null
*/
public function getConnection()
{

View File

@@ -2138,7 +2138,7 @@ class Builder
{
$page = $page ?: Paginator::resolveCurrentPage($pageName);
$total = $this->getCountForPagination($columns);
$total = $this->getCountForPagination();
$results = $total ? $this->forPage($page, $perPage)->get($columns) : collect();

View File

@@ -141,7 +141,7 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract
$filename = $name ?? basename($path);
$disposition = $response->headers->makeDisposition(
$disposition, $filename, Str::ascii($filename)
$disposition, $filename, $this->fallbackName($filename)
);
$response->headers->replace($headers + [
@@ -172,6 +172,17 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract
return $this->response($path, $name, $headers, 'attachment');
}
/**
* Convert the string to ASCII characters that are equivalent to the given name.
*
* @param string $name
* @return string
*/
protected function fallbackName($name)
{
return str_replace('%', '', Str::ascii($name));
}
/**
* Write the contents of a file.
*

View File

@@ -29,7 +29,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
*
* @var string
*/
const VERSION = '5.8.24';
const VERSION = '5.8.26';
/**
* The base path for the Laravel installation.

View File

@@ -48,9 +48,9 @@ class EventCacheCommand extends Command
$events = [];
foreach ($this->laravel->getProviders(EventServiceProvider::class) as $provider) {
$providerEvents = array_merge($provider->discoverEvents(), $provider->listens());
$providerEvents = array_merge_recursive($provider->shouldDiscoverEvents() ? $provider->discoverEvents() : [], $provider->listens());
$events = array_merge_recursive($events, $providerEvents);
$events[get_class($provider)] = $providerEvents;
}
return $events;

View File

@@ -153,6 +153,12 @@ class RouteListCommand extends Command
*/
protected function displayRoutes(array $routes)
{
if ($this->option('json')) {
$this->line(json_encode(array_values($routes)));
return;
}
$this->table($this->getHeaders(), $routes);
}
@@ -247,6 +253,7 @@ class RouteListCommand extends Command
return [
['columns', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Columns to include in the route table'],
['compact', 'c', InputOption::VALUE_NONE, 'Only show method, URI and action columns'],
['json', null, InputOption::VALUE_NONE, 'Output the route list as JSON'],
['method', null, InputOption::VALUE_OPTIONAL, 'Filter the routes by method'],
['name', null, InputOption::VALUE_OPTIONAL, 'Filter the routes by name'],
['path', null, InputOption::VALUE_OPTIONAL, 'Filter the routes by path'],

View File

@@ -29,10 +29,7 @@ class EventServiceProvider extends ServiceProvider
*/
public function boot()
{
$events = array_merge_recursive(
$this->discoveredEvents(),
$this->listens()
);
$events = $this->getEvents();
foreach ($events as $event => $listeners) {
foreach (array_unique($listeners) as $listener) {
@@ -60,12 +57,27 @@ class EventServiceProvider extends ServiceProvider
*
* @return array
*/
protected function discoveredEvents()
public function getEvents()
{
if ($this->app->eventsAreCached()) {
return require $this->app->getCachedEventsPath();
}
$cache = require $this->app->getCachedEventsPath();
return $cache[get_class($this)] ?? [];
} else {
return array_merge_recursive(
$this->discoveredEvents(),
$this->listens()
);
}
}
/**
* Get the discovered events for the application.
*
* @return array
*/
protected function discoveredEvents()
{
return $this->shouldDiscoverEvents()
? $this->discoverEvents()
: [];

View File

@@ -697,6 +697,12 @@ class TestResponse
*/
public function assertJsonMissingValidationErrors($keys = null)
{
if ($this->getContent() === '') {
PHPUnit::assertTrue(true);
return $this;
}
$json = $this->json();
if (! array_key_exists('errors', $json)) {
@@ -787,13 +793,13 @@ class TestResponse
$this->ensureResponseHasView();
if (is_null($value)) {
PHPUnit::assertArrayHasKey($key, $this->original->getData());
PHPUnit::assertArrayHasKey($key, $this->original->gatherData());
} elseif ($value instanceof Closure) {
PHPUnit::assertTrue($value($this->original->getData()[$key]));
PHPUnit::assertTrue($value($this->original->gatherData()[$key]));
} elseif ($value instanceof Model) {
PHPUnit::assertTrue($value->is($this->original->getData()[$key]));
PHPUnit::assertTrue($value->is($this->original->gatherData()[$key]));
} else {
PHPUnit::assertEquals($value, $this->original->getData()[$key]);
PHPUnit::assertEquals($value, $this->original->gatherData()[$key]);
}
return $this;
@@ -828,7 +834,7 @@ class TestResponse
{
$this->ensureResponseHasView();
return $this->original->getData()[$key];
return $this->original->gatherData()[$key];
}
/**
@@ -841,7 +847,7 @@ class TestResponse
{
$this->ensureResponseHasView();
PHPUnit::assertArrayNotHasKey($key, $this->original->getData());
PHPUnit::assertArrayNotHasKey($key, $this->original->gatherData());
return $this;
}

View File

@@ -365,7 +365,7 @@ class UrlGenerator implements UrlGeneratorContract
$signature = hash_hmac('sha256', $original, call_user_func($this->keyResolver));
return hash_equals($signature, (string) $request->query('signature', '')) &&
return hash_equals($signature, (string) $request->query('signature', '')) &&
! ($expires && Carbon::now()->getTimestamp() > $expires);
}

View File

@@ -23,7 +23,7 @@ class Schema extends Facade
/**
* Get a schema builder instance for a connection.
*
* @param string $name
* @param string|null $name
* @return \Illuminate\Database\Schema\Builder
*/
public static function connection($name)

View File

@@ -67,7 +67,7 @@ trait Macroable
* Dynamically handle calls to the class.
*
* @param string $method
* @param array $parameters
* @param array $parameters
* @return mixed
*
* @throws \BadMethodCallException
@@ -91,7 +91,7 @@ trait Macroable
* Dynamically handle calls to the class.
*
* @param string $method
* @param array $parameters
* @param array $parameters
* @return mixed
*
* @throws \BadMethodCallException

View File

@@ -147,7 +147,7 @@ class View implements ArrayAccess, ViewContract
*
* @return array
*/
protected function gatherData()
public function gatherData()
{
$data = array_merge($this->factory->getShared(), $this->data);