summaryrefslogtreecommitdiff
path: root/vendor/illuminate
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2019-08-25 19:22:36 +0100
committerGreg Roach <fisharebest@webtrees.net>2019-08-26 10:50:56 +0100
commitf8a5f4cc875c1af9415dbd10973d827d4618a996 (patch)
tree846822d82a49191f3292c983568e05896f797eee /vendor/illuminate
parent871db2ea6c6f89b03a7a9520f7de5a3805ee2659 (diff)
downloadwebtrees-f8a5f4cc875c1af9415dbd10973d827d4618a996.tar.gz
webtrees-f8a5f4cc875c1af9415dbd10973d827d4618a996.tar.bz2
webtrees-f8a5f4cc875c1af9415dbd10973d827d4618a996.zip
Update vendor dependencies
Diffstat (limited to 'vendor/illuminate')
-rw-r--r--vendor/illuminate/cache/ArrayStore.php8
-rwxr-xr-xvendor/illuminate/cache/Repository.php2
-rwxr-xr-xvendor/illuminate/container/Container.php6
-rwxr-xr-xvendor/illuminate/database/Connectors/SqlServerConnector.php6
-rwxr-xr-xvendor/illuminate/database/Eloquent/Builder.php2
-rw-r--r--vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php4
-rw-r--r--vendor/illuminate/database/Eloquent/Relations/Concerns/AsPivot.php2
-rw-r--r--vendor/illuminate/database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php10
-rwxr-xr-xvendor/illuminate/database/Query/Builder.php31
-rwxr-xr-xvendor/illuminate/database/Query/Grammars/Grammar.php12
-rwxr-xr-xvendor/illuminate/database/Query/Grammars/MySqlGrammar.php13
-rwxr-xr-xvendor/illuminate/database/Query/Grammars/PostgresGrammar.php22
-rwxr-xr-xvendor/illuminate/database/Query/Grammars/SQLiteGrammar.php16
-rwxr-xr-xvendor/illuminate/database/Seeder.php6
-rwxr-xr-xvendor/illuminate/support/Facades/Password.php12
-rwxr-xr-xvendor/illuminate/support/ServiceProvider.php6
16 files changed, 117 insertions, 41 deletions
diff --git a/vendor/illuminate/cache/ArrayStore.php b/vendor/illuminate/cache/ArrayStore.php
index cf95fe31a9..f1f00d637b 100644
--- a/vendor/illuminate/cache/ArrayStore.php
+++ b/vendor/illuminate/cache/ArrayStore.php
@@ -110,9 +110,13 @@ class ArrayStore extends TaggableStore
*/
public function forget($key)
{
- unset($this->storage[$key]);
+ if (array_key_exists($key, $this->storage)) {
+ unset($this->storage[$key]);
- return true;
+ return true;
+ }
+
+ return false;
}
/**
diff --git a/vendor/illuminate/cache/Repository.php b/vendor/illuminate/cache/Repository.php
index c6fee92a6c..a0b7d2c670 100755
--- a/vendor/illuminate/cache/Repository.php
+++ b/vendor/illuminate/cache/Repository.php
@@ -205,7 +205,7 @@ class Repository implements CacheContract, ArrayAccess
$seconds = $this->getSeconds($ttl);
if ($seconds <= 0) {
- return $this->delete($key);
+ return $this->forget($key);
}
$result = $this->store->put($this->itemKey($key), $value, $seconds);
diff --git a/vendor/illuminate/container/Container.php b/vendor/illuminate/container/Container.php
index 5c83d16760..7dc70f7f46 100755
--- a/vendor/illuminate/container/Container.php
+++ b/vendor/illuminate/container/Container.php
@@ -753,9 +753,7 @@ class Container implements ArrayAccess, ContainerContract
*/
protected function findInContextualBindings($abstract)
{
- if (isset($this->contextual[end($this->buildStack)][$abstract])) {
- return $this->contextual[end($this->buildStack)][$abstract];
- }
+ return $this->contextual[end($this->buildStack)][$abstract] ?? null;
}
/**
@@ -1183,7 +1181,7 @@ class Container implements ArrayAccess, ContainerContract
}
/**
- * Set the globally available instance of the container.
+ * Get the globally available instance of the container.
*
* @return static
*/
diff --git a/vendor/illuminate/database/Connectors/SqlServerConnector.php b/vendor/illuminate/database/Connectors/SqlServerConnector.php
index 6cfc33fb63..6d6ac2d073 100755
--- a/vendor/illuminate/database/Connectors/SqlServerConnector.php
+++ b/vendor/illuminate/database/Connectors/SqlServerConnector.php
@@ -166,11 +166,11 @@ class SqlServerConnector extends Connector implements ConnectorInterface
*/
protected function buildHostString(array $config, $separator)
{
- if (isset($config['port']) && ! empty($config['port'])) {
- return $config['host'].$separator.$config['port'];
- } else {
+ if (empty($config['port'])) {
return $config['host'];
}
+
+ return $config['host'].$separator.$config['port'];
}
/**
diff --git a/vendor/illuminate/database/Eloquent/Builder.php b/vendor/illuminate/database/Eloquent/Builder.php
index 670f7409f0..051b5aa2d0 100755
--- a/vendor/illuminate/database/Eloquent/Builder.php
+++ b/vendor/illuminate/database/Eloquent/Builder.php
@@ -71,7 +71,7 @@ class Builder
* @var array
*/
protected $passthru = [
- 'insert', 'insertGetId', 'getBindings', 'toSql', 'dump', 'dd',
+ 'insert', 'insertOrIgnore', 'insertGetId', 'insertUsing', 'getBindings', 'toSql', 'dump', 'dd',
'exists', 'doesntExist', 'count', 'min', 'max', 'avg', 'average', 'sum', 'getConnection',
];
diff --git a/vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php b/vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php
index 0eef812e71..fda92763df 100644
--- a/vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php
+++ b/vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php
@@ -372,9 +372,7 @@ trait HasAttributes
*/
protected function getAttributeFromArray($key)
{
- if (isset($this->attributes[$key])) {
- return $this->attributes[$key];
- }
+ return $this->attributes[$key] ?? null;
}
/**
diff --git a/vendor/illuminate/database/Eloquent/Relations/Concerns/AsPivot.php b/vendor/illuminate/database/Eloquent/Relations/Concerns/AsPivot.php
index 602f30f6bc..605e8cfa7d 100644
--- a/vendor/illuminate/database/Eloquent/Relations/Concerns/AsPivot.php
+++ b/vendor/illuminate/database/Eloquent/Relations/Concerns/AsPivot.php
@@ -203,7 +203,7 @@ trait AsPivot
/**
* Determine if the pivot model or given attributes has timestamp attributes.
*
- * @param $attributes array|null
+ * @param array|null $attributes
* @return bool
*/
public function hasTimestampAttributes($attributes = null)
diff --git a/vendor/illuminate/database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php b/vendor/illuminate/database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php
index 1611f596ee..70cf998aae 100644
--- a/vendor/illuminate/database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php
+++ b/vendor/illuminate/database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php
@@ -220,12 +220,12 @@ trait InteractsWithPivotTable
*/
protected function updateExistingPivotUsingCustomClass($id, array $attributes, $touch)
{
- $updated = $this->getCurrentlyAttachedPivots()
+ $pivot = $this->getCurrentlyAttachedPivots()
->where($this->foreignPivotKey, $this->parent->{$this->parentKey})
->where($this->relatedPivotKey, $this->parseId($id))
- ->first()
- ->fill($attributes)
- ->isDirty();
+ ->first();
+
+ $updated = $pivot ? $pivot->fill($attributes)->isDirty() : false;
$this->newPivot([
$this->foreignPivotKey => $this->parent->{$this->parentKey},
@@ -403,7 +403,7 @@ trait InteractsWithPivotTable
* @param string $column
* @return bool
*/
- protected function hasPivotColumn($column)
+ public function hasPivotColumn($column)
{
return in_array($column, $this->pivotColumns);
}
diff --git a/vendor/illuminate/database/Query/Builder.php b/vendor/illuminate/database/Query/Builder.php
index 0ff6d377d5..1c28b74f25 100755
--- a/vendor/illuminate/database/Query/Builder.php
+++ b/vendor/illuminate/database/Query/Builder.php
@@ -2648,6 +2648,33 @@ class Builder
}
/**
+ * Insert a new record into the database while ignoring errors.
+ *
+ * @param array $values
+ * @return int
+ */
+ public function insertOrIgnore(array $values)
+ {
+ if (empty($values)) {
+ return 0;
+ }
+
+ if (! is_array(reset($values))) {
+ $values = [$values];
+ } else {
+ foreach ($values as $key => $value) {
+ ksort($value);
+ $values[$key] = $value;
+ }
+ }
+
+ return $this->connection->affectingStatement(
+ $this->grammar->compileInsertOrIgnore($this, $values),
+ $this->cleanBindings(Arr::flatten($values, 1))
+ );
+ }
+
+ /**
* Insert a new record and get the value of the primary key.
*
* @param array $values
@@ -2987,11 +3014,13 @@ class Builder
/**
* Dump the current SQL and bindings.
*
- * @return void
+ * @return $this
*/
public function dump()
{
dump($this->toSql(), $this->getBindings());
+
+ return $this;
}
/**
diff --git a/vendor/illuminate/database/Query/Grammars/Grammar.php b/vendor/illuminate/database/Query/Grammars/Grammar.php
index cd1ed736c2..0d8241fc3d 100755
--- a/vendor/illuminate/database/Query/Grammars/Grammar.php
+++ b/vendor/illuminate/database/Query/Grammars/Grammar.php
@@ -873,6 +873,18 @@ class Grammar extends BaseGrammar
}
/**
+ * Compile an insert ignore statement into SQL.
+ *
+ * @param \Illuminate\Database\Query\Builder $query
+ * @param array $values
+ * @return string
+ */
+ public function compileInsertOrIgnore(Builder $query, array $values)
+ {
+ throw new RuntimeException('This database engine does not support inserting while ignoring errors.');
+ }
+
+ /**
* Compile an insert and get ID statement into SQL.
*
* @param \Illuminate\Database\Query\Builder $query
diff --git a/vendor/illuminate/database/Query/Grammars/MySqlGrammar.php b/vendor/illuminate/database/Query/Grammars/MySqlGrammar.php
index 5a9cea6e56..3b6462a612 100755
--- a/vendor/illuminate/database/Query/Grammars/MySqlGrammar.php
+++ b/vendor/illuminate/database/Query/Grammars/MySqlGrammar.php
@@ -2,6 +2,7 @@
namespace Illuminate\Database\Query\Grammars;
+use Illuminate\Support\Str;
use Illuminate\Database\Query\Builder;
use Illuminate\Database\Query\JsonExpression;
@@ -55,6 +56,18 @@ class MySqlGrammar extends Grammar
}
/**
+ * Compile an insert ignore statement into SQL.
+ *
+ * @param \Illuminate\Database\Query\Builder $query
+ * @param array $values
+ * @return string
+ */
+ public function compileInsertOrIgnore(Builder $query, array $values)
+ {
+ return Str::replaceFirst('insert', 'insert ignore', $this->compileInsert($query, $values));
+ }
+
+ /**
* Compile a "JSON contains" statement into SQL.
*
* @param string $column
diff --git a/vendor/illuminate/database/Query/Grammars/PostgresGrammar.php b/vendor/illuminate/database/Query/Grammars/PostgresGrammar.php
index bc686e3fe6..839d6e5b1c 100755
--- a/vendor/illuminate/database/Query/Grammars/PostgresGrammar.php
+++ b/vendor/illuminate/database/Query/Grammars/PostgresGrammar.php
@@ -196,6 +196,18 @@ class PostgresGrammar extends Grammar
}
/**
+ * Compile an insert ignore statement into SQL.
+ *
+ * @param \Illuminate\Database\Query\Builder $query
+ * @param array $values
+ * @return string
+ */
+ public function compileInsertOrIgnore(Builder $query, array $values)
+ {
+ return $this->compileInsert($query, $values).' on conflict do nothing';
+ }
+
+ /**
* Compile an insert and get ID statement into SQL.
*
* @param \Illuminate\Database\Query\Builder $query
@@ -205,11 +217,7 @@ class PostgresGrammar extends Grammar
*/
public function compileInsertGetId(Builder $query, $values, $sequence)
{
- if (is_null($sequence)) {
- $sequence = 'id';
- }
-
- return $this->compileInsert($query, $values).' returning '.$this->wrap($sequence);
+ return $this->compileInsert($query, $values).' returning '.$this->wrap($sequence ?: 'id');
}
/**
@@ -247,8 +255,8 @@ class PostgresGrammar extends Grammar
// When gathering the columns for an update statement, we'll wrap each of the
// columns and convert it to a parameter value. Then we will concatenate a
// list of the columns that can be added into this update query clauses.
- return collect($values)->map(function ($value, $key) use ($query) {
- $column = Str::after($key, $query->from.'.');
+ return collect($values)->map(function ($value, $key) {
+ $column = last(explode('.', $key));
if ($this->isJsonSelector($key)) {
return $this->compileJsonUpdateColumn($column, $value);
diff --git a/vendor/illuminate/database/Query/Grammars/SQLiteGrammar.php b/vendor/illuminate/database/Query/Grammars/SQLiteGrammar.php
index 2cedb89299..a6782138e2 100755
--- a/vendor/illuminate/database/Query/Grammars/SQLiteGrammar.php
+++ b/vendor/illuminate/database/Query/Grammars/SQLiteGrammar.php
@@ -179,6 +179,18 @@ class SQLiteGrammar extends Grammar
}
/**
+ * Compile an insert ignore statement into SQL.
+ *
+ * @param \Illuminate\Database\Query\Builder $query
+ * @param array $values
+ * @return string
+ */
+ public function compileInsertOrIgnore(Builder $query, array $values)
+ {
+ return Str::replaceFirst('insert', 'insert or ignore', $this->compileInsert($query, $values));
+ }
+
+ /**
* Compile an update statement into SQL.
*
* @param \Illuminate\Database\Query\Builder $query
@@ -189,8 +201,8 @@ class SQLiteGrammar extends Grammar
{
$table = $this->wrapTable($query->from);
- $columns = collect($values)->map(function ($value, $key) use ($query) {
- return $this->wrap(Str::after($key, $query->from.'.')).' = '.$this->parameter($value);
+ $columns = collect($values)->map(function ($value, $key) {
+ return $this->wrap(Str::after($key, '.')).' = '.$this->parameter($value);
})->implode(', ');
if (isset($query->joins) || isset($query->limit)) {
diff --git a/vendor/illuminate/database/Seeder.php b/vendor/illuminate/database/Seeder.php
index 9e0c2b5a49..c415c89840 100755
--- a/vendor/illuminate/database/Seeder.php
+++ b/vendor/illuminate/database/Seeder.php
@@ -35,11 +35,13 @@ abstract class Seeder
$classes = Arr::wrap($class);
foreach ($classes as $class) {
+ $seeder = $this->resolve($class);
+
if ($silent === false && isset($this->command)) {
- $this->command->getOutput()->writeln("<info>Seeding:</info> $class");
+ $this->command->getOutput()->writeln('<info>Seeding:</info> '.get_class($seeder));
}
- $this->resolve($class)->__invoke();
+ $seeder->__invoke();
}
return $this;
diff --git a/vendor/illuminate/support/Facades/Password.php b/vendor/illuminate/support/Facades/Password.php
index c291b97f46..cbe9e24722 100755
--- a/vendor/illuminate/support/Facades/Password.php
+++ b/vendor/illuminate/support/Facades/Password.php
@@ -2,6 +2,8 @@
namespace Illuminate\Support\Facades;
+use Illuminate\Contracts\Auth\PasswordBroker;
+
/**
* @method static string sendResetLink(array $credentials)
* @method static mixed reset(array $credentials, \Closure $callback)
@@ -17,35 +19,35 @@ class Password extends Facade
*
* @var string
*/
- const RESET_LINK_SENT = 'passwords.sent';
+ const RESET_LINK_SENT = PasswordBroker::RESET_LINK_SENT;
/**
* Constant representing a successfully reset password.
*
* @var string
*/
- const PASSWORD_RESET = 'passwords.reset';
+ const PASSWORD_RESET = PasswordBroker::PASSWORD_RESET;
/**
* Constant representing the user not found response.
*
* @var string
*/
- const INVALID_USER = 'passwords.user';
+ const INVALID_USER = PasswordBroker::INVALID_USER;
/**
* Constant representing an invalid password.
*
* @var string
*/
- const INVALID_PASSWORD = 'passwords.password';
+ const INVALID_PASSWORD = PasswordBroker::INVALID_PASSWORD;
/**
* Constant representing an invalid token.
*
* @var string
*/
- const INVALID_TOKEN = 'passwords.token';
+ const INVALID_TOKEN = PasswordBroker::INVALID_TOKEN;
/**
* Get the registered name of the component.
diff --git a/vendor/illuminate/support/ServiceProvider.php b/vendor/illuminate/support/ServiceProvider.php
index 458e213d0a..a20530450e 100755
--- a/vendor/illuminate/support/ServiceProvider.php
+++ b/vendor/illuminate/support/ServiceProvider.php
@@ -156,10 +156,8 @@ abstract class ServiceProvider
static::$publishes[$class] = array_merge(static::$publishes[$class], $paths);
- if (! is_null($groups)) {
- foreach ((array) $groups as $group) {
- $this->addPublishGroup($group, $paths);
- }
+ foreach ((array) $groups as $group) {
+ $this->addPublishGroup($group, $paths);
}
}