Skip to content

Commit

Permalink
Bump vendor dependencies (NOJIRA)
Browse files Browse the repository at this point in the history
  • Loading branch information
Benn Oshrin committed Oct 12, 2021
1 parent e9e35cc commit 56d7267
Show file tree
Hide file tree
Showing 888 changed files with 60,362 additions and 7,273 deletions.
1 change: 1 addition & 0 deletions app/vendor/bin/doctrine-dbal
13 changes: 13 additions & 0 deletions app/vendor/cakephp/bake/templates/bake/Template/add.twig
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@
/**
* @var \{{ namespace }}\View\AppView $this
* @var \{{ entityClass }} ${{ singularVar }}
{{- "\n" }}
{%- if associations.BelongsTo is defined %}
{%- for assocName, assocData in associations.BelongsTo %}
* @var \Cake\Collection\CollectionInterface|string[] ${{ assocData.variable }}
{{- "\n" }}
{%- endfor %}
{% endif %}
{%- if associations.BelongsToMany is defined %}
{%- for assocName, assocData in associations.BelongsToMany %}
* @var \Cake\Collection\CollectionInterface|string[] ${{ assocData.variable }}
{{- "\n" }}
{%- endfor %}
{% endif %}
*/
?>
{{ element('Bake.form') }}
13 changes: 13 additions & 0 deletions app/vendor/cakephp/bake/templates/bake/Template/edit.twig
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@
/**
* @var \{{ namespace }}\View\AppView $this
* @var \{{ entityClass }} ${{ singularVar }}
{{- "\n" }}
{%- if associations.BelongsTo is defined %}
{%- for assocName, assocData in associations.BelongsTo %}
* @var string[]|\Cake\Collection\CollectionInterface ${{ assocData.variable }}
{{- "\n" }}
{%- endfor %}
{% endif %}
{%- if associations.BelongsToMany is defined %}
{%- for assocName, assocData in associations.BelongsToMany %}
* @var string[]|\Cake\Collection\CollectionInterface ${{ assocData.variable }}
{{- "\n" }}
{%- endfor %}
{% endif %}
*/
?>
{{ element('Bake.form') }}
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ class {{ className }}Test extends TestCase
* Test {{ method }} method
*
* @return void
* @uses \{{ fullClassName }}::{{ method }}()
*/
public function test{{ method|camelize }}(): void
{
Expand Down
2 changes: 1 addition & 1 deletion app/vendor/cakephp/cakephp/VERSION.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
// @license https://opensource.org/licenses/mit-license.php MIT License
// +--------------------------------------------------------------------------------------------+ //
////////////////////////////////////////////////////////////////////////////////////////////////////
4.2.7
4.2.9
2 changes: 1 addition & 1 deletion app/vendor/cakephp/cakephp/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"@phpstan",
"@psalm"
],
"stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:0.12.88 psalm/phar:~4.7.0 && mv composer.backup composer.json",
"stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:0.12.94 psalm/phar:~4.9.3 && mv composer.backup composer.json",
"test": "phpunit",
"test-coverage": "phpunit --coverage-clover=clover.xml"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,8 @@ protected function _parse(ConsoleIo $io, string $functionName, array $map): void
if ($mapCount === count($strings)) {
$singular = '';
$plural = $context = null;
extract(array_combine($map, $strings));
$vars = array_combine($map, $strings);
extract($vars);
$domain = $domain ?? 'default';
$details = [
'file' => $this->_file,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ protected function _throwMissingClassError(string $class, ?string $plugin): void
* @param array $config An array of config to use for the component.
* @return \Cake\Controller\Component The constructed component class.
* @psalm-suppress MoreSpecificImplementedParamType
* @psalm-var class-string $class
* @psalm-param class-string $class
*/
protected function _create($class, string $alias, array $config): Component
{
Expand Down
1 change: 0 additions & 1 deletion app/vendor/cakephp/cakephp/src/Core/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class App
* @param string $suffix Class name suffix
* @return string|null Namespaced class name, null if the class is not found.
* @psalm-return class-string|null
* @psalm-var class-string $class
*/
public static function className(string $class, string $type = '', string $suffix = ''): ?string
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,5 @@ public function responseHeader($header = null, $value = null): ?array
}

// phpcs:disable
class_exists('Cake\Core\Exception\CakeException');
class_exists('Cake\Core\Exception\Exception');
// phpcs:enable
1 change: 0 additions & 1 deletion app/vendor/cakephp/cakephp/src/Core/PluginCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ public function get(string $name): PluginInterface
* @param array $config Configuration options for the plugin.
* @return \Cake\Core\PluginInterface
* @throws \Cake\Core\Exception\MissingPluginException When plugin instance could not be created.
* @psalm-var class-string<\Cake\Core\PluginInterface> $name
*/
public function create(string $name, array $config = []): PluginInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,9 @@ public function truncateTableSql(TableSchema $schema): array
$column = $schema->getColumn($pk[0]);
if (in_array($column['type'], ['integer', 'biginteger'])) {
$queries[] = sprintf(
"DBCC CHECKIDENT('%s', RESEED, 0)",
"IF EXISTS (SELECT * FROM sys.identity_columns WHERE OBJECT_NAME(OBJECT_ID) = '%s' AND " .
"last_value IS NOT NULL) DBCC CHECKIDENT('%s', RESEED, 0)",
$schema->name(),
$schema->name()
);
}
Expand Down
2 changes: 1 addition & 1 deletion app/vendor/cakephp/cakephp/src/Datasource/Paginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ protected function _prefix(RepositoryInterface $object, array $order, bool $allo
public function checkLimit(array $options): array
{
$options['limit'] = (int)$options['limit'];
if (empty($options['limit']) || $options['limit'] < 1) {
if ($options['limit'] < 1) {
$options['limit'] = 1;
}
$options['limit'] = max(min($options['limit'], $options['maxLimit']), 1);
Expand Down
1 change: 1 addition & 0 deletions app/vendor/cakephp/cakephp/src/Datasource/QueryTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@ public function firstOrFail()
* @see \Cake\Datasource\QueryInterface::applyOptions() to read about the options that will
* be processed by this class and not returned by this function
* @return array
* @see applyOptions()
*/
public function getOptions(): array
{
Expand Down
1 change: 1 addition & 0 deletions app/vendor/cakephp/cakephp/src/Error/Debugger.php
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ public static function formatTrace($backtrace, array $options = [])
return $back;
}

/** @psalm-suppress InvalidArgument */
return implode("\n", $back);
}

Expand Down
3 changes: 2 additions & 1 deletion app/vendor/cakephp/cakephp/src/Http/CallbackStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public function getContents(): string
{
$callback = $this->detach();
$result = '';
if (is_callable($callback)) {
/** @psalm-suppress TypeDoesNotContainType */
if ($callback !== null) {
$result = $callback();
}
if (!is_string($result)) {
Expand Down
1 change: 0 additions & 1 deletion app/vendor/cakephp/cakephp/src/Http/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ public static function createFromUrl(string $url)
}

$config = array_intersect_key($parts, ['scheme' => '', 'port' => '', 'host' => '', 'path' => '']);
$config = array_merge(['scheme' => '', 'host' => ''], $config);

if (empty($config['scheme']) || empty($config['host'])) {
throw new InvalidArgumentException('The URL was parsed but did not contain a scheme or host');
Expand Down
8 changes: 6 additions & 2 deletions app/vendor/cakephp/cakephp/src/Http/Client/Adapter/Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,14 @@ protected function getProtocolVersion(RequestInterface $request): int
/**
* Convert the raw curl response into an Http\Client\Response
*
* @param resource $handle Curl handle
* @param resource|\CurlHandle $handle Curl handle
* @param string $responseData string The response data from curl_exec
* @return \Cake\Http\Client\Response[]
* @psalm-suppress UndefinedDocblockClass
*/
protected function createResponse($handle, $responseData): array
{
/** @psalm-suppress PossiblyInvalidArgument */
$headerSize = curl_getinfo($handle, CURLINFO_HEADER_SIZE);
$headers = trim(substr($responseData, 0, $headerSize));
$body = substr($responseData, $headerSize);
Expand All @@ -208,11 +210,13 @@ protected function createResponse($handle, $responseData): array
/**
* Execute the curl handle.
*
* @param resource $ch Curl Resource handle
* @param resource|\CurlHandle $ch Curl Resource handle
* @return string|bool
* @psalm-suppress UndefinedDocblockClass
*/
protected function exec($ch)
{
/** @psalm-suppress PossiblyInvalidArgument */
return curl_exec($ch);
}
}
1 change: 1 addition & 0 deletions app/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ protected function setCookie($cookie): bool
}

if (PHP_VERSION_ID >= 70300) {
/** @psalm-suppress InvalidArgument */
return setcookie($cookie->getName(), $cookie->getScalarValue(), $cookie->getOptions());
}

Expand Down
2 changes: 1 addition & 1 deletion app/vendor/cakephp/cakephp/src/I18n/DateFormatTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ protected function _formatObject($date, $format, ?string $locale): string
$calendar,
$pattern
);
if ($formatter === false) {
if (empty($formatter)) {
throw new RuntimeException(
'Your version of icu does not support creating a date formatter for ' .
"`$key`. You should try to upgrade libicu and the intl extension."
Expand Down
2 changes: 1 addition & 1 deletion app/vendor/cakephp/cakephp/src/I18n/Number.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public static function toPercentage($value, int $precision = 2, array $options =
{
$options += ['multiply' => false, 'type' => NumberFormatter::PERCENT];
if (!$options['multiply']) {
$value /= 100;
$value = (float)$value / 100;
}

return static::precision($value, $precision, $options);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function send(Message $message): array
$to = $message->getHeaders(['to'])['To'];
$to = str_replace("\r\n", '', $to);

$eol = $this->getConfig('eol', PHP_EOL);
$eol = $this->getConfig('eol', version_compare(PHP_VERSION, '8.0', '>=') ? "\r\n" : "\n");
$headers = $message->getHeadersString(
[
'from',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ function ($c, &$field) use ($fields, $alias, $mainTableAlias, $mainTableFields,
return $c;
}

/** @psalm-suppress ParadoxicalCondition */
if (in_array($field, $fields, true)) {
$joinRequired = true;
$field = "$alias.$field";
Expand Down Expand Up @@ -319,6 +320,7 @@ function ($expression) use ($fields, $alias, $mainTableAlias, $mainTableFields,
return;
}

/** @psalm-suppress ParadoxicalCondition */
if (in_array($field, $mainTableFields, true)) {
$expression->setField("$mainTableAlias.$field");
}
Expand Down
30 changes: 27 additions & 3 deletions app/vendor/cakephp/cakephp/src/ORM/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,9 @@ public function notMatching(string $assoc, ?callable $builder = null)

/**
* Populates or adds parts to current query clauses using an array.
* This is handy for passing all query clauses at once. The option array accepts:
* This is handy for passing all query clauses at once.
*
* The method accepts the following query clause related options:
*
* - fields: Maps to the select method
* - conditions: Maps to the where method
Expand All @@ -779,6 +781,10 @@ public function notMatching(string $assoc, ?callable $builder = null)
* - join: Maps to the join method
* - page: Maps to the page method
*
* All other options will not affect the query, but will be stored
* as custom options that can be read via `getOptions()`. Furthermore
* they are automatically passed to `Model.beforeFind`.
*
* ### Example:
*
* ```
Expand All @@ -787,7 +793,7 @@ public function notMatching(string $assoc, ?callable $builder = null)
* 'conditions' => [
* 'created >=' => '2013-01-01'
* ],
* 'limit' => 10
* 'limit' => 10,
* ]);
* ```
*
Expand All @@ -800,8 +806,26 @@ public function notMatching(string $assoc, ?callable $builder = null)
* ->limit(10)
* ```
*
* @param array $options the options to be applied
* Custom options can be read via `getOptions()`:
*
* ```
* $query->applyOptions([
* 'fields' => ['id', 'name'],
* 'custom' => 'value',
* ]);
* ```
*
* Here `$options` will hold `['custom' => 'value']` (the `fields`
* option will be applied to the query instead of being stored, as
* it's a query clause related option):
*
* ```
* $options = $query->getOptions();
* ```
*
* @param array $options The options to be applied
* @return $this
* @see getOptions()
*/
public function applyOptions(array $options)
{
Expand Down
2 changes: 1 addition & 1 deletion app/vendor/cakephp/cakephp/src/ORM/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ public function findAll(Query $query, array $options): Query
* 'valueField' => ['first_name', 'last_name'],
* 'valueSeparator' => ' | ',
* ]);
*
* ```
*
* The results of this finder will be in the following form:
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@ trait ValidatorAwareTrait
* ```
* public function validationForSubscription($validator)
* {
* return $validator
* ->add('email', 'valid-email', ['rule' => 'email'])
* ->add('password', 'valid', ['rule' => 'notBlank'])
* ->requirePresence('username');
* return $validator
* ->add('email', 'valid-email', ['rule' => 'email'])
* ->add('password', 'valid', ['rule' => 'notBlank'])
* ->requirePresence('username');
* }
*
* $validator = $this->getValidator('forSubscription');
* ```
*
Expand Down Expand Up @@ -143,11 +144,11 @@ protected function createValidator(string $name): Validator
* You can build the object by yourself and store it in your object:
*
* ```
* $validator = new \Cake\Validation\Validator($table);
* $validator = new \Cake\Validation\Validator();
* $validator
* ->add('email', 'valid-email', ['rule' => 'email'])
* ->add('password', 'valid', ['rule' => 'notBlank'])
* ->allowEmpty('bio');
* ->add('email', 'valid-email', ['rule' => 'email'])
* ->add('password', 'valid', ['rule' => 'notBlank'])
* ->allowEmpty('bio');
* $this->setValidator('forSubscription', $validator);
* ```
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
*/
class MissingTemplateException extends CakeException
{
/**
* @var string|null
*/
protected $templateName;

/**
* @var string
*/
Expand All @@ -47,7 +52,13 @@ class MissingTemplateException extends CakeException
*/
public function __construct($file, array $paths = [], ?int $code = null, ?Throwable $previous = null)
{
$this->file = is_array($file) ? array_pop($file) : $file;
if (is_array($file)) {
$this->file = array_pop($file);
$this->templateName = array_pop($file);
} else {
$this->file = $file;
$this->templateName = null;
}
$this->paths = $paths;

parent::__construct($this->formatMessage(), $code, $previous);
Expand All @@ -60,7 +71,8 @@ public function __construct($file, array $paths = [], ?int $code = null, ?Throwa
*/
public function formatMessage(): string
{
$message = "{$this->type} file `{$this->file}` could not be found.";
$name = $this->templateName ?? $this->file;
$message = "{$this->type} file `{$name}` could not be found.";
if ($this->paths) {
$message .= "\n\nThe following paths were searched:\n\n";
foreach ($this->paths as $path) {
Expand Down
Loading

0 comments on commit 56d7267

Please sign in to comment.