mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
ComposerUpdate
This commit is contained in:
parent
8c1cdabd3c
commit
8b7ad2c850
@ -84,7 +84,6 @@ class Upload extends Controller
|
|||||||
* 文件上传入口
|
* 文件上传入口
|
||||||
* @login true
|
* @login true
|
||||||
* @return \think\response\Json
|
* @return \think\response\Json
|
||||||
* @throws \think\Exception
|
|
||||||
* @throws \think\admin\Exception
|
* @throws \think\admin\Exception
|
||||||
* @throws \think\db\exception\DataNotFoundException
|
* @throws \think\db\exception\DataNotFoundException
|
||||||
* @throws \think\db\exception\DbException
|
* @throws \think\db\exception\DbException
|
||||||
|
@ -82,12 +82,12 @@ class Article extends Member
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 取消收藏课程
|
* 取消收藏文章
|
||||||
* @throws \think\db\exception\DbException
|
* @throws \think\db\exception\DbException
|
||||||
*/
|
*/
|
||||||
public function delCollection()
|
public function delCollection()
|
||||||
{
|
{
|
||||||
$data = $this->_vali(['mid.value' => $this->mid, 'cid.require' => '课程ID不能为空!']);
|
$data = $this->_vali(['mid.value' => $this->mid, 'cid.require' => '文章ID不能为空!']);
|
||||||
if ($this->app->db->name('DataArticleCollection')->where($data)->delete() !== false) {
|
if ($this->app->db->name('DataArticleCollection')->where($data)->delete() !== false) {
|
||||||
ArticleService::instance()->syncTotal($data['cid']);
|
ArticleService::instance()->syncTotal($data['cid']);
|
||||||
$this->success('取消收藏成功!');
|
$this->success('取消收藏成功!');
|
||||||
@ -111,6 +111,7 @@ class Article extends Member
|
|||||||
foreach ($result['list'] as &$vo) $vo['record'] = $Articles[$vo['cid']] ?? [];
|
foreach ($result['list'] as &$vo) $vo['record'] = $Articles[$vo['cid']] ?? [];
|
||||||
}
|
}
|
||||||
$this->success('获取收藏记录成功!', $result);
|
$this->success('获取收藏记录成功!', $result);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
88
composer.lock
generated
88
composer.lock
generated
@ -74,16 +74,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/flysystem",
|
"name": "league/flysystem",
|
||||||
"version": "1.0.70",
|
"version": "1.1.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/thephpleague/flysystem.git",
|
"url": "https://github.com/thephpleague/flysystem.git",
|
||||||
"reference": "585824702f534f8d3cf7fab7225e8466cc4b7493"
|
"reference": "481c0174b9c99b189959e2bb9d6f52188ed1f692"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/585824702f534f8d3cf7fab7225e8466cc4b7493",
|
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/481c0174b9c99b189959e2bb9d6f52188ed1f692",
|
||||||
"reference": "585824702f534f8d3cf7fab7225e8466cc4b7493",
|
"reference": "481c0174b9c99b189959e2bb9d6f52188ed1f692",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -94,14 +94,15 @@
|
|||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"ext-fileinfo": "*",
|
"ext-fileinfo": "*",
|
||||||
"php": ">=5.5.9"
|
"league/mime-type-detection": "^1.3",
|
||||||
|
"php": "^7.2.5 || ^8.0"
|
||||||
},
|
},
|
||||||
"conflict": {
|
"conflict": {
|
||||||
"league/flysystem-sftp": "<1.0.6"
|
"league/flysystem-sftp": "<1.0.6"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpspec/phpspec": "^3.4 || ^4.0 || ^5.0 || ^6.0",
|
"phpspec/prophecy": "^1.11.1",
|
||||||
"phpunit/phpunit": "^5.7.26"
|
"phpunit/phpunit": "^8.5.8"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-fileinfo": "Required for MimeType",
|
"ext-fileinfo": "Required for MimeType",
|
||||||
@ -166,7 +167,7 @@
|
|||||||
"type": "other"
|
"type": "other"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-07-26T07:20:36+00:00"
|
"time": "2020-08-09T15:57:10+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/flysystem-cached-adapter",
|
"name": "league/flysystem-cached-adapter",
|
||||||
@ -222,17 +223,74 @@
|
|||||||
"time": "2020-07-25T15:56:04+00:00"
|
"time": "2020-07-25T15:56:04+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "opis/closure",
|
"name": "league/mime-type-detection",
|
||||||
"version": "3.5.5",
|
"version": "1.4.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/opis/closure.git",
|
"url": "https://github.com/thephpleague/mime-type-detection.git",
|
||||||
"reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c"
|
"reference": "fda190b62b962d96a069fcc414d781db66d65b69"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/opis/closure/zipball/dec9fc5ecfca93f45cd6121f8e6f14457dff372c",
|
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/fda190b62b962d96a069fcc414d781db66d65b69",
|
||||||
"reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c",
|
"reference": "fda190b62b962d96a069fcc414d781db66d65b69",
|
||||||
|
"shasum": "",
|
||||||
|
"mirrors": [
|
||||||
|
{
|
||||||
|
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
|
||||||
|
"preferred": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-fileinfo": "*",
|
||||||
|
"php": "^7.2 || ^8.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpstan/phpstan": "^0.12.36",
|
||||||
|
"phpunit/phpunit": "^8.5.8"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"League\\MimeTypeDetection\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Frank de Jonge",
|
||||||
|
"email": "info@frankdejonge.nl"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Mime-type detection for Flysystem",
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/frankdejonge",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/league/flysystem",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2020-08-09T10:34:01+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "opis/closure",
|
||||||
|
"version": "3.5.6",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/opis/closure.git",
|
||||||
|
"reference": "e8d34df855b0a0549a300cb8cb4db472556e8aa9"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/opis/closure/zipball/e8d34df855b0a0549a300cb8cb4db472556e8aa9",
|
||||||
|
"reference": "e8d34df855b0a0549a300cb8cb4db472556e8aa9",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -286,7 +344,7 @@
|
|||||||
"serialization",
|
"serialization",
|
||||||
"serialize"
|
"serialize"
|
||||||
],
|
],
|
||||||
"time": "2020-06-17T14:59:55+00:00"
|
"time": "2020-08-11T08:46:50+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/cache",
|
"name": "psr/cache",
|
||||||
|
6
vendor/composer/autoload_classmap.php
vendored
6
vendor/composer/autoload_classmap.php
vendored
@ -90,6 +90,12 @@ return array(
|
|||||||
'League\\Flysystem\\Util\\ContentListingFormatter' => $vendorDir . '/league/flysystem/src/Util/ContentListingFormatter.php',
|
'League\\Flysystem\\Util\\ContentListingFormatter' => $vendorDir . '/league/flysystem/src/Util/ContentListingFormatter.php',
|
||||||
'League\\Flysystem\\Util\\MimeType' => $vendorDir . '/league/flysystem/src/Util/MimeType.php',
|
'League\\Flysystem\\Util\\MimeType' => $vendorDir . '/league/flysystem/src/Util/MimeType.php',
|
||||||
'League\\Flysystem\\Util\\StreamHasher' => $vendorDir . '/league/flysystem/src/Util/StreamHasher.php',
|
'League\\Flysystem\\Util\\StreamHasher' => $vendorDir . '/league/flysystem/src/Util/StreamHasher.php',
|
||||||
|
'League\\MimeTypeDetection\\EmptyExtensionToMimeTypeMap' => $vendorDir . '/league/mime-type-detection/src/EmptyExtensionToMimeTypeMap.php',
|
||||||
|
'League\\MimeTypeDetection\\ExtensionMimeTypeDetector' => $vendorDir . '/league/mime-type-detection/src/ExtensionMimeTypeDetector.php',
|
||||||
|
'League\\MimeTypeDetection\\ExtensionToMimeTypeMap' => $vendorDir . '/league/mime-type-detection/src/ExtensionToMimeTypeMap.php',
|
||||||
|
'League\\MimeTypeDetection\\FinfoMimeTypeDetector' => $vendorDir . '/league/mime-type-detection/src/FinfoMimeTypeDetector.php',
|
||||||
|
'League\\MimeTypeDetection\\GeneratedExtensionToMimeTypeMap' => $vendorDir . '/league/mime-type-detection/src/GeneratedExtensionToMimeTypeMap.php',
|
||||||
|
'League\\MimeTypeDetection\\MimeTypeDetector' => $vendorDir . '/league/mime-type-detection/src/MimeTypeDetector.php',
|
||||||
'Opis\\Closure\\Analyzer' => $vendorDir . '/opis/closure/src/Analyzer.php',
|
'Opis\\Closure\\Analyzer' => $vendorDir . '/opis/closure/src/Analyzer.php',
|
||||||
'Opis\\Closure\\ClosureContext' => $vendorDir . '/opis/closure/src/ClosureContext.php',
|
'Opis\\Closure\\ClosureContext' => $vendorDir . '/opis/closure/src/ClosureContext.php',
|
||||||
'Opis\\Closure\\ClosureScope' => $vendorDir . '/opis/closure/src/ClosureScope.php',
|
'Opis\\Closure\\ClosureScope' => $vendorDir . '/opis/closure/src/ClosureScope.php',
|
||||||
|
1
vendor/composer/autoload_psr4.php
vendored
1
vendor/composer/autoload_psr4.php
vendored
@ -19,6 +19,7 @@ return array(
|
|||||||
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
|
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
|
||||||
'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
|
'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
|
||||||
'Opis\\Closure\\' => array($vendorDir . '/opis/closure/src'),
|
'Opis\\Closure\\' => array($vendorDir . '/opis/closure/src'),
|
||||||
|
'League\\MimeTypeDetection\\' => array($vendorDir . '/league/mime-type-detection/src'),
|
||||||
'League\\Flysystem\\Cached\\' => array($vendorDir . '/league/flysystem-cached-adapter/src'),
|
'League\\Flysystem\\Cached\\' => array($vendorDir . '/league/flysystem-cached-adapter/src'),
|
||||||
'League\\Flysystem\\' => array($vendorDir . '/league/flysystem/src'),
|
'League\\Flysystem\\' => array($vendorDir . '/league/flysystem/src'),
|
||||||
'Endroid\\QrCode\\' => array($vendorDir . '/endroid/qr-code/src'),
|
'Endroid\\QrCode\\' => array($vendorDir . '/endroid/qr-code/src'),
|
||||||
|
11
vendor/composer/autoload_static.php
vendored
11
vendor/composer/autoload_static.php
vendored
@ -46,6 +46,7 @@ class ComposerStaticInitb911c14a0826c73d9f097343fd33a252
|
|||||||
),
|
),
|
||||||
'L' =>
|
'L' =>
|
||||||
array (
|
array (
|
||||||
|
'League\\MimeTypeDetection\\' => 25,
|
||||||
'League\\Flysystem\\Cached\\' => 24,
|
'League\\Flysystem\\Cached\\' => 24,
|
||||||
'League\\Flysystem\\' => 17,
|
'League\\Flysystem\\' => 17,
|
||||||
),
|
),
|
||||||
@ -115,6 +116,10 @@ class ComposerStaticInitb911c14a0826c73d9f097343fd33a252
|
|||||||
array (
|
array (
|
||||||
0 => __DIR__ . '/..' . '/opis/closure/src',
|
0 => __DIR__ . '/..' . '/opis/closure/src',
|
||||||
),
|
),
|
||||||
|
'League\\MimeTypeDetection\\' =>
|
||||||
|
array (
|
||||||
|
0 => __DIR__ . '/..' . '/league/mime-type-detection/src',
|
||||||
|
),
|
||||||
'League\\Flysystem\\Cached\\' =>
|
'League\\Flysystem\\Cached\\' =>
|
||||||
array (
|
array (
|
||||||
0 => __DIR__ . '/..' . '/league/flysystem-cached-adapter/src',
|
0 => __DIR__ . '/..' . '/league/flysystem-cached-adapter/src',
|
||||||
@ -218,6 +223,12 @@ class ComposerStaticInitb911c14a0826c73d9f097343fd33a252
|
|||||||
'League\\Flysystem\\Util\\ContentListingFormatter' => __DIR__ . '/..' . '/league/flysystem/src/Util/ContentListingFormatter.php',
|
'League\\Flysystem\\Util\\ContentListingFormatter' => __DIR__ . '/..' . '/league/flysystem/src/Util/ContentListingFormatter.php',
|
||||||
'League\\Flysystem\\Util\\MimeType' => __DIR__ . '/..' . '/league/flysystem/src/Util/MimeType.php',
|
'League\\Flysystem\\Util\\MimeType' => __DIR__ . '/..' . '/league/flysystem/src/Util/MimeType.php',
|
||||||
'League\\Flysystem\\Util\\StreamHasher' => __DIR__ . '/..' . '/league/flysystem/src/Util/StreamHasher.php',
|
'League\\Flysystem\\Util\\StreamHasher' => __DIR__ . '/..' . '/league/flysystem/src/Util/StreamHasher.php',
|
||||||
|
'League\\MimeTypeDetection\\EmptyExtensionToMimeTypeMap' => __DIR__ . '/..' . '/league/mime-type-detection/src/EmptyExtensionToMimeTypeMap.php',
|
||||||
|
'League\\MimeTypeDetection\\ExtensionMimeTypeDetector' => __DIR__ . '/..' . '/league/mime-type-detection/src/ExtensionMimeTypeDetector.php',
|
||||||
|
'League\\MimeTypeDetection\\ExtensionToMimeTypeMap' => __DIR__ . '/..' . '/league/mime-type-detection/src/ExtensionToMimeTypeMap.php',
|
||||||
|
'League\\MimeTypeDetection\\FinfoMimeTypeDetector' => __DIR__ . '/..' . '/league/mime-type-detection/src/FinfoMimeTypeDetector.php',
|
||||||
|
'League\\MimeTypeDetection\\GeneratedExtensionToMimeTypeMap' => __DIR__ . '/..' . '/league/mime-type-detection/src/GeneratedExtensionToMimeTypeMap.php',
|
||||||
|
'League\\MimeTypeDetection\\MimeTypeDetector' => __DIR__ . '/..' . '/league/mime-type-detection/src/MimeTypeDetector.php',
|
||||||
'Opis\\Closure\\Analyzer' => __DIR__ . '/..' . '/opis/closure/src/Analyzer.php',
|
'Opis\\Closure\\Analyzer' => __DIR__ . '/..' . '/opis/closure/src/Analyzer.php',
|
||||||
'Opis\\Closure\\ClosureContext' => __DIR__ . '/..' . '/opis/closure/src/ClosureContext.php',
|
'Opis\\Closure\\ClosureContext' => __DIR__ . '/..' . '/opis/closure/src/ClosureContext.php',
|
||||||
'Opis\\Closure\\ClosureScope' => __DIR__ . '/..' . '/opis/closure/src/ClosureScope.php',
|
'Opis\\Closure\\ClosureScope' => __DIR__ . '/..' . '/opis/closure/src/ClosureScope.php',
|
||||||
|
94
vendor/composer/installed.json
vendored
94
vendor/composer/installed.json
vendored
@ -69,17 +69,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/flysystem",
|
"name": "league/flysystem",
|
||||||
"version": "1.0.70",
|
"version": "1.1.0",
|
||||||
"version_normalized": "1.0.70.0",
|
"version_normalized": "1.1.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/thephpleague/flysystem.git",
|
"url": "https://github.com/thephpleague/flysystem.git",
|
||||||
"reference": "585824702f534f8d3cf7fab7225e8466cc4b7493"
|
"reference": "481c0174b9c99b189959e2bb9d6f52188ed1f692"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/585824702f534f8d3cf7fab7225e8466cc4b7493",
|
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/481c0174b9c99b189959e2bb9d6f52188ed1f692",
|
||||||
"reference": "585824702f534f8d3cf7fab7225e8466cc4b7493",
|
"reference": "481c0174b9c99b189959e2bb9d6f52188ed1f692",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -90,14 +90,15 @@
|
|||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"ext-fileinfo": "*",
|
"ext-fileinfo": "*",
|
||||||
"php": ">=5.5.9"
|
"league/mime-type-detection": "^1.3",
|
||||||
|
"php": "^7.2.5 || ^8.0"
|
||||||
},
|
},
|
||||||
"conflict": {
|
"conflict": {
|
||||||
"league/flysystem-sftp": "<1.0.6"
|
"league/flysystem-sftp": "<1.0.6"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpspec/phpspec": "^3.4 || ^4.0 || ^5.0 || ^6.0",
|
"phpspec/prophecy": "^1.11.1",
|
||||||
"phpunit/phpunit": "^5.7.26"
|
"phpunit/phpunit": "^8.5.8"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-fileinfo": "Required for MimeType",
|
"ext-fileinfo": "Required for MimeType",
|
||||||
@ -115,7 +116,7 @@
|
|||||||
"spatie/flysystem-dropbox": "Allows you to use Dropbox storage",
|
"spatie/flysystem-dropbox": "Allows you to use Dropbox storage",
|
||||||
"srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications"
|
"srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications"
|
||||||
},
|
},
|
||||||
"time": "2020-07-26T07:20:36+00:00",
|
"time": "2020-08-09T15:57:10+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
@ -221,18 +222,77 @@
|
|||||||
"description": "An adapter decorator to enable meta-data caching."
|
"description": "An adapter decorator to enable meta-data caching."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "opis/closure",
|
"name": "league/mime-type-detection",
|
||||||
"version": "3.5.5",
|
"version": "1.4.0",
|
||||||
"version_normalized": "3.5.5.0",
|
"version_normalized": "1.4.0.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/opis/closure.git",
|
"url": "https://github.com/thephpleague/mime-type-detection.git",
|
||||||
"reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c"
|
"reference": "fda190b62b962d96a069fcc414d781db66d65b69"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/opis/closure/zipball/dec9fc5ecfca93f45cd6121f8e6f14457dff372c",
|
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/fda190b62b962d96a069fcc414d781db66d65b69",
|
||||||
"reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c",
|
"reference": "fda190b62b962d96a069fcc414d781db66d65b69",
|
||||||
|
"shasum": "",
|
||||||
|
"mirrors": [
|
||||||
|
{
|
||||||
|
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
|
||||||
|
"preferred": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-fileinfo": "*",
|
||||||
|
"php": "^7.2 || ^8.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpstan/phpstan": "^0.12.36",
|
||||||
|
"phpunit/phpunit": "^8.5.8"
|
||||||
|
},
|
||||||
|
"time": "2020-08-09T10:34:01+00:00",
|
||||||
|
"type": "library",
|
||||||
|
"installation-source": "dist",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"League\\MimeTypeDetection\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Frank de Jonge",
|
||||||
|
"email": "info@frankdejonge.nl"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Mime-type detection for Flysystem",
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/frankdejonge",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/league/flysystem",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "opis/closure",
|
||||||
|
"version": "3.5.6",
|
||||||
|
"version_normalized": "3.5.6.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/opis/closure.git",
|
||||||
|
"reference": "e8d34df855b0a0549a300cb8cb4db472556e8aa9"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/opis/closure/zipball/e8d34df855b0a0549a300cb8cb4db472556e8aa9",
|
||||||
|
"reference": "e8d34df855b0a0549a300cb8cb4db472556e8aa9",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -248,7 +308,7 @@
|
|||||||
"jeremeamia/superclosure": "^2.0",
|
"jeremeamia/superclosure": "^2.0",
|
||||||
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
|
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
|
||||||
},
|
},
|
||||||
"time": "2020-06-17T14:59:55+00:00",
|
"time": "2020-08-11T08:46:50+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
|
76
vendor/league/flysystem/CODE_OF_CONDUCT.md
vendored
Normal file
76
vendor/league/flysystem/CODE_OF_CONDUCT.md
vendored
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
# Contributor Covenant Code of Conduct
|
||||||
|
|
||||||
|
## Our Pledge
|
||||||
|
|
||||||
|
In the interest of fostering an open and welcoming environment, we as
|
||||||
|
contributors and maintainers pledge to making participation in our project and
|
||||||
|
our community a harassment-free experience for everyone, regardless of age, body
|
||||||
|
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||||
|
level of experience, education, socio-economic status, nationality, personal
|
||||||
|
appearance, race, religion, or sexual identity and orientation.
|
||||||
|
|
||||||
|
## Our Standards
|
||||||
|
|
||||||
|
Examples of behavior that contributes to creating a positive environment
|
||||||
|
include:
|
||||||
|
|
||||||
|
* Using welcoming and inclusive language
|
||||||
|
* Being respectful of differing viewpoints and experiences
|
||||||
|
* Gracefully accepting constructive criticism
|
||||||
|
* Focusing on what is best for the community
|
||||||
|
* Showing empathy towards other community members
|
||||||
|
|
||||||
|
Examples of unacceptable behavior by participants include:
|
||||||
|
|
||||||
|
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||||
|
advances
|
||||||
|
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||||
|
* Public or private harassment
|
||||||
|
* Publishing others' private information, such as a physical or electronic
|
||||||
|
address, without explicit permission
|
||||||
|
* Other conduct which could reasonably be considered inappropriate in a
|
||||||
|
professional setting
|
||||||
|
|
||||||
|
## Our Responsibilities
|
||||||
|
|
||||||
|
Project maintainers are responsible for clarifying the standards of acceptable
|
||||||
|
behavior and are expected to take appropriate and fair corrective action in
|
||||||
|
response to any instances of unacceptable behavior.
|
||||||
|
|
||||||
|
Project maintainers have the right and responsibility to remove, edit, or
|
||||||
|
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||||
|
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||||
|
permanently any contributor for other behaviors that they deem inappropriate,
|
||||||
|
threatening, offensive, or harmful.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This Code of Conduct applies both within project spaces and in public spaces
|
||||||
|
when an individual is representing the project or its community. Examples of
|
||||||
|
representing a project or community include using an official project e-mail
|
||||||
|
address, posting via an official social media account, or acting as an appointed
|
||||||
|
representative at an online or offline event. Representation of a project may be
|
||||||
|
further defined and clarified by project maintainers.
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
|
reported by contacting the project team at info+flysystem@frankdejonge.nl. All
|
||||||
|
complaints will be reviewed and investigated and will result in a response that
|
||||||
|
is deemed necessary and appropriate to the circumstances. The project team is
|
||||||
|
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||||
|
Further details of specific enforcement policies may be posted separately.
|
||||||
|
|
||||||
|
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||||
|
faith may face temporary or permanent repercussions as determined by other
|
||||||
|
members of the project's leadership.
|
||||||
|
|
||||||
|
## Attribution
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||||
|
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||||
|
|
||||||
|
[homepage]: https://www.contributor-covenant.org
|
||||||
|
|
||||||
|
For answers to common questions about this code of conduct, see
|
||||||
|
https://www.contributor-covenant.org/faq
|
14
vendor/league/flysystem/composer.json
vendored
14
vendor/league/flysystem/composer.json
vendored
@ -21,12 +21,13 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.5.9",
|
"php": "^7.2.5 || ^8.0",
|
||||||
"ext-fileinfo": "*"
|
"ext-fileinfo": "*",
|
||||||
|
"league/mime-type-detection": "^1.3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpspec/phpspec": "^3.4 || ^4.0 || ^5.0 || ^6.0",
|
"phpspec/prophecy": "^1.11.1",
|
||||||
"phpunit/phpunit": "^5.7.26"
|
"phpunit/phpunit": "^8.5.8"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
@ -36,10 +37,7 @@
|
|||||||
"autoload-dev": {
|
"autoload-dev": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"League\\Flysystem\\Stub\\": "stub/"
|
"League\\Flysystem\\Stub\\": "stub/"
|
||||||
},
|
}
|
||||||
"files": [
|
|
||||||
"tests/PHPUnitHacks.php"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-fileinfo": "Required for MimeType",
|
"ext-fileinfo": "Required for MimeType",
|
||||||
|
227
vendor/league/flysystem/src/Util/MimeType.php
vendored
227
vendor/league/flysystem/src/Util/MimeType.php
vendored
@ -2,194 +2,35 @@
|
|||||||
|
|
||||||
namespace League\Flysystem\Util;
|
namespace League\Flysystem\Util;
|
||||||
|
|
||||||
use ErrorException;
|
use League\MimeTypeDetection\FinfoMimeTypeDetector;
|
||||||
use finfo;
|
use League\MimeTypeDetection\GeneratedExtensionToMimeTypeMap;
|
||||||
|
use League\MimeTypeDetection\MimeTypeDetector;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
class MimeType
|
class MimeType
|
||||||
{
|
{
|
||||||
protected static $extensionToMimeTypeMap = [
|
protected static $extensionToMimeTypeMap = GeneratedExtensionToMimeTypeMap::MIME_TYPES_FOR_EXTENSIONS;
|
||||||
'hqx' => 'application/mac-binhex40',
|
protected static $detector;
|
||||||
'cpt' => 'application/mac-compactpro',
|
|
||||||
'csv' => 'text/csv',
|
public static function useDetector(MimeTypeDetector $detector)
|
||||||
'bin' => 'application/octet-stream',
|
{
|
||||||
'dms' => 'application/octet-stream',
|
static::$detector = $detector;
|
||||||
'lha' => 'application/octet-stream',
|
}
|
||||||
'lzh' => 'application/octet-stream',
|
|
||||||
'exe' => 'application/octet-stream',
|
/**
|
||||||
'class' => 'application/octet-stream',
|
* @return MimeTypeDetector
|
||||||
'psd' => 'application/x-photoshop',
|
*/
|
||||||
'so' => 'application/octet-stream',
|
protected static function detector()
|
||||||
'sea' => 'application/octet-stream',
|
{
|
||||||
'dll' => 'application/octet-stream',
|
if ( ! static::$detector instanceof MimeTypeDetector) {
|
||||||
'oda' => 'application/oda',
|
static::$detector = new FinfoMimeTypeDetector();
|
||||||
'pdf' => 'application/pdf',
|
}
|
||||||
'ai' => 'application/pdf',
|
|
||||||
'eps' => 'application/postscript',
|
return static::$detector;
|
||||||
'epub' => 'application/epub+zip',
|
}
|
||||||
'ps' => 'application/postscript',
|
|
||||||
'smi' => 'application/smil',
|
|
||||||
'smil' => 'application/smil',
|
|
||||||
'mif' => 'application/vnd.mif',
|
|
||||||
'xls' => 'application/vnd.ms-excel',
|
|
||||||
'xlt' => 'application/vnd.ms-excel',
|
|
||||||
'xla' => 'application/vnd.ms-excel',
|
|
||||||
'ppt' => 'application/powerpoint',
|
|
||||||
'pot' => 'application/vnd.ms-powerpoint',
|
|
||||||
'pps' => 'application/vnd.ms-powerpoint',
|
|
||||||
'ppa' => 'application/vnd.ms-powerpoint',
|
|
||||||
'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
|
||||||
'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template',
|
|
||||||
'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
|
|
||||||
'ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12',
|
|
||||||
'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
|
|
||||||
'potm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
|
|
||||||
'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12',
|
|
||||||
'wbxml' => 'application/wbxml',
|
|
||||||
'wmlc' => 'application/wmlc',
|
|
||||||
'dcr' => 'application/x-director',
|
|
||||||
'dir' => 'application/x-director',
|
|
||||||
'dxr' => 'application/x-director',
|
|
||||||
'dvi' => 'application/x-dvi',
|
|
||||||
'gtar' => 'application/x-gtar',
|
|
||||||
'gz' => 'application/x-gzip',
|
|
||||||
'gzip' => 'application/x-gzip',
|
|
||||||
'php' => 'application/x-httpd-php',
|
|
||||||
'php4' => 'application/x-httpd-php',
|
|
||||||
'php3' => 'application/x-httpd-php',
|
|
||||||
'phtml' => 'application/x-httpd-php',
|
|
||||||
'phps' => 'application/x-httpd-php-source',
|
|
||||||
'js' => 'application/javascript',
|
|
||||||
'swf' => 'application/x-shockwave-flash',
|
|
||||||
'sit' => 'application/x-stuffit',
|
|
||||||
'tar' => 'application/x-tar',
|
|
||||||
'tgz' => 'application/x-tar',
|
|
||||||
'z' => 'application/x-compress',
|
|
||||||
'xhtml' => 'application/xhtml+xml',
|
|
||||||
'xht' => 'application/xhtml+xml',
|
|
||||||
'rdf' => 'application/rdf+xml',
|
|
||||||
'zip' => 'application/x-zip',
|
|
||||||
'rar' => 'application/x-rar',
|
|
||||||
'mid' => 'audio/midi',
|
|
||||||
'midi' => 'audio/midi',
|
|
||||||
'mpga' => 'audio/mpeg',
|
|
||||||
'mp2' => 'audio/mpeg',
|
|
||||||
'mp3' => 'audio/mpeg',
|
|
||||||
'aif' => 'audio/x-aiff',
|
|
||||||
'aiff' => 'audio/x-aiff',
|
|
||||||
'aifc' => 'audio/x-aiff',
|
|
||||||
'ram' => 'audio/x-pn-realaudio',
|
|
||||||
'rm' => 'audio/x-pn-realaudio',
|
|
||||||
'rpm' => 'audio/x-pn-realaudio-plugin',
|
|
||||||
'ra' => 'audio/x-realaudio',
|
|
||||||
'rv' => 'video/vnd.rn-realvideo',
|
|
||||||
'wav' => 'audio/x-wav',
|
|
||||||
'jpg' => 'image/jpeg',
|
|
||||||
'jpeg' => 'image/jpeg',
|
|
||||||
'jpe' => 'image/jpeg',
|
|
||||||
'png' => 'image/png',
|
|
||||||
'gif' => 'image/gif',
|
|
||||||
'bmp' => 'image/bmp',
|
|
||||||
'tiff' => 'image/tiff',
|
|
||||||
'tif' => 'image/tiff',
|
|
||||||
'svg' => 'image/svg+xml',
|
|
||||||
'css' => 'text/css',
|
|
||||||
'html' => 'text/html',
|
|
||||||
'htm' => 'text/html',
|
|
||||||
'shtml' => 'text/html',
|
|
||||||
'txt' => 'text/plain',
|
|
||||||
'text' => 'text/plain',
|
|
||||||
'log' => 'text/plain',
|
|
||||||
'markdown' => 'text/markdown',
|
|
||||||
'md' => 'text/markdown',
|
|
||||||
'rtx' => 'text/richtext',
|
|
||||||
'rtf' => 'text/rtf',
|
|
||||||
'xml' => 'application/xml',
|
|
||||||
'xsl' => 'application/xml',
|
|
||||||
'dmn' => 'application/octet-stream',
|
|
||||||
'bpmn' => 'application/octet-stream',
|
|
||||||
'mpeg' => 'video/mpeg',
|
|
||||||
'mpg' => 'video/mpeg',
|
|
||||||
'mpe' => 'video/mpeg',
|
|
||||||
'qt' => 'video/quicktime',
|
|
||||||
'mov' => 'video/quicktime',
|
|
||||||
'avi' => 'video/x-msvideo',
|
|
||||||
'movie' => 'video/x-sgi-movie',
|
|
||||||
'doc' => 'application/msword',
|
|
||||||
'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
||||||
'docm' => 'application/vnd.ms-word.template.macroEnabled.12',
|
|
||||||
'dotm' => 'application/vnd.ms-word.template.macroEnabled.12',
|
|
||||||
'dot' => 'application/msword',
|
|
||||||
'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
|
|
||||||
'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
||||||
'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
|
|
||||||
'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',
|
|
||||||
'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12',
|
|
||||||
'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12',
|
|
||||||
'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
|
|
||||||
'word' => 'application/msword',
|
|
||||||
'xl' => 'application/excel',
|
|
||||||
'eml' => 'message/rfc822',
|
|
||||||
'json' => 'application/json',
|
|
||||||
'pem' => 'application/x-x509-user-cert',
|
|
||||||
'p10' => 'application/x-pkcs10',
|
|
||||||
'p12' => 'application/x-pkcs12',
|
|
||||||
'p7a' => 'application/x-pkcs7-signature',
|
|
||||||
'p7c' => 'application/pkcs7-mime',
|
|
||||||
'p7m' => 'application/pkcs7-mime',
|
|
||||||
'p7r' => 'application/x-pkcs7-certreqresp',
|
|
||||||
'p7s' => 'application/pkcs7-signature',
|
|
||||||
'crt' => 'application/x-x509-ca-cert',
|
|
||||||
'crl' => 'application/pkix-crl',
|
|
||||||
'der' => 'application/x-x509-ca-cert',
|
|
||||||
'kdb' => 'application/octet-stream',
|
|
||||||
'pgp' => 'application/pgp',
|
|
||||||
'gpg' => 'application/gpg-keys',
|
|
||||||
'sst' => 'application/octet-stream',
|
|
||||||
'csr' => 'application/octet-stream',
|
|
||||||
'rsa' => 'application/x-pkcs7',
|
|
||||||
'cer' => 'application/pkix-cert',
|
|
||||||
'3g2' => 'video/3gpp2',
|
|
||||||
'3gp' => 'video/3gp',
|
|
||||||
'mp4' => 'video/mp4',
|
|
||||||
'm4a' => 'audio/x-m4a',
|
|
||||||
'f4v' => 'video/mp4',
|
|
||||||
'webm' => 'video/webm',
|
|
||||||
'aac' => 'audio/x-acc',
|
|
||||||
'm4u' => 'application/vnd.mpegurl',
|
|
||||||
'm3u' => 'text/plain',
|
|
||||||
'xspf' => 'application/xspf+xml',
|
|
||||||
'vlc' => 'application/videolan',
|
|
||||||
'wmv' => 'video/x-ms-wmv',
|
|
||||||
'au' => 'audio/x-au',
|
|
||||||
'ac3' => 'audio/ac3',
|
|
||||||
'flac' => 'audio/x-flac',
|
|
||||||
'ogg' => 'audio/ogg',
|
|
||||||
'kmz' => 'application/vnd.google-earth.kmz',
|
|
||||||
'kml' => 'application/vnd.google-earth.kml+xml',
|
|
||||||
'ics' => 'text/calendar',
|
|
||||||
'zsh' => 'text/x-scriptzsh',
|
|
||||||
'7zip' => 'application/x-7z-compressed',
|
|
||||||
'cdr' => 'application/cdr',
|
|
||||||
'wma' => 'audio/x-ms-wma',
|
|
||||||
'jar' => 'application/java-archive',
|
|
||||||
'tex' => 'application/x-tex',
|
|
||||||
'latex' => 'application/x-latex',
|
|
||||||
'odt' => 'application/vnd.oasis.opendocument.text',
|
|
||||||
'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
|
|
||||||
'odp' => 'application/vnd.oasis.opendocument.presentation',
|
|
||||||
'odg' => 'application/vnd.oasis.opendocument.graphics',
|
|
||||||
'odc' => 'application/vnd.oasis.opendocument.chart',
|
|
||||||
'odf' => 'application/vnd.oasis.opendocument.formula',
|
|
||||||
'odi' => 'application/vnd.oasis.opendocument.image',
|
|
||||||
'odm' => 'application/vnd.oasis.opendocument.text-master',
|
|
||||||
'odb' => 'application/vnd.oasis.opendocument.database',
|
|
||||||
'ott' => 'application/vnd.oasis.opendocument.text-template',
|
|
||||||
'webp' => 'image/webp',
|
|
||||||
'ico' => 'image/x-icon',
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Detects MIME Type based on given content.
|
* Detects MIME Type based on given content.
|
||||||
@ -200,18 +41,12 @@ class MimeType
|
|||||||
*/
|
*/
|
||||||
public static function detectByContent($content)
|
public static function detectByContent($content)
|
||||||
{
|
{
|
||||||
if ( ! class_exists('finfo') || ! is_string($content)) {
|
if (is_string($content)) {
|
||||||
return null;
|
return static::detector()->detectMimeTypeFromBuffer($content);
|
||||||
}
|
}
|
||||||
try {
|
|
||||||
$finfo = new finfo(FILEINFO_MIME_TYPE);
|
|
||||||
|
|
||||||
return $finfo->buffer($content) ?: null;
|
return null;
|
||||||
// @codeCoverageIgnoreStart
|
}
|
||||||
} catch (ErrorException $e) {
|
|
||||||
// This is caused by an array to string conversion error.
|
|
||||||
}
|
|
||||||
} // @codeCoverageIgnoreEnd
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Detects MIME Type based on file extension.
|
* Detects MIME Type based on file extension.
|
||||||
@ -222,9 +57,7 @@ class MimeType
|
|||||||
*/
|
*/
|
||||||
public static function detectByFileExtension($extension)
|
public static function detectByFileExtension($extension)
|
||||||
{
|
{
|
||||||
return isset(static::$extensionToMimeTypeMap[$extension])
|
return static::detector()->detectMimeTypeFromPath('artificial.' . $extension) ?: 'text/plain';
|
||||||
? static::$extensionToMimeTypeMap[$extension]
|
|
||||||
: 'text/plain';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -234,9 +67,7 @@ class MimeType
|
|||||||
*/
|
*/
|
||||||
public static function detectByFilename($filename)
|
public static function detectByFilename($filename)
|
||||||
{
|
{
|
||||||
$extension = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
|
return static::detector()->detectMimeTypeFromPath($filename);
|
||||||
|
|
||||||
return empty($extension) ? 'text/plain' : static::detectByFileExtension($extension);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
19
vendor/league/mime-type-detection/LICENSE
vendored
Normal file
19
vendor/league/mime-type-detection/LICENSE
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
Copyright (c) 2013-2020 Frank de Jonge
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is furnished
|
||||||
|
to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
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.
|
24
vendor/league/mime-type-detection/composer.json
vendored
Normal file
24
vendor/league/mime-type-detection/composer.json
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"name": "league/mime-type-detection",
|
||||||
|
"description": "Mime-type detection for Flysystem",
|
||||||
|
"license": "MIT",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Frank de Jonge",
|
||||||
|
"email": "info@frankdejonge.nl"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"require": {
|
||||||
|
"php": "^7.2 || ^8.0",
|
||||||
|
"ext-fileinfo": "*"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^8.5.8",
|
||||||
|
"phpstan/phpstan": "^0.12.36"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"League\\MimeTypeDetection\\": "src"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
13
vendor/league/mime-type-detection/src/EmptyExtensionToMimeTypeMap.php
vendored
Normal file
13
vendor/league/mime-type-detection/src/EmptyExtensionToMimeTypeMap.php
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace League\MimeTypeDetection;
|
||||||
|
|
||||||
|
class EmptyExtensionToMimeTypeMap implements ExtensionToMimeTypeMap
|
||||||
|
{
|
||||||
|
public function lookupMimeType(string $extension): ?string
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
42
vendor/league/mime-type-detection/src/ExtensionMimeTypeDetector.php
vendored
Normal file
42
vendor/league/mime-type-detection/src/ExtensionMimeTypeDetector.php
vendored
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace League\MimeTypeDetection;
|
||||||
|
|
||||||
|
use const PATHINFO_EXTENSION;
|
||||||
|
|
||||||
|
class ExtensionMimeTypeDetector implements MimeTypeDetector
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var ExtensionToMimeTypeMap
|
||||||
|
*/
|
||||||
|
private $extensions;
|
||||||
|
|
||||||
|
public function __construct(ExtensionToMimeTypeMap $extensions = null)
|
||||||
|
{
|
||||||
|
$this->extensions = $extensions ?: new GeneratedExtensionToMimeTypeMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function detectMimeType(string $path, $contents): ?string
|
||||||
|
{
|
||||||
|
return $this->detectMimeTypeFromPath($path);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function detectMimeTypeFromPath(string $path): ?string
|
||||||
|
{
|
||||||
|
$extension = strtolower(pathinfo($path, PATHINFO_EXTENSION));
|
||||||
|
|
||||||
|
return $this->extensions->lookupMimeType($extension);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function detectMimeTypeFromFile(string $path): ?string
|
||||||
|
{
|
||||||
|
return $this->detectMimeTypeFromPath($path);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function detectMimeTypeFromBuffer(string $contents): ?string
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
10
vendor/league/mime-type-detection/src/ExtensionToMimeTypeMap.php
vendored
Normal file
10
vendor/league/mime-type-detection/src/ExtensionToMimeTypeMap.php
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace League\MimeTypeDetection;
|
||||||
|
|
||||||
|
interface ExtensionToMimeTypeMap
|
||||||
|
{
|
||||||
|
public function lookupMimeType(string $extension): ?string;
|
||||||
|
}
|
62
vendor/league/mime-type-detection/src/FinfoMimeTypeDetector.php
vendored
Normal file
62
vendor/league/mime-type-detection/src/FinfoMimeTypeDetector.php
vendored
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace League\MimeTypeDetection;
|
||||||
|
|
||||||
|
use finfo;
|
||||||
|
|
||||||
|
use const FILEINFO_MIME_TYPE;
|
||||||
|
use const PATHINFO_EXTENSION;
|
||||||
|
|
||||||
|
class FinfoMimeTypeDetector implements MimeTypeDetector
|
||||||
|
{
|
||||||
|
private const INCONCLUSIVE_MIME_TYPES = ['application/x-empty', 'text/plain', 'text/x-asm'];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var finfo
|
||||||
|
*/
|
||||||
|
private $finfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var ExtensionToMimeTypeMap
|
||||||
|
*/
|
||||||
|
private $extensionMap;
|
||||||
|
|
||||||
|
public function __construct(string $magicFile = '', ExtensionToMimeTypeMap $extensionMap = null)
|
||||||
|
{
|
||||||
|
$this->finfo = new finfo(FILEINFO_MIME_TYPE, $magicFile);
|
||||||
|
$this->extensionMap = $extensionMap ?: new GeneratedExtensionToMimeTypeMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function detectMimeType(string $path, $contents): ?string
|
||||||
|
{
|
||||||
|
$mimeType = is_string($contents)
|
||||||
|
? (@$this->finfo->buffer($contents) ?: null)
|
||||||
|
: null;
|
||||||
|
|
||||||
|
if ($mimeType !== null && ! in_array($mimeType, self::INCONCLUSIVE_MIME_TYPES)) {
|
||||||
|
return $mimeType;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->detectMimeTypeFromPath($path);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function detectMimeTypeFromPath(string $path): ?string
|
||||||
|
{
|
||||||
|
$extension = strtolower(pathinfo($path, PATHINFO_EXTENSION));
|
||||||
|
|
||||||
|
return $this->extensionMap->lookupMimeType($extension);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function detectMimeTypeFromFile(string $path): ?string
|
||||||
|
{
|
||||||
|
return @$this->finfo->file($path) ?: null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function detectMimeTypeFromBuffer(string $contents): ?string
|
||||||
|
{
|
||||||
|
return @$this->finfo->buffer($contents) ?: null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
1204
vendor/league/mime-type-detection/src/GeneratedExtensionToMimeTypeMap.php
vendored
Normal file
1204
vendor/league/mime-type-detection/src/GeneratedExtensionToMimeTypeMap.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
19
vendor/league/mime-type-detection/src/MimeTypeDetector.php
vendored
Normal file
19
vendor/league/mime-type-detection/src/MimeTypeDetector.php
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace League\MimeTypeDetection;
|
||||||
|
|
||||||
|
interface MimeTypeDetector
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @param string|resource $contents
|
||||||
|
*/
|
||||||
|
public function detectMimeType(string $path, $contents): ?string;
|
||||||
|
|
||||||
|
public function detectMimeTypeFromBuffer(string $contents): ?string;
|
||||||
|
|
||||||
|
public function detectMimeTypeFromPath(string $path): ?string;
|
||||||
|
|
||||||
|
public function detectMimeTypeFromFile(string $path): ?string;
|
||||||
|
}
|
3
vendor/opis/closure/CHANGELOG.md
vendored
3
vendor/opis/closure/CHANGELOG.md
vendored
@ -1,5 +1,8 @@
|
|||||||
CHANGELOG
|
CHANGELOG
|
||||||
---------
|
---------
|
||||||
|
### v3.5.6, 2020.08.11
|
||||||
|
|
||||||
|
- Fixed issue [#70](https://github.com/opis/closure/issues/70)
|
||||||
|
|
||||||
### v3.5.5, 2020.06.17
|
### v3.5.5, 2020.06.17
|
||||||
|
|
||||||
|
14
vendor/opis/closure/functions.php
vendored
14
vendor/opis/closure/functions.php
vendored
@ -10,7 +10,7 @@ namespace Opis\Closure;
|
|||||||
/**
|
/**
|
||||||
* Serialize
|
* Serialize
|
||||||
*
|
*
|
||||||
* @param $data
|
* @param mixed $data
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function serialize($data)
|
function serialize($data)
|
||||||
@ -25,18 +25,16 @@ function serialize($data)
|
|||||||
/**
|
/**
|
||||||
* Unserialize
|
* Unserialize
|
||||||
*
|
*
|
||||||
* @param $data
|
* @param string $data
|
||||||
* @param $options
|
* @param array|null $options
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
function unserialize($data, array $options = null)
|
function unserialize($data, array $options = null)
|
||||||
{
|
{
|
||||||
SerializableClosure::enterContext();
|
SerializableClosure::enterContext();
|
||||||
if ($options === null || PHP_MAJOR_VERSION < 7) {
|
$data = ($options === null || \PHP_MAJOR_VERSION < 7)
|
||||||
$data = \unserialize($data);
|
? \unserialize($data)
|
||||||
} else {
|
: \unserialize($data, $options);
|
||||||
$data = \unserialize($data, $options);
|
|
||||||
}
|
|
||||||
SerializableClosure::unwrapClosures($data);
|
SerializableClosure::unwrapClosures($data);
|
||||||
SerializableClosure::exitContext();
|
SerializableClosure::exitContext();
|
||||||
return $data;
|
return $data;
|
||||||
|
18
vendor/opis/closure/src/ReflectionClosure.php
vendored
18
vendor/opis/closure/src/ReflectionClosure.php
vendored
@ -561,6 +561,22 @@ class ReflectionClosure extends ReflectionFunction
|
|||||||
}
|
}
|
||||||
if(isset($constants[$id_start])){
|
if(isset($constants[$id_start])){
|
||||||
$id_start = $constants[$id_start];
|
$id_start = $constants[$id_start];
|
||||||
|
} elseif($context === 'new'){
|
||||||
|
if(in_array($id_start_ci, $class_keywords)) {
|
||||||
|
if (!$inside_structure) {
|
||||||
|
$isUsingScope = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ($classes === null) {
|
||||||
|
$classes = $this->getClasses();
|
||||||
|
}
|
||||||
|
if (isset($classes[$id_start_ci])) {
|
||||||
|
$id_start = $classes[$id_start_ci];
|
||||||
|
}
|
||||||
|
if ($id_start[0] !== '\\') {
|
||||||
|
$id_start = $nsf . '\\' . $id_start;
|
||||||
|
}
|
||||||
|
}
|
||||||
} elseif($context === 'use' ||
|
} elseif($context === 'use' ||
|
||||||
$context === 'instanceof' ||
|
$context === 'instanceof' ||
|
||||||
$context === 'args' ||
|
$context === 'args' ||
|
||||||
@ -568,7 +584,7 @@ class ReflectionClosure extends ReflectionFunction
|
|||||||
$context === 'extends' ||
|
$context === 'extends' ||
|
||||||
$context === 'root'
|
$context === 'root'
|
||||||
){
|
){
|
||||||
if($id_start_ci === 'self' || $id_start_ci === 'static' || $id_start_ci === 'parent'){
|
if(in_array($id_start_ci, $class_keywords)){
|
||||||
if (!$inside_structure && !$id_start_ci === 'static') {
|
if (!$inside_structure && !$id_start_ci === 'static') {
|
||||||
$isUsingScope = true;
|
$isUsingScope = true;
|
||||||
}
|
}
|
||||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// This file is automatically generated at:2020-08-05 11:00:24
|
// This file is automatically generated at:2020-08-12 09:59:33
|
||||||
declare (strict_types = 1);
|
declare (strict_types = 1);
|
||||||
return array (
|
return array (
|
||||||
0 => 'think\\admin\\Library',
|
0 => 'think\\admin\\Library',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user