mirror of https://github.com/1099438829/apeblog
更新vendor
This commit is contained in:
parent
dc0fcfd1eb
commit
b1ac3377b5
|
|
@ -2,6 +2,11 @@
|
|||
|
||||
// autoload.php @generated by Composer
|
||||
|
||||
if (PHP_VERSION_ID < 50600) {
|
||||
echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit4b57298e8d0e895486f3307a354a7e1a::getLoader();
|
||||
|
|
|
|||
|
|
@ -21,12 +21,14 @@ use Composer\Semver\VersionParser;
|
|||
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
|
||||
*
|
||||
* To require its presence, you can require `composer-runtime-api ^2.0`
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
class InstalledVersions
|
||||
{
|
||||
/**
|
||||
* @var mixed[]|null
|
||||
* @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
|
||||
* @psalm-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[]}>}|array{}|null
|
||||
*/
|
||||
private static $installed;
|
||||
|
||||
|
|
@ -37,7 +39,7 @@ class InstalledVersions
|
|||
|
||||
/**
|
||||
* @var array[]
|
||||
* @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
||||
* @psalm-var array<string, 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[]}>}>
|
||||
*/
|
||||
private static $installedByVendor = array();
|
||||
|
||||
|
|
@ -241,7 +243,7 @@ class InstalledVersions
|
|||
|
||||
/**
|
||||
* @return array
|
||||
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
|
||||
* @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
|
||||
*/
|
||||
public static function getRootPackage()
|
||||
{
|
||||
|
|
@ -255,7 +257,7 @@ class InstalledVersions
|
|||
*
|
||||
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
|
||||
* @return array[]
|
||||
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
|
||||
* @psalm-return 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[]}>}
|
||||
*/
|
||||
public static function getRawData()
|
||||
{
|
||||
|
|
@ -278,7 +280,7 @@ class InstalledVersions
|
|||
* Returns the raw data of all installed.php which are currently loaded for custom implementations
|
||||
*
|
||||
* @return array[]
|
||||
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
||||
* @psalm-return list<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[]}>}>
|
||||
*/
|
||||
public static function getAllRawData()
|
||||
{
|
||||
|
|
@ -301,7 +303,7 @@ class InstalledVersions
|
|||
* @param array[] $data A vendor/composer/installed.php data set
|
||||
* @return void
|
||||
*
|
||||
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
|
||||
* @psalm-param 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[]}>} $data
|
||||
*/
|
||||
public static function reload($data)
|
||||
{
|
||||
|
|
@ -311,7 +313,7 @@ class InstalledVersions
|
|||
|
||||
/**
|
||||
* @return array[]
|
||||
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
||||
* @psalm-return list<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[]}>}>
|
||||
*/
|
||||
private static function getInstalled()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_classmap.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
// autoload_files.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'9b552a3cc426e3287cc811caefa3cf53' => $vendorDir . '/topthink/think-helper/src/helper.php',
|
||||
'35fab96057f1bf5e7aba31a8a6d5fdde' => $vendorDir . '/topthink/think-orm/stubs/load_stubs.php',
|
||||
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
|
||||
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
|
||||
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
|
||||
'35fab96057f1bf5e7aba31a8a6d5fdde' => $vendorDir . '/topthink/think-orm/stubs/load_stubs.php',
|
||||
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
|
||||
'25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
|
||||
'667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php',
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_namespaces.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
// autoload_psr4.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'think\\view\\driver\\' => array($vendorDir . '/topthink/think-view/src'),
|
||||
'think\\captcha\\' => array($vendorDir . '/topthink/think-captcha/src'),
|
||||
'think\\app\\' => array($vendorDir . '/topthink/think-multi-app/src'),
|
||||
'think\\' => array($vendorDir . '/topthink/framework/src/think', $vendorDir . '/topthink/think-helper/src', $vendorDir . '/topthink/think-orm/src', $vendorDir . '/topthink/think-template/src'),
|
||||
'think\\' => array($vendorDir . '/topthink/framework/src/think', $vendorDir . '/topthink/think-helper/src', $vendorDir . '/topthink/think-template/src', $vendorDir . '/topthink/think-orm/src'),
|
||||
'app\\' => array($baseDir . '/app'),
|
||||
'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'),
|
||||
'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'),
|
||||
|
|
|
|||
|
|
@ -25,38 +25,15 @@ class ComposerAutoloaderInit4b57298e8d0e895486f3307a354a7e1a
|
|||
require __DIR__ . '/platform_check.php';
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit4b57298e8d0e895486f3307a354a7e1a', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit4b57298e8d0e895486f3307a354a7e1a', 'loadClassLoader'));
|
||||
|
||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
||||
if ($useStaticLoader) {
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit4b57298e8d0e895486f3307a354a7e1a::getInitializer($loader));
|
||||
} else {
|
||||
$map = require __DIR__ . '/autoload_namespaces.php';
|
||||
foreach ($map as $namespace => $path) {
|
||||
$loader->set($namespace, $path);
|
||||
}
|
||||
|
||||
$map = require __DIR__ . '/autoload_psr4.php';
|
||||
foreach ($map as $namespace => $path) {
|
||||
$loader->setPsr4($namespace, $path);
|
||||
}
|
||||
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
$loader->addClassMap($classMap);
|
||||
}
|
||||
}
|
||||
|
||||
$loader->register(true);
|
||||
|
||||
if ($useStaticLoader) {
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInit4b57298e8d0e895486f3307a354a7e1a::$files;
|
||||
} else {
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
}
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInit4b57298e8d0e895486f3307a354a7e1a::$files;
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequire4b57298e8d0e895486f3307a354a7e1a($fileIdentifier, $file);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ class ComposerStaticInit4b57298e8d0e895486f3307a354a7e1a
|
|||
{
|
||||
public static $files = array (
|
||||
'9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php',
|
||||
'35fab96057f1bf5e7aba31a8a6d5fdde' => __DIR__ . '/..' . '/topthink/think-orm/stubs/load_stubs.php',
|
||||
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
|
||||
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
|
||||
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
|
||||
'35fab96057f1bf5e7aba31a8a6d5fdde' => __DIR__ . '/..' . '/topthink/think-orm/stubs/load_stubs.php',
|
||||
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
|
||||
'25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
|
||||
'667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php',
|
||||
|
|
@ -81,8 +81,8 @@ class ComposerStaticInit4b57298e8d0e895486f3307a354a7e1a
|
|||
array (
|
||||
0 => __DIR__ . '/..' . '/topthink/framework/src/think',
|
||||
1 => __DIR__ . '/..' . '/topthink/think-helper/src',
|
||||
2 => __DIR__ . '/..' . '/topthink/think-orm/src',
|
||||
3 => __DIR__ . '/..' . '/topthink/think-template/src',
|
||||
2 => __DIR__ . '/..' . '/topthink/think-template/src',
|
||||
3 => __DIR__ . '/..' . '/topthink/think-orm/src',
|
||||
),
|
||||
'app\\' =>
|
||||
array (
|
||||
|
|
|
|||
|
|
@ -2,17 +2,17 @@
|
|||
"packages": [
|
||||
{
|
||||
"name": "doctrine/annotations",
|
||||
"version": "1.13.2",
|
||||
"version_normalized": "1.13.2.0",
|
||||
"version": "1.13.3",
|
||||
"version_normalized": "1.13.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/annotations.git",
|
||||
"reference": "5b668aef16090008790395c02c893b1ba13f7e08"
|
||||
"reference": "648b0343343565c4a056bfc8392201385e8d89f0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/annotations/zipball/5b668aef16090008790395c02c893b1ba13f7e08",
|
||||
"reference": "5b668aef16090008790395c02c893b1ba13f7e08",
|
||||
"url": "https://api.github.com/repos/doctrine/annotations/zipball/648b0343343565c4a056bfc8392201385e8d89f0",
|
||||
"reference": "648b0343343565c4a056bfc8392201385e8d89f0",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
|
|
@ -30,11 +30,12 @@
|
|||
"require-dev": {
|
||||
"doctrine/cache": "^1.11 || ^2.0",
|
||||
"doctrine/coding-standard": "^6.0 || ^8.1",
|
||||
"phpstan/phpstan": "^0.12.20",
|
||||
"phpstan/phpstan": "^1.4.10 || ^1.8.0",
|
||||
"phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5",
|
||||
"symfony/cache": "^4.4 || ^5.2"
|
||||
"symfony/cache": "^4.4 || ^5.2",
|
||||
"vimeo/psalm": "^4.10"
|
||||
},
|
||||
"time": "2021-08-05T19:00:23+00:00",
|
||||
"time": "2022-07-02T10:48:51+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
|
|
@ -77,7 +78,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/doctrine/annotations/issues",
|
||||
"source": "https://github.com/doctrine/annotations/tree/1.13.2"
|
||||
"source": "https://github.com/doctrine/annotations/tree/1.13.3"
|
||||
},
|
||||
"install-path": "../doctrine/annotations"
|
||||
},
|
||||
|
|
@ -396,17 +397,17 @@
|
|||
},
|
||||
{
|
||||
"name": "phpmailer/phpmailer",
|
||||
"version": "v6.6.0",
|
||||
"version_normalized": "6.6.0.0",
|
||||
"version": "v6.6.3",
|
||||
"version_normalized": "6.6.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPMailer/PHPMailer.git",
|
||||
"reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1"
|
||||
"reference": "9400f305a898f194caff5521f64e5dfa926626f3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e43bac82edc26ca04b36143a48bde1c051cfd5b1",
|
||||
"reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/9400f305a898f194caff5521f64e5dfa926626f3",
|
||||
"reference": "9400f305a898f194caff5521f64e5dfa926626f3",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
|
|
@ -424,8 +425,8 @@
|
|||
"require-dev": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
|
||||
"doctrine/annotations": "^1.2",
|
||||
"php-parallel-lint/php-console-highlighter": "^0.5.0",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.3.1",
|
||||
"php-parallel-lint/php-console-highlighter": "^1.0.0",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.3.2",
|
||||
"phpcompatibility/php-compatibility": "^9.3.5",
|
||||
"roave/security-advisories": "dev-latest",
|
||||
"squizlabs/php_codesniffer": "^3.6.2",
|
||||
|
|
@ -439,7 +440,7 @@
|
|||
"stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication",
|
||||
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
|
||||
},
|
||||
"time": "2022-02-28T15:31:21+00:00",
|
||||
"time": "2022-06-20T09:21:02+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
|
|
@ -471,7 +472,7 @@
|
|||
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
|
||||
"support": {
|
||||
"issues": "https://github.com/PHPMailer/PHPMailer/issues",
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.0"
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -838,8 +839,8 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/deprecation-contracts",
|
||||
"version": "v2.5.1",
|
||||
"version_normalized": "2.5.1.0",
|
||||
"version": "v2.5.2",
|
||||
"version_normalized": "2.5.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/deprecation-contracts.git",
|
||||
|
|
@ -894,7 +895,7 @@
|
|||
"description": "A generic function and convention to trigger deprecation notices",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.1"
|
||||
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -914,17 +915,17 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/http-foundation",
|
||||
"version": "v5.4.9",
|
||||
"version_normalized": "5.4.9.0",
|
||||
"version": "v5.4.10",
|
||||
"version_normalized": "5.4.10.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/http-foundation.git",
|
||||
"reference": "6b0d0e4aca38d57605dcd11e2416994b38774522"
|
||||
"reference": "e7793b7906f72a8cc51054fbca9dcff7a8af1c1e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/6b0d0e4aca38d57605dcd11e2416994b38774522",
|
||||
"reference": "6b0d0e4aca38d57605dcd11e2416994b38774522",
|
||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/e7793b7906f72a8cc51054fbca9dcff7a8af1c1e",
|
||||
"reference": "e7793b7906f72a8cc51054fbca9dcff7a8af1c1e",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
|
|
@ -948,7 +949,7 @@
|
|||
"suggest": {
|
||||
"symfony/mime": "To use the file extension guesser"
|
||||
},
|
||||
"time": "2022-05-17T15:07:29+00:00",
|
||||
"time": "2022-06-19T13:13:40+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
|
|
@ -976,7 +977,7 @@
|
|||
"description": "Defines an object-oriented layer for the HTTP specification",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/http-foundation/tree/v5.4.9"
|
||||
"source": "https://github.com/symfony/http-foundation/tree/v5.4.10"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -1613,17 +1614,17 @@
|
|||
},
|
||||
{
|
||||
"name": "topthink/think-orm",
|
||||
"version": "v2.0.52",
|
||||
"version_normalized": "2.0.52.0",
|
||||
"version": "v2.0.53",
|
||||
"version_normalized": "2.0.53.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/top-think/think-orm.git",
|
||||
"reference": "407a60658f37fc57422ab95a9922c6f69af90f46"
|
||||
"reference": "06783eda65547a70ea686360a897759e1f873fff"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/top-think/think-orm/zipball/407a60658f37fc57422ab95a9922c6f69af90f46",
|
||||
"reference": "407a60658f37fc57422ab95a9922c6f69af90f46",
|
||||
"url": "https://api.github.com/repos/top-think/think-orm/zipball/06783eda65547a70ea686360a897759e1f873fff",
|
||||
"reference": "06783eda65547a70ea686360a897759e1f873fff",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
|
|
@ -1643,16 +1644,16 @@
|
|||
"require-dev": {
|
||||
"phpunit/phpunit": "^7|^8|^9.5"
|
||||
},
|
||||
"time": "2022-01-25T06:00:05+00:00",
|
||||
"time": "2022-02-28T14:54:22+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"think\\": "src"
|
||||
},
|
||||
"files": [
|
||||
"stubs/load_stubs.php"
|
||||
]
|
||||
],
|
||||
"psr-4": {
|
||||
"think\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
|
|
@ -1671,7 +1672,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/top-think/think-orm/issues",
|
||||
"source": "https://github.com/top-think/think-orm/tree/v2.0.52"
|
||||
"source": "https://github.com/top-think/think-orm/tree/v2.0.53"
|
||||
},
|
||||
"install-path": "../topthink/think-orm"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,256 +1,256 @@
|
|||
<?php return array(
|
||||
'root' => array(
|
||||
'name' => 'topthink/think',
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'reference' => 'dc0fcfd1eb5f19c42b2ec51208d3bca840538c92',
|
||||
'type' => 'project',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'reference' => 'f9dfa5e1dc3d41f2de077e66f0e346d029a093b0',
|
||||
'name' => 'topthink/think',
|
||||
'dev' => true,
|
||||
),
|
||||
'versions' => array(
|
||||
'doctrine/annotations' => array(
|
||||
'pretty_version' => '1.13.2',
|
||||
'version' => '1.13.2.0',
|
||||
'pretty_version' => '1.13.3',
|
||||
'version' => '1.13.3.0',
|
||||
'reference' => '648b0343343565c4a056bfc8392201385e8d89f0',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../doctrine/annotations',
|
||||
'aliases' => array(),
|
||||
'reference' => '5b668aef16090008790395c02c893b1ba13f7e08',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'doctrine/lexer' => array(
|
||||
'pretty_version' => '1.2.3',
|
||||
'version' => '1.2.3.0',
|
||||
'reference' => 'c268e882d4dbdd85e36e4ad69e02dc284f89d229',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../doctrine/lexer',
|
||||
'aliases' => array(),
|
||||
'reference' => 'c268e882d4dbdd85e36e4ad69e02dc284f89d229',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'league/flysystem' => array(
|
||||
'pretty_version' => '1.1.9',
|
||||
'version' => '1.1.9.0',
|
||||
'reference' => '094defdb4a7001845300334e7c1ee2335925ef99',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../league/flysystem',
|
||||
'aliases' => array(),
|
||||
'reference' => '094defdb4a7001845300334e7c1ee2335925ef99',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'league/flysystem-cached-adapter' => array(
|
||||
'pretty_version' => '1.1.0',
|
||||
'version' => '1.1.0.0',
|
||||
'reference' => 'd1925efb2207ac4be3ad0c40b8277175f99ffaff',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../league/flysystem-cached-adapter',
|
||||
'aliases' => array(),
|
||||
'reference' => 'd1925efb2207ac4be3ad0c40b8277175f99ffaff',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'league/mime-type-detection' => array(
|
||||
'pretty_version' => '1.11.0',
|
||||
'version' => '1.11.0.0',
|
||||
'reference' => 'ff6248ea87a9f116e78edd6002e39e5128a0d4dd',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../league/mime-type-detection',
|
||||
'aliases' => array(),
|
||||
'reference' => 'ff6248ea87a9f116e78edd6002e39e5128a0d4dd',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'phpmailer/phpmailer' => array(
|
||||
'pretty_version' => 'v6.6.0',
|
||||
'version' => '6.6.0.0',
|
||||
'pretty_version' => 'v6.6.3',
|
||||
'version' => '6.6.3.0',
|
||||
'reference' => '9400f305a898f194caff5521f64e5dfa926626f3',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../phpmailer/phpmailer',
|
||||
'aliases' => array(),
|
||||
'reference' => 'e43bac82edc26ca04b36143a48bde1c051cfd5b1',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'psr/cache' => array(
|
||||
'pretty_version' => '1.0.1',
|
||||
'version' => '1.0.1.0',
|
||||
'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../psr/cache',
|
||||
'aliases' => array(),
|
||||
'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'psr/container' => array(
|
||||
'pretty_version' => '1.1.2',
|
||||
'version' => '1.1.2.0',
|
||||
'reference' => '513e0666f7216c7459170d56df27dfcefe1689ea',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../psr/container',
|
||||
'aliases' => array(),
|
||||
'reference' => '513e0666f7216c7459170d56df27dfcefe1689ea',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'psr/http-message' => array(
|
||||
'pretty_version' => '1.0.1',
|
||||
'version' => '1.0.1.0',
|
||||
'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../psr/http-message',
|
||||
'aliases' => array(),
|
||||
'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'psr/log' => array(
|
||||
'pretty_version' => '1.1.4',
|
||||
'version' => '1.1.4.0',
|
||||
'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../psr/log',
|
||||
'aliases' => array(),
|
||||
'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'psr/simple-cache' => array(
|
||||
'pretty_version' => '1.0.1',
|
||||
'version' => '1.0.1.0',
|
||||
'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../psr/simple-cache',
|
||||
'aliases' => array(),
|
||||
'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'spatie/macroable' => array(
|
||||
'pretty_version' => '1.0.1',
|
||||
'version' => '1.0.1.0',
|
||||
'reference' => '7a99549fc001c925714b329220dea680c04bfa48',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../spatie/macroable',
|
||||
'aliases' => array(),
|
||||
'reference' => '7a99549fc001c925714b329220dea680c04bfa48',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/deprecation-contracts' => array(
|
||||
'pretty_version' => 'v2.5.1',
|
||||
'version' => '2.5.1.0',
|
||||
'pretty_version' => 'v2.5.2',
|
||||
'version' => '2.5.2.0',
|
||||
'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
|
||||
'aliases' => array(),
|
||||
'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/http-foundation' => array(
|
||||
'pretty_version' => 'v5.4.9',
|
||||
'version' => '5.4.9.0',
|
||||
'pretty_version' => 'v5.4.10',
|
||||
'version' => '5.4.10.0',
|
||||
'reference' => 'e7793b7906f72a8cc51054fbca9dcff7a8af1c1e',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/http-foundation',
|
||||
'aliases' => array(),
|
||||
'reference' => '6b0d0e4aca38d57605dcd11e2416994b38774522',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-mbstring' => array(
|
||||
'pretty_version' => 'v1.26.0',
|
||||
'version' => '1.26.0.0',
|
||||
'reference' => '9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
|
||||
'aliases' => array(),
|
||||
'reference' => '9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-php72' => array(
|
||||
'pretty_version' => 'v1.26.0',
|
||||
'version' => '1.26.0.0',
|
||||
'reference' => 'bf44a9fd41feaac72b074de600314a93e2ae78e2',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-php72',
|
||||
'aliases' => array(),
|
||||
'reference' => 'bf44a9fd41feaac72b074de600314a93e2ae78e2',
|
||||
'dev_requirement' => true,
|
||||
),
|
||||
'symfony/polyfill-php80' => array(
|
||||
'pretty_version' => 'v1.26.0',
|
||||
'version' => '1.26.0.0',
|
||||
'reference' => 'cfa0ae98841b9e461207c13ab093d76b0fa7bace',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-php80',
|
||||
'aliases' => array(),
|
||||
'reference' => 'cfa0ae98841b9e461207c13ab093d76b0fa7bace',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/var-dumper' => array(
|
||||
'pretty_version' => 'v4.4.42',
|
||||
'version' => '4.4.42.0',
|
||||
'reference' => '742aab50ad097bcb62d91fccb613f66b8047d2ca',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/var-dumper',
|
||||
'aliases' => array(),
|
||||
'reference' => '742aab50ad097bcb62d91fccb613f66b8047d2ca',
|
||||
'dev_requirement' => true,
|
||||
),
|
||||
'topthink/framework' => array(
|
||||
'pretty_version' => 'v6.0.12',
|
||||
'version' => '6.0.12.0',
|
||||
'reference' => 'e478316ac843c1a884a3b3a7a94db17c4001ff5c',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../topthink/framework',
|
||||
'aliases' => array(),
|
||||
'reference' => 'e478316ac843c1a884a3b3a7a94db17c4001ff5c',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'topthink/think' => array(
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'reference' => 'dc0fcfd1eb5f19c42b2ec51208d3bca840538c92',
|
||||
'type' => 'project',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'reference' => 'f9dfa5e1dc3d41f2de077e66f0e346d029a093b0',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'topthink/think-captcha' => array(
|
||||
'pretty_version' => 'v3.0.7',
|
||||
'version' => '3.0.7.0',
|
||||
'reference' => 'a450602932a5d9ba183e288b79921ba3b9a92331',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../topthink/think-captcha',
|
||||
'aliases' => array(),
|
||||
'reference' => 'a450602932a5d9ba183e288b79921ba3b9a92331',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'topthink/think-helper' => array(
|
||||
'pretty_version' => 'v3.1.6',
|
||||
'version' => '3.1.6.0',
|
||||
'reference' => '769acbe50a4274327162f9c68ec2e89a38eb2aff',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../topthink/think-helper',
|
||||
'aliases' => array(),
|
||||
'reference' => '769acbe50a4274327162f9c68ec2e89a38eb2aff',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'topthink/think-multi-app' => array(
|
||||
'pretty_version' => 'v1.0.14',
|
||||
'version' => '1.0.14.0',
|
||||
'reference' => 'ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../topthink/think-multi-app',
|
||||
'aliases' => array(),
|
||||
'reference' => 'ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'topthink/think-orm' => array(
|
||||
'pretty_version' => 'v2.0.52',
|
||||
'version' => '2.0.52.0',
|
||||
'pretty_version' => 'v2.0.53',
|
||||
'version' => '2.0.53.0',
|
||||
'reference' => '06783eda65547a70ea686360a897759e1f873fff',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../topthink/think-orm',
|
||||
'aliases' => array(),
|
||||
'reference' => '407a60658f37fc57422ab95a9922c6f69af90f46',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'topthink/think-template' => array(
|
||||
'pretty_version' => 'v2.0.8',
|
||||
'version' => '2.0.8.0',
|
||||
'reference' => 'abfc293f74f9ef5127b5c416310a01fe42e59368',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../topthink/think-template',
|
||||
'aliases' => array(),
|
||||
'reference' => 'abfc293f74f9ef5127b5c416310a01fe42e59368',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'topthink/think-view' => array(
|
||||
'pretty_version' => 'v1.0.14',
|
||||
'version' => '1.0.14.0',
|
||||
'reference' => 'edce0ae2c9551ab65f9e94a222604b0dead3576d',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../topthink/think-view',
|
||||
'aliases' => array(),
|
||||
'reference' => 'edce0ae2c9551ab65f9e94a222604b0dead3576d',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'xaboy/form-builder' => array(
|
||||
'pretty_version' => '2.0.19',
|
||||
'version' => '2.0.19.0',
|
||||
'reference' => '5cf3f5435a63954c1d11ba82c3cd4cfe3d145acf',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../xaboy/form-builder',
|
||||
'aliases' => array(),
|
||||
'reference' => '5cf3f5435a63954c1d11ba82c3cd4cfe3d145acf',
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -1,17 +1,36 @@
|
|||
{
|
||||
"name": "doctrine/annotations",
|
||||
"type": "library",
|
||||
"description": "Docblock Annotations Parser",
|
||||
"keywords": ["annotations", "docblock", "parser"],
|
||||
"homepage": "https://www.doctrine-project.org/projects/annotations.html",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"},
|
||||
{"name": "Roman Borschel", "email": "roman@code-factory.org"},
|
||||
{"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"},
|
||||
{"name": "Jonathan Wage", "email": "jonwage@gmail.com"},
|
||||
{"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"}
|
||||
"type": "library",
|
||||
"keywords": [
|
||||
"annotations",
|
||||
"docblock",
|
||||
"parser"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Guilherme Blanco",
|
||||
"email": "guilhermeblanco@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Roman Borschel",
|
||||
"email": "roman@code-factory.org"
|
||||
},
|
||||
{
|
||||
"name": "Benjamin Eberlei",
|
||||
"email": "kontakt@beberlei.de"
|
||||
},
|
||||
{
|
||||
"name": "Jonathan Wage",
|
||||
"email": "jonwage@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Johannes Schmitt",
|
||||
"email": "schmittjoh@gmail.com"
|
||||
}
|
||||
],
|
||||
"homepage": "https://www.doctrine-project.org/projects/annotations.html",
|
||||
"require": {
|
||||
"php": "^7.1 || ^8.0",
|
||||
"ext-tokenizer": "*",
|
||||
|
|
@ -21,15 +40,15 @@
|
|||
"require-dev": {
|
||||
"doctrine/cache": "^1.11 || ^2.0",
|
||||
"doctrine/coding-standard": "^6.0 || ^8.1",
|
||||
"phpstan/phpstan": "^0.12.20",
|
||||
"phpstan/phpstan": "^1.4.10 || ^1.8.0",
|
||||
"phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5",
|
||||
"symfony/cache": "^4.4 || ^5.2"
|
||||
},
|
||||
"config": {
|
||||
"sort-packages": true
|
||||
"symfony/cache": "^4.4 || ^5.2",
|
||||
"vimeo/psalm": "^4.10"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" }
|
||||
"psr-4": {
|
||||
"Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
|
|
@ -40,5 +59,11 @@
|
|||
"tests/Doctrine/Tests/Common/Annotations/Fixtures/functions.php",
|
||||
"tests/Doctrine/Tests/Common/Annotations/Fixtures/SingleClassLOC1000.php"
|
||||
]
|
||||
},
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": true
|
||||
},
|
||||
"sort-packages": true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
namespace Doctrine\Common\Annotations;
|
||||
|
||||
use Exception;
|
||||
use Throwable;
|
||||
|
||||
use function get_class;
|
||||
use function gettype;
|
||||
|
|
@ -47,9 +48,9 @@ class AnnotationException extends Exception
|
|||
*
|
||||
* @return AnnotationException
|
||||
*/
|
||||
public static function creationError($message)
|
||||
public static function creationError($message, ?Throwable $previous = null)
|
||||
{
|
||||
return new self('[Creation Error] ' . $message);
|
||||
return new self('[Creation Error] ' . $message, 0, $previous);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ use ReflectionException;
|
|||
use ReflectionProperty;
|
||||
use RuntimeException;
|
||||
use stdClass;
|
||||
use Throwable;
|
||||
|
||||
use function array_keys;
|
||||
use function array_map;
|
||||
|
|
@ -941,7 +942,7 @@ EXCEPTION
|
|||
|
||||
if (self::$annotationMetadata[$name]['has_named_argument_constructor']) {
|
||||
if (PHP_VERSION_ID >= 80000) {
|
||||
return new $name(...$values);
|
||||
return $this->instantiateAnnotiation($originalName, $this->context, $name, $values);
|
||||
}
|
||||
|
||||
$positionalValues = [];
|
||||
|
|
@ -968,16 +969,16 @@ EXCEPTION
|
|||
$positionalValues[self::$annotationMetadata[$name]['constructor_args'][$property]['position']] = $value;
|
||||
}
|
||||
|
||||
return new $name(...$positionalValues);
|
||||
return $this->instantiateAnnotiation($originalName, $this->context, $name, $positionalValues);
|
||||
}
|
||||
|
||||
// check if the annotation expects values via the constructor,
|
||||
// or directly injected into public properties
|
||||
if (self::$annotationMetadata[$name]['has_constructor'] === true) {
|
||||
return new $name($values);
|
||||
return $this->instantiateAnnotiation($originalName, $this->context, $name, [$values]);
|
||||
}
|
||||
|
||||
$instance = new $name();
|
||||
$instance = $this->instantiateAnnotiation($originalName, $this->context, $name, []);
|
||||
|
||||
foreach ($values as $property => $value) {
|
||||
if (! isset(self::$annotationMetadata[$name]['properties'][$property])) {
|
||||
|
|
@ -1456,4 +1457,31 @@ EXCEPTION
|
|||
|
||||
return $values;
|
||||
}
|
||||
|
||||
/**
|
||||
* Try to instantiate the annotation and catch and process any exceptions related to failure
|
||||
*
|
||||
* @param class-string $name
|
||||
* @param array<string,mixed> $arguments
|
||||
*
|
||||
* @return object
|
||||
*
|
||||
* @throws AnnotationException
|
||||
*/
|
||||
private function instantiateAnnotiation(string $originalName, string $context, string $name, array $arguments)
|
||||
{
|
||||
try {
|
||||
return new $name(...$arguments);
|
||||
} catch (Throwable $exception) {
|
||||
throw AnnotationException::creationError(
|
||||
sprintf(
|
||||
'An error occurred while instantiating the annotation @%s declared on %s: "%s".',
|
||||
$originalName,
|
||||
$context,
|
||||
$exception->getMessage()
|
||||
),
|
||||
$exception
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -147,6 +147,7 @@ final class ImplicitlyIgnoredAnnotationNames
|
|||
// PHPStan, Psalm
|
||||
'extends' => true,
|
||||
'implements' => true,
|
||||
'readonly' => true,
|
||||
'template' => true,
|
||||
'use' => true,
|
||||
|
||||
|
|
|
|||
|
|
@ -38,9 +38,9 @@ class IndexedReader implements Reader
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getClassAnnotation(ReflectionClass $class, $annotation)
|
||||
public function getClassAnnotation(ReflectionClass $class, $annotationName)
|
||||
{
|
||||
return $this->delegate->getClassAnnotation($class, $annotation);
|
||||
return $this->delegate->getClassAnnotation($class, $annotationName);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -59,9 +59,9 @@ class IndexedReader implements Reader
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getMethodAnnotation(ReflectionMethod $method, $annotation)
|
||||
public function getMethodAnnotation(ReflectionMethod $method, $annotationName)
|
||||
{
|
||||
return $this->delegate->getMethodAnnotation($method, $annotation);
|
||||
return $this->delegate->getMethodAnnotation($method, $annotationName);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -80,9 +80,9 @@ class IndexedReader implements Reader
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getPropertyAnnotation(ReflectionProperty $property, $annotation)
|
||||
public function getPropertyAnnotation(ReflectionProperty $property, $annotationName)
|
||||
{
|
||||
return $this->delegate->getPropertyAnnotation($property, $annotation);
|
||||
return $this->delegate->getPropertyAnnotation($property, $annotationName);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<psalm
|
||||
errorLevel="7"
|
||||
resolveFromConfigFile="true"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="https://getpsalm.org/schema/config"
|
||||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
|
||||
>
|
||||
<projectFiles>
|
||||
<directory name="lib/Doctrine/Common/Annotations" />
|
||||
<ignoreFiles>
|
||||
<directory name="vendor" />
|
||||
</ignoreFiles>
|
||||
</projectFiles>
|
||||
</psalm>
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
[](https://supportukrainenow.org/)
|
||||
|
||||

|
||||
|
||||
# PHPMailer – A full-featured email creation and transfer class for PHP
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
6.6.0
|
||||
6.6.3
|
||||
|
|
@ -39,8 +39,8 @@
|
|||
"require-dev": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
|
||||
"doctrine/annotations": "^1.2",
|
||||
"php-parallel-lint/php-console-highlighter": "^0.5.0",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.3.1",
|
||||
"php-parallel-lint/php-console-highlighter": "^1.0.0",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.3.2",
|
||||
"phpcompatibility/php-compatibility": "^9.3.5",
|
||||
"roave/security-advisories": "dev-latest",
|
||||
"squizlabs/php_codesniffer": "^3.6.2",
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
"test": "./vendor/bin/phpunit --no-coverage",
|
||||
"coverage": "./vendor/bin/phpunit",
|
||||
"lint": [
|
||||
"@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php,phps --exclude vendor --exclude .git --exclude build"
|
||||
"@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . --show-deprecated -e php,phps --exclude vendor --exclude .git --exclude build"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,13 +45,25 @@ use Hayageek\OAuth2\Client\Provider\Yahoo;
|
|||
//@see https://github.com/stevenmaguire/oauth2-microsoft
|
||||
use Stevenmaguire\OAuth2\Client\Provider\Microsoft;
|
||||
|
||||
if (!isset($_GET['code']) && !isset($_GET['provider'])) {
|
||||
if (!isset($_GET['code']) && !isset($_POST['provider'])) {
|
||||
?>
|
||||
<html>
|
||||
<body>Select Provider:<br>
|
||||
<a href='?provider=Google'>Google</a><br>
|
||||
<a href='?provider=Yahoo'>Yahoo</a><br>
|
||||
<a href='?provider=Microsoft'>Microsoft/Outlook/Hotmail/Live/Office365</a><br>
|
||||
<body>
|
||||
<form method="post">
|
||||
<h1>Select Provider</h1>
|
||||
<input type="radio" name="provider" value="Google" id="providerGoogle">
|
||||
<label for="providerGoogle">Google</label><br>
|
||||
<input type="radio" name="provider" value="Yahoo" id="providerYahoo">
|
||||
<label for="providerYahoo">Yahoo</label><br>
|
||||
<input type="radio" name="provider" value="Microsoft" id="providerMicrosoft">
|
||||
<label for="providerMicrosoft">Microsoft</label><br>
|
||||
<h1>Enter id and secret</h1>
|
||||
<p>These details are obtained by setting up an app in your provider's developer console.
|
||||
</p>
|
||||
<p>ClientId: <input type="text" name="clientId"><p>
|
||||
<p>ClientSecret: <input type="text" name="clientSecret"></p>
|
||||
<input type="submit" value="Continue">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
|
|
@ -63,21 +75,25 @@ require 'vendor/autoload.php';
|
|||
session_start();
|
||||
|
||||
$providerName = '';
|
||||
$clientId = '';
|
||||
$clientSecret = '';
|
||||
|
||||
if (array_key_exists('provider', $_GET)) {
|
||||
$providerName = $_GET['provider'];
|
||||
if (array_key_exists('provider', $_POST)) {
|
||||
$providerName = $_POST['provider'];
|
||||
$clientId = $_POST['clientId'];
|
||||
$clientSecret = $_POST['clientSecret'];
|
||||
$_SESSION['provider'] = $providerName;
|
||||
$_SESSION['clientId'] = $clientId;
|
||||
$_SESSION['clientSecret'] = $clientSecret;
|
||||
} elseif (array_key_exists('provider', $_SESSION)) {
|
||||
$providerName = $_SESSION['provider'];
|
||||
}
|
||||
if (!in_array($providerName, ['Google', 'Microsoft', 'Yahoo'])) {
|
||||
exit('Only Google, Microsoft and Yahoo OAuth2 providers are currently supported in this script.');
|
||||
$clientId = $_SESSION['clientId'];
|
||||
$clientSecret = $_SESSION['clientSecret'];
|
||||
}
|
||||
|
||||
//These details are obtained by setting up an app in the Google developer console,
|
||||
//or whichever provider you're using.
|
||||
$clientId = 'RANDOMCHARS-----duv1n2.apps.googleusercontent.com';
|
||||
$clientSecret = 'RANDOMCHARS-----lGyjPcRtvP';
|
||||
//If you don't want to use the built-in form, set your client id and secret here
|
||||
//$clientId = 'RANDOMCHARS-----duv1n2.apps.googleusercontent.com';
|
||||
//$clientSecret = 'RANDOMCHARS-----lGyjPcRtvP';
|
||||
|
||||
//If this automatic URL doesn't work, set it yourself manually to the URL of this script
|
||||
$redirectUri = (isset($_SERVER['HTTPS']) ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Chinese PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author LiuXin <http://www.80x86.cn/blog/>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:身份验证失败。';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP 错误: 不能连接SMTP主机。';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误: 数据不可接受。';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = '未知编码:';
|
||||
$PHPMAILER_LANG['execute'] = '不能执行: ';
|
||||
$PHPMAILER_LANG['file_access'] = '不能访问文件:';
|
||||
$PHPMAILER_LANG['file_open'] = '文件错误:不能打开文件:';
|
||||
$PHPMAILER_LANG['from_failed'] = '下面的发送地址邮件发送失败了: ';
|
||||
$PHPMAILER_LANG['instantiate'] = '不能实现mail方法。';
|
||||
//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。';
|
||||
$PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: ';
|
||||
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Mongolian PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author @wispas
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Алдаа SMTP: Холбогдож чадсангүй.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Алдаа SMTP: SMTP- сервертэй холбогдож болохгүй байна.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Алдаа SMTP: зөвшөөрөгдсөнгүй.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Тодорхойгүй кодчилол: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Коммандыг гүйцэтгэх боломжгүй байна: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Файлд хандах боломжгүй байна: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Файлын алдаа: файлыг нээх боломжгүй байна: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Илгээгчийн хаяг буруу байна: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Mail () функцийг ажиллуулах боломжгүй байна.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Хүлээн авагчийн имэйл хаягийг оруулна уу.';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' — мэйл серверийг дэмжсэнгүй.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Алдаа SMTP: ийм хаягийг илгээж чадсангүй: ';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Хоосон мессэж';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'И-Мэйл буруу форматтай тул илгээх боломжгүй: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Гарын үсгийн алдаа: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP сервертэй холбогдоход алдаа гарлаа';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'SMTP серверийн алдаа: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Хувьсагчийг тохируулах эсвэл дахин тохируулах боломжгүй байна: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Өргөтгөл байхгүй: ';
|
||||
|
|
@ -750,7 +750,7 @@ class PHPMailer
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.6.0';
|
||||
const VERSION = '6.6.3';
|
||||
|
||||
/**
|
||||
* Error severity: message only, continue processing.
|
||||
|
|
@ -1066,8 +1066,8 @@ class PHPMailer
|
|||
* Addresses that have been added already return false, but do not throw exceptions.
|
||||
*
|
||||
* @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo'
|
||||
* @param string $address The email address to send, resp. to reply to
|
||||
* @param string $name
|
||||
* @param string $address The email address
|
||||
* @param string $name An optional username associated with the address
|
||||
*
|
||||
* @throws Exception
|
||||
*
|
||||
|
|
@ -1075,9 +1075,11 @@ class PHPMailer
|
|||
*/
|
||||
protected function addOrEnqueueAnAddress($kind, $address, $name)
|
||||
{
|
||||
$pos = false;
|
||||
if ($address !== null) {
|
||||
$address = trim($address);
|
||||
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
|
||||
$pos = strrpos($address, '@');
|
||||
}
|
||||
if (false === $pos) {
|
||||
//At-sign is missing.
|
||||
$error_message = sprintf(
|
||||
|
|
@ -1094,8 +1096,14 @@ class PHPMailer
|
|||
|
||||
return false;
|
||||
}
|
||||
if ($name !== null) {
|
||||
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
|
||||
} else {
|
||||
$name = '';
|
||||
}
|
||||
$params = [$kind, $address, $name];
|
||||
//Enqueue addresses with IDN until we know the PHPMailer::$CharSet.
|
||||
//Domain is assumed to be whatever is after the last @ symbol in the address
|
||||
if (static::idnSupported() && $this->has8bitChars(substr($address, ++$pos))) {
|
||||
if ('Reply-To' !== $kind) {
|
||||
if (!array_key_exists($address, $this->RecipientsQueue)) {
|
||||
|
|
@ -1547,17 +1555,17 @@ class PHPMailer
|
|||
|
||||
//Validate From, Sender, and ConfirmReadingTo addresses
|
||||
foreach (['From', 'Sender', 'ConfirmReadingTo'] as $address_kind) {
|
||||
$this->$address_kind = trim($this->$address_kind);
|
||||
if (empty($this->$address_kind)) {
|
||||
$this->{$address_kind} = trim($this->{$address_kind});
|
||||
if (empty($this->{$address_kind})) {
|
||||
continue;
|
||||
}
|
||||
$this->$address_kind = $this->punyencodeAddress($this->$address_kind);
|
||||
if (!static::validateAddress($this->$address_kind)) {
|
||||
$this->{$address_kind} = $this->punyencodeAddress($this->{$address_kind});
|
||||
if (!static::validateAddress($this->{$address_kind})) {
|
||||
$error_message = sprintf(
|
||||
'%s (%s): %s',
|
||||
$this->lang('invalid_address'),
|
||||
$address_kind,
|
||||
$this->$address_kind
|
||||
$this->{$address_kind}
|
||||
);
|
||||
$this->setError($error_message);
|
||||
$this->edebug($error_message);
|
||||
|
|
@ -1657,7 +1665,7 @@ class PHPMailer
|
|||
default:
|
||||
$sendMethod = $this->Mailer . 'Send';
|
||||
if (method_exists($this, $sendMethod)) {
|
||||
return $this->$sendMethod($this->MIMEHeader, $this->MIMEBody);
|
||||
return $this->{$sendMethod}($this->MIMEHeader, $this->MIMEBody);
|
||||
}
|
||||
|
||||
return $this->mailSend($this->MIMEHeader, $this->MIMEBody);
|
||||
|
|
@ -2192,7 +2200,8 @@ class PHPMailer
|
|||
//As we've caught all exceptions, just report whatever the last one was
|
||||
if ($this->exceptions && null !== $lastexception) {
|
||||
throw $lastexception;
|
||||
} elseif ($this->exceptions) {
|
||||
}
|
||||
if ($this->exceptions) {
|
||||
// no exception was thrown, likely $this->smtp->connect() failed
|
||||
$message = $this->getSmtpErrorMessage('connect_host');
|
||||
throw new Exception($message);
|
||||
|
|
@ -3705,20 +3714,21 @@ class PHPMailer
|
|||
* These differ from 'regular' attachments in that they are intended to be
|
||||
* displayed inline with the message, not just attached for download.
|
||||
* This is used in HTML messages that embed the images
|
||||
* the HTML refers to using the $cid value.
|
||||
* the HTML refers to using the `$cid` value in `img` tags, for example `<img src="cid:mylogo">`.
|
||||
* Never use a user-supplied path to a file!
|
||||
*
|
||||
* @param string $path Path to the attachment
|
||||
* @param string $cid Content ID of the attachment; Use this to reference
|
||||
* the content when using an embedded image in HTML
|
||||
* @param string $name Overrides the attachment name
|
||||
* @param string $encoding File encoding (see $Encoding)
|
||||
* @param string $type File MIME type
|
||||
* @param string $disposition Disposition to use
|
||||
*
|
||||
* @throws Exception
|
||||
* @param string $name Overrides the attachment filename
|
||||
* @param string $encoding File encoding (see $Encoding) defaults to `base64`
|
||||
* @param string $type File MIME type (by default mapped from the `$path` filename's extension)
|
||||
* @param string $disposition Disposition to use: `inline` (default) or `attachment`
|
||||
* (unlikely you want this – {@see `addAttachment()`} instead)
|
||||
*
|
||||
* @return bool True on successfully adding an attachment
|
||||
* @throws Exception
|
||||
*
|
||||
*/
|
||||
public function addEmbeddedImage(
|
||||
$path,
|
||||
|
|
@ -4096,12 +4106,8 @@ class PHPMailer
|
|||
//Is it a valid IPv4 address?
|
||||
return filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false;
|
||||
}
|
||||
if (filter_var('http://' . $host, FILTER_VALIDATE_URL) !== false) {
|
||||
//Is it a syntactically valid hostname?
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
//Is it a syntactically valid hostname (when embeded in a URL)?
|
||||
return filter_var('http://' . $host, FILTER_VALIDATE_URL) !== false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -4571,7 +4577,7 @@ class PHPMailer
|
|||
public function set($name, $value = '')
|
||||
{
|
||||
if (property_exists($this, $name)) {
|
||||
$this->$name = $value;
|
||||
$this->{$name} = $value;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class POP3
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.6.0';
|
||||
const VERSION = '6.6.3';
|
||||
|
||||
/**
|
||||
* Default POP3 port number.
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class SMTP
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.6.0';
|
||||
const VERSION = '6.6.3';
|
||||
|
||||
/**
|
||||
* SMTP line break constant.
|
||||
|
|
@ -1037,7 +1037,10 @@ class SMTP
|
|||
return false;
|
||||
}
|
||||
|
||||
//Don't clear the error store when using keepalive
|
||||
if ($command !== 'RSET') {
|
||||
$this->setError('');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
// This file is automatically generated at:2022-06-12 21:34:01
|
||||
// This file is automatically generated at:2022-07-10 21:24:02
|
||||
declare (strict_types = 1);
|
||||
return array (
|
||||
0 => 'think\\captcha\\CaptchaService',
|
||||
|
|
|
|||
|
|
@ -253,11 +253,8 @@ class UploadedFile extends File
|
|||
|
||||
switch (substr($size, -1)) {
|
||||
case 't': $max *= 1024;
|
||||
// no break
|
||||
case 'g': $max *= 1024;
|
||||
// no break
|
||||
case 'm': $max *= 1024;
|
||||
// no break
|
||||
case 'k': $max *= 1024;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ class NativeSessionStorage implements SessionStorageInterface
|
|||
}
|
||||
|
||||
$sessionId = $_COOKIE[session_name()] ?? null;
|
||||
if ($sessionId && !preg_match('/^[a-zA-Z0-9,-]{22,}$/', $sessionId)) {
|
||||
if ($sessionId && $this->saveHandler instanceof AbstractProxy && 'files' === $this->saveHandler->getSaveHandlerName() && !preg_match('/^[a-zA-Z0-9,-]{22,}$/', $sessionId)) {
|
||||
// the session ID in the header is invalid, create a new one
|
||||
session_id(session_create_id());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -350,7 +350,7 @@ abstract class BaseQuery
|
|||
$field = array_merge((array) $this->options['field'], $field);
|
||||
}
|
||||
|
||||
$this->options['field'] = array_unique($field);
|
||||
$this->options['field'] = array_unique($field, SORT_REGULAR);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
|
@ -379,7 +379,7 @@ abstract class BaseQuery
|
|||
$field = array_merge((array) $this->options['field'], $field);
|
||||
}
|
||||
|
||||
$this->options['field'] = array_unique($field);
|
||||
$this->options['field'] = array_unique($field, SORT_REGULAR);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
|
@ -424,7 +424,7 @@ abstract class BaseQuery
|
|||
$field = array_merge((array) $this->options['field'], $field);
|
||||
}
|
||||
|
||||
$this->options['field'] = array_unique($field);
|
||||
$this->options['field'] = array_unique($field, SORT_REGULAR);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
|
@ -765,14 +765,15 @@ abstract class BaseQuery
|
|||
}
|
||||
|
||||
/**
|
||||
* 查询缓存
|
||||
* 查询缓存 数据为空不缓存
|
||||
* @access public
|
||||
* @param mixed $key 缓存key
|
||||
* @param integer|\DateTime $expire 缓存有效期
|
||||
* @param string|array $tag 缓存标签
|
||||
* @param bool $always 始终缓存
|
||||
* @return $this
|
||||
*/
|
||||
public function cache($key = true, $expire = null, $tag = null)
|
||||
public function cache($key = true, $expire = null, $tag = null, bool $always = false)
|
||||
{
|
||||
if (false === $key || !$this->getConnection()->getCache()) {
|
||||
return $this;
|
||||
|
|
@ -784,10 +785,24 @@ abstract class BaseQuery
|
|||
}
|
||||
|
||||
$this->options['cache'] = [$key, $expire, $tag];
|
||||
$this->options['cache_always'] = $always;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询缓存 允许缓存空数据
|
||||
* @access public
|
||||
* @param mixed $key 缓存key
|
||||
* @param integer|\DateTime $expire 缓存有效期
|
||||
* @param string|array $tag 缓存标签
|
||||
* @return $this
|
||||
*/
|
||||
public function cacheAlways($key = true, $expire = null, $tag = null)
|
||||
{
|
||||
return $this->cache($key, $expire, $tag, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定查询lock
|
||||
* @access public
|
||||
|
|
|
|||
|
|
@ -703,6 +703,8 @@ abstract class Builder
|
|||
// 比较运算
|
||||
if ($value instanceof Closure) {
|
||||
$value = $this->parseClosure($query, $value);
|
||||
} elseif ($value instanceof Raw) {
|
||||
$value = $this->parseRaw($query, $value);
|
||||
}
|
||||
|
||||
if ('=' == $exp && is_null($value)) {
|
||||
|
|
|
|||
|
|
@ -710,8 +710,9 @@ abstract class PDOConnection extends Connection
|
|||
$this->getPDOStatement($sql, $bind, $master, $procedure);
|
||||
|
||||
$resultSet = $this->getResult($procedure);
|
||||
$requireCache = $query->getOptions('cache_always') || !empty($resultSet);
|
||||
|
||||
if (isset($cacheItem) && $resultSet) {
|
||||
if (isset($cacheItem) && $requireCache) {
|
||||
// 缓存数据集
|
||||
$cacheItem->set($resultSet);
|
||||
$this->cacheData($cacheItem);
|
||||
|
|
|
|||
|
|
@ -374,7 +374,9 @@ trait WhereQuery
|
|||
} elseif ($field instanceof Closure) {
|
||||
$where = $field;
|
||||
} elseif (is_string($field)) {
|
||||
if (preg_match('/[,=\<\'\"\(\s]/', $field)) {
|
||||
if ($condition instanceof Raw) {
|
||||
|
||||
} elseif (preg_match('/[,=\<\'\"\(\s]/', $field)) {
|
||||
return $this->whereRaw($field, is_array($op) ? $op : [], $logic);
|
||||
} elseif (is_string($op) && strtolower($op) == 'exp' && !is_null($condition)) {
|
||||
$bind = isset($param[2]) && is_array($param[2]) ? $param[2] : [];
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@ use think\Paginator;
|
|||
|
||||
/**
|
||||
* 模型数据集类
|
||||
*
|
||||
* @template TKey of array-key
|
||||
* @template TModel of \think\Model
|
||||
*
|
||||
* @extends BaseCollection<TKey, TModel>
|
||||
*/
|
||||
class Collection extends BaseCollection
|
||||
{
|
||||
|
|
@ -185,7 +190,7 @@ class Collection extends BaseCollection
|
|||
*
|
||||
* @access public
|
||||
* @param mixed $items 数据
|
||||
* @param string $indexKey 键名
|
||||
* @param string|null $indexKey 键名
|
||||
* @return array
|
||||
*/
|
||||
public function dictionary($items = null, string &$indexKey = null)
|
||||
|
|
@ -212,7 +217,7 @@ class Collection extends BaseCollection
|
|||
*
|
||||
* @access public
|
||||
* @param mixed $items 数据
|
||||
* @param string $indexKey 指定比较的键名
|
||||
* @param string|null $indexKey 指定比较的键名
|
||||
* @return static
|
||||
*/
|
||||
public function diff($items, string $indexKey = null)
|
||||
|
|
@ -240,7 +245,7 @@ class Collection extends BaseCollection
|
|||
*
|
||||
* @access public
|
||||
* @param mixed $items 数据
|
||||
* @param string $indexKey 指定比较的键名
|
||||
* @param string|null $indexKey 指定比较的键名
|
||||
* @return static
|
||||
*/
|
||||
public function intersect($items, string $indexKey = null)
|
||||
|
|
|
|||
|
|
@ -215,11 +215,15 @@ abstract class Relation
|
|||
/**
|
||||
* 限制关联数据的字段
|
||||
* @access public
|
||||
* @param array $field 关联字段限制
|
||||
* @param array|string $field 关联字段限制
|
||||
* @return $this
|
||||
*/
|
||||
public function withField(array $field)
|
||||
public function withField($field)
|
||||
{
|
||||
if (is_string($field)) {
|
||||
$field = array_map('trim', explode(',', $field));
|
||||
}
|
||||
|
||||
$this->withField = $field;
|
||||
return $this;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ namespace think\model\concern;
|
|||
use InvalidArgumentException;
|
||||
use think\db\Raw;
|
||||
use think\helper\Str;
|
||||
use think\Model;
|
||||
use think\model\Relation;
|
||||
|
||||
/**
|
||||
|
|
@ -382,7 +383,7 @@ trait Attribute
|
|||
} elseif (isset($this->type[$name])) {
|
||||
// 类型转换
|
||||
$value = $this->writeTransform($value, $this->type[$name]);
|
||||
} elseif (is_object($value) && method_exists($value, '__toString')) {
|
||||
} elseif (array_key_exists($name, $this->origin) && is_object($value) && method_exists($value, '__toString')) {
|
||||
// 对象类型
|
||||
$value = $value->__toString();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue