generated from jric11/baseProject
Codex's updates...
This commit is contained in:
+2
-2
@@ -277,7 +277,7 @@ class InstalledVersions
|
||||
if (null === self::$installed) {
|
||||
// only require the installed.php file if this file is loaded from its dumped location,
|
||||
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
||||
if (substr(__DIR__, -8, 1) !== 'C' && is_file(__DIR__ . '/installed.php')) {
|
||||
if (substr(__DIR__, -8, 1) !== 'C') {
|
||||
self::$installed = include __DIR__ . '/installed.php';
|
||||
} else {
|
||||
self::$installed = array();
|
||||
@@ -378,7 +378,7 @@ class InstalledVersions
|
||||
if (null === self::$installed) {
|
||||
// only require the installed.php file if this file is loaded from its dumped location,
|
||||
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
||||
if (substr(__DIR__, -8, 1) !== 'C' && is_file(__DIR__ . '/installed.php')) {
|
||||
if (substr(__DIR__, -8, 1) !== 'C') {
|
||||
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
|
||||
$required = require __DIR__ . '/installed.php';
|
||||
self::$installed = $required;
|
||||
|
||||
Vendored
+2
@@ -1,3 +1,4 @@
|
||||
|
||||
Copyright (c) Nils Adermann, Jordi Boggiano
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
@@ -17,3 +18,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
Vendored
-16
@@ -8,25 +8,9 @@ $baseDir = dirname($vendorDir);
|
||||
return array(
|
||||
'ZipStream\\' => array($vendorDir . '/maennchen/zipstream-php/src'),
|
||||
'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
|
||||
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'),
|
||||
'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'),
|
||||
'PhpOffice\\PhpSpreadsheet\\' => array($vendorDir . '/phpoffice/phpspreadsheet/src/PhpSpreadsheet'),
|
||||
'PHPMailer\\PHPMailer\\' => array($vendorDir . '/phpmailer/phpmailer/src'),
|
||||
'Matrix\\' => array($vendorDir . '/markbaker/matrix/classes/src'),
|
||||
'Composer\\Pcre\\' => array($vendorDir . '/composer/pcre/src'),
|
||||
'Complex\\' => array($vendorDir . '/markbaker/complex/classes/src'),
|
||||
'Com\\Tecnick\\Unicode\\Data\\' => array($vendorDir . '/tecnickcom/tc-lib-unicode-data/src'),
|
||||
'Com\\Tecnick\\Unicode\\' => array($vendorDir . '/tecnickcom/tc-lib-unicode/src'),
|
||||
'Com\\Tecnick\\Pdf\\Sign\\' => array($vendorDir . '/tecnickcom/tc-lib-pdf-sign/src'),
|
||||
'Com\\Tecnick\\Pdf\\Parser\\' => array($vendorDir . '/tecnickcom/tc-lib-pdf-parser/src'),
|
||||
'Com\\Tecnick\\Pdf\\Page\\' => array($vendorDir . '/tecnickcom/tc-lib-pdf-page/src'),
|
||||
'Com\\Tecnick\\Pdf\\Image\\' => array($vendorDir . '/tecnickcom/tc-lib-pdf-image/src'),
|
||||
'Com\\Tecnick\\Pdf\\Graph\\' => array($vendorDir . '/tecnickcom/tc-lib-pdf-graph/src'),
|
||||
'Com\\Tecnick\\Pdf\\Font\\' => array($vendorDir . '/tecnickcom/tc-lib-pdf-font/src'),
|
||||
'Com\\Tecnick\\Pdf\\Filter\\' => array($vendorDir . '/tecnickcom/tc-lib-pdf-filter/src'),
|
||||
'Com\\Tecnick\\Pdf\\Encrypt\\' => array($vendorDir . '/tecnickcom/tc-lib-pdf-encrypt/src'),
|
||||
'Com\\Tecnick\\Pdf\\' => array($vendorDir . '/tecnickcom/tc-lib-pdf/src'),
|
||||
'Com\\Tecnick\\File\\' => array($vendorDir . '/tecnickcom/tc-lib-file/src'),
|
||||
'Com\\Tecnick\\Color\\' => array($vendorDir . '/tecnickcom/tc-lib-color/src'),
|
||||
'Com\\Tecnick\\Barcode\\' => array($vendorDir . '/tecnickcom/tc-lib-barcode/src'),
|
||||
);
|
||||
|
||||
Vendored
-81
@@ -14,8 +14,6 @@ class ComposerStaticInit6621356a0da1644f04f6f40bd0e0b948
|
||||
'P' =>
|
||||
array (
|
||||
'Psr\\SimpleCache\\' => 16,
|
||||
'Psr\\Http\\Message\\' => 17,
|
||||
'Psr\\Http\\Client\\' => 16,
|
||||
'PhpOffice\\PhpSpreadsheet\\' => 25,
|
||||
'PHPMailer\\PHPMailer\\' => 20,
|
||||
),
|
||||
@@ -27,20 +25,6 @@ class ComposerStaticInit6621356a0da1644f04f6f40bd0e0b948
|
||||
array (
|
||||
'Composer\\Pcre\\' => 14,
|
||||
'Complex\\' => 8,
|
||||
'Com\\Tecnick\\Unicode\\Data\\' => 25,
|
||||
'Com\\Tecnick\\Unicode\\' => 20,
|
||||
'Com\\Tecnick\\Pdf\\Sign\\' => 21,
|
||||
'Com\\Tecnick\\Pdf\\Parser\\' => 23,
|
||||
'Com\\Tecnick\\Pdf\\Page\\' => 21,
|
||||
'Com\\Tecnick\\Pdf\\Image\\' => 22,
|
||||
'Com\\Tecnick\\Pdf\\Graph\\' => 22,
|
||||
'Com\\Tecnick\\Pdf\\Font\\' => 21,
|
||||
'Com\\Tecnick\\Pdf\\Filter\\' => 23,
|
||||
'Com\\Tecnick\\Pdf\\Encrypt\\' => 24,
|
||||
'Com\\Tecnick\\Pdf\\' => 16,
|
||||
'Com\\Tecnick\\File\\' => 17,
|
||||
'Com\\Tecnick\\Color\\' => 18,
|
||||
'Com\\Tecnick\\Barcode\\' => 20,
|
||||
),
|
||||
);
|
||||
|
||||
@@ -53,15 +37,6 @@ class ComposerStaticInit6621356a0da1644f04f6f40bd0e0b948
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/psr/simple-cache/src',
|
||||
),
|
||||
'Psr\\Http\\Message\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/psr/http-factory/src',
|
||||
1 => __DIR__ . '/..' . '/psr/http-message/src',
|
||||
),
|
||||
'Psr\\Http\\Client\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/psr/http-client/src',
|
||||
),
|
||||
'PhpOffice\\PhpSpreadsheet\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/phpoffice/phpspreadsheet/src/PhpSpreadsheet',
|
||||
@@ -82,62 +57,6 @@ class ComposerStaticInit6621356a0da1644f04f6f40bd0e0b948
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/markbaker/complex/classes/src',
|
||||
),
|
||||
'Com\\Tecnick\\Unicode\\Data\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/tecnickcom/tc-lib-unicode-data/src',
|
||||
),
|
||||
'Com\\Tecnick\\Unicode\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/tecnickcom/tc-lib-unicode/src',
|
||||
),
|
||||
'Com\\Tecnick\\Pdf\\Sign\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/tecnickcom/tc-lib-pdf-sign/src',
|
||||
),
|
||||
'Com\\Tecnick\\Pdf\\Parser\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/tecnickcom/tc-lib-pdf-parser/src',
|
||||
),
|
||||
'Com\\Tecnick\\Pdf\\Page\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/tecnickcom/tc-lib-pdf-page/src',
|
||||
),
|
||||
'Com\\Tecnick\\Pdf\\Image\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/tecnickcom/tc-lib-pdf-image/src',
|
||||
),
|
||||
'Com\\Tecnick\\Pdf\\Graph\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/tecnickcom/tc-lib-pdf-graph/src',
|
||||
),
|
||||
'Com\\Tecnick\\Pdf\\Font\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/tecnickcom/tc-lib-pdf-font/src',
|
||||
),
|
||||
'Com\\Tecnick\\Pdf\\Filter\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/tecnickcom/tc-lib-pdf-filter/src',
|
||||
),
|
||||
'Com\\Tecnick\\Pdf\\Encrypt\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/tecnickcom/tc-lib-pdf-encrypt/src',
|
||||
),
|
||||
'Com\\Tecnick\\Pdf\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/tecnickcom/tc-lib-pdf/src',
|
||||
),
|
||||
'Com\\Tecnick\\File\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/tecnickcom/tc-lib-file/src',
|
||||
),
|
||||
'Com\\Tecnick\\Color\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/tecnickcom/tc-lib-color/src',
|
||||
),
|
||||
'Com\\Tecnick\\Barcode\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/tecnickcom/tc-lib-barcode/src',
|
||||
),
|
||||
);
|
||||
|
||||
public static $classMap = array (
|
||||
|
||||
Vendored
+38
-1204
File diff suppressed because it is too large
Load Diff
Vendored
+15
-168
@@ -1,9 +1,9 @@
|
||||
<?php return array(
|
||||
'root' => array(
|
||||
'name' => '__root__',
|
||||
'pretty_version' => '1.0.0+no-version-set',
|
||||
'version' => '1.0.0.0',
|
||||
'reference' => null,
|
||||
'pretty_version' => 'dev-development',
|
||||
'version' => 'dev-development',
|
||||
'reference' => 'a1643eb1b74d1dae0fda79a68b6f0672d4603a81',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
@@ -11,27 +11,27 @@
|
||||
),
|
||||
'versions' => array(
|
||||
'__root__' => array(
|
||||
'pretty_version' => '1.0.0+no-version-set',
|
||||
'version' => '1.0.0.0',
|
||||
'reference' => null,
|
||||
'pretty_version' => 'dev-development',
|
||||
'version' => 'dev-development',
|
||||
'reference' => 'a1643eb1b74d1dae0fda79a68b6f0672d4603a81',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'composer/pcre' => array(
|
||||
'pretty_version' => '3.3.2',
|
||||
'version' => '3.3.2.0',
|
||||
'reference' => 'b2bed4734f0cc156ee1fe9c0da2550420d99a21e',
|
||||
'pretty_version' => '3.4.0',
|
||||
'version' => '3.4.0.0',
|
||||
'reference' => 'd5a341b3fb61f3001970940afb1d332968a183ed',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/./pcre',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'maennchen/zipstream-php' => array(
|
||||
'pretty_version' => '3.2.0',
|
||||
'version' => '3.2.0.0',
|
||||
'reference' => '9712d8fa4cdf9240380b01eb4be55ad8dcf71416',
|
||||
'pretty_version' => '3.2.2',
|
||||
'version' => '3.2.2.0',
|
||||
'reference' => '77bebeb4c6c340bb3c11c843b2cffd8bbfde4d5e',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../maennchen/zipstream-php',
|
||||
'aliases' => array(),
|
||||
@@ -65,41 +65,14 @@
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'phpoffice/phpspreadsheet' => array(
|
||||
'pretty_version' => '5.2.0',
|
||||
'version' => '5.2.0.0',
|
||||
'reference' => '3b8994b3aac4b61018bc04fc8c441f4fd68c18eb',
|
||||
'pretty_version' => '5.10.0',
|
||||
'version' => '5.10.0.0',
|
||||
'reference' => 'eb18727acf6b1f4cc67145a52ab04f9fd4c28d53',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../phpoffice/phpspreadsheet',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'psr/http-client' => array(
|
||||
'pretty_version' => '1.0.3',
|
||||
'version' => '1.0.3.0',
|
||||
'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../psr/http-client',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'psr/http-factory' => array(
|
||||
'pretty_version' => '1.1.0',
|
||||
'version' => '1.1.0.0',
|
||||
'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../psr/http-factory',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'psr/http-message' => array(
|
||||
'pretty_version' => '2.0',
|
||||
'version' => '2.0.0.0',
|
||||
'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../psr/http-message',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'psr/simple-cache' => array(
|
||||
'pretty_version' => '3.0.0',
|
||||
'version' => '3.0.0.0',
|
||||
@@ -109,132 +82,6 @@
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'tecnickcom/tc-lib-barcode' => array(
|
||||
'pretty_version' => '2.13.2',
|
||||
'version' => '2.13.2.0',
|
||||
'reference' => 'c7f3ddbc3df10259c59ddc3016ec421267e25e5d',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../tecnickcom/tc-lib-barcode',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'tecnickcom/tc-lib-color' => array(
|
||||
'pretty_version' => '2.13.3',
|
||||
'version' => '2.13.3.0',
|
||||
'reference' => '36b0cb2215c446fed65842151d494f2b3081533c',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../tecnickcom/tc-lib-color',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'tecnickcom/tc-lib-file' => array(
|
||||
'pretty_version' => '3.7.3',
|
||||
'version' => '3.7.3.0',
|
||||
'reference' => 'c582b6d493c26703e95809f6d3e938c79f88885f',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../tecnickcom/tc-lib-file',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'tecnickcom/tc-lib-pdf' => array(
|
||||
'pretty_version' => '8.68.3',
|
||||
'version' => '8.68.3.0',
|
||||
'reference' => '6b056239c0d9781319a4d009e8ca33d48e94e0ea',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../tecnickcom/tc-lib-pdf',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'tecnickcom/tc-lib-pdf-encrypt' => array(
|
||||
'pretty_version' => '2.9.3',
|
||||
'version' => '2.9.3.0',
|
||||
'reference' => '9d188937a673af8adc6da1f104c44cf434f7b198',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../tecnickcom/tc-lib-pdf-encrypt',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'tecnickcom/tc-lib-pdf-filter' => array(
|
||||
'pretty_version' => '2.10.3',
|
||||
'version' => '2.10.3.0',
|
||||
'reference' => '48270d50db69852ef58a22b5b034b8a08e5c8464',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../tecnickcom/tc-lib-pdf-filter',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'tecnickcom/tc-lib-pdf-font' => array(
|
||||
'pretty_version' => '3.13.2',
|
||||
'version' => '3.13.2.0',
|
||||
'reference' => '314dfbe240057e1119d4830f35827455f8a76eba',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../tecnickcom/tc-lib-pdf-font',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'tecnickcom/tc-lib-pdf-graph' => array(
|
||||
'pretty_version' => '2.15.2',
|
||||
'version' => '2.15.2.0',
|
||||
'reference' => '4a3408690c65e14b9c86abe97a12c3079eb8a0cd',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../tecnickcom/tc-lib-pdf-graph',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'tecnickcom/tc-lib-pdf-image' => array(
|
||||
'pretty_version' => '3.12.2',
|
||||
'version' => '3.12.2.0',
|
||||
'reference' => 'd7052a7e9216e842bd77395f1dfb443e9bfbcef8',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../tecnickcom/tc-lib-pdf-image',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'tecnickcom/tc-lib-pdf-page' => array(
|
||||
'pretty_version' => '4.14.2',
|
||||
'version' => '4.14.2.0',
|
||||
'reference' => 'ac9adaddf8624b5008da335914a42a318cd7d310',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../tecnickcom/tc-lib-pdf-page',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'tecnickcom/tc-lib-pdf-parser' => array(
|
||||
'pretty_version' => '3.14.2',
|
||||
'version' => '3.14.2.0',
|
||||
'reference' => 'db9c32046a3e8d57c8626e8d3ffc94caa10a0675',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../tecnickcom/tc-lib-pdf-parser',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'tecnickcom/tc-lib-pdf-sign' => array(
|
||||
'pretty_version' => '1.1.3',
|
||||
'version' => '1.1.3.0',
|
||||
'reference' => '4132f1fc4b9c103b1a9ec879e2d7b7f9598918f7',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../tecnickcom/tc-lib-pdf-sign',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'tecnickcom/tc-lib-unicode' => array(
|
||||
'pretty_version' => '3.0.2',
|
||||
'version' => '3.0.2.0',
|
||||
'reference' => 'e0549f1e0bee657a7a5c361d823409655a4ea2c3',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../tecnickcom/tc-lib-unicode',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'tecnickcom/tc-lib-unicode-data' => array(
|
||||
'pretty_version' => '3.0.2',
|
||||
'version' => '3.0.2.0',
|
||||
'reference' => '6b090f51613087c2ed6e576e9543c1feddf2ba51',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../tecnickcom/tc-lib-unicode-data',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'tecnickcom/tcpdf' => array(
|
||||
'pretty_version' => '6.10.0',
|
||||
'version' => '6.10.0.0',
|
||||
|
||||
Vendored
+9
-5
@@ -20,12 +20,13 @@
|
||||
"php": "^7.4 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^8 || ^9",
|
||||
"phpstan/phpstan": "^1.12 || ^2",
|
||||
"phpstan/phpstan-strict-rules": "^1 || ^2"
|
||||
"phpunit/phpunit": "^9",
|
||||
"phpstan/phpstan": "^2",
|
||||
"phpstan/phpstan-strict-rules": "^2",
|
||||
"phpstan/phpstan-deprecation-rules": "^2"
|
||||
},
|
||||
"conflict": {
|
||||
"phpstan/phpstan": "<1.11.10"
|
||||
"phpstan/phpstan": "<2.2.2"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@@ -48,7 +49,10 @@
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"test": "@php vendor/bin/phpunit",
|
||||
"test": [
|
||||
"@php vendor/bin/phpunit",
|
||||
"@php vendor/bin/phpunit --testsuite phpstan"
|
||||
],
|
||||
"phpstan": "@php phpstan analyse"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,18 +57,38 @@ final class PregMatchTypeSpecifyingExtension implements StaticMethodTypeSpecifyi
|
||||
{
|
||||
$args = $node->getArgs();
|
||||
$patternArg = $args[0] ?? null;
|
||||
$subjectArg = $args[1] ?? null;
|
||||
$matchesArg = $args[2] ?? null;
|
||||
$flagsArg = $args[3] ?? null;
|
||||
|
||||
$subjectTypes = new SpecifiedTypes();
|
||||
if ($patternArg === null) {
|
||||
return $subjectTypes;
|
||||
}
|
||||
|
||||
if (
|
||||
$patternArg === null || $matchesArg === null
|
||||
$subjectArg !== null
|
||||
&& $context->true()
|
||||
&& $scope->getType($subjectArg->value)->isString()->yes()
|
||||
) {
|
||||
return new SpecifiedTypes();
|
||||
$subjectType = $this->regexShapeMatcher->matchSubjectExpr($patternArg->value, $scope);
|
||||
if ($subjectType !== null) {
|
||||
$subjectTypes = $this->typeSpecifier->create(
|
||||
$subjectArg->value,
|
||||
$subjectType,
|
||||
$context,
|
||||
$scope,
|
||||
)->setRootExpr($node);
|
||||
}
|
||||
}
|
||||
|
||||
if ($matchesArg === null) {
|
||||
return $subjectTypes;
|
||||
}
|
||||
|
||||
$flagsType = PregMatchFlags::getType($flagsArg, $scope);
|
||||
if ($flagsType === null) {
|
||||
return new SpecifiedTypes();
|
||||
return $subjectTypes;
|
||||
}
|
||||
|
||||
if (stripos($methodReflection->getName(), 'matchAll') !== false) {
|
||||
@@ -78,7 +98,7 @@ final class PregMatchTypeSpecifyingExtension implements StaticMethodTypeSpecifyi
|
||||
}
|
||||
|
||||
if ($matchedType === null) {
|
||||
return new SpecifiedTypes();
|
||||
return $subjectTypes;
|
||||
}
|
||||
|
||||
if (
|
||||
@@ -93,27 +113,13 @@ final class PregMatchTypeSpecifyingExtension implements StaticMethodTypeSpecifyi
|
||||
$context = $context->negate();
|
||||
}
|
||||
|
||||
// @phpstan-ignore function.alreadyNarrowedType
|
||||
if (method_exists('PHPStan\Analyser\SpecifiedTypes', 'setRootExpr')) {
|
||||
$typeSpecifier = $this->typeSpecifier->create(
|
||||
$matchesArg->value,
|
||||
$matchedType,
|
||||
$context,
|
||||
$scope
|
||||
)->setRootExpr($node);
|
||||
|
||||
return $overwrite ? $typeSpecifier->setAlwaysOverwriteTypes() : $typeSpecifier;
|
||||
}
|
||||
|
||||
// @phpstan-ignore arguments.count
|
||||
return $this->typeSpecifier->create(
|
||||
$specifiedTypes = $this->typeSpecifier->create(
|
||||
$matchesArg->value,
|
||||
$matchedType,
|
||||
$context,
|
||||
// @phpstan-ignore argument.type
|
||||
$overwrite,
|
||||
$scope,
|
||||
$node
|
||||
);
|
||||
$scope
|
||||
)->setRootExpr($node);
|
||||
|
||||
return $subjectTypes->unionWith($overwrite ? $specifiedTypes->setAlwaysOverwriteTypes() : $specifiedTypes);
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -395,7 +395,7 @@ class Preg
|
||||
* @return array<int|string, string>
|
||||
* @throws UnexpectedNullMatchException
|
||||
*/
|
||||
private static function enforceNonNullMatches(string $pattern, array $matches, string $variantMethod)
|
||||
private static function enforceNonNullMatches(string $pattern, array $matches, string $variantMethod): array
|
||||
{
|
||||
foreach ($matches as $group => $match) {
|
||||
if (is_string($match) || (is_array($match) && is_string($match[0]))) {
|
||||
@@ -414,7 +414,7 @@ class Preg
|
||||
* @return array<int|string, list<string>>
|
||||
* @throws UnexpectedNullMatchException
|
||||
*/
|
||||
private static function enforceNonNullMatchAll(string $pattern, array $matches, string $variantMethod)
|
||||
private static function enforceNonNullMatchAll(string $pattern, array $matches, string $variantMethod): array
|
||||
{
|
||||
foreach ($matches as $group => $groupMatches) {
|
||||
foreach ($groupMatches as $match) {
|
||||
|
||||
Reference in New Issue
Block a user