upgrade idiorm to php8.1-patched version (aaronpk/idiorm)
This commit is contained in:
12
vendor/webmozart/assert/.editorconfig
vendored
12
vendor/webmozart/assert/.editorconfig
vendored
@@ -1,12 +0,0 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset=utf-8
|
||||
end_of_line=lf
|
||||
trim_trailing_whitespace=true
|
||||
insert_final_newline=true
|
||||
indent_style=space
|
||||
indent_size=4
|
||||
|
||||
[*.yml]
|
||||
indent_size=2
|
||||
120
vendor/webmozart/assert/.github/workflows/ci.yaml
vendored
120
vendor/webmozart/assert/.github/workflows/ci.yaml
vendored
@@ -1,120 +0,0 @@
|
||||
# https://docs.github.com/en/actions
|
||||
|
||||
name: "CI"
|
||||
|
||||
on:
|
||||
pull_request: ~
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
|
||||
env:
|
||||
COMPOSER_ROOT_VERSION: 1.99
|
||||
|
||||
jobs:
|
||||
coding-standards:
|
||||
name: "Coding Standards"
|
||||
|
||||
runs-on: "ubuntu-latest"
|
||||
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: "actions/checkout@v2.3.4"
|
||||
|
||||
- name: "Install PHP"
|
||||
uses: "shivammathur/setup-php@2.9.0"
|
||||
with:
|
||||
coverage: "none"
|
||||
extensions: "mbstring"
|
||||
php-version: "7.4"
|
||||
tools: "composer-normalize"
|
||||
|
||||
- name: "Validate composer.json"
|
||||
run: "composer validate --strict"
|
||||
|
||||
- name: "Normalize composer.json"
|
||||
run: "composer-normalize --dry-run"
|
||||
|
||||
- name: "PHP-CS-Fixer"
|
||||
uses: "docker://oskarstark/php-cs-fixer-ga:2.18.0"
|
||||
with:
|
||||
args: "--dry-run --diff-format udiff"
|
||||
|
||||
static-code-analysis:
|
||||
name: "Static Code Analysis"
|
||||
|
||||
runs-on: "ubuntu-latest"
|
||||
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: "actions/checkout@v2.3.4"
|
||||
|
||||
- name: "Install PHP"
|
||||
uses: "shivammathur/setup-php@2.9.0"
|
||||
with:
|
||||
coverage: "none"
|
||||
extensions: "mbstring"
|
||||
php-version: "7.4"
|
||||
|
||||
- name: "Install dependencies with composer"
|
||||
run: "composer update --no-interaction --no-progress && composer i --working-dir=ci"
|
||||
|
||||
- name: "Run vimeo/psalm"
|
||||
run: "ci/vendor/bin/psalm --threads=4"
|
||||
|
||||
tests:
|
||||
name: "Tests"
|
||||
|
||||
runs-on: "ubuntu-latest"
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php-version:
|
||||
- "7.2"
|
||||
- "7.3"
|
||||
- "7.4"
|
||||
- "8.0"
|
||||
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: "actions/checkout@v2.3.4"
|
||||
|
||||
- name: "Install PHP"
|
||||
uses: "shivammathur/setup-php@2.9.0"
|
||||
with:
|
||||
coverage: "none"
|
||||
extensions: "mbstring"
|
||||
php-version: "${{ matrix.php-version }}"
|
||||
|
||||
- name: "Install dependencies with composer"
|
||||
run: "composer update --no-interaction --no-progress"
|
||||
|
||||
- name: "Run unit tests"
|
||||
run: "vendor/bin/phpunit"
|
||||
|
||||
windows-tests:
|
||||
name: "Windows tests"
|
||||
|
||||
runs-on: "windows-latest"
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php-version:
|
||||
- "7.4"
|
||||
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: "actions/checkout@v2.3.4"
|
||||
|
||||
- name: "Install PHP"
|
||||
uses: "shivammathur/setup-php@2.9.0"
|
||||
with:
|
||||
coverage: "none"
|
||||
extensions: "mbstring"
|
||||
php-version: "${{ matrix.php-version }}"
|
||||
|
||||
- name: "Install dependencies with composer"
|
||||
run: "composer update --no-interaction --no-progress"
|
||||
|
||||
- name: "Run unit tests"
|
||||
run: "vendor/bin/phpunit tests/AssertTest.php"
|
||||
24
vendor/webmozart/assert/.php_cs
vendored
24
vendor/webmozart/assert/.php_cs
vendored
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
$finder = PhpCsFixer\Finder::create()
|
||||
->in(__DIR__.'/src')
|
||||
->in(__DIR__.'/tests')
|
||||
;
|
||||
|
||||
return PhpCsFixer\Config::create()
|
||||
->setRiskyAllowed(true)
|
||||
->setRules([
|
||||
'@PSR2' => true,
|
||||
'@Symfony' => true,
|
||||
'ordered_imports' => true,
|
||||
'array_syntax' => ['syntax' => 'long'],
|
||||
'no_superfluous_phpdoc_tags' => false,
|
||||
'phpdoc_annotation_without_dot' => false,
|
||||
'phpdoc_types_order' => false,
|
||||
'phpdoc_summary' => false,
|
||||
'phpdoc_to_comment' => false,
|
||||
'phpdoc_align' => false,
|
||||
'yoda_style' => false,
|
||||
])
|
||||
->setFinder($finder)
|
||||
;
|
||||
17
vendor/webmozart/assert/CHANGELOG.md
vendored
17
vendor/webmozart/assert/CHANGELOG.md
vendored
@@ -3,6 +3,23 @@ Changelog
|
||||
|
||||
## UNRELEASED
|
||||
|
||||
## 1.11.0
|
||||
|
||||
### Added
|
||||
|
||||
* Added explicit (non magic) `allNullOr*` methods, with `@psalm-assert` annotations, for better Psalm support.
|
||||
|
||||
### Changed
|
||||
|
||||
* Trait methods will now check the assertion themselves, instead of using `__callStatic`
|
||||
* `isList` will now deal correctly with (modified) lists that contain `NaN`
|
||||
* `reportInvalidArgument` now has a return type of `never`.
|
||||
|
||||
### Removed
|
||||
|
||||
* Removed `symfony/polyfill-ctype` as a dependency, and require `ext-cytpe` instead.
|
||||
* You can still require the `symfony/polyfill-ctype` in your project if you need it, as it provides `ext-ctype`
|
||||
|
||||
## 1.10.0
|
||||
|
||||
### Added
|
||||
|
||||
4
vendor/webmozart/assert/README.md
vendored
4
vendor/webmozart/assert/README.md
vendored
@@ -43,8 +43,8 @@ Installation
|
||||
|
||||
Use [Composer] to install the package:
|
||||
|
||||
```
|
||||
$ composer require webmozart/assert
|
||||
```bash
|
||||
composer require webmozart/assert
|
||||
```
|
||||
|
||||
Example
|
||||
|
||||
20
vendor/webmozart/assert/composer.json
vendored
20
vendor/webmozart/assert/composer.json
vendored
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "webmozart/assert",
|
||||
"description": "Assertions to validate method input/output with nice error messages.",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"assert",
|
||||
"check",
|
||||
"validate"
|
||||
],
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Bernhard Schussek",
|
||||
@@ -15,19 +15,14 @@
|
||||
],
|
||||
"require": {
|
||||
"php": "^7.2 || ^8.0",
|
||||
"symfony/polyfill-ctype": "^1.8"
|
||||
},
|
||||
"conflict": {
|
||||
"phpstan/phpstan": "<0.12.20",
|
||||
"vimeo/psalm": "<4.6.1 || 4.6.2"
|
||||
"ext-ctype": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^8.5.13"
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.10-dev"
|
||||
}
|
||||
"conflict": {
|
||||
"phpstan/phpstan": "<0.12.20",
|
||||
"vimeo/psalm": "<4.6.1 || 4.6.2"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@@ -39,5 +34,10 @@
|
||||
"Webmozart\\Assert\\Tests\\": "tests/",
|
||||
"Webmozart\\Assert\\Bin\\": "bin/src"
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.10-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
14
vendor/webmozart/assert/psalm.xml
vendored
14
vendor/webmozart/assert/psalm.xml
vendored
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<psalm
|
||||
totallyTyped="true"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="https://getpsalm.org/schema/config"
|
||||
xsi:schemaLocation="https://getpsalm.org/schema/config ci/vendor/vimeo/psalm/config.xsd"
|
||||
phpVersion="7.3"
|
||||
>
|
||||
<projectFiles>
|
||||
<directory name="bin" />
|
||||
<directory name="tests/static-analysis" />
|
||||
</projectFiles>
|
||||
|
||||
</psalm>
|
||||
38
vendor/webmozart/assert/src/Assert.php
vendored
38
vendor/webmozart/assert/src/Assert.php
vendored
@@ -463,7 +463,7 @@ class Assert
|
||||
static::reportInvalidArgument(\sprintf(
|
||||
$message ?: 'Expected an instance of any of %2$s. Got: %s',
|
||||
static::typeToString($value),
|
||||
\implode(', ', \array_map(array('static', 'valueToString'), $classes))
|
||||
\implode(', ', \array_map(array(static::class, 'valueToString'), $classes))
|
||||
));
|
||||
}
|
||||
|
||||
@@ -485,8 +485,8 @@ class Assert
|
||||
|
||||
if (!\is_a($value, $class, \is_string($value))) {
|
||||
static::reportInvalidArgument(sprintf(
|
||||
$message ?: 'Expected an instance of this class or to this class among his parents %2$s. Got: %s',
|
||||
static::typeToString($value),
|
||||
$message ?: 'Expected an instance of this class or to this class among its parents "%2$s". Got: %s',
|
||||
static::valueToString($value),
|
||||
$class
|
||||
));
|
||||
}
|
||||
@@ -511,8 +511,8 @@ class Assert
|
||||
|
||||
if (\is_a($value, $class, \is_string($value))) {
|
||||
static::reportInvalidArgument(sprintf(
|
||||
$message ?: 'Expected an instance of this class or to this class among his parents other than %2$s. Got: %s',
|
||||
static::typeToString($value),
|
||||
$message ?: 'Expected an instance of this class or to this class among its parents other than "%2$s". Got: %s',
|
||||
static::valueToString($value),
|
||||
$class
|
||||
));
|
||||
}
|
||||
@@ -539,9 +539,9 @@ class Assert
|
||||
}
|
||||
|
||||
static::reportInvalidArgument(sprintf(
|
||||
$message ?: 'Expected an any of instance of this class or to this class among his parents other than %2$s. Got: %s',
|
||||
static::typeToString($value),
|
||||
\implode(', ', \array_map(array('static', 'valueToString'), $classes))
|
||||
$message ?: 'Expected an instance of any of this classes or any of those classes among their parents "%2$s". Got: %s',
|
||||
static::valueToString($value),
|
||||
\implode(', ', $classes)
|
||||
));
|
||||
}
|
||||
|
||||
@@ -975,7 +975,7 @@ class Assert
|
||||
static::reportInvalidArgument(\sprintf(
|
||||
$message ?: 'Expected one of: %2$s. Got: %s',
|
||||
static::valueToString($value),
|
||||
\implode(', ', \array_map(array('static', 'valueToString'), $values))
|
||||
\implode(', ', \array_map(array(static::class, 'valueToString'), $values))
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -1822,11 +1822,24 @@ class Assert
|
||||
*/
|
||||
public static function isList($array, $message = '')
|
||||
{
|
||||
if (!\is_array($array) || $array !== \array_values($array)) {
|
||||
if (!\is_array($array)) {
|
||||
static::reportInvalidArgument(
|
||||
$message ?: 'Expected list - non-associative array.'
|
||||
);
|
||||
}
|
||||
|
||||
if ($array === \array_values($array)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$nextKey = -1;
|
||||
foreach ($array as $k => $v) {
|
||||
if ($k !== ++$nextKey) {
|
||||
static::reportInvalidArgument(
|
||||
$message ?: 'Expected list - non-associative array.'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1955,7 +1968,7 @@ class Assert
|
||||
if ('nullOr' === \substr($name, 0, 6)) {
|
||||
if (null !== $arguments[0]) {
|
||||
$method = \lcfirst(\substr($name, 6));
|
||||
\call_user_func_array(array('static', $method), $arguments);
|
||||
\call_user_func_array(array(static::class, $method), $arguments);
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -1970,7 +1983,7 @@ class Assert
|
||||
foreach ($arguments[0] as $entry) {
|
||||
$args[0] = $entry;
|
||||
|
||||
\call_user_func_array(array('static', $method), $args);
|
||||
\call_user_func_array(array(static::class, $method), $args);
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -2054,6 +2067,7 @@ class Assert
|
||||
* @throws InvalidArgumentException
|
||||
*
|
||||
* @psalm-pure this method is not supposed to perform side-effects
|
||||
* @psalm-return never
|
||||
*/
|
||||
protected static function reportInvalidArgument($message)
|
||||
{
|
||||
|
||||
2551
vendor/webmozart/assert/src/Mixin.php
vendored
2551
vendor/webmozart/assert/src/Mixin.php
vendored
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user