up
This commit is contained in:
parent
26f7a501d9
commit
c8b45b4958
94
composer.lock
generated
94
composer.lock
generated
@ -8,16 +8,16 @@
|
||||
"packages": [
|
||||
{
|
||||
"name": "league/flysystem",
|
||||
"version": "1.0.70",
|
||||
"version": "1.1.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem.git",
|
||||
"reference": "585824702f534f8d3cf7fab7225e8466cc4b7493"
|
||||
"reference": "9be3b16c877d477357c015cec057548cf9b2a14a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/585824702f534f8d3cf7fab7225e8466cc4b7493",
|
||||
"reference": "585824702f534f8d3cf7fab7225e8466cc4b7493",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/9be3b16c877d477357c015cec057548cf9b2a14a",
|
||||
"reference": "9be3b16c877d477357c015cec057548cf9b2a14a",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -28,14 +28,15 @@
|
||||
},
|
||||
"require": {
|
||||
"ext-fileinfo": "*",
|
||||
"php": ">=5.5.9"
|
||||
"league/mime-type-detection": "^1.3",
|
||||
"php": "^7.2.5 || ^8.0"
|
||||
},
|
||||
"conflict": {
|
||||
"league/flysystem-sftp": "<1.0.6"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpspec/phpspec": "^3.4 || ^4.0 || ^5.0 || ^6.0",
|
||||
"phpunit/phpunit": "^5.7.26"
|
||||
"phpspec/prophecy": "^1.11.1",
|
||||
"phpunit/phpunit": "^8.5.8"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-fileinfo": "Required for MimeType",
|
||||
@ -94,7 +95,7 @@
|
||||
"sftp",
|
||||
"storage"
|
||||
],
|
||||
"time": "2020-07-26T07:20:36+00:00"
|
||||
"time": "2020-08-23T07:39:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem-cached-adapter",
|
||||
@ -150,17 +151,64 @@
|
||||
"time": "2020-07-25T15:56:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "opis/closure",
|
||||
"version": "3.5.5",
|
||||
"name": "league/mime-type-detection",
|
||||
"version": "1.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/opis/closure.git",
|
||||
"reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c"
|
||||
"url": "https://github.com/thephpleague/mime-type-detection.git",
|
||||
"reference": "fda190b62b962d96a069fcc414d781db66d65b69"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/opis/closure/zipball/dec9fc5ecfca93f45cd6121f8e6f14457dff372c",
|
||||
"reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c",
|
||||
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/fda190b62b962d96a069fcc414d781db66d65b69",
|
||||
"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",
|
||||
"time": "2020-08-09T10:34:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "opis/closure",
|
||||
"version": "3.5.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/opis/closure.git",
|
||||
"reference": "4531e53afe2fc660403e76fb7644e95998bff7bf"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/opis/closure/zipball/4531e53afe2fc660403e76fb7644e95998bff7bf",
|
||||
"reference": "4531e53afe2fc660403e76fb7644e95998bff7bf",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -214,7 +262,7 @@
|
||||
"serialization",
|
||||
"serialize"
|
||||
],
|
||||
"time": "2020-06-17T14:59:55+00:00"
|
||||
"time": "2020-09-06T17:02:15+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpmailer/phpmailer",
|
||||
@ -970,7 +1018,7 @@
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.18.0",
|
||||
"version": "v1.18.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
@ -1039,7 +1087,7 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php72",
|
||||
"version": "v1.18.0",
|
||||
"version": "v1.18.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php72.git",
|
||||
@ -1104,7 +1152,7 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php80",
|
||||
"version": "v1.18.0",
|
||||
"version": "v1.18.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php80.git",
|
||||
@ -1176,16 +1224,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/var-dumper",
|
||||
"version": "v4.4.11",
|
||||
"version": "v4.4.13",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/var-dumper.git",
|
||||
"reference": "2125805a1a4e57f2340bc566c3013ca94d2722dc"
|
||||
"reference": "1bef32329f3166486ab7cb88599cae4875632b99"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/2125805a1a4e57f2340bc566c3013ca94d2722dc",
|
||||
"reference": "2125805a1a4e57f2340bc566c3013ca94d2722dc",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/1bef32329f3166486ab7cb88599cae4875632b99",
|
||||
"reference": "1bef32329f3166486ab7cb88599cae4875632b99",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -1255,7 +1303,7 @@
|
||||
"debug",
|
||||
"dump"
|
||||
],
|
||||
"time": "2020-06-24T13:34:53+00:00"
|
||||
"time": "2020-08-17T07:31:35+00:00"
|
||||
},
|
||||
{
|
||||
"name": "topthink/think-trace",
|
||||
|
1
vendor/composer/autoload_psr4.php
vendored
1
vendor/composer/autoload_psr4.php
vendored
@ -23,6 +23,7 @@ return array(
|
||||
'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
|
||||
'PHPMailer\\PHPMailer\\' => array($vendorDir . '/phpmailer/phpmailer/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\\' => array($vendorDir . '/league/flysystem/src'),
|
||||
);
|
||||
|
5
vendor/composer/autoload_static.php
vendored
5
vendor/composer/autoload_static.php
vendored
@ -52,6 +52,7 @@ class ComposerStaticInit1b32198725235c8d6500c87262ef30c2
|
||||
),
|
||||
'L' =>
|
||||
array (
|
||||
'League\\MimeTypeDetection\\' => 25,
|
||||
'League\\Flysystem\\Cached\\' => 24,
|
||||
'League\\Flysystem\\' => 17,
|
||||
),
|
||||
@ -130,6 +131,10 @@ class ComposerStaticInit1b32198725235c8d6500c87262ef30c2
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/opis/closure/src',
|
||||
),
|
||||
'League\\MimeTypeDetection\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/league/mime-type-detection/src',
|
||||
),
|
||||
'League\\Flysystem\\Cached\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/league/flysystem-cached-adapter/src',
|
||||
|
108
vendor/composer/installed.json
vendored
108
vendor/composer/installed.json
vendored
@ -1,17 +1,17 @@
|
||||
[
|
||||
{
|
||||
"name": "league/flysystem",
|
||||
"version": "1.0.70",
|
||||
"version_normalized": "1.0.70.0",
|
||||
"version": "1.1.3",
|
||||
"version_normalized": "1.1.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem.git",
|
||||
"reference": "585824702f534f8d3cf7fab7225e8466cc4b7493"
|
||||
"reference": "9be3b16c877d477357c015cec057548cf9b2a14a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/585824702f534f8d3cf7fab7225e8466cc4b7493",
|
||||
"reference": "585824702f534f8d3cf7fab7225e8466cc4b7493",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/9be3b16c877d477357c015cec057548cf9b2a14a",
|
||||
"reference": "9be3b16c877d477357c015cec057548cf9b2a14a",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -22,14 +22,15 @@
|
||||
},
|
||||
"require": {
|
||||
"ext-fileinfo": "*",
|
||||
"php": ">=5.5.9"
|
||||
"league/mime-type-detection": "^1.3",
|
||||
"php": "^7.2.5 || ^8.0"
|
||||
},
|
||||
"conflict": {
|
||||
"league/flysystem-sftp": "<1.0.6"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpspec/phpspec": "^3.4 || ^4.0 || ^5.0 || ^6.0",
|
||||
"phpunit/phpunit": "^5.7.26"
|
||||
"phpspec/prophecy": "^1.11.1",
|
||||
"phpunit/phpunit": "^8.5.8"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-fileinfo": "Required for MimeType",
|
||||
@ -47,7 +48,7 @@
|
||||
"spatie/flysystem-dropbox": "Allows you to use Dropbox storage",
|
||||
"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-23T07:39:11+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
@ -147,18 +148,67 @@
|
||||
"description": "An adapter decorator to enable meta-data caching."
|
||||
},
|
||||
{
|
||||
"name": "opis/closure",
|
||||
"version": "3.5.5",
|
||||
"version_normalized": "3.5.5.0",
|
||||
"name": "league/mime-type-detection",
|
||||
"version": "1.4.0",
|
||||
"version_normalized": "1.4.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/opis/closure.git",
|
||||
"reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c"
|
||||
"url": "https://github.com/thephpleague/mime-type-detection.git",
|
||||
"reference": "fda190b62b962d96a069fcc414d781db66d65b69"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/opis/closure/zipball/dec9fc5ecfca93f45cd6121f8e6f14457dff372c",
|
||||
"reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c",
|
||||
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/fda190b62b962d96a069fcc414d781db66d65b69",
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"name": "opis/closure",
|
||||
"version": "3.5.7",
|
||||
"version_normalized": "3.5.7.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/opis/closure.git",
|
||||
"reference": "4531e53afe2fc660403e76fb7644e95998bff7bf"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/opis/closure/zipball/4531e53afe2fc660403e76fb7644e95998bff7bf",
|
||||
"reference": "4531e53afe2fc660403e76fb7644e95998bff7bf",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -174,7 +224,7 @@
|
||||
"jeremeamia/superclosure": "^2.0",
|
||||
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
|
||||
},
|
||||
"time": "2020-06-17T14:59:55+00:00",
|
||||
"time": "2020-09-06T17:02:15+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
@ -509,8 +559,8 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.18.0",
|
||||
"version_normalized": "1.18.0.0",
|
||||
"version": "v1.18.1",
|
||||
"version_normalized": "1.18.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
@ -580,8 +630,8 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php72",
|
||||
"version": "v1.18.0",
|
||||
"version_normalized": "1.18.0.0",
|
||||
"version": "v1.18.1",
|
||||
"version_normalized": "1.18.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php72.git",
|
||||
@ -647,8 +697,8 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php80",
|
||||
"version": "v1.18.0",
|
||||
"version_normalized": "1.18.0.0",
|
||||
"version": "v1.18.1",
|
||||
"version_normalized": "1.18.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php80.git",
|
||||
@ -721,17 +771,17 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/var-dumper",
|
||||
"version": "v4.4.11",
|
||||
"version_normalized": "4.4.11.0",
|
||||
"version": "v4.4.13",
|
||||
"version_normalized": "4.4.13.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/var-dumper.git",
|
||||
"reference": "2125805a1a4e57f2340bc566c3013ca94d2722dc"
|
||||
"reference": "1bef32329f3166486ab7cb88599cae4875632b99"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/2125805a1a4e57f2340bc566c3013ca94d2722dc",
|
||||
"reference": "2125805a1a4e57f2340bc566c3013ca94d2722dc",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/1bef32329f3166486ab7cb88599cae4875632b99",
|
||||
"reference": "1bef32329f3166486ab7cb88599cae4875632b99",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -761,7 +811,7 @@
|
||||
"ext-intl": "To show region name in time zone dump",
|
||||
"symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script"
|
||||
},
|
||||
"time": "2020-06-24T13:34:53+00:00",
|
||||
"time": "2020-08-17T07:31:35+00:00",
|
||||
"bin": [
|
||||
"Resources/bin/var-dump-server"
|
||||
],
|
||||
|
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": {
|
||||
"php": ">=5.5.9",
|
||||
"ext-fileinfo": "*"
|
||||
"php": "^7.2.5 || ^8.0",
|
||||
"ext-fileinfo": "*",
|
||||
"league/mime-type-detection": "^1.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpspec/phpspec": "^3.4 || ^4.0 || ^5.0 || ^6.0",
|
||||
"phpunit/phpunit": "^5.7.26"
|
||||
"phpspec/prophecy": "^1.11.1",
|
||||
"phpunit/phpunit": "^8.5.8"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@ -36,10 +37,7 @@
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"League\\Flysystem\\Stub\\": "stub/"
|
||||
},
|
||||
"files": [
|
||||
"tests/PHPUnitHacks.php"
|
||||
]
|
||||
}
|
||||
},
|
||||
"suggest": {
|
||||
"ext-fileinfo": "Required for MimeType",
|
||||
|
@ -440,7 +440,13 @@ abstract class AbstractFtpAdapter extends AbstractAdapter
|
||||
$path = $base === '' ? $name : $base . $this->separator . $name;
|
||||
|
||||
if ($type === 'dir') {
|
||||
return compact('type', 'path');
|
||||
$result = compact('type', 'path');
|
||||
if ($this->enableTimestampsOnUnixListings) {
|
||||
$timestamp = $this->normalizeUnixTimestamp($month, $day, $timeOrYear);
|
||||
$result += compact('timestamp');
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
$permissions = $this->normalizePermissions($permissions);
|
||||
@ -639,10 +645,7 @@ abstract class AbstractFtpAdapter extends AbstractAdapter
|
||||
*/
|
||||
public function getConnection()
|
||||
{
|
||||
$tries = 0;
|
||||
|
||||
while ( ! $this->isConnected() && $tries < 3) {
|
||||
$tries++;
|
||||
if ( ! $this->isConnected()) {
|
||||
$this->disconnect();
|
||||
$this->connect();
|
||||
}
|
||||
@ -694,4 +697,9 @@ abstract class AbstractFtpAdapter extends AbstractAdapter
|
||||
* @return bool
|
||||
*/
|
||||
abstract public function isConnected();
|
||||
|
||||
protected function escapePath($path)
|
||||
{
|
||||
return str_replace(['*', '[', ']'], ['\\*', '\\[', '\\]'], $path);
|
||||
}
|
||||
}
|
||||
|
13
vendor/league/flysystem/src/Adapter/Ftp.php
vendored
13
vendor/league/flysystem/src/Adapter/Ftp.php
vendored
@ -2,7 +2,6 @@
|
||||
|
||||
namespace League\Flysystem\Adapter;
|
||||
|
||||
use ErrorException;
|
||||
use League\Flysystem\Adapter\Polyfill\StreamedCopyTrait;
|
||||
use League\Flysystem\AdapterInterface;
|
||||
use League\Flysystem\Config;
|
||||
@ -130,6 +129,9 @@ class Ftp extends AbstractFtpAdapter
|
||||
*/
|
||||
public function connect()
|
||||
{
|
||||
$tries = 3;
|
||||
start_connecting:
|
||||
|
||||
if ($this->ssl) {
|
||||
$this->connection = @ftp_ssl_connect($this->getHost(), $this->getPort(), $this->getTimeout());
|
||||
} else {
|
||||
@ -137,6 +139,10 @@ class Ftp extends AbstractFtpAdapter
|
||||
}
|
||||
|
||||
if ( ! $this->connection) {
|
||||
$tries--;
|
||||
|
||||
if ($tries > 0) goto start_connecting;
|
||||
|
||||
throw new ConnectionRuntimeException('Could not connect to host: ' . $this->getHost() . ', port:' . $this->getPort());
|
||||
}
|
||||
|
||||
@ -394,7 +400,7 @@ class Ftp extends AbstractFtpAdapter
|
||||
return ['type' => 'dir', 'path' => $path];
|
||||
}
|
||||
|
||||
$listing = $this->ftpRawlist('-A', str_replace('*', '\\*', $path));
|
||||
$listing = $this->ftpRawlist('-A', $path);
|
||||
|
||||
if (empty($listing) || in_array('total 0', $listing, true)) {
|
||||
return false;
|
||||
@ -490,8 +496,6 @@ class Ftp extends AbstractFtpAdapter
|
||||
*/
|
||||
protected function listDirectoryContents($directory, $recursive = true)
|
||||
{
|
||||
$directory = str_replace('*', '\\*', $directory);
|
||||
|
||||
if ($recursive && $this->recurseManually) {
|
||||
return $this->listDirectoryContentsRecursive($directory);
|
||||
}
|
||||
@ -560,6 +564,7 @@ class Ftp extends AbstractFtpAdapter
|
||||
|
||||
if ($this->isPureFtpd) {
|
||||
$path = str_replace(' ', '\ ', $path);
|
||||
$this->escapePath($path);
|
||||
}
|
||||
|
||||
return ftp_rawlist($connection, $options . ' ' . $path);
|
||||
|
7
vendor/league/flysystem/src/Adapter/Ftpd.php
vendored
7
vendor/league/flysystem/src/Adapter/Ftpd.php
vendored
@ -12,13 +12,16 @@ class Ftpd extends Ftp
|
||||
if ($path === '') {
|
||||
return ['type' => 'dir', 'path' => ''];
|
||||
}
|
||||
|
||||
if (@ftp_chdir($this->getConnection(), $path) === true) {
|
||||
$this->setConnectionRoot();
|
||||
|
||||
return ['type' => 'dir', 'path' => $path];
|
||||
}
|
||||
|
||||
if ( ! ($object = ftp_raw($this->getConnection(), 'STAT ' . $path)) || count($object) < 3) {
|
||||
$object = ftp_raw($this->getConnection(), 'STAT ' . $this->escapePath($path));
|
||||
|
||||
if ( ! $object || count($object) < 3) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -34,7 +37,7 @@ class Ftpd extends Ftp
|
||||
*/
|
||||
protected function listDirectoryContents($directory, $recursive = true)
|
||||
{
|
||||
$listing = ftp_rawlist($this->getConnection(), $directory, $recursive);
|
||||
$listing = ftp_rawlist($this->getConnection(), $this->escapePath($directory), $recursive);
|
||||
|
||||
if ($listing === false || ( ! empty($listing) && substr($listing[0], 0, 5) === "ftpd:")) {
|
||||
return [];
|
||||
|
6
vendor/league/flysystem/src/Filesystem.php
vendored
6
vendor/league/flysystem/src/Filesystem.php
vendored
@ -74,7 +74,7 @@ class Filesystem implements FilesystemInterface
|
||||
*/
|
||||
public function writeStream($path, $resource, array $config = [])
|
||||
{
|
||||
if ( ! is_resource($resource)) {
|
||||
if ( ! is_resource($resource) || get_resource_type($resource) !== 'stream') {
|
||||
throw new InvalidArgumentException(__METHOD__ . ' expects argument #2 to be a valid resource.');
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ class Filesystem implements FilesystemInterface
|
||||
*/
|
||||
public function putStream($path, $resource, array $config = [])
|
||||
{
|
||||
if ( ! is_resource($resource)) {
|
||||
if ( ! is_resource($resource) || get_resource_type($resource) !== 'stream') {
|
||||
throw new InvalidArgumentException(__METHOD__ . ' expects argument #2 to be a valid resource.');
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ class Filesystem implements FilesystemInterface
|
||||
*/
|
||||
public function updateStream($path, $resource, array $config = [])
|
||||
{
|
||||
if ( ! is_resource($resource)) {
|
||||
if ( ! is_resource($resource) || get_resource_type($resource) !== 'stream') {
|
||||
throw new InvalidArgumentException(__METHOD__ . ' expects argument #2 to be a valid resource.');
|
||||
}
|
||||
|
||||
|
231
vendor/league/flysystem/src/Util/MimeType.php
vendored
231
vendor/league/flysystem/src/Util/MimeType.php
vendored
@ -2,241 +2,72 @@
|
||||
|
||||
namespace League\Flysystem\Util;
|
||||
|
||||
use ErrorException;
|
||||
use finfo;
|
||||
use League\MimeTypeDetection\FinfoMimeTypeDetector;
|
||||
use League\MimeTypeDetection\GeneratedExtensionToMimeTypeMap;
|
||||
use League\MimeTypeDetection\MimeTypeDetector;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
class MimeType
|
||||
{
|
||||
protected static $extensionToMimeTypeMap = [
|
||||
'hqx' => 'application/mac-binhex40',
|
||||
'cpt' => 'application/mac-compactpro',
|
||||
'csv' => 'text/csv',
|
||||
'bin' => 'application/octet-stream',
|
||||
'dms' => 'application/octet-stream',
|
||||
'lha' => 'application/octet-stream',
|
||||
'lzh' => 'application/octet-stream',
|
||||
'exe' => 'application/octet-stream',
|
||||
'class' => 'application/octet-stream',
|
||||
'psd' => 'application/x-photoshop',
|
||||
'so' => 'application/octet-stream',
|
||||
'sea' => 'application/octet-stream',
|
||||
'dll' => 'application/octet-stream',
|
||||
'oda' => 'application/oda',
|
||||
'pdf' => 'application/pdf',
|
||||
'ai' => 'application/pdf',
|
||||
'eps' => 'application/postscript',
|
||||
'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',
|
||||
];
|
||||
protected static $extensionToMimeTypeMap = GeneratedExtensionToMimeTypeMap::MIME_TYPES_FOR_EXTENSIONS;
|
||||
protected static $detector;
|
||||
|
||||
public static function useDetector(MimeTypeDetector $detector)
|
||||
{
|
||||
static::$detector = $detector;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return MimeTypeDetector
|
||||
*/
|
||||
protected static function detector()
|
||||
{
|
||||
if ( ! static::$detector instanceof MimeTypeDetector) {
|
||||
static::$detector = new FinfoMimeTypeDetector();
|
||||
}
|
||||
|
||||
return static::$detector;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Detects MIME Type based on given content.
|
||||
*
|
||||
* @param mixed $content
|
||||
*
|
||||
* @return string|null MIME Type or NULL if no mime type detected
|
||||
* @return string MIME Type
|
||||
*/
|
||||
public static function detectByContent($content)
|
||||
{
|
||||
if ( ! class_exists('finfo') || ! is_string($content)) {
|
||||
return null;
|
||||
if (is_string($content)) {
|
||||
return static::detector()->detectMimeTypeFromBuffer($content);
|
||||
}
|
||||
try {
|
||||
$finfo = new finfo(FILEINFO_MIME_TYPE);
|
||||
|
||||
return $finfo->buffer($content) ?: null;
|
||||
// @codeCoverageIgnoreStart
|
||||
} catch (ErrorException $e) {
|
||||
// This is caused by an array to string conversion error.
|
||||
return 'text/plain';
|
||||
}
|
||||
} // @codeCoverageIgnoreEnd
|
||||
|
||||
/**
|
||||
* Detects MIME Type based on file extension.
|
||||
*
|
||||
* @param string $extension
|
||||
*
|
||||
* @return string|null MIME Type or NULL if no extension detected
|
||||
* @return string MIME Type
|
||||
*/
|
||||
public static function detectByFileExtension($extension)
|
||||
{
|
||||
return isset(static::$extensionToMimeTypeMap[$extension])
|
||||
? static::$extensionToMimeTypeMap[$extension]
|
||||
: 'text/plain';
|
||||
return static::detector()->detectMimeTypeFromPath('artificial.' . $extension) ?: 'text/plain';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $filename
|
||||
*
|
||||
* @return string|null MIME Type or NULL if no extension detected
|
||||
* @return string MIME Type
|
||||
*/
|
||||
public static function detectByFilename($filename)
|
||||
{
|
||||
$extension = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
|
||||
|
||||
return empty($extension) ? 'text/plain' : static::detectByFileExtension($extension);
|
||||
return static::detector()->detectMimeTypeFromPath($filename) ?: 'text/plain';
|
||||
}
|
||||
|
||||
/**
|
||||
|
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;
|
||||
}
|
8
vendor/opis/closure/CHANGELOG.md
vendored
8
vendor/opis/closure/CHANGELOG.md
vendored
@ -1,5 +1,13 @@
|
||||
CHANGELOG
|
||||
---------
|
||||
### v3.5.7, 2020.09.06
|
||||
|
||||
- Fixed issue [#76](https://github.com/opis/closure/issues/76).
|
||||
- Fixed issue [#78](https://github.com/opis/closure/issues/78).
|
||||
|
||||
### v3.5.6, 2020.08.11
|
||||
|
||||
- Fixed issue [#70](https://github.com/opis/closure/issues/70)
|
||||
|
||||
### 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
|
||||
*
|
||||
* @param $data
|
||||
* @param mixed $data
|
||||
* @return string
|
||||
*/
|
||||
function serialize($data)
|
||||
@ -25,18 +25,16 @@ function serialize($data)
|
||||
/**
|
||||
* Unserialize
|
||||
*
|
||||
* @param $data
|
||||
* @param $options
|
||||
* @param string $data
|
||||
* @param array|null $options
|
||||
* @return mixed
|
||||
*/
|
||||
function unserialize($data, array $options = null)
|
||||
{
|
||||
SerializableClosure::enterContext();
|
||||
if ($options === null || PHP_MAJOR_VERSION < 7) {
|
||||
$data = \unserialize($data);
|
||||
} else {
|
||||
$data = \unserialize($data, $options);
|
||||
}
|
||||
$data = ($options === null || \PHP_MAJOR_VERSION < 7)
|
||||
? \unserialize($data)
|
||||
: \unserialize($data, $options);
|
||||
SerializableClosure::unwrapClosures($data);
|
||||
SerializableClosure::exitContext();
|
||||
return $data;
|
||||
|
22
vendor/opis/closure/src/ReflectionClosure.php
vendored
22
vendor/opis/closure/src/ReflectionClosure.php
vendored
@ -521,6 +521,10 @@ class ReflectionClosure extends ReflectionFunction
|
||||
}
|
||||
if(isset($functions[$id_start_ci])){
|
||||
$id_start = $functions[$id_start_ci];
|
||||
} elseif ($nsf !== '\\' && function_exists($nsf . '\\' . $id_start)) {
|
||||
$id_start = $nsf . '\\' . $id_start;
|
||||
// Cache it to functions array
|
||||
$functions[$id_start_ci] = $id_start;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -561,6 +565,22 @@ class ReflectionClosure extends ReflectionFunction
|
||||
}
|
||||
if(isset($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' ||
|
||||
$context === 'instanceof' ||
|
||||
$context === 'args' ||
|
||||
@ -568,7 +588,7 @@ class ReflectionClosure extends ReflectionFunction
|
||||
$context === 'extends' ||
|
||||
$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') {
|
||||
$isUsingScope = true;
|
||||
}
|
||||
|
12
vendor/opis/closure/src/SerializableClosure.php
vendored
12
vendor/opis/closure/src/SerializableClosure.php
vendored
@ -419,6 +419,9 @@ class SerializableClosure implements Serializable
|
||||
continue;
|
||||
}
|
||||
$property->setAccessible(true);
|
||||
if (PHP_VERSION >= 7.4 && !$property->isInitialized($instance)) {
|
||||
continue;
|
||||
}
|
||||
$value = $property->getValue($instance);
|
||||
if(is_array($value) || is_object($value)){
|
||||
static::wrapClosures($value, $storage);
|
||||
@ -480,6 +483,9 @@ class SerializableClosure implements Serializable
|
||||
continue;
|
||||
}
|
||||
$property->setAccessible(true);
|
||||
if (PHP_VERSION >= 7.4 && !$property->isInitialized($data)) {
|
||||
continue;
|
||||
}
|
||||
$value = $property->getValue($data);
|
||||
if(is_array($value) || is_object($value)){
|
||||
static::unwrapClosures($value, $storage);
|
||||
@ -561,6 +567,9 @@ class SerializableClosure implements Serializable
|
||||
continue;
|
||||
}
|
||||
$property->setAccessible(true);
|
||||
if (PHP_VERSION >= 7.4 && !$property->isInitialized($data)) {
|
||||
continue;
|
||||
}
|
||||
$item = $property->getValue($data);
|
||||
if ($item instanceof SerializableClosure || ($item instanceof SelfReference && $item->hash === $this->code['self'])) {
|
||||
$this->code['objects'][] = array(
|
||||
@ -653,6 +662,9 @@ class SerializableClosure implements Serializable
|
||||
continue;
|
||||
}
|
||||
$property->setAccessible(true);
|
||||
if (PHP_VERSION >= 7.4 && !$property->isInitialized($instance)) {
|
||||
continue;
|
||||
}
|
||||
$value = $property->getValue($instance);
|
||||
if(is_array($value) || is_object($value)){
|
||||
$this->mapByReference($value);
|
||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// This file is automatically generated at:2020-07-31 15:28:52
|
||||
// This file is automatically generated at:2020-09-20 15:13:17
|
||||
declare (strict_types = 1);
|
||||
return array (
|
||||
0 => 'think\\captcha\\CaptchaService',
|
||||
|
@ -114,7 +114,6 @@ class VarCloner extends AbstractCloner
|
||||
case \is_int($v):
|
||||
case \is_float($v):
|
||||
continue 2;
|
||||
|
||||
case \is_string($v):
|
||||
if ('' === $v) {
|
||||
continue 2;
|
||||
|
@ -273,6 +273,10 @@ class CliDumper extends AbstractDumper
|
||||
*/
|
||||
public function enterHash(Cursor $cursor, $type, $class, $hasChild)
|
||||
{
|
||||
if (null === $this->colors) {
|
||||
$this->colors = $this->supportsColors();
|
||||
}
|
||||
|
||||
$this->dumpKey($cursor);
|
||||
$attr = $cursor->attr;
|
||||
|
||||
@ -287,8 +291,7 @@ class CliDumper extends AbstractDumper
|
||||
} elseif (Cursor::HASH_RESOURCE === $type) {
|
||||
$prefix = $this->style('note', $class.' resource', $attr).($hasChild ? ' {' : ' ');
|
||||
} else {
|
||||
$unstyledPrefix = $class && !(self::DUMP_LIGHT_ARRAY & $this->flags) ? 'array:'.$class : '';
|
||||
$prefix = $this->style('note', $unstyledPrefix, $attr).($unstyledPrefix ? ' [' : '[');
|
||||
$prefix = $class && !(self::DUMP_LIGHT_ARRAY & $this->flags) ? $this->style('note', 'array:'.$class).' [' : '[';
|
||||
}
|
||||
|
||||
if (($cursor->softRefCount || 0 < $cursor->softRefHandle) && empty($attr['cut_hash'])) {
|
||||
|
6
vendor/symfony/var-dumper/VarDumper.php
vendored
6
vendor/symfony/var-dumper/VarDumper.php
vendored
@ -53,6 +53,12 @@ class VarDumper
|
||||
public static function setHandler(callable $callable = null)
|
||||
{
|
||||
$prevHandler = self::$handler;
|
||||
|
||||
// Prevent replacing the handler with expected format as soon as the env var was set:
|
||||
if (isset($_SERVER['VAR_DUMPER_FORMAT'])) {
|
||||
return $prevHandler;
|
||||
}
|
||||
|
||||
self::$handler = $callable;
|
||||
|
||||
return $prevHandler;
|
||||
|
Loading…
x
Reference in New Issue
Block a user