mirror of
https://github.com/freescout-helpdesk/freescout.git
synced 2025-01-31 20:11:38 +01:00
Add vendor files to dist
This commit is contained in:
parent
66c1ca83d9
commit
fbf2f1f063
55
vendor/composer/autoload_classmap.php
vendored
55
vendor/composer/autoload_classmap.php
vendored
@ -14,6 +14,7 @@ return array(
|
||||
'App\\Console\\Commands\\Build' => $baseDir . '/app/Console/Commands/Build.php',
|
||||
'App\\Console\\Commands\\CheckConvViewers' => $baseDir . '/app/Console/Commands/CheckConvViewers.php',
|
||||
'App\\Console\\Commands\\CheckRequirements' => $baseDir . '/app/Console/Commands/CheckRequirements.php',
|
||||
'App\\Console\\Commands\\CleanNotificationsTable' => $baseDir . '/app/Console/Commands/CleanNotificationsTable.php',
|
||||
'App\\Console\\Commands\\CleanSendLog' => $baseDir . '/app/Console/Commands/CleanSendLog.php',
|
||||
'App\\Console\\Commands\\CleanTmp' => $baseDir . '/app/Console/Commands/CleanTmp.php',
|
||||
'App\\Console\\Commands\\ClearCache' => $baseDir . '/app/Console/Commands/ClearCache.php',
|
||||
@ -27,6 +28,7 @@ return array(
|
||||
'App\\Console\\Commands\\ModuleCheckLicenses' => $baseDir . '/app/Console/Commands/ModuleCheckLicenses.php',
|
||||
'App\\Console\\Commands\\ModuleInstall' => $baseDir . '/app/Console/Commands/ModuleInstall.php',
|
||||
'App\\Console\\Commands\\ModuleLaroute' => $baseDir . '/app/Console/Commands/ModuleLaroute.php',
|
||||
'App\\Console\\Commands\\ModuleUpdate' => $baseDir . '/app/Console/Commands/ModuleUpdate.php',
|
||||
'App\\Console\\Commands\\SendMonitor' => $baseDir . '/app/Console/Commands/SendMonitor.php',
|
||||
'App\\Console\\Commands\\TestWebklex' => $baseDir . '/app/Console/Commands/TestWebklex.php',
|
||||
'App\\Console\\Commands\\Update' => $baseDir . '/app/Console/Commands/Update.php',
|
||||
@ -35,6 +37,7 @@ return array(
|
||||
'App\\Conversation' => $baseDir . '/app/Conversation.php',
|
||||
'App\\ConversationFolder' => $baseDir . '/app/ConversationFolder.php',
|
||||
'App\\Customer' => $baseDir . '/app/Customer.php',
|
||||
'App\\CustomerChannel' => $baseDir . '/app/CustomerChannel.php',
|
||||
'App\\Email' => $baseDir . '/app/Email.php',
|
||||
'App\\Events\\ConversationCustomerChanged' => $baseDir . '/app/Events/ConversationCustomerChanged.php',
|
||||
'App\\Events\\ConversationStatusChanged' => $baseDir . '/app/Events/ConversationStatusChanged.php',
|
||||
@ -123,6 +126,7 @@ return array(
|
||||
'App\\MailboxUser' => $baseDir . '/app/MailboxUser.php',
|
||||
'App\\Misc\\Helper' => $baseDir . '/app/Misc/Helper.php',
|
||||
'App\\Misc\\Mail' => $baseDir . '/app/Misc/Mail.php',
|
||||
'App\\Misc\\SwiftGetSmtpQueueId' => $baseDir . '/app/Misc/SwiftGetSmtpQueueId.php',
|
||||
'App\\Misc\\WpApi' => $baseDir . '/app/Misc/WpApi.php',
|
||||
'App\\Module' => $baseDir . '/app/Module.php',
|
||||
'App\\Notifications\\BroadcastNotification' => $baseDir . '/app/Notifications/BroadcastNotification.php',
|
||||
@ -709,6 +713,7 @@ return array(
|
||||
'GuzzleHttp\\Exception\\ClientException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/ClientException.php',
|
||||
'GuzzleHttp\\Exception\\ConnectException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/ConnectException.php',
|
||||
'GuzzleHttp\\Exception\\GuzzleException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/GuzzleException.php',
|
||||
'GuzzleHttp\\Exception\\InvalidArgumentException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php',
|
||||
'GuzzleHttp\\Exception\\RequestException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/RequestException.php',
|
||||
'GuzzleHttp\\Exception\\SeekException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/SeekException.php',
|
||||
'GuzzleHttp\\Exception\\ServerException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/ServerException.php',
|
||||
@ -748,28 +753,36 @@ return array(
|
||||
'GuzzleHttp\\Psr7\\CachingStream' => $vendorDir . '/guzzlehttp/psr7/src/CachingStream.php',
|
||||
'GuzzleHttp\\Psr7\\DroppingStream' => $vendorDir . '/guzzlehttp/psr7/src/DroppingStream.php',
|
||||
'GuzzleHttp\\Psr7\\FnStream' => $vendorDir . '/guzzlehttp/psr7/src/FnStream.php',
|
||||
'GuzzleHttp\\Psr7\\Header' => $vendorDir . '/guzzlehttp/psr7/src/Header.php',
|
||||
'GuzzleHttp\\Psr7\\InflateStream' => $vendorDir . '/guzzlehttp/psr7/src/InflateStream.php',
|
||||
'GuzzleHttp\\Psr7\\LazyOpenStream' => $baseDir . '/overrides/guzzlehttp/psr7/src/LazyOpenStream.php',
|
||||
'GuzzleHttp\\Psr7\\LimitStream' => $vendorDir . '/guzzlehttp/psr7/src/LimitStream.php',
|
||||
'GuzzleHttp\\Psr7\\Message' => $vendorDir . '/guzzlehttp/psr7/src/Message.php',
|
||||
'GuzzleHttp\\Psr7\\MessageTrait' => $vendorDir . '/guzzlehttp/psr7/src/MessageTrait.php',
|
||||
'GuzzleHttp\\Psr7\\MimeType' => $vendorDir . '/guzzlehttp/psr7/src/MimeType.php',
|
||||
'GuzzleHttp\\Psr7\\MultipartStream' => $vendorDir . '/guzzlehttp/psr7/src/MultipartStream.php',
|
||||
'GuzzleHttp\\Psr7\\NoSeekStream' => $vendorDir . '/guzzlehttp/psr7/src/NoSeekStream.php',
|
||||
'GuzzleHttp\\Psr7\\PumpStream' => $vendorDir . '/guzzlehttp/psr7/src/PumpStream.php',
|
||||
'GuzzleHttp\\Psr7\\Query' => $vendorDir . '/guzzlehttp/psr7/src/Query.php',
|
||||
'GuzzleHttp\\Psr7\\Request' => $vendorDir . '/guzzlehttp/psr7/src/Request.php',
|
||||
'GuzzleHttp\\Psr7\\Response' => $vendorDir . '/guzzlehttp/psr7/src/Response.php',
|
||||
'GuzzleHttp\\Psr7\\Rfc7230' => $vendorDir . '/guzzlehttp/psr7/src/Rfc7230.php',
|
||||
'GuzzleHttp\\Psr7\\ServerRequest' => $vendorDir . '/guzzlehttp/psr7/src/ServerRequest.php',
|
||||
'GuzzleHttp\\Psr7\\Stream' => $vendorDir . '/guzzlehttp/psr7/src/Stream.php',
|
||||
'GuzzleHttp\\Psr7\\StreamDecoratorTrait' => $vendorDir . '/guzzlehttp/psr7/src/StreamDecoratorTrait.php',
|
||||
'GuzzleHttp\\Psr7\\StreamWrapper' => $vendorDir . '/guzzlehttp/psr7/src/StreamWrapper.php',
|
||||
'GuzzleHttp\\Psr7\\UploadedFile' => $vendorDir . '/guzzlehttp/psr7/src/UploadedFile.php',
|
||||
'GuzzleHttp\\Psr7\\Uri' => $vendorDir . '/guzzlehttp/psr7/src/Uri.php',
|
||||
'GuzzleHttp\\Psr7\\UriComparator' => $vendorDir . '/guzzlehttp/psr7/src/UriComparator.php',
|
||||
'GuzzleHttp\\Psr7\\UriNormalizer' => $vendorDir . '/guzzlehttp/psr7/src/UriNormalizer.php',
|
||||
'GuzzleHttp\\Psr7\\UriResolver' => $vendorDir . '/guzzlehttp/psr7/src/UriResolver.php',
|
||||
'GuzzleHttp\\Psr7\\Utils' => $vendorDir . '/guzzlehttp/psr7/src/Utils.php',
|
||||
'GuzzleHttp\\RedirectMiddleware' => $vendorDir . '/guzzlehttp/guzzle/src/RedirectMiddleware.php',
|
||||
'GuzzleHttp\\RequestOptions' => $vendorDir . '/guzzlehttp/guzzle/src/RequestOptions.php',
|
||||
'GuzzleHttp\\RetryMiddleware' => $vendorDir . '/guzzlehttp/guzzle/src/RetryMiddleware.php',
|
||||
'GuzzleHttp\\TransferStats' => $vendorDir . '/guzzlehttp/guzzle/src/TransferStats.php',
|
||||
'GuzzleHttp\\UriTemplate' => $vendorDir . '/guzzlehttp/guzzle/src/UriTemplate.php',
|
||||
'GuzzleHttp\\Utils' => $vendorDir . '/guzzlehttp/guzzle/src/Utils.php',
|
||||
'HTMLPurifier' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.php',
|
||||
'HTMLPurifier_Arborize' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Arborize.php',
|
||||
'HTMLPurifier_AttrCollections' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrCollections.php',
|
||||
@ -1200,8 +1213,9 @@ return array(
|
||||
'Illuminate\\Contracts\\View\\View' => $vendorDir . '/laravel/framework/src/Illuminate/Contracts/View/View.php',
|
||||
'Illuminate\\Cookie\\CookieJar' => $vendorDir . '/laravel/framework/src/Illuminate/Cookie/CookieJar.php',
|
||||
'Illuminate\\Cookie\\CookieServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Cookie/CookieServiceProvider.php',
|
||||
'Illuminate\\Cookie\\CookieValuePrefix' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Cookie/CookieValuePrefix.php',
|
||||
'Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse' => $vendorDir . '/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php',
|
||||
'Illuminate\\Cookie\\Middleware\\EncryptCookies' => $vendorDir . '/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php',
|
||||
'Illuminate\\Cookie\\Middleware\\EncryptCookies' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php',
|
||||
'Illuminate\\Database\\Capsule\\Manager' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Capsule/Manager.php',
|
||||
'Illuminate\\Database\\Concerns\\BuildsQueries' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php',
|
||||
'Illuminate\\Database\\Concerns\\ManagesTransactions' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php',
|
||||
@ -1234,7 +1248,7 @@ return array(
|
||||
'Illuminate\\Database\\DetectsLostConnections' => $vendorDir . '/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php',
|
||||
'Illuminate\\Database\\Eloquent\\Builder' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php',
|
||||
'Illuminate\\Database\\Eloquent\\Collection' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php',
|
||||
'Illuminate\\Database\\Eloquent\\Concerns\\GuardsAttributes' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php',
|
||||
'Illuminate\\Database\\Eloquent\\Concerns\\GuardsAttributes' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php',
|
||||
'Illuminate\\Database\\Eloquent\\Concerns\\HasAttributes' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php',
|
||||
'Illuminate\\Database\\Eloquent\\Concerns\\HasEvents' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php',
|
||||
'Illuminate\\Database\\Eloquent\\Concerns\\HasGlobalScopes' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasGlobalScopes.php',
|
||||
@ -1402,7 +1416,7 @@ return array(
|
||||
'Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php',
|
||||
'Illuminate\\Foundation\\Http\\Middleware\\TrimStrings' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php',
|
||||
'Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php',
|
||||
'Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php',
|
||||
'Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php',
|
||||
'Illuminate\\Foundation\\Inspiring' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/Inspiring.php',
|
||||
'Illuminate\\Foundation\\PackageManifest' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Foundation/PackageManifest.php',
|
||||
'Illuminate\\Foundation\\ProviderRepository' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php',
|
||||
@ -1565,7 +1579,7 @@ return array(
|
||||
'Illuminate\\Queue\\Jobs\\RedisJob' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Jobs/RedisJob.php',
|
||||
'Illuminate\\Queue\\Jobs\\SqsJob' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Jobs/SqsJob.php',
|
||||
'Illuminate\\Queue\\Jobs\\SyncJob' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Jobs/SyncJob.php',
|
||||
'Illuminate\\Queue\\Listener' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/Listener.php',
|
||||
'Illuminate\\Queue\\Listener' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Queue/Listener.php',
|
||||
'Illuminate\\Queue\\ListenerOptions' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/ListenerOptions.php',
|
||||
'Illuminate\\Queue\\LuaScripts' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/LuaScripts.php',
|
||||
'Illuminate\\Queue\\ManuallyFailedException' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/ManuallyFailedException.php',
|
||||
@ -1738,7 +1752,7 @@ return array(
|
||||
'Illuminate\\Validation\\ValidationServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/ValidationServiceProvider.php',
|
||||
'Illuminate\\Validation\\Validator' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Validator.php',
|
||||
'Illuminate\\View\\Compilers\\BladeCompiler' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php',
|
||||
'Illuminate\\View\\Compilers\\Compiler' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/Compiler.php',
|
||||
'Illuminate\\View\\Compilers\\Compiler' => $baseDir . '/overrides/laravel/framework/src/Illuminate/View/Compilers/Compiler.php',
|
||||
'Illuminate\\View\\Compilers\\CompilerInterface' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/CompilerInterface.php',
|
||||
'Illuminate\\View\\Compilers\\Concerns\\CompilesAuthorizations' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesAuthorizations.php',
|
||||
'Illuminate\\View\\Compilers\\Concerns\\CompilesComments' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesComments.php',
|
||||
@ -1748,14 +1762,14 @@ return array(
|
||||
'Illuminate\\View\\Compilers\\Concerns\\CompilesIncludes' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesIncludes.php',
|
||||
'Illuminate\\View\\Compilers\\Concerns\\CompilesInjections' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesInjections.php',
|
||||
'Illuminate\\View\\Compilers\\Concerns\\CompilesJson' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesJson.php',
|
||||
'Illuminate\\View\\Compilers\\Concerns\\CompilesLayouts' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesLayouts.php',
|
||||
'Illuminate\\View\\Compilers\\Concerns\\CompilesLayouts' => $baseDir . '/overrides/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesLayouts.php',
|
||||
'Illuminate\\View\\Compilers\\Concerns\\CompilesLoops' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesLoops.php',
|
||||
'Illuminate\\View\\Compilers\\Concerns\\CompilesRawPhp' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesRawPhp.php',
|
||||
'Illuminate\\View\\Compilers\\Concerns\\CompilesStacks' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesStacks.php',
|
||||
'Illuminate\\View\\Compilers\\Concerns\\CompilesTranslations' => $vendorDir . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesTranslations.php',
|
||||
'Illuminate\\View\\Concerns\\ManagesComponents' => $vendorDir . '/laravel/framework/src/Illuminate/View/Concerns/ManagesComponents.php',
|
||||
'Illuminate\\View\\Concerns\\ManagesEvents' => $vendorDir . '/laravel/framework/src/Illuminate/View/Concerns/ManagesEvents.php',
|
||||
'Illuminate\\View\\Concerns\\ManagesLayouts' => $vendorDir . '/laravel/framework/src/Illuminate/View/Concerns/ManagesLayouts.php',
|
||||
'Illuminate\\View\\Concerns\\ManagesLayouts' => $baseDir . '/overrides/laravel/framework/src/Illuminate/View/Concerns/ManagesLayouts.php',
|
||||
'Illuminate\\View\\Concerns\\ManagesLoops' => $vendorDir . '/laravel/framework/src/Illuminate/View/Concerns/ManagesLoops.php',
|
||||
'Illuminate\\View\\Concerns\\ManagesStacks' => $vendorDir . '/laravel/framework/src/Illuminate/View/Concerns/ManagesStacks.php',
|
||||
'Illuminate\\View\\Concerns\\ManagesTranslations' => $vendorDir . '/laravel/framework/src/Illuminate/View/Concerns/ManagesTranslations.php',
|
||||
@ -1799,15 +1813,20 @@ return array(
|
||||
'League\\Flysystem\\Adapter\\SynologyFtp' => $vendorDir . '/league/flysystem/src/Adapter/SynologyFtp.php',
|
||||
'League\\Flysystem\\Config' => $vendorDir . '/league/flysystem/src/Config.php',
|
||||
'League\\Flysystem\\ConfigAwareTrait' => $vendorDir . '/league/flysystem/src/ConfigAwareTrait.php',
|
||||
'League\\Flysystem\\ConnectionErrorException' => $vendorDir . '/league/flysystem/src/ConnectionErrorException.php',
|
||||
'League\\Flysystem\\ConnectionRuntimeException' => $vendorDir . '/league/flysystem/src/ConnectionRuntimeException.php',
|
||||
'League\\Flysystem\\CorruptedPathDetected' => $vendorDir . '/league/flysystem/src/CorruptedPathDetected.php',
|
||||
'League\\Flysystem\\Directory' => $vendorDir . '/league/flysystem/src/Directory.php',
|
||||
'League\\Flysystem\\Exception' => $vendorDir . '/league/flysystem/src/Exception.php',
|
||||
'League\\Flysystem\\File' => $vendorDir . '/league/flysystem/src/File.php',
|
||||
'League\\Flysystem\\FileExistsException' => $vendorDir . '/league/flysystem/src/FileExistsException.php',
|
||||
'League\\Flysystem\\FileNotFoundException' => $vendorDir . '/league/flysystem/src/FileNotFoundException.php',
|
||||
'League\\Flysystem\\Filesystem' => $vendorDir . '/league/flysystem/src/Filesystem.php',
|
||||
'League\\Flysystem\\FilesystemException' => $vendorDir . '/league/flysystem/src/FilesystemException.php',
|
||||
'League\\Flysystem\\FilesystemInterface' => $vendorDir . '/league/flysystem/src/FilesystemInterface.php',
|
||||
'League\\Flysystem\\FilesystemNotFoundException' => $vendorDir . '/league/flysystem/src/FilesystemNotFoundException.php',
|
||||
'League\\Flysystem\\Handler' => $vendorDir . '/league/flysystem/src/Handler.php',
|
||||
'League\\Flysystem\\InvalidRootException' => $vendorDir . '/league/flysystem/src/InvalidRootException.php',
|
||||
'League\\Flysystem\\MountManager' => $vendorDir . '/league/flysystem/src/MountManager.php',
|
||||
'League\\Flysystem\\NotSupportedException' => $vendorDir . '/league/flysystem/src/NotSupportedException.php',
|
||||
'League\\Flysystem\\PluginInterface' => $vendorDir . '/league/flysystem/src/PluginInterface.php',
|
||||
@ -1829,6 +1848,14 @@ return array(
|
||||
'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\\StreamHasher' => $vendorDir . '/league/flysystem/src/Util/StreamHasher.php',
|
||||
'League\\MimeTypeDetection\\EmptyExtensionToMimeTypeMap' => $vendorDir . '/league/mime-type-detection/src/EmptyExtensionToMimeTypeMap.php',
|
||||
'League\\MimeTypeDetection\\ExtensionLookup' => $vendorDir . '/league/mime-type-detection/src/ExtensionLookup.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',
|
||||
'League\\MimeTypeDetection\\OverridingExtensionToMimeTypeMap' => $vendorDir . '/league/mime-type-detection/src/OverridingExtensionToMimeTypeMap.php',
|
||||
'Lord\\Laroute\\Compilers\\CompilerInterface' => $vendorDir . '/lord/laroute/src/Compilers/CompilerInterface.php',
|
||||
'Lord\\Laroute\\Compilers\\TemplateCompiler' => $vendorDir . '/lord/laroute/src/Compilers/TemplateCompiler.php',
|
||||
'Lord\\Laroute\\Console\\Commands\\LarouteGeneratorCommand' => $vendorDir . '/lord/laroute/src/Console/Commands/LarouteGeneratorCommand.php',
|
||||
@ -1938,7 +1965,7 @@ return array(
|
||||
'Monolog\\ResettableInterface' => $vendorDir . '/monolog/monolog/src/Monolog/ResettableInterface.php',
|
||||
'Monolog\\SignalHandler' => $vendorDir . '/monolog/monolog/src/Monolog/SignalHandler.php',
|
||||
'Monolog\\Utils' => $vendorDir . '/monolog/monolog/src/Monolog/Utils.php',
|
||||
'Normalizer' => $vendorDir . '/patchwork/utf8/src/Normalizer.php',
|
||||
'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
|
||||
'Nwidart\\Modules\\Collection' => $vendorDir . '/nwidart/laravel-modules/src/Collection.php',
|
||||
'Nwidart\\Modules\\Commands\\CommandMakeCommand' => $vendorDir . '/nwidart/laravel-modules/src/Commands/CommandMakeCommand.php',
|
||||
'Nwidart\\Modules\\Commands\\ControllerMakeCommand' => $vendorDir . '/nwidart/laravel-modules/src/Commands/ControllerMakeCommand.php',
|
||||
@ -2705,7 +2732,7 @@ return array(
|
||||
'Symfony\\Component\\HttpFoundation\\File\\File' => $vendorDir . '/symfony/http-foundation/File/File.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\ExtensionGuesser' => $vendorDir . '/symfony/http-foundation/File/MimeType/ExtensionGuesser.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\ExtensionGuesserInterface' => $vendorDir . '/symfony/http-foundation/File/MimeType/ExtensionGuesserInterface.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\FileBinaryMimeTypeGuesser' => $vendorDir . '/symfony/http-foundation/File/MimeType/FileBinaryMimeTypeGuesser.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\FileBinaryMimeTypeGuesser' => $baseDir . '/overrides/symfony/http-foundation/File/MimeType/FileBinaryMimeTypeGuesser.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\FileinfoMimeTypeGuesser' => $vendorDir . '/symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeExtensionGuesser' => $vendorDir . '/symfony/http-foundation/File/MimeType/MimeTypeExtensionGuesser.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeGuesser' => $vendorDir . '/symfony/http-foundation/File/MimeType/MimeTypeGuesser.php',
|
||||
@ -2871,7 +2898,7 @@ return array(
|
||||
'Symfony\\Component\\HttpKernel\\HttpCache\\ResponseCacheStrategy' => $vendorDir . '/symfony/http-kernel/HttpCache/ResponseCacheStrategy.php',
|
||||
'Symfony\\Component\\HttpKernel\\HttpCache\\ResponseCacheStrategyInterface' => $vendorDir . '/symfony/http-kernel/HttpCache/ResponseCacheStrategyInterface.php',
|
||||
'Symfony\\Component\\HttpKernel\\HttpCache\\Ssi' => $vendorDir . '/symfony/http-kernel/HttpCache/Ssi.php',
|
||||
'Symfony\\Component\\HttpKernel\\HttpCache\\Store' => $vendorDir . '/symfony/http-kernel/HttpCache/Store.php',
|
||||
'Symfony\\Component\\HttpKernel\\HttpCache\\Store' => $baseDir . '/overrides/symfony/http-kernel/HttpCache/Store.php',
|
||||
'Symfony\\Component\\HttpKernel\\HttpCache\\StoreInterface' => $vendorDir . '/symfony/http-kernel/HttpCache/StoreInterface.php',
|
||||
'Symfony\\Component\\HttpKernel\\HttpCache\\SubRequestHandler' => $vendorDir . '/symfony/http-kernel/HttpCache/SubRequestHandler.php',
|
||||
'Symfony\\Component\\HttpKernel\\HttpCache\\SurrogateInterface' => $vendorDir . '/symfony/http-kernel/HttpCache/SurrogateInterface.php',
|
||||
@ -2888,7 +2915,7 @@ return array(
|
||||
'Symfony\\Component\\HttpKernel\\Profiler\\ProfilerStorageInterface' => $vendorDir . '/symfony/http-kernel/Profiler/ProfilerStorageInterface.php',
|
||||
'Symfony\\Component\\HttpKernel\\RebootableInterface' => $vendorDir . '/symfony/http-kernel/RebootableInterface.php',
|
||||
'Symfony\\Component\\HttpKernel\\TerminableInterface' => $vendorDir . '/symfony/http-kernel/TerminableInterface.php',
|
||||
'Symfony\\Component\\HttpKernel\\UriSigner' => $vendorDir . '/symfony/http-kernel/UriSigner.php',
|
||||
'Symfony\\Component\\HttpKernel\\UriSigner' => $baseDir . '/overrides/symfony/http-kernel/UriSigner.php',
|
||||
'Symfony\\Component\\Process\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/process/Exception/ExceptionInterface.php',
|
||||
'Symfony\\Component\\Process\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/process/Exception/InvalidArgumentException.php',
|
||||
'Symfony\\Component\\Process\\Exception\\LogicException' => $vendorDir . '/symfony/process/Exception/LogicException.php',
|
||||
@ -3067,8 +3094,14 @@ return array(
|
||||
'Symfony\\Component\\VarDumper\\Test\\VarDumperTestTrait' => $vendorDir . '/symfony/var-dumper/Test/VarDumperTestTrait.php',
|
||||
'Symfony\\Component\\VarDumper\\VarDumper' => $vendorDir . '/symfony/var-dumper/VarDumper.php',
|
||||
'Symfony\\Polyfill\\Ctype\\Ctype' => $vendorDir . '/symfony/polyfill-ctype/Ctype.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Idn' => $vendorDir . '/symfony/polyfill-intl-idn/Idn.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Info' => $vendorDir . '/symfony/polyfill-intl-idn/Info.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\DisallowedRanges' => $vendorDir . '/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\Regex' => $vendorDir . '/symfony/polyfill-intl-idn/Resources/unidata/Regex.php',
|
||||
'Symfony\\Polyfill\\Intl\\Normalizer\\Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Normalizer.php',
|
||||
'Symfony\\Polyfill\\Mbstring\\Mbstring' => $vendorDir . '/symfony/polyfill-mbstring/Mbstring.php',
|
||||
'Symfony\\Polyfill\\Php70\\Php70' => $vendorDir . '/symfony/polyfill-php70/Php70.php',
|
||||
'Symfony\\Polyfill\\Php72\\Php72' => $vendorDir . '/symfony/polyfill-php72/Php72.php',
|
||||
'TijsVerkoyen\\CssToInlineStyles\\CssToInlineStyles' => $vendorDir . '/tijsverkoyen/css-to-inline-styles/src/CssToInlineStyles.php',
|
||||
'TijsVerkoyen\\CssToInlineStyles\\Css\\Processor' => $vendorDir . '/tijsverkoyen/css-to-inline-styles/src/Css/Processor.php',
|
||||
'TijsVerkoyen\\CssToInlineStyles\\Css\\Property\\Processor' => $vendorDir . '/tijsverkoyen/css-to-inline-styles/src/Css/Property/Processor.php',
|
||||
|
4
vendor/composer/autoload_files.php
vendored
4
vendor/composer/autoload_files.php
vendored
@ -10,10 +10,14 @@ return array(
|
||||
'023d27dca8066ef29e6739335ea73bad' => $vendorDir . '/symfony/polyfill-php70/bootstrap.php',
|
||||
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
|
||||
'667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php',
|
||||
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
|
||||
'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
|
||||
'25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
|
||||
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
|
||||
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
|
||||
'e39a8b23c42d4e1452234d762b03835a' => $vendorDir . '/ramsey/uuid/src/functions.php',
|
||||
'2c102faa651ef8ea5874edb585946bce' => $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php',
|
||||
'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php',
|
||||
'2cffec82183ee1cea088009cef9a6fc3' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
|
||||
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
|
||||
'f0906e6318348a765ffb6eb24e0d0938' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/helpers.php',
|
||||
|
16
vendor/composer/autoload_psr4.php
vendored
16
vendor/composer/autoload_psr4.php
vendored
@ -14,8 +14,11 @@ return array(
|
||||
'Underscore\\' => array($vendorDir . '/anahkiasen/underscore-php/src', $vendorDir . '/anahkiasen/underscore-php/tests'),
|
||||
'TorMorten\\Eventy\\' => array($baseDir . '/overrides/tormjens/eventy/src', $vendorDir . '/tormjens/eventy/src'),
|
||||
'TijsVerkoyen\\CssToInlineStyles\\' => array($vendorDir . '/tijsverkoyen/css-to-inline-styles/src'),
|
||||
'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'),
|
||||
'Symfony\\Polyfill\\Php70\\' => array($vendorDir . '/symfony/polyfill-php70'),
|
||||
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
|
||||
'Symfony\\Polyfill\\Intl\\Normalizer\\' => array($vendorDir . '/symfony/polyfill-intl-normalizer'),
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\' => array($vendorDir . '/symfony/polyfill-intl-idn'),
|
||||
'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
|
||||
'Symfony\\Component\\VarDumper\\Dumper\\' => array($baseDir . '/overrides/symfony/var-dumper/Dumper'),
|
||||
'Symfony\\Component\\VarDumper\\Cloner\\' => array($baseDir . '/overrides/symfony/var-dumper/Cloner'),
|
||||
@ -23,8 +26,10 @@ return array(
|
||||
'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'),
|
||||
'Symfony\\Component\\Routing\\' => array($baseDir . '/overrides/symfony/routing', $vendorDir . '/symfony/routing'),
|
||||
'Symfony\\Component\\Process\\' => array($baseDir . '/overrides/symfony/process', $vendorDir . '/symfony/process'),
|
||||
'Symfony\\Component\\HttpKernel\\HttpCache\\' => array($baseDir . '/overrides/symfony/http-kernel/HttpCache'),
|
||||
'Symfony\\Component\\HttpKernel\\Exception\\' => array($baseDir . '/overrides/symfony/http-kernel/Exception'),
|
||||
'Symfony\\Component\\HttpKernel\\' => array($vendorDir . '/symfony/http-kernel'),
|
||||
'Symfony\\Component\\HttpKernel\\' => array($baseDir . '/overrides/symfony/http-kernel', $vendorDir . '/symfony/http-kernel'),
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\' => array($baseDir . '/overrides/symfony/http-foundation/File/MimeType'),
|
||||
'Symfony\\Component\\HttpFoundation\\' => array($baseDir . '/overrides/symfony/http-foundation', $vendorDir . '/symfony/http-foundation'),
|
||||
'Symfony\\Component\\Finder\\Iterator\\' => array($baseDir . '/overrides/symfony/finder/Iterator'),
|
||||
'Symfony\\Component\\Finder\\' => array($baseDir . '/overrides/symfony/finder', $vendorDir . '/symfony/finder'),
|
||||
@ -58,22 +63,31 @@ return array(
|
||||
'Mews\\Purifier\\' => array($vendorDir . '/mews/purifier/src'),
|
||||
'Lord\\Laroute\\Routes\\' => array($baseDir . '/overrides/lord/laroute/src/Routes'),
|
||||
'Lord\\Laroute\\' => array($vendorDir . '/lord/laroute/src'),
|
||||
'League\\MimeTypeDetection\\' => array($vendorDir . '/league/mime-type-detection/src'),
|
||||
'League\\Flysystem\\' => array($vendorDir . '/league/flysystem/src'),
|
||||
'Laravel\\Tinker\\' => array($vendorDir . '/laravel/tinker/src'),
|
||||
'Javoscript\\MacroableModels\\' => array($baseDir . '/overrides/javoscript/laravel-macroable-models/src', $vendorDir . '/javoscript/laravel-macroable-models/src'),
|
||||
'JakubOnderka\\PhpConsoleHighlighter\\' => array($vendorDir . '/jakub-onderka/php-console-highlighter/src'),
|
||||
'JakubOnderka\\PhpConsoleColor\\' => array($vendorDir . '/jakub-onderka/php-console-color/src'),
|
||||
'Illuminate\\View\\Concerns\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/View/Concerns'),
|
||||
'Illuminate\\View\\Compilers\\Concerns\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/View/Compilers/Concerns'),
|
||||
'Illuminate\\View\\Compilers\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/View/Compilers'),
|
||||
'Illuminate\\View\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/View'),
|
||||
'Illuminate\\Validation\\Concerns\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Validation/Concerns'),
|
||||
'Illuminate\\Support\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Support'),
|
||||
'Illuminate\\Session\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Session'),
|
||||
'Illuminate\\Routing\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Routing'),
|
||||
'Illuminate\\Queue\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Queue'),
|
||||
'Illuminate\\Pagination\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Pagination'),
|
||||
'Illuminate\\Mail\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Mail'),
|
||||
'Illuminate\\Http\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Http'),
|
||||
'Illuminate\\Foundation\\Http\\Middleware\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Foundation/Http/Middleware'),
|
||||
'Illuminate\\Foundation\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Foundation'),
|
||||
'Illuminate\\Filesystem\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Filesystem'),
|
||||
'Illuminate\\Database\\Eloquent\\Concerns\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Database/Eloquent/Concerns'),
|
||||
'Illuminate\\Database\\Eloquent\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Database/Eloquent'),
|
||||
'Illuminate\\Cookie\\Middleware\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Cookie/Middleware'),
|
||||
'Illuminate\\Cookie\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Cookie'),
|
||||
'Illuminate\\Container\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Container'),
|
||||
'Illuminate\\Config\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Config'),
|
||||
'Illuminate\\Cache\\Console\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Cache/Console'),
|
||||
|
132
vendor/composer/autoload_static.php
vendored
132
vendor/composer/autoload_static.php
vendored
@ -11,10 +11,14 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
'023d27dca8066ef29e6739335ea73bad' => __DIR__ . '/..' . '/symfony/polyfill-php70/bootstrap.php',
|
||||
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
|
||||
'667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php',
|
||||
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
|
||||
'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
|
||||
'25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
|
||||
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
|
||||
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
|
||||
'e39a8b23c42d4e1452234d762b03835a' => __DIR__ . '/..' . '/ramsey/uuid/src/functions.php',
|
||||
'2c102faa651ef8ea5874edb585946bce' => __DIR__ . '/..' . '/swiftmailer/swiftmailer/lib/swift_required.php',
|
||||
'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php',
|
||||
'2cffec82183ee1cea088009cef9a6fc3' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
|
||||
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
|
||||
'f0906e6318348a765ffb6eb24e0d0938' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/helpers.php',
|
||||
@ -53,8 +57,11 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
),
|
||||
'S' =>
|
||||
array (
|
||||
'Symfony\\Polyfill\\Php72\\' => 23,
|
||||
'Symfony\\Polyfill\\Php70\\' => 23,
|
||||
'Symfony\\Polyfill\\Mbstring\\' => 26,
|
||||
'Symfony\\Polyfill\\Intl\\Normalizer\\' => 33,
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\' => 26,
|
||||
'Symfony\\Polyfill\\Ctype\\' => 23,
|
||||
'Symfony\\Component\\VarDumper\\Dumper\\' => 35,
|
||||
'Symfony\\Component\\VarDumper\\Cloner\\' => 35,
|
||||
@ -62,8 +69,10 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
'Symfony\\Component\\Translation\\' => 30,
|
||||
'Symfony\\Component\\Routing\\' => 26,
|
||||
'Symfony\\Component\\Process\\' => 26,
|
||||
'Symfony\\Component\\HttpKernel\\HttpCache\\' => 39,
|
||||
'Symfony\\Component\\HttpKernel\\Exception\\' => 39,
|
||||
'Symfony\\Component\\HttpKernel\\' => 29,
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\' => 47,
|
||||
'Symfony\\Component\\HttpFoundation\\' => 33,
|
||||
'Symfony\\Component\\Finder\\Iterator\\' => 34,
|
||||
'Symfony\\Component\\Finder\\' => 25,
|
||||
@ -112,6 +121,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
array (
|
||||
'Lord\\Laroute\\Routes\\' => 20,
|
||||
'Lord\\Laroute\\' => 13,
|
||||
'League\\MimeTypeDetection\\' => 25,
|
||||
'League\\Flysystem\\' => 17,
|
||||
'Laravel\\Tinker\\' => 15,
|
||||
),
|
||||
@ -123,17 +133,25 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
),
|
||||
'I' =>
|
||||
array (
|
||||
'Illuminate\\View\\Concerns\\' => 25,
|
||||
'Illuminate\\View\\Compilers\\Concerns\\' => 35,
|
||||
'Illuminate\\View\\Compilers\\' => 26,
|
||||
'Illuminate\\View\\' => 16,
|
||||
'Illuminate\\Validation\\Concerns\\' => 31,
|
||||
'Illuminate\\Support\\' => 19,
|
||||
'Illuminate\\Session\\' => 19,
|
||||
'Illuminate\\Routing\\' => 19,
|
||||
'Illuminate\\Queue\\' => 17,
|
||||
'Illuminate\\Pagination\\' => 22,
|
||||
'Illuminate\\Mail\\' => 16,
|
||||
'Illuminate\\Http\\' => 16,
|
||||
'Illuminate\\Foundation\\Http\\Middleware\\' => 38,
|
||||
'Illuminate\\Foundation\\' => 22,
|
||||
'Illuminate\\Filesystem\\' => 22,
|
||||
'Illuminate\\Database\\Eloquent\\Concerns\\' => 38,
|
||||
'Illuminate\\Database\\Eloquent\\' => 29,
|
||||
'Illuminate\\Cookie\\Middleware\\' => 29,
|
||||
'Illuminate\\Cookie\\' => 18,
|
||||
'Illuminate\\Container\\' => 21,
|
||||
'Illuminate\\Config\\' => 18,
|
||||
'Illuminate\\Cache\\Console\\' => 25,
|
||||
@ -237,6 +255,10 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/tijsverkoyen/css-to-inline-styles/src',
|
||||
),
|
||||
'Symfony\\Polyfill\\Php72\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/polyfill-php72',
|
||||
),
|
||||
'Symfony\\Polyfill\\Php70\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/polyfill-php70',
|
||||
@ -245,6 +267,14 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
|
||||
),
|
||||
'Symfony\\Polyfill\\Intl\\Normalizer\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer',
|
||||
),
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/polyfill-intl-idn',
|
||||
),
|
||||
'Symfony\\Polyfill\\Ctype\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
|
||||
@ -275,13 +305,22 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
0 => __DIR__ . '/../..' . '/overrides/symfony/process',
|
||||
1 => __DIR__ . '/..' . '/symfony/process',
|
||||
),
|
||||
'Symfony\\Component\\HttpKernel\\HttpCache\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/../..' . '/overrides/symfony/http-kernel/HttpCache',
|
||||
),
|
||||
'Symfony\\Component\\HttpKernel\\Exception\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/../..' . '/overrides/symfony/http-kernel/Exception',
|
||||
),
|
||||
'Symfony\\Component\\HttpKernel\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/http-kernel',
|
||||
0 => __DIR__ . '/../..' . '/overrides/symfony/http-kernel',
|
||||
1 => __DIR__ . '/..' . '/symfony/http-kernel',
|
||||
),
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/../..' . '/overrides/symfony/http-foundation/File/MimeType',
|
||||
),
|
||||
'Symfony\\Component\\HttpFoundation\\' =>
|
||||
array (
|
||||
@ -421,6 +460,10 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/lord/laroute/src',
|
||||
),
|
||||
'League\\MimeTypeDetection\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/league/mime-type-detection/src',
|
||||
),
|
||||
'League\\Flysystem\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/league/flysystem/src',
|
||||
@ -442,6 +485,18 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/jakub-onderka/php-console-color/src',
|
||||
),
|
||||
'Illuminate\\View\\Concerns\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/View/Concerns',
|
||||
),
|
||||
'Illuminate\\View\\Compilers\\Concerns\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/View/Compilers/Concerns',
|
||||
),
|
||||
'Illuminate\\View\\Compilers\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/View/Compilers',
|
||||
),
|
||||
'Illuminate\\View\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/View',
|
||||
@ -462,6 +517,10 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
array (
|
||||
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Routing',
|
||||
),
|
||||
'Illuminate\\Queue\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Queue',
|
||||
),
|
||||
'Illuminate\\Pagination\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Pagination',
|
||||
@ -474,6 +533,10 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
array (
|
||||
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Http',
|
||||
),
|
||||
'Illuminate\\Foundation\\Http\\Middleware\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Foundation/Http/Middleware',
|
||||
),
|
||||
'Illuminate\\Foundation\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Foundation',
|
||||
@ -482,10 +545,22 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
array (
|
||||
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Filesystem',
|
||||
),
|
||||
'Illuminate\\Database\\Eloquent\\Concerns\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Database/Eloquent/Concerns',
|
||||
),
|
||||
'Illuminate\\Database\\Eloquent\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Database/Eloquent',
|
||||
),
|
||||
'Illuminate\\Cookie\\Middleware\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Cookie/Middleware',
|
||||
),
|
||||
'Illuminate\\Cookie\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Cookie',
|
||||
),
|
||||
'Illuminate\\Container\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Container',
|
||||
@ -711,6 +786,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
'App\\Console\\Commands\\Build' => __DIR__ . '/../..' . '/app/Console/Commands/Build.php',
|
||||
'App\\Console\\Commands\\CheckConvViewers' => __DIR__ . '/../..' . '/app/Console/Commands/CheckConvViewers.php',
|
||||
'App\\Console\\Commands\\CheckRequirements' => __DIR__ . '/../..' . '/app/Console/Commands/CheckRequirements.php',
|
||||
'App\\Console\\Commands\\CleanNotificationsTable' => __DIR__ . '/../..' . '/app/Console/Commands/CleanNotificationsTable.php',
|
||||
'App\\Console\\Commands\\CleanSendLog' => __DIR__ . '/../..' . '/app/Console/Commands/CleanSendLog.php',
|
||||
'App\\Console\\Commands\\CleanTmp' => __DIR__ . '/../..' . '/app/Console/Commands/CleanTmp.php',
|
||||
'App\\Console\\Commands\\ClearCache' => __DIR__ . '/../..' . '/app/Console/Commands/ClearCache.php',
|
||||
@ -724,6 +800,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
'App\\Console\\Commands\\ModuleCheckLicenses' => __DIR__ . '/../..' . '/app/Console/Commands/ModuleCheckLicenses.php',
|
||||
'App\\Console\\Commands\\ModuleInstall' => __DIR__ . '/../..' . '/app/Console/Commands/ModuleInstall.php',
|
||||
'App\\Console\\Commands\\ModuleLaroute' => __DIR__ . '/../..' . '/app/Console/Commands/ModuleLaroute.php',
|
||||
'App\\Console\\Commands\\ModuleUpdate' => __DIR__ . '/../..' . '/app/Console/Commands/ModuleUpdate.php',
|
||||
'App\\Console\\Commands\\SendMonitor' => __DIR__ . '/../..' . '/app/Console/Commands/SendMonitor.php',
|
||||
'App\\Console\\Commands\\TestWebklex' => __DIR__ . '/../..' . '/app/Console/Commands/TestWebklex.php',
|
||||
'App\\Console\\Commands\\Update' => __DIR__ . '/../..' . '/app/Console/Commands/Update.php',
|
||||
@ -732,6 +809,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
'App\\Conversation' => __DIR__ . '/../..' . '/app/Conversation.php',
|
||||
'App\\ConversationFolder' => __DIR__ . '/../..' . '/app/ConversationFolder.php',
|
||||
'App\\Customer' => __DIR__ . '/../..' . '/app/Customer.php',
|
||||
'App\\CustomerChannel' => __DIR__ . '/../..' . '/app/CustomerChannel.php',
|
||||
'App\\Email' => __DIR__ . '/../..' . '/app/Email.php',
|
||||
'App\\Events\\ConversationCustomerChanged' => __DIR__ . '/../..' . '/app/Events/ConversationCustomerChanged.php',
|
||||
'App\\Events\\ConversationStatusChanged' => __DIR__ . '/../..' . '/app/Events/ConversationStatusChanged.php',
|
||||
@ -820,6 +898,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
'App\\MailboxUser' => __DIR__ . '/../..' . '/app/MailboxUser.php',
|
||||
'App\\Misc\\Helper' => __DIR__ . '/../..' . '/app/Misc/Helper.php',
|
||||
'App\\Misc\\Mail' => __DIR__ . '/../..' . '/app/Misc/Mail.php',
|
||||
'App\\Misc\\SwiftGetSmtpQueueId' => __DIR__ . '/../..' . '/app/Misc/SwiftGetSmtpQueueId.php',
|
||||
'App\\Misc\\WpApi' => __DIR__ . '/../..' . '/app/Misc/WpApi.php',
|
||||
'App\\Module' => __DIR__ . '/../..' . '/app/Module.php',
|
||||
'App\\Notifications\\BroadcastNotification' => __DIR__ . '/../..' . '/app/Notifications/BroadcastNotification.php',
|
||||
@ -1406,6 +1485,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
'GuzzleHttp\\Exception\\ClientException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/ClientException.php',
|
||||
'GuzzleHttp\\Exception\\ConnectException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/ConnectException.php',
|
||||
'GuzzleHttp\\Exception\\GuzzleException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/GuzzleException.php',
|
||||
'GuzzleHttp\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php',
|
||||
'GuzzleHttp\\Exception\\RequestException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/RequestException.php',
|
||||
'GuzzleHttp\\Exception\\SeekException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/SeekException.php',
|
||||
'GuzzleHttp\\Exception\\ServerException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/ServerException.php',
|
||||
@ -1445,28 +1525,36 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
'GuzzleHttp\\Psr7\\CachingStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/CachingStream.php',
|
||||
'GuzzleHttp\\Psr7\\DroppingStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/DroppingStream.php',
|
||||
'GuzzleHttp\\Psr7\\FnStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/FnStream.php',
|
||||
'GuzzleHttp\\Psr7\\Header' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Header.php',
|
||||
'GuzzleHttp\\Psr7\\InflateStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/InflateStream.php',
|
||||
'GuzzleHttp\\Psr7\\LazyOpenStream' => __DIR__ . '/../..' . '/overrides/guzzlehttp/psr7/src/LazyOpenStream.php',
|
||||
'GuzzleHttp\\Psr7\\LimitStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/LimitStream.php',
|
||||
'GuzzleHttp\\Psr7\\Message' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Message.php',
|
||||
'GuzzleHttp\\Psr7\\MessageTrait' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/MessageTrait.php',
|
||||
'GuzzleHttp\\Psr7\\MimeType' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/MimeType.php',
|
||||
'GuzzleHttp\\Psr7\\MultipartStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/MultipartStream.php',
|
||||
'GuzzleHttp\\Psr7\\NoSeekStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/NoSeekStream.php',
|
||||
'GuzzleHttp\\Psr7\\PumpStream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/PumpStream.php',
|
||||
'GuzzleHttp\\Psr7\\Query' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Query.php',
|
||||
'GuzzleHttp\\Psr7\\Request' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Request.php',
|
||||
'GuzzleHttp\\Psr7\\Response' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Response.php',
|
||||
'GuzzleHttp\\Psr7\\Rfc7230' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Rfc7230.php',
|
||||
'GuzzleHttp\\Psr7\\ServerRequest' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/ServerRequest.php',
|
||||
'GuzzleHttp\\Psr7\\Stream' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Stream.php',
|
||||
'GuzzleHttp\\Psr7\\StreamDecoratorTrait' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/StreamDecoratorTrait.php',
|
||||
'GuzzleHttp\\Psr7\\StreamWrapper' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/StreamWrapper.php',
|
||||
'GuzzleHttp\\Psr7\\UploadedFile' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UploadedFile.php',
|
||||
'GuzzleHttp\\Psr7\\Uri' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Uri.php',
|
||||
'GuzzleHttp\\Psr7\\UriComparator' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UriComparator.php',
|
||||
'GuzzleHttp\\Psr7\\UriNormalizer' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UriNormalizer.php',
|
||||
'GuzzleHttp\\Psr7\\UriResolver' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/UriResolver.php',
|
||||
'GuzzleHttp\\Psr7\\Utils' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/Utils.php',
|
||||
'GuzzleHttp\\RedirectMiddleware' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/RedirectMiddleware.php',
|
||||
'GuzzleHttp\\RequestOptions' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/RequestOptions.php',
|
||||
'GuzzleHttp\\RetryMiddleware' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/RetryMiddleware.php',
|
||||
'GuzzleHttp\\TransferStats' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/TransferStats.php',
|
||||
'GuzzleHttp\\UriTemplate' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/UriTemplate.php',
|
||||
'GuzzleHttp\\Utils' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Utils.php',
|
||||
'HTMLPurifier' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier.php',
|
||||
'HTMLPurifier_Arborize' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Arborize.php',
|
||||
'HTMLPurifier_AttrCollections' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/AttrCollections.php',
|
||||
@ -1897,8 +1985,9 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
'Illuminate\\Contracts\\View\\View' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Contracts/View/View.php',
|
||||
'Illuminate\\Cookie\\CookieJar' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cookie/CookieJar.php',
|
||||
'Illuminate\\Cookie\\CookieServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cookie/CookieServiceProvider.php',
|
||||
'Illuminate\\Cookie\\CookieValuePrefix' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Cookie/CookieValuePrefix.php',
|
||||
'Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php',
|
||||
'Illuminate\\Cookie\\Middleware\\EncryptCookies' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php',
|
||||
'Illuminate\\Cookie\\Middleware\\EncryptCookies' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php',
|
||||
'Illuminate\\Database\\Capsule\\Manager' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Capsule/Manager.php',
|
||||
'Illuminate\\Database\\Concerns\\BuildsQueries' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php',
|
||||
'Illuminate\\Database\\Concerns\\ManagesTransactions' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php',
|
||||
@ -1931,7 +2020,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
'Illuminate\\Database\\DetectsLostConnections' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php',
|
||||
'Illuminate\\Database\\Eloquent\\Builder' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php',
|
||||
'Illuminate\\Database\\Eloquent\\Collection' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php',
|
||||
'Illuminate\\Database\\Eloquent\\Concerns\\GuardsAttributes' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php',
|
||||
'Illuminate\\Database\\Eloquent\\Concerns\\GuardsAttributes' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php',
|
||||
'Illuminate\\Database\\Eloquent\\Concerns\\HasAttributes' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php',
|
||||
'Illuminate\\Database\\Eloquent\\Concerns\\HasEvents' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php',
|
||||
'Illuminate\\Database\\Eloquent\\Concerns\\HasGlobalScopes' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasGlobalScopes.php',
|
||||
@ -2099,7 +2188,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
'Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php',
|
||||
'Illuminate\\Foundation\\Http\\Middleware\\TrimStrings' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php',
|
||||
'Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php',
|
||||
'Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php',
|
||||
'Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php',
|
||||
'Illuminate\\Foundation\\Inspiring' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Foundation/Inspiring.php',
|
||||
'Illuminate\\Foundation\\PackageManifest' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Foundation/PackageManifest.php',
|
||||
'Illuminate\\Foundation\\ProviderRepository' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php',
|
||||
@ -2262,7 +2351,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
'Illuminate\\Queue\\Jobs\\RedisJob' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Jobs/RedisJob.php',
|
||||
'Illuminate\\Queue\\Jobs\\SqsJob' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Jobs/SqsJob.php',
|
||||
'Illuminate\\Queue\\Jobs\\SyncJob' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Jobs/SyncJob.php',
|
||||
'Illuminate\\Queue\\Listener' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/Listener.php',
|
||||
'Illuminate\\Queue\\Listener' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Queue/Listener.php',
|
||||
'Illuminate\\Queue\\ListenerOptions' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/ListenerOptions.php',
|
||||
'Illuminate\\Queue\\LuaScripts' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/LuaScripts.php',
|
||||
'Illuminate\\Queue\\ManuallyFailedException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/ManuallyFailedException.php',
|
||||
@ -2435,7 +2524,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
'Illuminate\\Validation\\ValidationServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/ValidationServiceProvider.php',
|
||||
'Illuminate\\Validation\\Validator' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/Validator.php',
|
||||
'Illuminate\\View\\Compilers\\BladeCompiler' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php',
|
||||
'Illuminate\\View\\Compilers\\Compiler' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/Compiler.php',
|
||||
'Illuminate\\View\\Compilers\\Compiler' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/View/Compilers/Compiler.php',
|
||||
'Illuminate\\View\\Compilers\\CompilerInterface' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/CompilerInterface.php',
|
||||
'Illuminate\\View\\Compilers\\Concerns\\CompilesAuthorizations' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesAuthorizations.php',
|
||||
'Illuminate\\View\\Compilers\\Concerns\\CompilesComments' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesComments.php',
|
||||
@ -2445,14 +2534,14 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
'Illuminate\\View\\Compilers\\Concerns\\CompilesIncludes' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesIncludes.php',
|
||||
'Illuminate\\View\\Compilers\\Concerns\\CompilesInjections' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesInjections.php',
|
||||
'Illuminate\\View\\Compilers\\Concerns\\CompilesJson' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesJson.php',
|
||||
'Illuminate\\View\\Compilers\\Concerns\\CompilesLayouts' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesLayouts.php',
|
||||
'Illuminate\\View\\Compilers\\Concerns\\CompilesLayouts' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesLayouts.php',
|
||||
'Illuminate\\View\\Compilers\\Concerns\\CompilesLoops' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesLoops.php',
|
||||
'Illuminate\\View\\Compilers\\Concerns\\CompilesRawPhp' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesRawPhp.php',
|
||||
'Illuminate\\View\\Compilers\\Concerns\\CompilesStacks' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesStacks.php',
|
||||
'Illuminate\\View\\Compilers\\Concerns\\CompilesTranslations' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesTranslations.php',
|
||||
'Illuminate\\View\\Concerns\\ManagesComponents' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Concerns/ManagesComponents.php',
|
||||
'Illuminate\\View\\Concerns\\ManagesEvents' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Concerns/ManagesEvents.php',
|
||||
'Illuminate\\View\\Concerns\\ManagesLayouts' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Concerns/ManagesLayouts.php',
|
||||
'Illuminate\\View\\Concerns\\ManagesLayouts' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/View/Concerns/ManagesLayouts.php',
|
||||
'Illuminate\\View\\Concerns\\ManagesLoops' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Concerns/ManagesLoops.php',
|
||||
'Illuminate\\View\\Concerns\\ManagesStacks' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Concerns/ManagesStacks.php',
|
||||
'Illuminate\\View\\Concerns\\ManagesTranslations' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Concerns/ManagesTranslations.php',
|
||||
@ -2496,15 +2585,20 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
'League\\Flysystem\\Adapter\\SynologyFtp' => __DIR__ . '/..' . '/league/flysystem/src/Adapter/SynologyFtp.php',
|
||||
'League\\Flysystem\\Config' => __DIR__ . '/..' . '/league/flysystem/src/Config.php',
|
||||
'League\\Flysystem\\ConfigAwareTrait' => __DIR__ . '/..' . '/league/flysystem/src/ConfigAwareTrait.php',
|
||||
'League\\Flysystem\\ConnectionErrorException' => __DIR__ . '/..' . '/league/flysystem/src/ConnectionErrorException.php',
|
||||
'League\\Flysystem\\ConnectionRuntimeException' => __DIR__ . '/..' . '/league/flysystem/src/ConnectionRuntimeException.php',
|
||||
'League\\Flysystem\\CorruptedPathDetected' => __DIR__ . '/..' . '/league/flysystem/src/CorruptedPathDetected.php',
|
||||
'League\\Flysystem\\Directory' => __DIR__ . '/..' . '/league/flysystem/src/Directory.php',
|
||||
'League\\Flysystem\\Exception' => __DIR__ . '/..' . '/league/flysystem/src/Exception.php',
|
||||
'League\\Flysystem\\File' => __DIR__ . '/..' . '/league/flysystem/src/File.php',
|
||||
'League\\Flysystem\\FileExistsException' => __DIR__ . '/..' . '/league/flysystem/src/FileExistsException.php',
|
||||
'League\\Flysystem\\FileNotFoundException' => __DIR__ . '/..' . '/league/flysystem/src/FileNotFoundException.php',
|
||||
'League\\Flysystem\\Filesystem' => __DIR__ . '/..' . '/league/flysystem/src/Filesystem.php',
|
||||
'League\\Flysystem\\FilesystemException' => __DIR__ . '/..' . '/league/flysystem/src/FilesystemException.php',
|
||||
'League\\Flysystem\\FilesystemInterface' => __DIR__ . '/..' . '/league/flysystem/src/FilesystemInterface.php',
|
||||
'League\\Flysystem\\FilesystemNotFoundException' => __DIR__ . '/..' . '/league/flysystem/src/FilesystemNotFoundException.php',
|
||||
'League\\Flysystem\\Handler' => __DIR__ . '/..' . '/league/flysystem/src/Handler.php',
|
||||
'League\\Flysystem\\InvalidRootException' => __DIR__ . '/..' . '/league/flysystem/src/InvalidRootException.php',
|
||||
'League\\Flysystem\\MountManager' => __DIR__ . '/..' . '/league/flysystem/src/MountManager.php',
|
||||
'League\\Flysystem\\NotSupportedException' => __DIR__ . '/..' . '/league/flysystem/src/NotSupportedException.php',
|
||||
'League\\Flysystem\\PluginInterface' => __DIR__ . '/..' . '/league/flysystem/src/PluginInterface.php',
|
||||
@ -2526,6 +2620,14 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
'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\\StreamHasher' => __DIR__ . '/..' . '/league/flysystem/src/Util/StreamHasher.php',
|
||||
'League\\MimeTypeDetection\\EmptyExtensionToMimeTypeMap' => __DIR__ . '/..' . '/league/mime-type-detection/src/EmptyExtensionToMimeTypeMap.php',
|
||||
'League\\MimeTypeDetection\\ExtensionLookup' => __DIR__ . '/..' . '/league/mime-type-detection/src/ExtensionLookup.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',
|
||||
'League\\MimeTypeDetection\\OverridingExtensionToMimeTypeMap' => __DIR__ . '/..' . '/league/mime-type-detection/src/OverridingExtensionToMimeTypeMap.php',
|
||||
'Lord\\Laroute\\Compilers\\CompilerInterface' => __DIR__ . '/..' . '/lord/laroute/src/Compilers/CompilerInterface.php',
|
||||
'Lord\\Laroute\\Compilers\\TemplateCompiler' => __DIR__ . '/..' . '/lord/laroute/src/Compilers/TemplateCompiler.php',
|
||||
'Lord\\Laroute\\Console\\Commands\\LarouteGeneratorCommand' => __DIR__ . '/..' . '/lord/laroute/src/Console/Commands/LarouteGeneratorCommand.php',
|
||||
@ -2635,7 +2737,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
'Monolog\\ResettableInterface' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/ResettableInterface.php',
|
||||
'Monolog\\SignalHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/SignalHandler.php',
|
||||
'Monolog\\Utils' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Utils.php',
|
||||
'Normalizer' => __DIR__ . '/..' . '/patchwork/utf8/src/Normalizer.php',
|
||||
'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
|
||||
'Nwidart\\Modules\\Collection' => __DIR__ . '/..' . '/nwidart/laravel-modules/src/Collection.php',
|
||||
'Nwidart\\Modules\\Commands\\CommandMakeCommand' => __DIR__ . '/..' . '/nwidart/laravel-modules/src/Commands/CommandMakeCommand.php',
|
||||
'Nwidart\\Modules\\Commands\\ControllerMakeCommand' => __DIR__ . '/..' . '/nwidart/laravel-modules/src/Commands/ControllerMakeCommand.php',
|
||||
@ -3402,7 +3504,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
'Symfony\\Component\\HttpFoundation\\File\\File' => __DIR__ . '/..' . '/symfony/http-foundation/File/File.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\ExtensionGuesser' => __DIR__ . '/..' . '/symfony/http-foundation/File/MimeType/ExtensionGuesser.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\ExtensionGuesserInterface' => __DIR__ . '/..' . '/symfony/http-foundation/File/MimeType/ExtensionGuesserInterface.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\FileBinaryMimeTypeGuesser' => __DIR__ . '/..' . '/symfony/http-foundation/File/MimeType/FileBinaryMimeTypeGuesser.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\FileBinaryMimeTypeGuesser' => __DIR__ . '/../..' . '/overrides/symfony/http-foundation/File/MimeType/FileBinaryMimeTypeGuesser.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\FileinfoMimeTypeGuesser' => __DIR__ . '/..' . '/symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeExtensionGuesser' => __DIR__ . '/..' . '/symfony/http-foundation/File/MimeType/MimeTypeExtensionGuesser.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeGuesser' => __DIR__ . '/..' . '/symfony/http-foundation/File/MimeType/MimeTypeGuesser.php',
|
||||
@ -3568,7 +3670,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
'Symfony\\Component\\HttpKernel\\HttpCache\\ResponseCacheStrategy' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/ResponseCacheStrategy.php',
|
||||
'Symfony\\Component\\HttpKernel\\HttpCache\\ResponseCacheStrategyInterface' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/ResponseCacheStrategyInterface.php',
|
||||
'Symfony\\Component\\HttpKernel\\HttpCache\\Ssi' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/Ssi.php',
|
||||
'Symfony\\Component\\HttpKernel\\HttpCache\\Store' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/Store.php',
|
||||
'Symfony\\Component\\HttpKernel\\HttpCache\\Store' => __DIR__ . '/../..' . '/overrides/symfony/http-kernel/HttpCache/Store.php',
|
||||
'Symfony\\Component\\HttpKernel\\HttpCache\\StoreInterface' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/StoreInterface.php',
|
||||
'Symfony\\Component\\HttpKernel\\HttpCache\\SubRequestHandler' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/SubRequestHandler.php',
|
||||
'Symfony\\Component\\HttpKernel\\HttpCache\\SurrogateInterface' => __DIR__ . '/..' . '/symfony/http-kernel/HttpCache/SurrogateInterface.php',
|
||||
@ -3585,7 +3687,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
'Symfony\\Component\\HttpKernel\\Profiler\\ProfilerStorageInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Profiler/ProfilerStorageInterface.php',
|
||||
'Symfony\\Component\\HttpKernel\\RebootableInterface' => __DIR__ . '/..' . '/symfony/http-kernel/RebootableInterface.php',
|
||||
'Symfony\\Component\\HttpKernel\\TerminableInterface' => __DIR__ . '/..' . '/symfony/http-kernel/TerminableInterface.php',
|
||||
'Symfony\\Component\\HttpKernel\\UriSigner' => __DIR__ . '/..' . '/symfony/http-kernel/UriSigner.php',
|
||||
'Symfony\\Component\\HttpKernel\\UriSigner' => __DIR__ . '/../..' . '/overrides/symfony/http-kernel/UriSigner.php',
|
||||
'Symfony\\Component\\Process\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/process/Exception/ExceptionInterface.php',
|
||||
'Symfony\\Component\\Process\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/process/Exception/InvalidArgumentException.php',
|
||||
'Symfony\\Component\\Process\\Exception\\LogicException' => __DIR__ . '/..' . '/symfony/process/Exception/LogicException.php',
|
||||
@ -3764,8 +3866,14 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
|
||||
'Symfony\\Component\\VarDumper\\Test\\VarDumperTestTrait' => __DIR__ . '/..' . '/symfony/var-dumper/Test/VarDumperTestTrait.php',
|
||||
'Symfony\\Component\\VarDumper\\VarDumper' => __DIR__ . '/..' . '/symfony/var-dumper/VarDumper.php',
|
||||
'Symfony\\Polyfill\\Ctype\\Ctype' => __DIR__ . '/..' . '/symfony/polyfill-ctype/Ctype.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Idn' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Idn.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Info' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Info.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\DisallowedRanges' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php',
|
||||
'Symfony\\Polyfill\\Intl\\Idn\\Resources\\unidata\\Regex' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/Resources/unidata/Regex.php',
|
||||
'Symfony\\Polyfill\\Intl\\Normalizer\\Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Normalizer.php',
|
||||
'Symfony\\Polyfill\\Mbstring\\Mbstring' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/Mbstring.php',
|
||||
'Symfony\\Polyfill\\Php70\\Php70' => __DIR__ . '/..' . '/symfony/polyfill-php70/Php70.php',
|
||||
'Symfony\\Polyfill\\Php72\\Php72' => __DIR__ . '/..' . '/symfony/polyfill-php72/Php72.php',
|
||||
'TijsVerkoyen\\CssToInlineStyles\\CssToInlineStyles' => __DIR__ . '/..' . '/tijsverkoyen/css-to-inline-styles/src/CssToInlineStyles.php',
|
||||
'TijsVerkoyen\\CssToInlineStyles\\Css\\Processor' => __DIR__ . '/..' . '/tijsverkoyen/css-to-inline-styles/src/Css/Processor.php',
|
||||
'TijsVerkoyen\\CssToInlineStyles\\Css\\Property\\Processor' => __DIR__ . '/..' . '/tijsverkoyen/css-to-inline-styles/src/Css/Property/Processor.php',
|
||||
|
536
vendor/composer/installed.json
vendored
536
vendor/composer/installed.json
vendored
@ -981,17 +981,17 @@
|
||||
},
|
||||
{
|
||||
"name": "erusev/parsedown",
|
||||
"version": "1.7.1",
|
||||
"version_normalized": "1.7.1.0",
|
||||
"version": "v1.7.2",
|
||||
"version_normalized": "1.7.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/erusev/parsedown.git",
|
||||
"reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1"
|
||||
"reference": "d60bcdc46978357759ecb13cb4b078da783f8faf"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/erusev/parsedown/zipball/92e9c27ba0e74b8b028b111d1b6f956a15c01fc1",
|
||||
"reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1",
|
||||
"url": "https://api.github.com/repos/erusev/parsedown/zipball/d60bcdc46978357759ecb13cb4b078da783f8faf",
|
||||
"reference": "d60bcdc46978357759ecb13cb4b078da783f8faf",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1001,7 +1001,7 @@
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8.35"
|
||||
},
|
||||
"time": "2018-03-08T01:11:30+00:00",
|
||||
"time": "2019-03-17T17:19:46+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@ -1028,7 +1028,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/erusev/parsedown/issues",
|
||||
"source": "https://github.com/erusev/parsedown/tree/master"
|
||||
"source": "https://github.com/erusev/parsedown/tree/1.7.x"
|
||||
},
|
||||
"install-path": "../erusev/parsedown"
|
||||
},
|
||||
@ -1152,37 +1152,39 @@
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"version": "6.3.3",
|
||||
"version_normalized": "6.3.3.0",
|
||||
"version": "6.5.8",
|
||||
"version_normalized": "6.5.8.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/guzzle.git",
|
||||
"reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba"
|
||||
"reference": "a52f0440530b54fa079ce76e8c5d196a42cad981"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba",
|
||||
"reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/a52f0440530b54fa079ce76e8c5d196a42cad981",
|
||||
"reference": "a52f0440530b54fa079ce76e8c5d196a42cad981",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"guzzlehttp/promises": "^1.0",
|
||||
"guzzlehttp/psr7": "^1.4",
|
||||
"php": ">=5.5"
|
||||
"guzzlehttp/psr7": "^1.9",
|
||||
"php": ">=5.5",
|
||||
"symfony/polyfill-intl-idn": "^1.17"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-curl": "*",
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
|
||||
"psr/log": "^1.0"
|
||||
"psr/log": "^1.1"
|
||||
},
|
||||
"suggest": {
|
||||
"psr/log": "Required for using the Log middleware"
|
||||
},
|
||||
"time": "2018-04-22T15:46:56+00:00",
|
||||
"time": "2022-06-20T22:16:07+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "6.3-dev"
|
||||
"dev-master": "6.5-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
@ -1199,10 +1201,40 @@
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Graham Campbell",
|
||||
"email": "hello@gjcampbell.co.uk",
|
||||
"homepage": "https://github.com/GrahamCampbell"
|
||||
},
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
},
|
||||
{
|
||||
"name": "Jeremy Lindblom",
|
||||
"email": "jeremeamia@gmail.com",
|
||||
"homepage": "https://github.com/jeremeamia"
|
||||
},
|
||||
{
|
||||
"name": "George Mponos",
|
||||
"email": "gmponos@gmail.com",
|
||||
"homepage": "https://github.com/gmponos"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Nyholm",
|
||||
"email": "tobias.nyholm@gmail.com",
|
||||
"homepage": "https://github.com/Nyholm"
|
||||
},
|
||||
{
|
||||
"name": "Márk Sági-Kazár",
|
||||
"email": "mark.sagikazar@gmail.com",
|
||||
"homepage": "https://github.com/sagikazarmark"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Schultze",
|
||||
"email": "webmaster@tubo-world.de",
|
||||
"homepage": "https://github.com/Tobion"
|
||||
}
|
||||
],
|
||||
"description": "Guzzle is a PHP HTTP client library",
|
||||
@ -1218,8 +1250,22 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/guzzle/issues",
|
||||
"source": "https://github.com/guzzle/guzzle/tree/master"
|
||||
"source": "https://github.com/guzzle/guzzle/tree/6.5.8"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/GrahamCampbell",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/Nyholm",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"install-path": "../guzzlehttp/guzzle"
|
||||
},
|
||||
{
|
||||
@ -1306,36 +1352,36 @@
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"version": "1.4.2",
|
||||
"version_normalized": "1.4.2.0",
|
||||
"version": "1.9.1",
|
||||
"version_normalized": "1.9.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/psr7.git",
|
||||
"reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c"
|
||||
"reference": "e4490cabc77465aaee90b20cfc9a770f8c04be6b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
|
||||
"reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/e4490cabc77465aaee90b20cfc9a770f8c04be6b",
|
||||
"reference": "e4490cabc77465aaee90b20cfc9a770f8c04be6b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4.0",
|
||||
"psr/http-message": "~1.0"
|
||||
"psr/http-message": "~1.0",
|
||||
"ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
|
||||
},
|
||||
"provide": {
|
||||
"psr/http-message-implementation": "1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0"
|
||||
"ext-zlib": "*",
|
||||
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10"
|
||||
},
|
||||
"time": "2017-03-20T17:10:46+00:00",
|
||||
"suggest": {
|
||||
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
|
||||
},
|
||||
"time": "2023-04-17T16:00:37+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"files": [
|
||||
@ -1350,13 +1396,34 @@
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Graham Campbell",
|
||||
"email": "hello@gjcampbell.co.uk",
|
||||
"homepage": "https://github.com/GrahamCampbell"
|
||||
},
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
},
|
||||
{
|
||||
"name": "George Mponos",
|
||||
"email": "gmponos@gmail.com",
|
||||
"homepage": "https://github.com/gmponos"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Nyholm",
|
||||
"email": "tobias.nyholm@gmail.com",
|
||||
"homepage": "https://github.com/Nyholm"
|
||||
},
|
||||
{
|
||||
"name": "Márk Sági-Kazár",
|
||||
"email": "mark.sagikazar@gmail.com",
|
||||
"homepage": "https://github.com/sagikazarmark"
|
||||
},
|
||||
{
|
||||
"name": "Tobias Schultze",
|
||||
"email": "webmaster@tubo-world.de",
|
||||
"homepage": "https://github.com/Tobion"
|
||||
}
|
||||
],
|
||||
@ -1364,6 +1431,7 @@
|
||||
"keywords": [
|
||||
"http",
|
||||
"message",
|
||||
"psr-7",
|
||||
"request",
|
||||
"response",
|
||||
"stream",
|
||||
@ -1372,8 +1440,22 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/psr7/issues",
|
||||
"source": "https://github.com/guzzle/psr7/tree/1.4.2"
|
||||
"source": "https://github.com/guzzle/psr7/tree/1.9.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/GrahamCampbell",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/Nyholm",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"install-path": "../guzzlehttp/psr7"
|
||||
},
|
||||
{
|
||||
@ -1791,32 +1873,32 @@
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem",
|
||||
"version": "1.0.48",
|
||||
"version_normalized": "1.0.48.0",
|
||||
"version": "1.1.4",
|
||||
"version_normalized": "1.1.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem.git",
|
||||
"reference": "a6ded5b2f6055e2db97b4b859fdfca2b952b78aa"
|
||||
"reference": "f3ad69181b8afed2c9edf7be5a2918144ff4ea32"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/a6ded5b2f6055e2db97b4b859fdfca2b952b78aa",
|
||||
"reference": "a6ded5b2f6055e2db97b4b859fdfca2b952b78aa",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/f3ad69181b8afed2c9edf7be5a2918144ff4ea32",
|
||||
"reference": "f3ad69181b8afed2c9edf7be5a2918144ff4ea32",
|
||||
"shasum": ""
|
||||
},
|
||||
"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",
|
||||
"phpunit/phpunit": "^5.7.10"
|
||||
"phpspec/prophecy": "^1.11.1",
|
||||
"phpunit/phpunit": "^8.5.8"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-fileinfo": "Required for MimeType",
|
||||
"ext-ftp": "Allows you to use FTP server storage",
|
||||
"ext-openssl": "Allows you to use FTPS server storage",
|
||||
"league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2",
|
||||
@ -1831,7 +1913,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": "2018-10-15T13:53:10+00:00",
|
||||
"time": "2021-06-23T21:56:05+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
@ -1876,10 +1958,75 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/flysystem/issues",
|
||||
"source": "https://github.com/thephpleague/flysystem/tree/master"
|
||||
"source": "https://github.com/thephpleague/flysystem/tree/1.1.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://offset.earth/frankdejonge",
|
||||
"type": "other"
|
||||
}
|
||||
],
|
||||
"install-path": "../league/flysystem"
|
||||
},
|
||||
{
|
||||
"name": "league/mime-type-detection",
|
||||
"version": "1.13.0",
|
||||
"version_normalized": "1.13.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/mime-type-detection.git",
|
||||
"reference": "a6dfb1194a2946fcdc1f38219445234f65b35c96"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/a6dfb1194a2946fcdc1f38219445234f65b35c96",
|
||||
"reference": "a6dfb1194a2946fcdc1f38219445234f65b35c96",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-fileinfo": "*",
|
||||
"php": "^7.4 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^3.2",
|
||||
"phpstan/phpstan": "^0.12.68",
|
||||
"phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0"
|
||||
},
|
||||
"time": "2023-08-05T12:09:49+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",
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/mime-type-detection/issues",
|
||||
"source": "https://github.com/thephpleague/mime-type-detection/tree/1.13.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/frankdejonge",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/league/flysystem",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"install-path": "../league/mime-type-detection"
|
||||
},
|
||||
{
|
||||
"name": "lord/laroute",
|
||||
"version": "2.4.7",
|
||||
@ -2907,6 +3054,53 @@
|
||||
},
|
||||
"install-path": "../rachidlaasri/laravel-installer"
|
||||
},
|
||||
{
|
||||
"name": "ralouphie/getallheaders",
|
||||
"version": "3.0.3",
|
||||
"version_normalized": "3.0.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ralouphie/getallheaders.git",
|
||||
"reference": "120b605dfeb996808c31b6477290a714d356e822"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
|
||||
"reference": "120b605dfeb996808c31b6477290a714d356e822",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.6"
|
||||
},
|
||||
"require-dev": {
|
||||
"php-coveralls/php-coveralls": "^2.1",
|
||||
"phpunit/phpunit": "^5 || ^6.5"
|
||||
},
|
||||
"time": "2019-03-08T08:55:37+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/getallheaders.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Ralph Khattar",
|
||||
"email": "ralph.khattar@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "A polyfill for getallheaders.",
|
||||
"support": {
|
||||
"issues": "https://github.com/ralouphie/getallheaders/issues",
|
||||
"source": "https://github.com/ralouphie/getallheaders/tree/develop"
|
||||
},
|
||||
"install-path": "../ralouphie/getallheaders"
|
||||
},
|
||||
{
|
||||
"name": "ramsey/uuid",
|
||||
"version": "3.9.6",
|
||||
@ -3841,6 +4035,183 @@
|
||||
},
|
||||
"install-path": "../symfony/polyfill-ctype"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-idn",
|
||||
"version": "v1.28.0",
|
||||
"version_normalized": "1.28.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-intl-idn.git",
|
||||
"reference": "ecaafce9f77234a6a449d29e49267ba10499116d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/ecaafce9f77234a6a449d29e49267ba10499116d",
|
||||
"reference": "ecaafce9f77234a6a449d29e49267ba10499116d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1",
|
||||
"symfony/polyfill-intl-normalizer": "^1.10",
|
||||
"symfony/polyfill-php72": "^1.10"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-intl": "For best performance"
|
||||
},
|
||||
"time": "2023-01-26T09:30:37+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.28-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Intl\\Idn\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Laurent Bassin",
|
||||
"email": "laurent@bassin.info"
|
||||
},
|
||||
{
|
||||
"name": "Trevor Rowbotham",
|
||||
"email": "trevor.rowbotham@pm.me"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"idn",
|
||||
"intl",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.28.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"install-path": "../symfony/polyfill-intl-idn"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-normalizer",
|
||||
"version": "v1.28.0",
|
||||
"version_normalized": "1.28.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
|
||||
"reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92",
|
||||
"reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-intl": "For best performance"
|
||||
},
|
||||
"time": "2023-01-26T09:26:14+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.28-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Intl\\Normalizer\\": ""
|
||||
},
|
||||
"classmap": [
|
||||
"Resources/stubs"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill for intl's Normalizer class and related functions",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"intl",
|
||||
"normalizer",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"install-path": "../symfony/polyfill-intl-normalizer"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.24.0",
|
||||
@ -3992,6 +4363,85 @@
|
||||
},
|
||||
"install-path": "../symfony/polyfill-php70"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php72",
|
||||
"version": "v1.28.0",
|
||||
"version_normalized": "1.28.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php72.git",
|
||||
"reference": "70f4aebd92afca2f865444d30a4d2151c13c3179"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/70f4aebd92afca2f865444d30a4d2151c13c3179",
|
||||
"reference": "70f4aebd92afca2f865444d30a4d2151c13c3179",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"time": "2023-01-26T09:26:14+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.28-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Php72\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-php72/tree/v1.28.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"install-path": "../symfony/polyfill-php72"
|
||||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
"version": "v3.4.18",
|
||||
|
73
vendor/composer/installed.php
vendored
73
vendor/composer/installed.php
vendored
@ -3,7 +3,7 @@
|
||||
'name' => 'freescout-helpdesk/freescout',
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'reference' => '584d84475ad9c19d93498221f5cc8444e7dc715e',
|
||||
'reference' => '66c1ca83d93c19083cd107f5b2a7a3b8ec67123c',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
@ -146,9 +146,9 @@
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'erusev/parsedown' => array(
|
||||
'pretty_version' => '1.7.1',
|
||||
'version' => '1.7.1.0',
|
||||
'reference' => '92e9c27ba0e74b8b028b111d1b6f956a15c01fc1',
|
||||
'pretty_version' => 'v1.7.2',
|
||||
'version' => '1.7.2.0',
|
||||
'reference' => 'd60bcdc46978357759ecb13cb4b078da783f8faf',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../erusev/parsedown',
|
||||
'aliases' => array(),
|
||||
@ -175,16 +175,16 @@
|
||||
'freescout-helpdesk/freescout' => array(
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'reference' => '584d84475ad9c19d93498221f5cc8444e7dc715e',
|
||||
'reference' => '66c1ca83d93c19083cd107f5b2a7a3b8ec67123c',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'guzzlehttp/guzzle' => array(
|
||||
'pretty_version' => '6.3.3',
|
||||
'version' => '6.3.3.0',
|
||||
'reference' => '407b0cb880ace85c9b63c5f9551db498cb2d50ba',
|
||||
'pretty_version' => '6.5.8',
|
||||
'version' => '6.5.8.0',
|
||||
'reference' => 'a52f0440530b54fa079ce76e8c5d196a42cad981',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
|
||||
'aliases' => array(),
|
||||
@ -200,9 +200,9 @@
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'guzzlehttp/psr7' => array(
|
||||
'pretty_version' => '1.4.2',
|
||||
'version' => '1.4.2.0',
|
||||
'reference' => 'f5b8a8512e2b58b0071a7280e39f14f72e05d87c',
|
||||
'pretty_version' => '1.9.1',
|
||||
'version' => '1.9.1.0',
|
||||
'reference' => 'e4490cabc77465aaee90b20cfc9a770f8c04be6b',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../guzzlehttp/psr7',
|
||||
'aliases' => array(),
|
||||
@ -431,14 +431,23 @@
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'league/flysystem' => array(
|
||||
'pretty_version' => '1.0.48',
|
||||
'version' => '1.0.48.0',
|
||||
'reference' => 'a6ded5b2f6055e2db97b4b859fdfca2b952b78aa',
|
||||
'pretty_version' => '1.1.4',
|
||||
'version' => '1.1.4.0',
|
||||
'reference' => 'f3ad69181b8afed2c9edf7be5a2918144ff4ea32',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../league/flysystem',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'league/mime-type-detection' => array(
|
||||
'pretty_version' => '1.13.0',
|
||||
'version' => '1.13.0.0',
|
||||
'reference' => 'a6dfb1194a2946fcdc1f38219445234f65b35c96',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../league/mime-type-detection',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'lord/laroute' => array(
|
||||
'pretty_version' => '2.4.7',
|
||||
'version' => '2.4.7.0',
|
||||
@ -596,6 +605,15 @@
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'ralouphie/getallheaders' => array(
|
||||
'pretty_version' => '3.0.3',
|
||||
'version' => '3.0.3.0',
|
||||
'reference' => '120b605dfeb996808c31b6477290a714d356e822',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../ralouphie/getallheaders',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'ramsey/uuid' => array(
|
||||
'pretty_version' => '3.9.6',
|
||||
'version' => '3.9.6.0',
|
||||
@ -719,6 +737,24 @@
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-intl-idn' => array(
|
||||
'pretty_version' => 'v1.28.0',
|
||||
'version' => '1.28.0.0',
|
||||
'reference' => 'ecaafce9f77234a6a449d29e49267ba10499116d',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-intl-normalizer' => array(
|
||||
'pretty_version' => 'v1.28.0',
|
||||
'version' => '1.28.0.0',
|
||||
'reference' => '8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-mbstring' => array(
|
||||
'pretty_version' => 'v1.24.0',
|
||||
'version' => '1.24.0.0',
|
||||
@ -737,6 +773,15 @@
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-php72' => array(
|
||||
'pretty_version' => 'v1.28.0',
|
||||
'version' => '1.28.0.0',
|
||||
'reference' => '70f4aebd92afca2f865444d30a4d2151c13c3179',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-php72',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/process' => array(
|
||||
'pretty_version' => 'v3.4.18',
|
||||
'version' => '3.4.18.0',
|
||||
|
18
vendor/erusev/parsedown/Parsedown.php
vendored
18
vendor/erusev/parsedown/Parsedown.php
vendored
@ -17,7 +17,7 @@ class Parsedown
|
||||
{
|
||||
# ~
|
||||
|
||||
const version = '1.7.1';
|
||||
const version = '1.7.2';
|
||||
|
||||
# ~
|
||||
|
||||
@ -429,7 +429,21 @@ class Parsedown
|
||||
|
||||
if (isset($matches[1]))
|
||||
{
|
||||
$class = 'language-'.$matches[1];
|
||||
/**
|
||||
* https://www.w3.org/TR/2011/WD-html5-20110525/elements.html#classes
|
||||
* Every HTML element may have a class attribute specified.
|
||||
* The attribute, if specified, must have a value that is a set
|
||||
* of space-separated tokens representing the various classes
|
||||
* that the element belongs to.
|
||||
* [...]
|
||||
* The space characters, for the purposes of this specification,
|
||||
* are U+0020 SPACE, U+0009 CHARACTER TABULATION (tab),
|
||||
* U+000A LINE FEED (LF), U+000C FORM FEED (FF), and
|
||||
* U+000D CARRIAGE RETURN (CR).
|
||||
*/
|
||||
$language = substr($matches[1], 0, strcspn($matches[1], " \t\n\f\r"));
|
||||
|
||||
$class = 'language-'.$language;
|
||||
|
||||
$Element['attributes'] = array(
|
||||
'class' => $class,
|
||||
|
18
vendor/guzzlehttp/guzzle/Dockerfile
vendored
Normal file
18
vendor/guzzlehttp/guzzle/Dockerfile
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
FROM composer:latest as setup
|
||||
|
||||
RUN mkdir /guzzle
|
||||
|
||||
WORKDIR /guzzle
|
||||
|
||||
RUN set -xe \
|
||||
&& composer init --name=guzzlehttp/test --description="Simple project for testing Guzzle scripts" --author="Márk Sági-Kazár <mark.sagikazar@gmail.com>" --no-interaction \
|
||||
&& composer require guzzlehttp/guzzle
|
||||
|
||||
|
||||
FROM php:7.3
|
||||
|
||||
RUN mkdir /guzzle
|
||||
|
||||
WORKDIR /guzzle
|
||||
|
||||
COPY --from=setup /guzzle /guzzle
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
namespace GuzzleHttp;
|
||||
|
||||
use GuzzleHttp\Promise\PromiseInterface;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use GuzzleHttp\Promise\PromiseInterface;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\UriInterface;
|
||||
@ -12,7 +12,10 @@ use Psr\Http\Message\UriInterface;
|
||||
*/
|
||||
interface ClientInterface
|
||||
{
|
||||
const VERSION = '6.3.3';
|
||||
/**
|
||||
* @deprecated Will be removed in Guzzle 7.0.0
|
||||
*/
|
||||
const VERSION = '6.5.5';
|
||||
|
||||
/**
|
||||
* Send an HTTP request.
|
||||
|
@ -58,9 +58,9 @@ interface CookieJarInterface extends \Countable, \IteratorAggregate
|
||||
* arguments, then the cookie with the specified name, path and domain is
|
||||
* removed.
|
||||
*
|
||||
* @param string $domain Clears cookies matching a domain
|
||||
* @param string $path Clears cookies matching a domain and path
|
||||
* @param string $name Clears cookies matching a domain, path, and name
|
||||
* @param string|null $domain Clears cookies matching a domain
|
||||
* @param string|null $path Clears cookies matching a domain and path
|
||||
* @param string|null $name Clears cookies matching a domain, path, and name
|
||||
*
|
||||
* @return CookieJarInterface
|
||||
*/
|
||||
|
@ -23,6 +23,7 @@ class FileCookieJar extends CookieJar
|
||||
*/
|
||||
public function __construct($cookieFile, $storeSessionCookies = false)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->filename = $cookieFile;
|
||||
$this->storeSessionCookies = $storeSessionCookies;
|
||||
|
||||
@ -56,7 +57,7 @@ class FileCookieJar extends CookieJar
|
||||
}
|
||||
|
||||
$jsonStr = \GuzzleHttp\json_encode($json);
|
||||
if (false === file_put_contents($filename, $jsonStr)) {
|
||||
if (false === file_put_contents($filename, $jsonStr, LOCK_EX)) {
|
||||
throw new \RuntimeException("Unable to save file {$filename}");
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ class SessionCookieJar extends CookieJar
|
||||
*/
|
||||
public function __construct($sessionKey, $storeSessionCookies = false)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->sessionKey = $sessionKey;
|
||||
$this->storeSessionCookies = $storeSessionCookies;
|
||||
$this->load();
|
||||
|
@ -227,7 +227,7 @@ class SetCookie
|
||||
/**
|
||||
* Get whether or not this is a secure cookie
|
||||
*
|
||||
* @return null|bool
|
||||
* @return bool|null
|
||||
*/
|
||||
public function getSecure()
|
||||
{
|
||||
@ -247,7 +247,7 @@ class SetCookie
|
||||
/**
|
||||
* Get whether or not this is a session cookie
|
||||
*
|
||||
* @return null|bool
|
||||
* @return bool|null
|
||||
*/
|
||||
public function getDiscard()
|
||||
{
|
||||
@ -333,12 +333,19 @@ class SetCookie
|
||||
*/
|
||||
public function matchesDomain($domain)
|
||||
{
|
||||
$cookieDomain = $this->getDomain();
|
||||
if (null === $cookieDomain) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Remove the leading '.' as per spec in RFC 6265.
|
||||
// http://tools.ietf.org/html/rfc6265#section-5.2.3
|
||||
$cookieDomain = ltrim($this->getDomain(), '.');
|
||||
$cookieDomain = ltrim(strtolower($cookieDomain), '.');
|
||||
|
||||
$domain = strtolower($domain);
|
||||
|
||||
// Domain not set or exact match.
|
||||
if (!$cookieDomain || !strcasecmp($domain, $cookieDomain)) {
|
||||
if ('' === $cookieDomain || $domain === $cookieDomain) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -4,4 +4,6 @@ namespace GuzzleHttp\Exception;
|
||||
/**
|
||||
* Exception when a client error is encountered (4xx codes)
|
||||
*/
|
||||
class ClientException extends BadResponseException {}
|
||||
class ClientException extends BadResponseException
|
||||
{
|
||||
}
|
||||
|
@ -1,13 +1,23 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
/**
|
||||
* @method string getMessage()
|
||||
* @method \Throwable|null getPrevious()
|
||||
* @method mixed getCode()
|
||||
* @method string getFile()
|
||||
* @method int getLine()
|
||||
* @method array getTrace()
|
||||
* @method string getTraceAsString()
|
||||
*/
|
||||
interface GuzzleException {}
|
||||
use Throwable;
|
||||
|
||||
if (interface_exists(Throwable::class)) {
|
||||
interface GuzzleException extends Throwable
|
||||
{
|
||||
}
|
||||
} else {
|
||||
/**
|
||||
* @method string getMessage()
|
||||
* @method \Throwable|null getPrevious()
|
||||
* @method mixed getCode()
|
||||
* @method string getFile()
|
||||
* @method int getLine()
|
||||
* @method array getTrace()
|
||||
* @method string getTraceAsString()
|
||||
*/
|
||||
interface GuzzleException
|
||||
{
|
||||
}
|
||||
}
|
||||
|
7
vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php
vendored
Normal file
7
vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
final class InvalidArgumentException extends \InvalidArgumentException implements GuzzleException
|
||||
{
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
use GuzzleHttp\Promise\PromiseInterface;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use GuzzleHttp\Promise\PromiseInterface;
|
||||
use Psr\Http\Message\UriInterface;
|
||||
|
||||
/**
|
||||
@ -14,7 +14,7 @@ class RequestException extends TransferException
|
||||
/** @var RequestInterface */
|
||||
private $request;
|
||||
|
||||
/** @var ResponseInterface */
|
||||
/** @var ResponseInterface|null */
|
||||
private $response;
|
||||
|
||||
/** @var array */
|
||||
@ -124,42 +124,17 @@ class RequestException extends TransferException
|
||||
*/
|
||||
public static function getResponseBodySummary(ResponseInterface $response)
|
||||
{
|
||||
$body = $response->getBody();
|
||||
|
||||
if (!$body->isSeekable()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$size = $body->getSize();
|
||||
|
||||
if ($size === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$summary = $body->read(120);
|
||||
$body->rewind();
|
||||
|
||||
if ($size > 120) {
|
||||
$summary .= ' (truncated...)';
|
||||
}
|
||||
|
||||
// Matches any printable character, including unicode characters:
|
||||
// letters, marks, numbers, punctuation, spacing, and separators.
|
||||
if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/', $summary)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $summary;
|
||||
return \GuzzleHttp\Psr7\get_message_body_summary($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Obfuscates URI if there is an username and a password present
|
||||
* Obfuscates URI if there is a username and a password present
|
||||
*
|
||||
* @param UriInterface $uri
|
||||
*
|
||||
* @return UriInterface
|
||||
*/
|
||||
private static function obfuscateUri($uri)
|
||||
private static function obfuscateUri(UriInterface $uri)
|
||||
{
|
||||
$userInfo = $uri->getUserInfo();
|
||||
|
||||
|
@ -4,4 +4,6 @@ namespace GuzzleHttp\Exception;
|
||||
/**
|
||||
* Exception when a server error is encountered (5xx codes)
|
||||
*/
|
||||
class ServerException extends BadResponseException {}
|
||||
class ServerException extends BadResponseException
|
||||
{
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
class TooManyRedirectsException extends RequestException {}
|
||||
class TooManyRedirectsException extends RequestException
|
||||
{
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
class TransferException extends \RuntimeException implements GuzzleException {}
|
||||
class TransferException extends \RuntimeException implements GuzzleException
|
||||
{
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Handler;
|
||||
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use GuzzleHttp\Exception\ConnectException;
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use GuzzleHttp\Promise\FulfilledPromise;
|
||||
use GuzzleHttp\Psr7;
|
||||
use GuzzleHttp\Psr7\LazyOpenStream;
|
||||
@ -14,6 +14,9 @@ use Psr\Http\Message\RequestInterface;
|
||||
*/
|
||||
class CurlFactory implements CurlFactoryInterface
|
||||
{
|
||||
const CURL_VERSION_STR = 'curl_version';
|
||||
const LOW_CURL_VERSION_NUMBER = '7.21.2';
|
||||
|
||||
/** @var array */
|
||||
private $handles = [];
|
||||
|
||||
@ -117,6 +120,7 @@ class CurlFactory implements CurlFactoryInterface
|
||||
private static function invokeStats(EasyHandle $easy)
|
||||
{
|
||||
$curlStats = curl_getinfo($easy->handle);
|
||||
$curlStats['appconnect_time'] = curl_getinfo($easy->handle, CURLINFO_APPCONNECT_TIME);
|
||||
$stats = new TransferStats(
|
||||
$easy->request,
|
||||
$easy->response,
|
||||
@ -136,7 +140,9 @@ class CurlFactory implements CurlFactoryInterface
|
||||
$ctx = [
|
||||
'errno' => $easy->errno,
|
||||
'error' => curl_error($easy->handle),
|
||||
'appconnect_time' => curl_getinfo($easy->handle, CURLINFO_APPCONNECT_TIME),
|
||||
] + curl_getinfo($easy->handle);
|
||||
$ctx[self::CURL_VERSION_STR] = curl_version()['version'];
|
||||
$factory->release($easy);
|
||||
|
||||
// Retry when nothing is present or when curl failed to rewind.
|
||||
@ -172,13 +178,22 @@ class CurlFactory implements CurlFactoryInterface
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$message = sprintf(
|
||||
'cURL error %s: %s (%s)',
|
||||
$ctx['errno'],
|
||||
$ctx['error'],
|
||||
'see http://curl.haxx.se/libcurl/c/libcurl-errors.html'
|
||||
);
|
||||
if (version_compare($ctx[self::CURL_VERSION_STR], self::LOW_CURL_VERSION_NUMBER)) {
|
||||
$message = sprintf(
|
||||
'cURL error %s: %s (%s)',
|
||||
$ctx['errno'],
|
||||
$ctx['error'],
|
||||
'see https://curl.haxx.se/libcurl/c/libcurl-errors.html'
|
||||
);
|
||||
} else {
|
||||
$message = sprintf(
|
||||
'cURL error %s: %s (%s) for %s',
|
||||
$ctx['errno'],
|
||||
$ctx['error'],
|
||||
'see https://curl.haxx.se/libcurl/c/libcurl-errors.html',
|
||||
$easy->request->getUri()
|
||||
);
|
||||
}
|
||||
|
||||
// Create a connection exception if it was a specific error code.
|
||||
$error = isset($connectionErrors[$easy->errno])
|
||||
@ -439,11 +454,16 @@ class CurlFactory implements CurlFactoryInterface
|
||||
}
|
||||
|
||||
if (isset($options['ssl_key'])) {
|
||||
$sslKey = $options['ssl_key'];
|
||||
if (is_array($sslKey)) {
|
||||
$conf[CURLOPT_SSLKEYPASSWD] = $sslKey[1];
|
||||
$sslKey = $sslKey[0];
|
||||
if (is_array($options['ssl_key'])) {
|
||||
if (count($options['ssl_key']) === 2) {
|
||||
list($sslKey, $conf[CURLOPT_SSLKEYPASSWD]) = $options['ssl_key'];
|
||||
} else {
|
||||
list($sslKey) = $options['ssl_key'];
|
||||
}
|
||||
}
|
||||
|
||||
$sslKey = isset($sslKey) ? $sslKey: $options['ssl_key'];
|
||||
|
||||
if (!file_exists($sslKey)) {
|
||||
throw new \InvalidArgumentException(
|
||||
"SSL private key not found: {$sslKey}"
|
||||
|
@ -3,7 +3,7 @@ namespace GuzzleHttp\Handler;
|
||||
|
||||
use GuzzleHttp\Promise as P;
|
||||
use GuzzleHttp\Promise\Promise;
|
||||
use GuzzleHttp\Psr7;
|
||||
use GuzzleHttp\Utils;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
|
||||
/**
|
||||
@ -23,6 +23,7 @@ class CurlMultiHandler
|
||||
private $active;
|
||||
private $handles = [];
|
||||
private $delays = [];
|
||||
private $options = [];
|
||||
|
||||
/**
|
||||
* This handler accepts the following options:
|
||||
@ -30,6 +31,8 @@ class CurlMultiHandler
|
||||
* - handle_factory: An optional factory used to create curl handles
|
||||
* - select_timeout: Optional timeout (in seconds) to block before timing
|
||||
* out while selecting curl handles. Defaults to 1 second.
|
||||
* - options: An associative array of CURLMOPT_* options and
|
||||
* corresponding values for curl_multi_setopt()
|
||||
*
|
||||
* @param array $options
|
||||
*/
|
||||
@ -37,14 +40,31 @@ class CurlMultiHandler
|
||||
{
|
||||
$this->factory = isset($options['handle_factory'])
|
||||
? $options['handle_factory'] : new CurlFactory(50);
|
||||
$this->selectTimeout = isset($options['select_timeout'])
|
||||
? $options['select_timeout'] : 1;
|
||||
|
||||
if (isset($options['select_timeout'])) {
|
||||
$this->selectTimeout = $options['select_timeout'];
|
||||
} elseif ($selectTimeout = getenv('GUZZLE_CURL_SELECT_TIMEOUT')) {
|
||||
$this->selectTimeout = $selectTimeout;
|
||||
} else {
|
||||
$this->selectTimeout = 1;
|
||||
}
|
||||
|
||||
$this->options = isset($options['options']) ? $options['options'] : [];
|
||||
}
|
||||
|
||||
public function __get($name)
|
||||
{
|
||||
if ($name === '_mh') {
|
||||
return $this->_mh = curl_multi_init();
|
||||
$this->_mh = curl_multi_init();
|
||||
|
||||
foreach ($this->options as $option => $value) {
|
||||
// A warning is raised in case of a wrong option.
|
||||
curl_multi_setopt($this->_mh, $option, $value);
|
||||
}
|
||||
|
||||
// Further calls to _mh will return the value directly, without entering the
|
||||
// __get() method at all.
|
||||
return $this->_mh;
|
||||
}
|
||||
|
||||
throw new \BadMethodCallException();
|
||||
@ -82,7 +102,7 @@ class CurlMultiHandler
|
||||
{
|
||||
// Add any delayed handles if needed.
|
||||
if ($this->delays) {
|
||||
$currentTime = microtime(true);
|
||||
$currentTime = Utils::currentTime();
|
||||
foreach ($this->delays as $id => $delay) {
|
||||
if ($currentTime >= $delay) {
|
||||
unset($this->delays[$id]);
|
||||
@ -134,7 +154,7 @@ class CurlMultiHandler
|
||||
if (empty($easy->options['delay'])) {
|
||||
curl_multi_add_handle($this->_mh, $easy->handle);
|
||||
} else {
|
||||
$this->delays[$id] = microtime(true) + ($easy->options['delay'] / 1000);
|
||||
$this->delays[$id] = Utils::currentTime() + ($easy->options['delay'] / 1000);
|
||||
}
|
||||
}
|
||||
|
||||
@ -186,7 +206,7 @@ class CurlMultiHandler
|
||||
|
||||
private function timeToNext()
|
||||
{
|
||||
$currentTime = microtime(true);
|
||||
$currentTime = Utils::currentTime();
|
||||
$nextTime = PHP_INT_MAX;
|
||||
foreach ($this->delays as $time) {
|
||||
if ($time < $nextTime) {
|
||||
|
@ -66,7 +66,7 @@ class MockHandler implements \Countable
|
||||
throw new \OutOfBoundsException('Mock queue is empty');
|
||||
}
|
||||
|
||||
if (isset($options['delay'])) {
|
||||
if (isset($options['delay']) && is_numeric($options['delay'])) {
|
||||
usleep($options['delay'] * 1000);
|
||||
}
|
||||
|
||||
@ -175,6 +175,11 @@ class MockHandler implements \Countable
|
||||
return count($this->queue);
|
||||
}
|
||||
|
||||
public function reset()
|
||||
{
|
||||
$this->queue = [];
|
||||
}
|
||||
|
||||
private function invokeStats(
|
||||
RequestInterface $request,
|
||||
array $options,
|
||||
@ -182,7 +187,8 @@ class MockHandler implements \Countable
|
||||
$reason = null
|
||||
) {
|
||||
if (isset($options['on_stats'])) {
|
||||
$stats = new TransferStats($request, $response, 0, $reason);
|
||||
$transferTime = isset($options['transfer_time']) ? $options['transfer_time'] : 0;
|
||||
$stats = new TransferStats($request, $response, $transferTime, $reason);
|
||||
call_user_func($options['on_stats'], $stats);
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,13 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Handler;
|
||||
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use GuzzleHttp\Exception\ConnectException;
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use GuzzleHttp\Promise\FulfilledPromise;
|
||||
use GuzzleHttp\Promise\PromiseInterface;
|
||||
use GuzzleHttp\Psr7;
|
||||
use GuzzleHttp\TransferStats;
|
||||
use GuzzleHttp\Utils;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
@ -33,7 +34,7 @@ class StreamHandler
|
||||
usleep($options['delay'] * 1000);
|
||||
}
|
||||
|
||||
$startTime = isset($options['on_stats']) ? microtime(true) : null;
|
||||
$startTime = isset($options['on_stats']) ? Utils::currentTime() : null;
|
||||
|
||||
try {
|
||||
// Does not support the expect header.
|
||||
@ -42,7 +43,7 @@ class StreamHandler
|
||||
// Append a content-length header if body size is zero to match
|
||||
// cURL's behavior.
|
||||
if (0 === $request->getBody()->getSize()) {
|
||||
$request = $request->withHeader('Content-Length', 0);
|
||||
$request = $request->withHeader('Content-Length', '0');
|
||||
}
|
||||
|
||||
return $this->createResponse(
|
||||
@ -82,7 +83,7 @@ class StreamHandler
|
||||
$stats = new TransferStats(
|
||||
$request,
|
||||
$response,
|
||||
microtime(true) - $startTime,
|
||||
Utils::currentTime() - $startTime,
|
||||
$error,
|
||||
[]
|
||||
);
|
||||
@ -343,13 +344,25 @@ class StreamHandler
|
||||
if ('v4' === $options['force_ip_resolve']) {
|
||||
$records = dns_get_record($uri->getHost(), DNS_A);
|
||||
if (!isset($records[0]['ip'])) {
|
||||
throw new ConnectException(sprintf("Could not resolve IPv4 address for host '%s'", $uri->getHost()), $request);
|
||||
throw new ConnectException(
|
||||
sprintf(
|
||||
"Could not resolve IPv4 address for host '%s'",
|
||||
$uri->getHost()
|
||||
),
|
||||
$request
|
||||
);
|
||||
}
|
||||
$uri = $uri->withHost($records[0]['ip']);
|
||||
} elseif ('v6' === $options['force_ip_resolve']) {
|
||||
$records = dns_get_record($uri->getHost(), DNS_AAAA);
|
||||
if (!isset($records[0]['ipv6'])) {
|
||||
throw new ConnectException(sprintf("Could not resolve IPv6 address for host '%s'", $uri->getHost()), $request);
|
||||
throw new ConnectException(
|
||||
sprintf(
|
||||
"Could not resolve IPv6 address for host '%s'",
|
||||
$uri->getHost()
|
||||
),
|
||||
$request
|
||||
);
|
||||
}
|
||||
$uri = $uri->withHost('[' . $records[0]['ipv6'] . ']');
|
||||
}
|
||||
|
14
vendor/guzzlehttp/guzzle/src/HandlerStack.php
vendored
14
vendor/guzzlehttp/guzzle/src/HandlerStack.php
vendored
@ -1,7 +1,9 @@
|
||||
<?php
|
||||
namespace GuzzleHttp;
|
||||
|
||||
use GuzzleHttp\Promise\PromiseInterface;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
/**
|
||||
* Creates a composed Guzzle handler function by stacking middlewares on top of
|
||||
@ -9,7 +11,7 @@ use Psr\Http\Message\RequestInterface;
|
||||
*/
|
||||
class HandlerStack
|
||||
{
|
||||
/** @var callable */
|
||||
/** @var callable|null */
|
||||
private $handler;
|
||||
|
||||
/** @var array */
|
||||
@ -59,6 +61,8 @@ class HandlerStack
|
||||
*
|
||||
* @param RequestInterface $request
|
||||
* @param array $options
|
||||
*
|
||||
* @return ResponseInterface|PromiseInterface
|
||||
*/
|
||||
public function __invoke(RequestInterface $request, array $options)
|
||||
{
|
||||
@ -206,7 +210,7 @@ class HandlerStack
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $name
|
||||
* @param string $name
|
||||
* @return int
|
||||
*/
|
||||
private function findByName($name)
|
||||
@ -223,10 +227,10 @@ class HandlerStack
|
||||
/**
|
||||
* Splices a function into the middleware list at a specific position.
|
||||
*
|
||||
* @param $findName
|
||||
* @param $withName
|
||||
* @param string $findName
|
||||
* @param string $withName
|
||||
* @param callable $middleware
|
||||
* @param $before
|
||||
* @param bool $before
|
||||
*/
|
||||
private function splice($findName, $withName, callable $middleware, $before)
|
||||
{
|
||||
|
@ -168,6 +168,11 @@ class MessageFormatter
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get headers from message as string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function headers(MessageInterface $message)
|
||||
{
|
||||
$result = '';
|
||||
|
7
vendor/guzzlehttp/guzzle/src/Middleware.php
vendored
7
vendor/guzzlehttp/guzzle/src/Middleware.php
vendored
@ -7,7 +7,6 @@ use GuzzleHttp\Promise\RejectedPromise;
|
||||
use GuzzleHttp\Psr7;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Psr\Log\LogLevel;
|
||||
|
||||
/**
|
||||
* Functions used to create and wrap handlers with handler middleware.
|
||||
@ -39,7 +38,7 @@ final class Middleware
|
||||
$cookieJar->extractCookies($request, $response);
|
||||
return $response;
|
||||
}
|
||||
);
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
@ -58,7 +57,7 @@ final class Middleware
|
||||
return $handler($request, $options);
|
||||
}
|
||||
return $handler($request, $options)->then(
|
||||
function (ResponseInterface $response) use ($request, $handler) {
|
||||
function (ResponseInterface $response) use ($request) {
|
||||
$code = $response->getStatusCode();
|
||||
if ($code < 400) {
|
||||
return $response;
|
||||
@ -183,7 +182,7 @@ final class Middleware
|
||||
*
|
||||
* @return callable Returns a function that accepts the next handler.
|
||||
*/
|
||||
public static function log(LoggerInterface $logger, MessageFormatter $formatter, $logLevel = LogLevel::INFO)
|
||||
public static function log(LoggerInterface $logger, MessageFormatter $formatter, $logLevel = 'info' /* \Psr\Log\LogLevel::INFO */)
|
||||
{
|
||||
return function (callable $handler) use ($logger, $formatter, $logLevel) {
|
||||
return function ($request, array $options) use ($handler, $logger, $formatter, $logLevel) {
|
||||
|
15
vendor/guzzlehttp/guzzle/src/Pool.php
vendored
15
vendor/guzzlehttp/guzzle/src/Pool.php
vendored
@ -1,12 +1,13 @@
|
||||
<?php
|
||||
namespace GuzzleHttp;
|
||||
|
||||
use GuzzleHttp\Promise\EachPromise;
|
||||
use GuzzleHttp\Promise\PromiseInterface;
|
||||
use GuzzleHttp\Promise\PromisorInterface;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use GuzzleHttp\Promise\EachPromise;
|
||||
|
||||
/**
|
||||
* Sends and iterator of requests concurrently using a capped pool size.
|
||||
* Sends an iterator of requests concurrently using a capped pool size.
|
||||
*
|
||||
* The pool will read from an iterator until it is cancelled or until the
|
||||
* iterator is consumed. When a request is yielded, the request is sent after
|
||||
@ -69,6 +70,11 @@ class Pool implements PromisorInterface
|
||||
$this->each = new EachPromise($requests(), $config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get promise
|
||||
*
|
||||
* @return PromiseInterface
|
||||
*/
|
||||
public function promise()
|
||||
{
|
||||
return $this->each->promise();
|
||||
@ -106,6 +112,11 @@ class Pool implements PromisorInterface
|
||||
return $res;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute callback(s)
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private static function cmpCallback(array &$options, $name, array &$results)
|
||||
{
|
||||
if (!isset($options[$name])) {
|
||||
|
@ -66,6 +66,11 @@ class PrepareBodyMiddleware
|
||||
return $fn(Psr7\modify_request($request, $modify), $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add expect header
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function addExpectHeader(
|
||||
RequestInterface $request,
|
||||
array $options,
|
||||
|
@ -13,7 +13,7 @@ use Psr\Http\Message\UriInterface;
|
||||
* Request redirect middleware.
|
||||
*
|
||||
* Apply this middleware like other middleware using
|
||||
* {@see GuzzleHttp\Middleware::redirect()}.
|
||||
* {@see \GuzzleHttp\Middleware::redirect()}.
|
||||
*/
|
||||
class RedirectMiddleware
|
||||
{
|
||||
@ -76,7 +76,7 @@ class RedirectMiddleware
|
||||
/**
|
||||
* @param RequestInterface $request
|
||||
* @param array $options
|
||||
* @param ResponseInterface|PromiseInterface $response
|
||||
* @param ResponseInterface $response
|
||||
*
|
||||
* @return ResponseInterface|PromiseInterface
|
||||
*/
|
||||
@ -94,6 +94,14 @@ class RedirectMiddleware
|
||||
$this->guardMax($request, $options);
|
||||
$nextRequest = $this->modifyRequest($request, $options, $response);
|
||||
|
||||
// If authorization is handled by curl, unset it if URI is cross-origin.
|
||||
if (Psr7\UriComparator::isCrossOrigin($request->getUri(), $nextRequest->getUri()) && defined('\CURLOPT_HTTPAUTH')) {
|
||||
unset(
|
||||
$options['curl'][\CURLOPT_HTTPAUTH],
|
||||
$options['curl'][\CURLOPT_USERPWD]
|
||||
);
|
||||
}
|
||||
|
||||
if (isset($options['allow_redirects']['on_redirect'])) {
|
||||
call_user_func(
|
||||
$options['allow_redirects']['on_redirect'],
|
||||
@ -118,6 +126,11 @@ class RedirectMiddleware
|
||||
return $promise;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable tracking on promise.
|
||||
*
|
||||
* @return PromiseInterface
|
||||
*/
|
||||
private function withTracking(PromiseInterface $promise, $uri, $statusCode)
|
||||
{
|
||||
return $promise->then(
|
||||
@ -135,6 +148,13 @@ class RedirectMiddleware
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for too many redirects.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws TooManyRedirectsException Too many redirects.
|
||||
*/
|
||||
private function guardMax(RequestInterface $request, array &$options)
|
||||
{
|
||||
$current = isset($options['__redirect_count'])
|
||||
@ -172,13 +192,19 @@ class RedirectMiddleware
|
||||
// would do.
|
||||
$statusCode = $response->getStatusCode();
|
||||
if ($statusCode == 303 ||
|
||||
($statusCode <= 302 && $request->getBody() && !$options['allow_redirects']['strict'])
|
||||
($statusCode <= 302 && !$options['allow_redirects']['strict'])
|
||||
) {
|
||||
$modify['method'] = 'GET';
|
||||
$modify['body'] = '';
|
||||
}
|
||||
|
||||
$modify['uri'] = $this->redirectUri($request, $response, $protocols);
|
||||
$uri = self::redirectUri($request, $response, $protocols);
|
||||
if (isset($options['idn_conversion']) && ($options['idn_conversion'] !== false)) {
|
||||
$idnOptions = ($options['idn_conversion'] === true) ? IDNA_DEFAULT : $options['idn_conversion'];
|
||||
$uri = Utils::idnUriConvert($uri, $idnOptions);
|
||||
}
|
||||
|
||||
$modify['uri'] = $uri;
|
||||
Psr7\rewind_body($request);
|
||||
|
||||
// Add the Referer header if it is told to do so and only
|
||||
@ -186,22 +212,23 @@ class RedirectMiddleware
|
||||
if ($options['allow_redirects']['referer']
|
||||
&& $modify['uri']->getScheme() === $request->getUri()->getScheme()
|
||||
) {
|
||||
$uri = $request->getUri()->withUserInfo('', '');
|
||||
$uri = $request->getUri()->withUserInfo('');
|
||||
$modify['set_headers']['Referer'] = (string) $uri;
|
||||
} else {
|
||||
$modify['remove_headers'][] = 'Referer';
|
||||
}
|
||||
|
||||
// Remove Authorization header if host is different.
|
||||
if ($request->getUri()->getHost() !== $modify['uri']->getHost()) {
|
||||
// Remove Authorization and Cookie headers if URI is cross-origin.
|
||||
if (Psr7\UriComparator::isCrossOrigin($request->getUri(), $modify['uri'])) {
|
||||
$modify['remove_headers'][] = 'Authorization';
|
||||
$modify['remove_headers'][] = 'Cookie';
|
||||
}
|
||||
|
||||
return Psr7\modify_request($request, $modify);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the appropriate URL on the request based on the location header
|
||||
* Set the appropriate URL on the request based on the location header.
|
||||
*
|
||||
* @param RequestInterface $request
|
||||
* @param ResponseInterface $response
|
||||
@ -209,7 +236,7 @@ class RedirectMiddleware
|
||||
*
|
||||
* @return UriInterface
|
||||
*/
|
||||
private function redirectUri(
|
||||
private static function redirectUri(
|
||||
RequestInterface $request,
|
||||
ResponseInterface $response,
|
||||
array $protocols
|
||||
|
10
vendor/guzzlehttp/guzzle/src/RequestOptions.php
vendored
10
vendor/guzzlehttp/guzzle/src/RequestOptions.php
vendored
@ -22,7 +22,7 @@ final class RequestOptions
|
||||
* - strict: (bool, default=false) Set to true to use strict redirects
|
||||
* meaning redirect POST requests with POST requests vs. doing what most
|
||||
* browsers do which is redirect POST requests with GET requests
|
||||
* - referer: (bool, default=true) Set to false to disable the Referer
|
||||
* - referer: (bool, default=false) Set to true to enable the Referer
|
||||
* header.
|
||||
* - protocols: (array, default=['http', 'https']) Allowed redirect
|
||||
* protocols.
|
||||
@ -132,6 +132,14 @@ final class RequestOptions
|
||||
*/
|
||||
const HTTP_ERRORS = 'http_errors';
|
||||
|
||||
/**
|
||||
* idn: (bool|int, default=true) A combination of IDNA_* constants for
|
||||
* idn_to_ascii() PHP's function (see "options" parameter). Set to false to
|
||||
* disable IDN support completely, or to true to use the default
|
||||
* configuration (IDNA_DEFAULT constant).
|
||||
*/
|
||||
const IDN_CONVERSION = 'idn_conversion';
|
||||
|
||||
/**
|
||||
* json: (mixed) Adds JSON data to a request. The provided value is JSON
|
||||
* encoded and a Content-Type header of application/json will be added to
|
||||
|
22
vendor/guzzlehttp/guzzle/src/RetryMiddleware.php
vendored
22
vendor/guzzlehttp/guzzle/src/RetryMiddleware.php
vendored
@ -19,6 +19,9 @@ class RetryMiddleware
|
||||
/** @var callable */
|
||||
private $decider;
|
||||
|
||||
/** @var callable */
|
||||
private $delay;
|
||||
|
||||
/**
|
||||
* @param callable $decider Function that accepts the number of retries,
|
||||
* a request, [response], and [exception] and
|
||||
@ -42,13 +45,13 @@ class RetryMiddleware
|
||||
/**
|
||||
* Default exponential backoff delay function.
|
||||
*
|
||||
* @param $retries
|
||||
* @param int $retries
|
||||
*
|
||||
* @return int
|
||||
* @return int milliseconds.
|
||||
*/
|
||||
public static function exponentialDelay($retries)
|
||||
{
|
||||
return (int) pow(2, $retries - 1);
|
||||
return (int) pow(2, $retries - 1) * 1000;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -71,6 +74,11 @@ class RetryMiddleware
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute fulfilled closure
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
private function onFulfilled(RequestInterface $req, array $options)
|
||||
{
|
||||
return function ($value) use ($req, $options) {
|
||||
@ -87,6 +95,11 @@ class RetryMiddleware
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute rejected closure
|
||||
*
|
||||
* @return callable
|
||||
*/
|
||||
private function onRejected(RequestInterface $req, array $options)
|
||||
{
|
||||
return function ($reason) use ($req, $options) {
|
||||
@ -103,6 +116,9 @@ class RetryMiddleware
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @return self
|
||||
*/
|
||||
private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null)
|
||||
{
|
||||
$options['delay'] = call_user_func($this->delay, ++$options['retries'], $response);
|
||||
|
12
vendor/guzzlehttp/guzzle/src/TransferStats.php
vendored
12
vendor/guzzlehttp/guzzle/src/TransferStats.php
vendored
@ -18,11 +18,11 @@ final class TransferStats
|
||||
private $handlerErrorData;
|
||||
|
||||
/**
|
||||
* @param RequestInterface $request Request that was sent.
|
||||
* @param ResponseInterface $response Response received (if any)
|
||||
* @param null $transferTime Total handler transfer time.
|
||||
* @param mixed $handlerErrorData Handler error data.
|
||||
* @param array $handlerStats Handler specific stats.
|
||||
* @param RequestInterface $request Request that was sent.
|
||||
* @param ResponseInterface|null $response Response received (if any)
|
||||
* @param float|null $transferTime Total handler transfer time.
|
||||
* @param mixed $handlerErrorData Handler error data.
|
||||
* @param array $handlerStats Handler specific stats.
|
||||
*/
|
||||
public function __construct(
|
||||
RequestInterface $request,
|
||||
@ -93,7 +93,7 @@ final class TransferStats
|
||||
/**
|
||||
* Get the estimated time the request was being transferred by the handler.
|
||||
*
|
||||
* @return float Time in seconds.
|
||||
* @return float|null Time in seconds.
|
||||
*/
|
||||
public function getTransferTime()
|
||||
{
|
||||
|
92
vendor/guzzlehttp/guzzle/src/Utils.php
vendored
Normal file
92
vendor/guzzlehttp/guzzle/src/Utils.php
vendored
Normal file
@ -0,0 +1,92 @@
|
||||
<?php
|
||||
namespace GuzzleHttp;
|
||||
|
||||
use GuzzleHttp\Exception\InvalidArgumentException;
|
||||
use Psr\Http\Message\UriInterface;
|
||||
use Symfony\Polyfill\Intl\Idn\Idn;
|
||||
|
||||
final class Utils
|
||||
{
|
||||
/**
|
||||
* Wrapper for the hrtime() or microtime() functions
|
||||
* (depending on the PHP version, one of the two is used)
|
||||
*
|
||||
* @return float|mixed UNIX timestamp
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
public static function currentTime()
|
||||
{
|
||||
return function_exists('hrtime') ? hrtime(true) / 1e9 : microtime(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $options
|
||||
*
|
||||
* @return UriInterface
|
||||
* @throws InvalidArgumentException
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
public static function idnUriConvert(UriInterface $uri, $options = 0)
|
||||
{
|
||||
if ($uri->getHost()) {
|
||||
$asciiHost = self::idnToAsci($uri->getHost(), $options, $info);
|
||||
if ($asciiHost === false) {
|
||||
$errorBitSet = isset($info['errors']) ? $info['errors'] : 0;
|
||||
|
||||
$errorConstants = array_filter(array_keys(get_defined_constants()), function ($name) {
|
||||
return substr($name, 0, 11) === 'IDNA_ERROR_';
|
||||
});
|
||||
|
||||
$errors = [];
|
||||
foreach ($errorConstants as $errorConstant) {
|
||||
if ($errorBitSet & constant($errorConstant)) {
|
||||
$errors[] = $errorConstant;
|
||||
}
|
||||
}
|
||||
|
||||
$errorMessage = 'IDN conversion failed';
|
||||
if ($errors) {
|
||||
$errorMessage .= ' (errors: ' . implode(', ', $errors) . ')';
|
||||
}
|
||||
|
||||
throw new InvalidArgumentException($errorMessage);
|
||||
} else {
|
||||
if ($uri->getHost() !== $asciiHost) {
|
||||
// Replace URI only if the ASCII version is different
|
||||
$uri = $uri->withHost($asciiHost);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $uri;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $domain
|
||||
* @param int $options
|
||||
* @param array $info
|
||||
*
|
||||
* @return string|false
|
||||
*/
|
||||
private static function idnToAsci($domain, $options, &$info = [])
|
||||
{
|
||||
if (\preg_match('%^[ -~]+$%', $domain) === 1) {
|
||||
return $domain;
|
||||
}
|
||||
|
||||
if (\extension_loaded('intl') && defined('INTL_IDNA_VARIANT_UTS46')) {
|
||||
return \idn_to_ascii($domain, $options, INTL_IDNA_VARIANT_UTS46, $info);
|
||||
}
|
||||
|
||||
/*
|
||||
* The Idn class is marked as @internal. Verify that class and method exists.
|
||||
*/
|
||||
if (method_exists(Idn::class, 'idn_to_ascii')) {
|
||||
return Idn::idn_to_ascii($domain, $options, Idn::INTL_IDNA_VARIANT_UTS46, $info);
|
||||
}
|
||||
|
||||
throw new \RuntimeException('ext-intl or symfony/polyfill-intl-idn not loaded or too old');
|
||||
}
|
||||
}
|
15
vendor/guzzlehttp/guzzle/src/functions.php
vendored
15
vendor/guzzlehttp/guzzle/src/functions.php
vendored
@ -56,7 +56,7 @@ function describe_type($input)
|
||||
/**
|
||||
* Parses an array of header lines into an associative array of headers.
|
||||
*
|
||||
* @param array $lines Header lines array of strings in the following
|
||||
* @param iterable $lines Header lines array of strings in the following
|
||||
* format: "Name: Value"
|
||||
* @return array
|
||||
*/
|
||||
@ -97,8 +97,8 @@ function debug_resource($value = null)
|
||||
*
|
||||
* The returned handler is not wrapped by any default middlewares.
|
||||
*
|
||||
* @throws \RuntimeException if no viable Handler is available.
|
||||
* @return callable Returns the best handler for the given system.
|
||||
* @throws \RuntimeException if no viable Handler is available.
|
||||
*/
|
||||
function choose_handler()
|
||||
{
|
||||
@ -196,7 +196,8 @@ function default_ca_bundle()
|
||||
}
|
||||
}
|
||||
|
||||
throw new \RuntimeException(<<< EOT
|
||||
throw new \RuntimeException(
|
||||
<<< EOT
|
||||
No system CA bundle could be found in any of the the common system locations.
|
||||
PHP versions earlier than 5.6 are not properly configured to use the system's
|
||||
CA bundle by default. In order to verify peer certificates, you will need to
|
||||
@ -294,14 +295,14 @@ function is_host_in_noproxy($host, array $noProxyArray)
|
||||
* @param int $options Bitmask of JSON decode options.
|
||||
*
|
||||
* @return mixed
|
||||
* @throws \InvalidArgumentException if the JSON cannot be decoded.
|
||||
* @throws Exception\InvalidArgumentException if the JSON cannot be decoded.
|
||||
* @link http://www.php.net/manual/en/function.json-decode.php
|
||||
*/
|
||||
function json_decode($json, $assoc = false, $depth = 512, $options = 0)
|
||||
{
|
||||
$data = \json_decode($json, $assoc, $depth, $options);
|
||||
if (JSON_ERROR_NONE !== json_last_error()) {
|
||||
throw new \InvalidArgumentException(
|
||||
throw new Exception\InvalidArgumentException(
|
||||
'json_decode error: ' . json_last_error_msg()
|
||||
);
|
||||
}
|
||||
@ -317,14 +318,14 @@ function json_decode($json, $assoc = false, $depth = 512, $options = 0)
|
||||
* @param int $depth Set the maximum depth. Must be greater than zero.
|
||||
*
|
||||
* @return string
|
||||
* @throws \InvalidArgumentException if the JSON cannot be encoded.
|
||||
* @throws Exception\InvalidArgumentException if the JSON cannot be encoded.
|
||||
* @link http://www.php.net/manual/en/function.json-encode.php
|
||||
*/
|
||||
function json_encode($value, $options = 0, $depth = 512)
|
||||
{
|
||||
$json = \json_encode($value, $options, $depth);
|
||||
if (JSON_ERROR_NONE !== json_last_error()) {
|
||||
throw new \InvalidArgumentException(
|
||||
throw new Exception\InvalidArgumentException(
|
||||
'json_encode error: ' . json_last_error_msg()
|
||||
);
|
||||
}
|
||||
|
23
vendor/guzzlehttp/psr7/src/AppendStream.php
vendored
23
vendor/guzzlehttp/psr7/src/AppendStream.php
vendored
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
@ -7,6 +8,8 @@ use Psr\Http\Message\StreamInterface;
|
||||
* Reads from multiple streams, one after the other.
|
||||
*
|
||||
* This is a read-only stream decorator.
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
class AppendStream implements StreamInterface
|
||||
{
|
||||
@ -16,7 +19,6 @@ class AppendStream implements StreamInterface
|
||||
private $seekable = true;
|
||||
private $current = 0;
|
||||
private $pos = 0;
|
||||
private $detached = false;
|
||||
|
||||
/**
|
||||
* @param StreamInterface[] $streams Streams to decorate. Each stream must
|
||||
@ -62,7 +64,7 @@ class AppendStream implements StreamInterface
|
||||
|
||||
public function getContents()
|
||||
{
|
||||
return copy_to_string($this);
|
||||
return Utils::copyToString($this);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -73,6 +75,7 @@ class AppendStream implements StreamInterface
|
||||
public function close()
|
||||
{
|
||||
$this->pos = $this->current = 0;
|
||||
$this->seekable = true;
|
||||
|
||||
foreach ($this->streams as $stream) {
|
||||
$stream->close();
|
||||
@ -82,14 +85,24 @@ class AppendStream implements StreamInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Detaches each attached stream
|
||||
* Detaches each attached stream.
|
||||
*
|
||||
* Returns null as it's not clear which underlying stream resource to return.
|
||||
*
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function detach()
|
||||
{
|
||||
$this->close();
|
||||
$this->detached = true;
|
||||
$this->pos = $this->current = 0;
|
||||
$this->seekable = true;
|
||||
|
||||
foreach ($this->streams as $stream) {
|
||||
$stream->detach();
|
||||
}
|
||||
|
||||
$this->streams = [];
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function tell()
|
||||
|
5
vendor/guzzlehttp/psr7/src/BufferStream.php
vendored
5
vendor/guzzlehttp/psr7/src/BufferStream.php
vendored
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
@ -10,6 +11,8 @@ use Psr\Http\Message\StreamInterface;
|
||||
* This stream returns a "hwm" metadata value that tells upstream consumers
|
||||
* what the configured high water mark of the stream is, or the maximum
|
||||
* preferred size of the buffer.
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
class BufferStream implements StreamInterface
|
||||
{
|
||||
@ -49,6 +52,8 @@ class BufferStream implements StreamInterface
|
||||
public function detach()
|
||||
{
|
||||
$this->close();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getSize()
|
||||
|
17
vendor/guzzlehttp/psr7/src/CachingStream.php
vendored
17
vendor/guzzlehttp/psr7/src/CachingStream.php
vendored
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
@ -6,6 +7,8 @@ use Psr\Http\Message\StreamInterface;
|
||||
/**
|
||||
* Stream decorator that can cache previously read bytes from a sequentially
|
||||
* read stream.
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
class CachingStream implements StreamInterface
|
||||
{
|
||||
@ -20,7 +23,7 @@ class CachingStream implements StreamInterface
|
||||
/**
|
||||
* We will treat the buffer object as the body of the stream
|
||||
*
|
||||
* @param StreamInterface $stream Stream to cache
|
||||
* @param StreamInterface $stream Stream to cache. The cursor is assumed to be at the beginning of the stream.
|
||||
* @param StreamInterface $target Optionally specify where data is cached
|
||||
*/
|
||||
public function __construct(
|
||||
@ -28,12 +31,18 @@ class CachingStream implements StreamInterface
|
||||
StreamInterface $target = null
|
||||
) {
|
||||
$this->remoteStream = $stream;
|
||||
$this->stream = $target ?: new Stream(fopen('php://temp', 'r+'));
|
||||
$this->stream = $target ?: new Stream(Utils::tryFopen('php://temp', 'r+'));
|
||||
}
|
||||
|
||||
public function getSize()
|
||||
{
|
||||
return max($this->stream->getSize(), $this->remoteStream->getSize());
|
||||
$remoteSize = $this->remoteStream->getSize();
|
||||
|
||||
if (null === $remoteSize) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return max($this->stream->getSize(), $remoteSize);
|
||||
}
|
||||
|
||||
public function rewind()
|
||||
@ -131,7 +140,7 @@ class CachingStream implements StreamInterface
|
||||
private function cacheEntireStream()
|
||||
{
|
||||
$target = new FnStream(['write' => 'strlen']);
|
||||
copy_to_stream($this, $target);
|
||||
Utils::copyToStream($this, $target);
|
||||
|
||||
return $this->tell();
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
@ -6,6 +7,8 @@ use Psr\Http\Message\StreamInterface;
|
||||
/**
|
||||
* Stream decorator that begins dropping data once the size of the underlying
|
||||
* stream becomes too full.
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
class DroppingStream implements StreamInterface
|
||||
{
|
||||
|
14
vendor/guzzlehttp/psr7/src/FnStream.php
vendored
14
vendor/guzzlehttp/psr7/src/FnStream.php
vendored
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
@ -8,6 +9,8 @@ use Psr\Http\Message\StreamInterface;
|
||||
*
|
||||
* Allows for easy testing and extension of a provided stream without needing
|
||||
* to create a concrete class for a simple extension point.
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
class FnStream implements StreamInterface
|
||||
{
|
||||
@ -34,6 +37,7 @@ class FnStream implements StreamInterface
|
||||
|
||||
/**
|
||||
* Lazily determine which methods are not implemented.
|
||||
*
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
public function __get($name)
|
||||
@ -52,6 +56,16 @@ class FnStream implements StreamInterface
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* An unserialize would allow the __destruct to run when the unserialized value goes out of scope.
|
||||
*
|
||||
* @throws \LogicException
|
||||
*/
|
||||
public function __wakeup()
|
||||
{
|
||||
throw new \LogicException('FnStream should never be unserialized');
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds custom functionality to an underlying stream by intercepting
|
||||
* specific method calls.
|
||||
|
71
vendor/guzzlehttp/psr7/src/Header.php
vendored
Normal file
71
vendor/guzzlehttp/psr7/src/Header.php
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
final class Header
|
||||
{
|
||||
/**
|
||||
* Parse an array of header values containing ";" separated data into an
|
||||
* array of associative arrays representing the header key value pair data
|
||||
* of the header. When a parameter does not contain a value, but just
|
||||
* contains a key, this function will inject a key with a '' string value.
|
||||
*
|
||||
* @param string|array $header Header to parse into components.
|
||||
*
|
||||
* @return array Returns the parsed header values.
|
||||
*/
|
||||
public static function parse($header)
|
||||
{
|
||||
static $trimmed = "\"' \n\t\r";
|
||||
$params = $matches = [];
|
||||
|
||||
foreach (self::normalize($header) as $val) {
|
||||
$part = [];
|
||||
foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) {
|
||||
if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) {
|
||||
$m = $matches[0];
|
||||
if (isset($m[1])) {
|
||||
$part[trim($m[0], $trimmed)] = trim($m[1], $trimmed);
|
||||
} else {
|
||||
$part[] = trim($m[0], $trimmed);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($part) {
|
||||
$params[] = $part;
|
||||
}
|
||||
}
|
||||
|
||||
return $params;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts an array of header values that may contain comma separated
|
||||
* headers into an array of headers with no comma separated values.
|
||||
*
|
||||
* @param string|array $header Header to normalize.
|
||||
*
|
||||
* @return array Returns the normalized header field values.
|
||||
*/
|
||||
public static function normalize($header)
|
||||
{
|
||||
if (!is_array($header)) {
|
||||
return array_map('trim', explode(',', $header));
|
||||
}
|
||||
|
||||
$result = [];
|
||||
foreach ($header as $value) {
|
||||
foreach ((array) $value as $v) {
|
||||
if (strpos($v, ',') === false) {
|
||||
$result[] = $v;
|
||||
continue;
|
||||
}
|
||||
foreach (preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $v) as $vv) {
|
||||
$result[] = trim($vv);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
6
vendor/guzzlehttp/psr7/src/InflateStream.php
vendored
6
vendor/guzzlehttp/psr7/src/InflateStream.php
vendored
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
@ -13,6 +14,8 @@ use Psr\Http\Message\StreamInterface;
|
||||
*
|
||||
* @link http://tools.ietf.org/html/rfc1952
|
||||
* @link http://php.net/manual/en/filters.compression.php
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
class InflateStream implements StreamInterface
|
||||
{
|
||||
@ -27,12 +30,13 @@ class InflateStream implements StreamInterface
|
||||
$stream = new LimitStream($stream, -1, 10 + $filenameHeaderLength);
|
||||
$resource = StreamWrapper::getResource($stream);
|
||||
stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ);
|
||||
$this->stream = new Stream($resource);
|
||||
$this->stream = $stream->isSeekable() ? new Stream($resource) : new NoSeekStream(new Stream($resource));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param StreamInterface $stream
|
||||
* @param $header
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
private function getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header)
|
||||
|
8
vendor/guzzlehttp/psr7/src/LimitStream.php
vendored
8
vendor/guzzlehttp/psr7/src/LimitStream.php
vendored
@ -1,11 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
|
||||
|
||||
/**
|
||||
* Decorator used to return only a subset of a stream
|
||||
* Decorator used to return only a subset of a stream.
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
class LimitStream implements StreamInterface
|
||||
{
|
||||
@ -72,7 +74,7 @@ class LimitStream implements StreamInterface
|
||||
{
|
||||
if ($whence !== SEEK_SET || $offset < 0) {
|
||||
throw new \RuntimeException(sprintf(
|
||||
'Cannot seek to offset % with whence %s',
|
||||
'Cannot seek to offset %s with whence %s',
|
||||
$offset,
|
||||
$whence
|
||||
));
|
||||
|
252
vendor/guzzlehttp/psr7/src/Message.php
vendored
Normal file
252
vendor/guzzlehttp/psr7/src/Message.php
vendored
Normal file
@ -0,0 +1,252 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
use Psr\Http\Message\MessageInterface;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
final class Message
|
||||
{
|
||||
/**
|
||||
* Returns the string representation of an HTTP message.
|
||||
*
|
||||
* @param MessageInterface $message Message to convert to a string.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function toString(MessageInterface $message)
|
||||
{
|
||||
if ($message instanceof RequestInterface) {
|
||||
$msg = trim($message->getMethod() . ' '
|
||||
. $message->getRequestTarget())
|
||||
. ' HTTP/' . $message->getProtocolVersion();
|
||||
if (!$message->hasHeader('host')) {
|
||||
$msg .= "\r\nHost: " . $message->getUri()->getHost();
|
||||
}
|
||||
} elseif ($message instanceof ResponseInterface) {
|
||||
$msg = 'HTTP/' . $message->getProtocolVersion() . ' '
|
||||
. $message->getStatusCode() . ' '
|
||||
. $message->getReasonPhrase();
|
||||
} else {
|
||||
throw new \InvalidArgumentException('Unknown message type');
|
||||
}
|
||||
|
||||
foreach ($message->getHeaders() as $name => $values) {
|
||||
if (strtolower($name) === 'set-cookie') {
|
||||
foreach ($values as $value) {
|
||||
$msg .= "\r\n{$name}: " . $value;
|
||||
}
|
||||
} else {
|
||||
$msg .= "\r\n{$name}: " . implode(', ', $values);
|
||||
}
|
||||
}
|
||||
|
||||
return "{$msg}\r\n\r\n" . $message->getBody();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a short summary of the message body.
|
||||
*
|
||||
* Will return `null` if the response is not printable.
|
||||
*
|
||||
* @param MessageInterface $message The message to get the body summary
|
||||
* @param int $truncateAt The maximum allowed size of the summary
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public static function bodySummary(MessageInterface $message, $truncateAt = 120)
|
||||
{
|
||||
$body = $message->getBody();
|
||||
|
||||
if (!$body->isSeekable() || !$body->isReadable()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$size = $body->getSize();
|
||||
|
||||
if ($size === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$summary = $body->read($truncateAt);
|
||||
$body->rewind();
|
||||
|
||||
if ($size > $truncateAt) {
|
||||
$summary .= ' (truncated...)';
|
||||
}
|
||||
|
||||
// Matches any printable character, including unicode characters:
|
||||
// letters, marks, numbers, punctuation, spacing, and separators.
|
||||
if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/u', $summary)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $summary;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to rewind a message body and throws an exception on failure.
|
||||
*
|
||||
* The body of the message will only be rewound if a call to `tell()`
|
||||
* returns a value other than `0`.
|
||||
*
|
||||
* @param MessageInterface $message Message to rewind
|
||||
*
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
public static function rewindBody(MessageInterface $message)
|
||||
{
|
||||
$body = $message->getBody();
|
||||
|
||||
if ($body->tell()) {
|
||||
$body->rewind();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses an HTTP message into an associative array.
|
||||
*
|
||||
* The array contains the "start-line" key containing the start line of
|
||||
* the message, "headers" key containing an associative array of header
|
||||
* array values, and a "body" key containing the body of the message.
|
||||
*
|
||||
* @param string $message HTTP request or response to parse.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function parseMessage($message)
|
||||
{
|
||||
if (!$message) {
|
||||
throw new \InvalidArgumentException('Invalid message');
|
||||
}
|
||||
|
||||
$message = ltrim($message, "\r\n");
|
||||
|
||||
$messageParts = preg_split("/\r?\n\r?\n/", $message, 2);
|
||||
|
||||
if ($messageParts === false || count($messageParts) !== 2) {
|
||||
throw new \InvalidArgumentException('Invalid message: Missing header delimiter');
|
||||
}
|
||||
|
||||
list($rawHeaders, $body) = $messageParts;
|
||||
$rawHeaders .= "\r\n"; // Put back the delimiter we split previously
|
||||
$headerParts = preg_split("/\r?\n/", $rawHeaders, 2);
|
||||
|
||||
if ($headerParts === false || count($headerParts) !== 2) {
|
||||
throw new \InvalidArgumentException('Invalid message: Missing status line');
|
||||
}
|
||||
|
||||
list($startLine, $rawHeaders) = $headerParts;
|
||||
|
||||
if (preg_match("/(?:^HTTP\/|^[A-Z]+ \S+ HTTP\/)(\d+(?:\.\d+)?)/i", $startLine, $matches) && $matches[1] === '1.0') {
|
||||
// Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0
|
||||
$rawHeaders = preg_replace(Rfc7230::HEADER_FOLD_REGEX, ' ', $rawHeaders);
|
||||
}
|
||||
|
||||
/** @var array[] $headerLines */
|
||||
$count = preg_match_all(Rfc7230::HEADER_REGEX, $rawHeaders, $headerLines, PREG_SET_ORDER);
|
||||
|
||||
// If these aren't the same, then one line didn't match and there's an invalid header.
|
||||
if ($count !== substr_count($rawHeaders, "\n")) {
|
||||
// Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4
|
||||
if (preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) {
|
||||
throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding');
|
||||
}
|
||||
|
||||
throw new \InvalidArgumentException('Invalid header syntax');
|
||||
}
|
||||
|
||||
$headers = [];
|
||||
|
||||
foreach ($headerLines as $headerLine) {
|
||||
$headers[$headerLine[1]][] = $headerLine[2];
|
||||
}
|
||||
|
||||
return [
|
||||
'start-line' => $startLine,
|
||||
'headers' => $headers,
|
||||
'body' => $body,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a URI for an HTTP request message.
|
||||
*
|
||||
* @param string $path Path from the start-line
|
||||
* @param array $headers Array of headers (each value an array).
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function parseRequestUri($path, array $headers)
|
||||
{
|
||||
$hostKey = array_filter(array_keys($headers), function ($k) {
|
||||
return strtolower($k) === 'host';
|
||||
});
|
||||
|
||||
// If no host is found, then a full URI cannot be constructed.
|
||||
if (!$hostKey) {
|
||||
return $path;
|
||||
}
|
||||
|
||||
$host = $headers[reset($hostKey)][0];
|
||||
$scheme = substr($host, -4) === ':443' ? 'https' : 'http';
|
||||
|
||||
return $scheme . '://' . $host . '/' . ltrim($path, '/');
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a request message string into a request object.
|
||||
*
|
||||
* @param string $message Request message string.
|
||||
*
|
||||
* @return Request
|
||||
*/
|
||||
public static function parseRequest($message)
|
||||
{
|
||||
$data = self::parseMessage($message);
|
||||
$matches = [];
|
||||
if (!preg_match('/^[\S]+\s+([a-zA-Z]+:\/\/|\/).*/', $data['start-line'], $matches)) {
|
||||
throw new \InvalidArgumentException('Invalid request string');
|
||||
}
|
||||
$parts = explode(' ', $data['start-line'], 3);
|
||||
$version = isset($parts[2]) ? explode('/', $parts[2])[1] : '1.1';
|
||||
|
||||
$request = new Request(
|
||||
$parts[0],
|
||||
$matches[1] === '/' ? self::parseRequestUri($parts[1], $data['headers']) : $parts[1],
|
||||
$data['headers'],
|
||||
$data['body'],
|
||||
$version
|
||||
);
|
||||
|
||||
return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a response message string into a response object.
|
||||
*
|
||||
* @param string $message Response message string.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public static function parseResponse($message)
|
||||
{
|
||||
$data = self::parseMessage($message);
|
||||
// According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space
|
||||
// between status-code and reason-phrase is required. But browsers accept
|
||||
// responses without space and reason as well.
|
||||
if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) {
|
||||
throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']);
|
||||
}
|
||||
$parts = explode(' ', $data['start-line'], 3);
|
||||
|
||||
return new Response(
|
||||
(int) $parts[1],
|
||||
$data['headers'],
|
||||
$data['body'],
|
||||
explode('/', $parts[0])[1],
|
||||
isset($parts[2]) ? $parts[2] : null
|
||||
);
|
||||
}
|
||||
}
|
126
vendor/guzzlehttp/psr7/src/MessageTrait.php
vendored
126
vendor/guzzlehttp/psr7/src/MessageTrait.php
vendored
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
@ -17,7 +18,7 @@ trait MessageTrait
|
||||
/** @var string */
|
||||
private $protocol = '1.1';
|
||||
|
||||
/** @var StreamInterface */
|
||||
/** @var StreamInterface|null */
|
||||
private $stream;
|
||||
|
||||
public function getProtocolVersion()
|
||||
@ -66,11 +67,8 @@ trait MessageTrait
|
||||
|
||||
public function withHeader($header, $value)
|
||||
{
|
||||
if (!is_array($value)) {
|
||||
$value = [$value];
|
||||
}
|
||||
|
||||
$value = $this->trimHeaderValues($value);
|
||||
$this->assertHeader($header);
|
||||
$value = $this->normalizeHeaderValue($value);
|
||||
$normalized = strtolower($header);
|
||||
|
||||
$new = clone $this;
|
||||
@ -85,11 +83,8 @@ trait MessageTrait
|
||||
|
||||
public function withAddedHeader($header, $value)
|
||||
{
|
||||
if (!is_array($value)) {
|
||||
$value = [$value];
|
||||
}
|
||||
|
||||
$value = $this->trimHeaderValues($value);
|
||||
$this->assertHeader($header);
|
||||
$value = $this->normalizeHeaderValue($value);
|
||||
$normalized = strtolower($header);
|
||||
|
||||
$new = clone $this;
|
||||
@ -123,7 +118,7 @@ trait MessageTrait
|
||||
public function getBody()
|
||||
{
|
||||
if (!$this->stream) {
|
||||
$this->stream = stream_for('');
|
||||
$this->stream = Utils::streamFor('');
|
||||
}
|
||||
|
||||
return $this->stream;
|
||||
@ -144,11 +139,13 @@ trait MessageTrait
|
||||
{
|
||||
$this->headerNames = $this->headers = [];
|
||||
foreach ($headers as $header => $value) {
|
||||
if (!is_array($value)) {
|
||||
$value = [$value];
|
||||
if (is_int($header)) {
|
||||
// Numeric array keys are converted to int by PHP but having a header name '123' is not forbidden by the spec
|
||||
// and also allowed in withHeader(). So we need to cast it to string again for the following assertion to pass.
|
||||
$header = (string) $header;
|
||||
}
|
||||
|
||||
$value = $this->trimHeaderValues($value);
|
||||
$this->assertHeader($header);
|
||||
$value = $this->normalizeHeaderValue($value);
|
||||
$normalized = strtolower($header);
|
||||
if (isset($this->headerNames[$normalized])) {
|
||||
$header = $this->headerNames[$normalized];
|
||||
@ -160,6 +157,24 @@ trait MessageTrait
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
private function normalizeHeaderValue($value)
|
||||
{
|
||||
if (!is_array($value)) {
|
||||
return $this->trimAndValidateHeaderValues([$value]);
|
||||
}
|
||||
|
||||
if (count($value) === 0) {
|
||||
throw new \InvalidArgumentException('Header value can not be an empty array.');
|
||||
}
|
||||
|
||||
return $this->trimAndValidateHeaderValues($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Trims whitespace from the header values.
|
||||
*
|
||||
@ -168,16 +183,87 @@ trait MessageTrait
|
||||
* header-field = field-name ":" OWS field-value OWS
|
||||
* OWS = *( SP / HTAB )
|
||||
*
|
||||
* @param string[] $values Header values
|
||||
* @param mixed[] $values Header values
|
||||
*
|
||||
* @return string[] Trimmed header values
|
||||
*
|
||||
* @see https://tools.ietf.org/html/rfc7230#section-3.2.4
|
||||
*/
|
||||
private function trimHeaderValues(array $values)
|
||||
private function trimAndValidateHeaderValues(array $values)
|
||||
{
|
||||
return array_map(function ($value) {
|
||||
return trim($value, " \t");
|
||||
}, $values);
|
||||
if (!is_scalar($value) && null !== $value) {
|
||||
throw new \InvalidArgumentException(sprintf(
|
||||
'Header value must be scalar or null but %s provided.',
|
||||
is_object($value) ? get_class($value) : gettype($value)
|
||||
));
|
||||
}
|
||||
|
||||
$trimmed = trim((string) $value, " \t");
|
||||
$this->assertValue($trimmed);
|
||||
|
||||
return $trimmed;
|
||||
}, array_values($values));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see https://tools.ietf.org/html/rfc7230#section-3.2
|
||||
*
|
||||
* @param mixed $header
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function assertHeader($header)
|
||||
{
|
||||
if (!is_string($header)) {
|
||||
throw new \InvalidArgumentException(sprintf(
|
||||
'Header name must be a string but %s provided.',
|
||||
is_object($header) ? get_class($header) : gettype($header)
|
||||
));
|
||||
}
|
||||
|
||||
if ($header === '') {
|
||||
throw new \InvalidArgumentException('Header name can not be empty.');
|
||||
}
|
||||
|
||||
if (! preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/D', $header)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf('"%s" is not valid header name.', $header)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @see https://tools.ietf.org/html/rfc7230#section-3.2
|
||||
*
|
||||
* field-value = *( field-content / obs-fold )
|
||||
* field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
|
||||
* field-vchar = VCHAR / obs-text
|
||||
* VCHAR = %x21-7E
|
||||
* obs-text = %x80-FF
|
||||
* obs-fold = CRLF 1*( SP / HTAB )
|
||||
*/
|
||||
private function assertValue($value)
|
||||
{
|
||||
// The regular expression intentionally does not support the obs-fold production, because as
|
||||
// per RFC 7230#3.2.4:
|
||||
//
|
||||
// A sender MUST NOT generate a message that includes
|
||||
// line folding (i.e., that has any field-value that contains a match to
|
||||
// the obs-fold rule) unless the message is intended for packaging
|
||||
// within the message/http media type.
|
||||
//
|
||||
// Clients must not send a request with line folding and a server sending folded headers is
|
||||
// likely very rare. Line folding is a fairly obscure feature of HTTP/1.1 and thus not accepting
|
||||
// folding is not likely to break any legitimate use case.
|
||||
if (! preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/D', $value)) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf('"%s" is not valid header value.', $value)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
140
vendor/guzzlehttp/psr7/src/MimeType.php
vendored
Normal file
140
vendor/guzzlehttp/psr7/src/MimeType.php
vendored
Normal file
@ -0,0 +1,140 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
final class MimeType
|
||||
{
|
||||
/**
|
||||
* Determines the mimetype of a file by looking at its extension.
|
||||
*
|
||||
* @param string $filename
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public static function fromFilename($filename)
|
||||
{
|
||||
return self::fromExtension(pathinfo($filename, PATHINFO_EXTENSION));
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps a file extensions to a mimetype.
|
||||
*
|
||||
* @param string $extension string The file extension.
|
||||
*
|
||||
* @return string|null
|
||||
*
|
||||
* @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types
|
||||
*/
|
||||
public static function fromExtension($extension)
|
||||
{
|
||||
static $mimetypes = [
|
||||
'3gp' => 'video/3gpp',
|
||||
'7z' => 'application/x-7z-compressed',
|
||||
'aac' => 'audio/x-aac',
|
||||
'ai' => 'application/postscript',
|
||||
'aif' => 'audio/x-aiff',
|
||||
'asc' => 'text/plain',
|
||||
'asf' => 'video/x-ms-asf',
|
||||
'atom' => 'application/atom+xml',
|
||||
'avi' => 'video/x-msvideo',
|
||||
'bmp' => 'image/bmp',
|
||||
'bz2' => 'application/x-bzip2',
|
||||
'cer' => 'application/pkix-cert',
|
||||
'crl' => 'application/pkix-crl',
|
||||
'crt' => 'application/x-x509-ca-cert',
|
||||
'css' => 'text/css',
|
||||
'csv' => 'text/csv',
|
||||
'cu' => 'application/cu-seeme',
|
||||
'deb' => 'application/x-debian-package',
|
||||
'doc' => 'application/msword',
|
||||
'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
'dvi' => 'application/x-dvi',
|
||||
'eot' => 'application/vnd.ms-fontobject',
|
||||
'eps' => 'application/postscript',
|
||||
'epub' => 'application/epub+zip',
|
||||
'etx' => 'text/x-setext',
|
||||
'flac' => 'audio/flac',
|
||||
'flv' => 'video/x-flv',
|
||||
'gif' => 'image/gif',
|
||||
'gz' => 'application/gzip',
|
||||
'htm' => 'text/html',
|
||||
'html' => 'text/html',
|
||||
'ico' => 'image/x-icon',
|
||||
'ics' => 'text/calendar',
|
||||
'ini' => 'text/plain',
|
||||
'iso' => 'application/x-iso9660-image',
|
||||
'jar' => 'application/java-archive',
|
||||
'jpe' => 'image/jpeg',
|
||||
'jpeg' => 'image/jpeg',
|
||||
'jpg' => 'image/jpeg',
|
||||
'js' => 'text/javascript',
|
||||
'json' => 'application/json',
|
||||
'latex' => 'application/x-latex',
|
||||
'log' => 'text/plain',
|
||||
'm4a' => 'audio/mp4',
|
||||
'm4v' => 'video/mp4',
|
||||
'mid' => 'audio/midi',
|
||||
'midi' => 'audio/midi',
|
||||
'mov' => 'video/quicktime',
|
||||
'mkv' => 'video/x-matroska',
|
||||
'mp3' => 'audio/mpeg',
|
||||
'mp4' => 'video/mp4',
|
||||
'mp4a' => 'audio/mp4',
|
||||
'mp4v' => 'video/mp4',
|
||||
'mpe' => 'video/mpeg',
|
||||
'mpeg' => 'video/mpeg',
|
||||
'mpg' => 'video/mpeg',
|
||||
'mpg4' => 'video/mp4',
|
||||
'oga' => 'audio/ogg',
|
||||
'ogg' => 'audio/ogg',
|
||||
'ogv' => 'video/ogg',
|
||||
'ogx' => 'application/ogg',
|
||||
'pbm' => 'image/x-portable-bitmap',
|
||||
'pdf' => 'application/pdf',
|
||||
'pgm' => 'image/x-portable-graymap',
|
||||
'png' => 'image/png',
|
||||
'pnm' => 'image/x-portable-anymap',
|
||||
'ppm' => 'image/x-portable-pixmap',
|
||||
'ppt' => 'application/vnd.ms-powerpoint',
|
||||
'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
||||
'ps' => 'application/postscript',
|
||||
'qt' => 'video/quicktime',
|
||||
'rar' => 'application/x-rar-compressed',
|
||||
'ras' => 'image/x-cmu-raster',
|
||||
'rss' => 'application/rss+xml',
|
||||
'rtf' => 'application/rtf',
|
||||
'sgm' => 'text/sgml',
|
||||
'sgml' => 'text/sgml',
|
||||
'svg' => 'image/svg+xml',
|
||||
'swf' => 'application/x-shockwave-flash',
|
||||
'tar' => 'application/x-tar',
|
||||
'tif' => 'image/tiff',
|
||||
'tiff' => 'image/tiff',
|
||||
'torrent' => 'application/x-bittorrent',
|
||||
'ttf' => 'application/x-font-ttf',
|
||||
'txt' => 'text/plain',
|
||||
'wav' => 'audio/x-wav',
|
||||
'webm' => 'video/webm',
|
||||
'webp' => 'image/webp',
|
||||
'wma' => 'audio/x-ms-wma',
|
||||
'wmv' => 'video/x-ms-wmv',
|
||||
'woff' => 'application/x-font-woff',
|
||||
'wsdl' => 'application/wsdl+xml',
|
||||
'xbm' => 'image/x-xbitmap',
|
||||
'xls' => 'application/vnd.ms-excel',
|
||||
'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
'xml' => 'application/xml',
|
||||
'xpm' => 'image/x-xpixmap',
|
||||
'xwd' => 'image/x-xwindowdump',
|
||||
'yaml' => 'text/yaml',
|
||||
'yml' => 'text/yaml',
|
||||
'zip' => 'application/zip',
|
||||
];
|
||||
|
||||
$extension = strtolower($extension);
|
||||
|
||||
return isset($mimetypes[$extension])
|
||||
? $mimetypes[$extension]
|
||||
: null;
|
||||
}
|
||||
}
|
19
vendor/guzzlehttp/psr7/src/MultipartStream.php
vendored
19
vendor/guzzlehttp/psr7/src/MultipartStream.php
vendored
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
@ -6,6 +7,8 @@ use Psr\Http\Message\StreamInterface;
|
||||
/**
|
||||
* Stream that when read returns bytes for a streaming multipart or
|
||||
* multipart/form-data stream.
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
class MultipartStream implements StreamInterface
|
||||
{
|
||||
@ -71,7 +74,7 @@ class MultipartStream implements StreamInterface
|
||||
}
|
||||
|
||||
// Add the trailing boundary with CRLF
|
||||
$stream->addStream(stream_for("--{$this->boundary}--\r\n"));
|
||||
$stream->addStream(Utils::streamFor("--{$this->boundary}--\r\n"));
|
||||
|
||||
return $stream;
|
||||
}
|
||||
@ -84,7 +87,7 @@ class MultipartStream implements StreamInterface
|
||||
}
|
||||
}
|
||||
|
||||
$element['contents'] = stream_for($element['contents']);
|
||||
$element['contents'] = Utils::streamFor($element['contents']);
|
||||
|
||||
if (empty($element['filename'])) {
|
||||
$uri = $element['contents']->getMetadata('uri');
|
||||
@ -100,9 +103,9 @@ class MultipartStream implements StreamInterface
|
||||
isset($element['headers']) ? $element['headers'] : []
|
||||
);
|
||||
|
||||
$stream->addStream(stream_for($this->getHeaders($headers)));
|
||||
$stream->addStream(Utils::streamFor($this->getHeaders($headers)));
|
||||
$stream->addStream($body);
|
||||
$stream->addStream(stream_for("\r\n"));
|
||||
$stream->addStream(Utils::streamFor("\r\n"));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -114,9 +117,11 @@ class MultipartStream implements StreamInterface
|
||||
$disposition = $this->getHeader($headers, 'content-disposition');
|
||||
if (!$disposition) {
|
||||
$headers['Content-Disposition'] = ($filename === '0' || $filename)
|
||||
? sprintf('form-data; name="%s"; filename="%s"',
|
||||
? sprintf(
|
||||
'form-data; name="%s"; filename="%s"',
|
||||
$name,
|
||||
basename($filename))
|
||||
basename($filename)
|
||||
)
|
||||
: "form-data; name=\"{$name}\"";
|
||||
}
|
||||
|
||||
@ -131,7 +136,7 @@ class MultipartStream implements StreamInterface
|
||||
// Set a default Content-Type if one was not supplied
|
||||
$type = $this->getHeader($headers, 'content-type');
|
||||
if (!$type && ($filename === '0' || $filename)) {
|
||||
if ($type = mimetype_from_filename($filename)) {
|
||||
if ($type = MimeType::fromFilename($filename)) {
|
||||
$headers['Content-Type'] = $type;
|
||||
}
|
||||
}
|
||||
|
5
vendor/guzzlehttp/psr7/src/NoSeekStream.php
vendored
5
vendor/guzzlehttp/psr7/src/NoSeekStream.php
vendored
@ -1,10 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
|
||||
/**
|
||||
* Stream decorator that prevents a stream from being seeked
|
||||
* Stream decorator that prevents a stream from being seeked.
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
class NoSeekStream implements StreamInterface
|
||||
{
|
||||
|
23
vendor/guzzlehttp/psr7/src/PumpStream.php
vendored
23
vendor/guzzlehttp/psr7/src/PumpStream.php
vendored
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
@ -12,6 +13,8 @@ use Psr\Http\Message\StreamInterface;
|
||||
* returned by the provided callable is buffered internally until drained using
|
||||
* the read() function of the PumpStream. The provided callable MUST return
|
||||
* false when there is no more data to read.
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
class PumpStream implements StreamInterface
|
||||
{
|
||||
@ -31,14 +34,14 @@ class PumpStream implements StreamInterface
|
||||
private $buffer;
|
||||
|
||||
/**
|
||||
* @param callable $source Source of the stream data. The callable MAY
|
||||
* accept an integer argument used to control the
|
||||
* amount of data to return. The callable MUST
|
||||
* return a string when called, or false on error
|
||||
* or EOF.
|
||||
* @param array $options Stream options:
|
||||
* - metadata: Hash of metadata to use with stream.
|
||||
* - size: Size of the stream, if known.
|
||||
* @param callable $source Source of the stream data. The callable MAY
|
||||
* accept an integer argument used to control the
|
||||
* amount of data to return. The callable MUST
|
||||
* return a string when called, or false on error
|
||||
* or EOF.
|
||||
* @param array $options Stream options:
|
||||
* - metadata: Hash of metadata to use with stream.
|
||||
* - size: Size of the stream, if known.
|
||||
*/
|
||||
public function __construct(callable $source, array $options = [])
|
||||
{
|
||||
@ -51,7 +54,7 @@ class PumpStream implements StreamInterface
|
||||
public function __toString()
|
||||
{
|
||||
try {
|
||||
return copy_to_string($this);
|
||||
return Utils::copyToString($this);
|
||||
} catch (\Exception $e) {
|
||||
return '';
|
||||
}
|
||||
@ -66,6 +69,8 @@ class PumpStream implements StreamInterface
|
||||
{
|
||||
$this->tellPos = false;
|
||||
$this->source = null;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getSize()
|
||||
|
113
vendor/guzzlehttp/psr7/src/Query.php
vendored
Normal file
113
vendor/guzzlehttp/psr7/src/Query.php
vendored
Normal file
@ -0,0 +1,113 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
final class Query
|
||||
{
|
||||
/**
|
||||
* Parse a query string into an associative array.
|
||||
*
|
||||
* If multiple values are found for the same key, the value of that key
|
||||
* value pair will become an array. This function does not parse nested
|
||||
* PHP style arrays into an associative array (e.g., `foo[a]=1&foo[b]=2`
|
||||
* will be parsed into `['foo[a]' => '1', 'foo[b]' => '2'])`.
|
||||
*
|
||||
* @param string $str Query string to parse
|
||||
* @param int|bool $urlEncoding How the query string is encoded
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function parse($str, $urlEncoding = true)
|
||||
{
|
||||
$result = [];
|
||||
|
||||
if ($str === '') {
|
||||
return $result;
|
||||
}
|
||||
|
||||
if ($urlEncoding === true) {
|
||||
$decoder = function ($value) {
|
||||
return rawurldecode(str_replace('+', ' ', $value));
|
||||
};
|
||||
} elseif ($urlEncoding === PHP_QUERY_RFC3986) {
|
||||
$decoder = 'rawurldecode';
|
||||
} elseif ($urlEncoding === PHP_QUERY_RFC1738) {
|
||||
$decoder = 'urldecode';
|
||||
} else {
|
||||
$decoder = function ($str) {
|
||||
return $str;
|
||||
};
|
||||
}
|
||||
|
||||
foreach (explode('&', $str) as $kvp) {
|
||||
$parts = explode('=', $kvp, 2);
|
||||
$key = $decoder($parts[0]);
|
||||
$value = isset($parts[1]) ? $decoder($parts[1]) : null;
|
||||
if (!isset($result[$key])) {
|
||||
$result[$key] = $value;
|
||||
} else {
|
||||
if (!is_array($result[$key])) {
|
||||
$result[$key] = [$result[$key]];
|
||||
}
|
||||
$result[$key][] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a query string from an array of key value pairs.
|
||||
*
|
||||
* This function can use the return value of `parse()` to build a query
|
||||
* string. This function does not modify the provided keys when an array is
|
||||
* encountered (like `http_build_query()` would).
|
||||
*
|
||||
* @param array $params Query string parameters.
|
||||
* @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
|
||||
* to encode using RFC3986, or PHP_QUERY_RFC1738
|
||||
* to encode using RFC1738.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function build(array $params, $encoding = PHP_QUERY_RFC3986)
|
||||
{
|
||||
if (!$params) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if ($encoding === false) {
|
||||
$encoder = function ($str) {
|
||||
return $str;
|
||||
};
|
||||
} elseif ($encoding === PHP_QUERY_RFC3986) {
|
||||
$encoder = 'rawurlencode';
|
||||
} elseif ($encoding === PHP_QUERY_RFC1738) {
|
||||
$encoder = 'urlencode';
|
||||
} else {
|
||||
throw new \InvalidArgumentException('Invalid type');
|
||||
}
|
||||
|
||||
$qs = '';
|
||||
foreach ($params as $k => $v) {
|
||||
$k = $encoder($k);
|
||||
if (!is_array($v)) {
|
||||
$qs .= $k;
|
||||
if ($v !== null) {
|
||||
$qs .= '=' . $encoder($v);
|
||||
}
|
||||
$qs .= '&';
|
||||
} else {
|
||||
foreach ($v as $vv) {
|
||||
$qs .= $k;
|
||||
if ($vv !== null) {
|
||||
$qs .= '=' . $encoder($vv);
|
||||
}
|
||||
$qs .= '&';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $qs ? (string) substr($qs, 0, -1) : '';
|
||||
}
|
||||
}
|
20
vendor/guzzlehttp/psr7/src/Request.php
vendored
20
vendor/guzzlehttp/psr7/src/Request.php
vendored
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
use InvalidArgumentException;
|
||||
@ -16,7 +17,7 @@ class Request implements RequestInterface
|
||||
/** @var string */
|
||||
private $method;
|
||||
|
||||
/** @var null|string */
|
||||
/** @var string|null */
|
||||
private $requestTarget;
|
||||
|
||||
/** @var UriInterface */
|
||||
@ -26,7 +27,7 @@ class Request implements RequestInterface
|
||||
* @param string $method HTTP method
|
||||
* @param string|UriInterface $uri URI
|
||||
* @param array $headers Request headers
|
||||
* @param string|null|resource|StreamInterface $body Request body
|
||||
* @param string|resource|StreamInterface|null $body Request body
|
||||
* @param string $version Protocol version
|
||||
*/
|
||||
public function __construct(
|
||||
@ -36,6 +37,7 @@ class Request implements RequestInterface
|
||||
$body = null,
|
||||
$version = '1.1'
|
||||
) {
|
||||
$this->assertMethod($method);
|
||||
if (!($uri instanceof UriInterface)) {
|
||||
$uri = new Uri($uri);
|
||||
}
|
||||
@ -45,12 +47,12 @@ class Request implements RequestInterface
|
||||
$this->setHeaders($headers);
|
||||
$this->protocol = $version;
|
||||
|
||||
if (!$this->hasHeader('Host')) {
|
||||
if (!isset($this->headerNames['host'])) {
|
||||
$this->updateHostFromUri();
|
||||
}
|
||||
|
||||
if ($body !== '' && $body !== null) {
|
||||
$this->stream = stream_for($body);
|
||||
$this->stream = Utils::streamFor($body);
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,6 +93,7 @@ class Request implements RequestInterface
|
||||
|
||||
public function withMethod($method)
|
||||
{
|
||||
$this->assertMethod($method);
|
||||
$new = clone $this;
|
||||
$new->method = strtoupper($method);
|
||||
return $new;
|
||||
@ -110,7 +113,7 @@ class Request implements RequestInterface
|
||||
$new = clone $this;
|
||||
$new->uri = $uri;
|
||||
|
||||
if (!$preserveHost) {
|
||||
if (!$preserveHost || !isset($this->headerNames['host'])) {
|
||||
$new->updateHostFromUri();
|
||||
}
|
||||
|
||||
@ -139,4 +142,11 @@ class Request implements RequestInterface
|
||||
// See: http://tools.ietf.org/html/rfc7230#section-5.4
|
||||
$this->headers = [$header => [$host]] + $this->headers;
|
||||
}
|
||||
|
||||
private function assertMethod($method)
|
||||
{
|
||||
if (!is_string($method) || $method === '') {
|
||||
throw new \InvalidArgumentException('Method must be a non-empty string.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
33
vendor/guzzlehttp/psr7/src/Response.php
vendored
33
vendor/guzzlehttp/psr7/src/Response.php
vendored
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
@ -82,7 +83,7 @@ class Response implements ResponseInterface
|
||||
/**
|
||||
* @param int $status Status code
|
||||
* @param array $headers Response headers
|
||||
* @param string|null|resource|StreamInterface $body Response body
|
||||
* @param string|resource|StreamInterface|null $body Response body
|
||||
* @param string $version Protocol version
|
||||
* @param string|null $reason Reason phrase (when empty a default will be used based on the status code)
|
||||
*/
|
||||
@ -93,10 +94,14 @@ class Response implements ResponseInterface
|
||||
$version = '1.1',
|
||||
$reason = null
|
||||
) {
|
||||
$this->statusCode = (int) $status;
|
||||
$this->assertStatusCodeIsInteger($status);
|
||||
$status = (int) $status;
|
||||
$this->assertStatusCodeRange($status);
|
||||
|
||||
$this->statusCode = $status;
|
||||
|
||||
if ($body !== '' && $body !== null) {
|
||||
$this->stream = stream_for($body);
|
||||
$this->stream = Utils::streamFor($body);
|
||||
}
|
||||
|
||||
$this->setHeaders($headers);
|
||||
@ -121,12 +126,30 @@ class Response implements ResponseInterface
|
||||
|
||||
public function withStatus($code, $reasonPhrase = '')
|
||||
{
|
||||
$this->assertStatusCodeIsInteger($code);
|
||||
$code = (int) $code;
|
||||
$this->assertStatusCodeRange($code);
|
||||
|
||||
$new = clone $this;
|
||||
$new->statusCode = (int) $code;
|
||||
$new->statusCode = $code;
|
||||
if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) {
|
||||
$reasonPhrase = self::$phrases[$new->statusCode];
|
||||
}
|
||||
$new->reasonPhrase = $reasonPhrase;
|
||||
$new->reasonPhrase = (string) $reasonPhrase;
|
||||
return $new;
|
||||
}
|
||||
|
||||
private function assertStatusCodeIsInteger($statusCode)
|
||||
{
|
||||
if (filter_var($statusCode, FILTER_VALIDATE_INT) === false) {
|
||||
throw new \InvalidArgumentException('Status code must be an integer value.');
|
||||
}
|
||||
}
|
||||
|
||||
private function assertStatusCodeRange($statusCode)
|
||||
{
|
||||
if ($statusCode < 100 || $statusCode >= 600) {
|
||||
throw new \InvalidArgumentException('Status code must be an integer value between 1xx and 5xx.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
19
vendor/guzzlehttp/psr7/src/Rfc7230.php
vendored
Normal file
19
vendor/guzzlehttp/psr7/src/Rfc7230.php
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
final class Rfc7230
|
||||
{
|
||||
/**
|
||||
* Header related regular expressions (copied from amphp/http package)
|
||||
* (Note: once we require PHP 7.x we could just depend on the upstream package)
|
||||
*
|
||||
* Note: header delimiter (\r\n) is modified to \r?\n to accept line feed only delimiters for BC reasons.
|
||||
*
|
||||
* @link https://github.com/amphp/http/blob/v1.0.1/src/Rfc7230.php#L12-L15
|
||||
*
|
||||
* @license https://github.com/amphp/http/blob/v1.0.1/LICENSE
|
||||
*/
|
||||
const HEADER_REGEX = "(^([^()<>@,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m";
|
||||
const HEADER_FOLD_REGEX = "(\r?\n[ \t]++)";
|
||||
}
|
47
vendor/guzzlehttp/psr7/src/ServerRequest.php
vendored
47
vendor/guzzlehttp/psr7/src/ServerRequest.php
vendored
@ -4,9 +4,9 @@ namespace GuzzleHttp\Psr7;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Psr\Http\Message\UriInterface;
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
use Psr\Http\Message\UploadedFileInterface;
|
||||
use Psr\Http\Message\UriInterface;
|
||||
|
||||
/**
|
||||
* Server-side HTTP request
|
||||
@ -35,7 +35,7 @@ class ServerRequest extends Request implements ServerRequestInterface
|
||||
private $cookieParams = [];
|
||||
|
||||
/**
|
||||
* @var null|array|object
|
||||
* @var array|object|null
|
||||
*/
|
||||
private $parsedBody;
|
||||
|
||||
@ -58,7 +58,7 @@ class ServerRequest extends Request implements ServerRequestInterface
|
||||
* @param string $method HTTP method
|
||||
* @param string|UriInterface $uri URI
|
||||
* @param array $headers Request headers
|
||||
* @param string|null|resource|StreamInterface $body Request body
|
||||
* @param string|resource|StreamInterface|null $body Request body
|
||||
* @param string $version Protocol version
|
||||
* @param array $serverParams Typically the $_SERVER superglobal
|
||||
*/
|
||||
@ -79,8 +79,10 @@ class ServerRequest extends Request implements ServerRequestInterface
|
||||
* Return an UploadedFile instance array.
|
||||
*
|
||||
* @param array $files A array which respect $_FILES structure
|
||||
* @throws InvalidArgumentException for unrecognized values
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws InvalidArgumentException for unrecognized values
|
||||
*/
|
||||
public static function normalizeFiles(array $files)
|
||||
{
|
||||
@ -109,6 +111,7 @@ class ServerRequest extends Request implements ServerRequestInterface
|
||||
* delegate to normalizeNestedFileSpec() and return that return value.
|
||||
*
|
||||
* @param array $value $_FILES struct
|
||||
*
|
||||
* @return array|UploadedFileInterface
|
||||
*/
|
||||
private static function createUploadedFileFromSpec(array $value)
|
||||
@ -133,6 +136,7 @@ class ServerRequest extends Request implements ServerRequestInterface
|
||||
* UploadedFileInterface instances.
|
||||
*
|
||||
* @param array $files
|
||||
*
|
||||
* @return UploadedFileInterface[]
|
||||
*/
|
||||
private static function normalizeNestedFileSpec(array $files = [])
|
||||
@ -166,9 +170,9 @@ class ServerRequest extends Request implements ServerRequestInterface
|
||||
public static function fromGlobals()
|
||||
{
|
||||
$method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET';
|
||||
$headers = function_exists('getallheaders') ? getallheaders() : [];
|
||||
$headers = getallheaders();
|
||||
$uri = self::getUriFromGlobals();
|
||||
$body = new LazyOpenStream('php://input', 'r+');
|
||||
$body = new CachingStream(new LazyOpenStream('php://input', 'r+'));
|
||||
$protocol = isset($_SERVER['SERVER_PROTOCOL']) ? str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1';
|
||||
|
||||
$serverRequest = new ServerRequest($method, $uri, $headers, $body, $protocol, $_SERVER);
|
||||
@ -180,23 +184,41 @@ class ServerRequest extends Request implements ServerRequestInterface
|
||||
->withUploadedFiles(self::normalizeFiles($_FILES));
|
||||
}
|
||||
|
||||
private static function extractHostAndPortFromAuthority($authority)
|
||||
{
|
||||
$uri = 'http://' . $authority;
|
||||
$parts = parse_url($uri);
|
||||
if (false === $parts) {
|
||||
return [null, null];
|
||||
}
|
||||
|
||||
$host = isset($parts['host']) ? $parts['host'] : null;
|
||||
$port = isset($parts['port']) ? $parts['port'] : null;
|
||||
|
||||
return [$host, $port];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a Uri populated with values from $_SERVER.
|
||||
*
|
||||
* @return UriInterface
|
||||
*/
|
||||
public static function getUriFromGlobals() {
|
||||
public static function getUriFromGlobals()
|
||||
{
|
||||
$uri = new Uri('');
|
||||
|
||||
$uri = $uri->withScheme(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http');
|
||||
|
||||
$hasPort = false;
|
||||
if (isset($_SERVER['HTTP_HOST'])) {
|
||||
$hostHeaderParts = explode(':', $_SERVER['HTTP_HOST']);
|
||||
$uri = $uri->withHost($hostHeaderParts[0]);
|
||||
if (isset($hostHeaderParts[1])) {
|
||||
list($host, $port) = self::extractHostAndPortFromAuthority($_SERVER['HTTP_HOST']);
|
||||
if ($host !== null) {
|
||||
$uri = $uri->withHost($host);
|
||||
}
|
||||
|
||||
if ($port !== null) {
|
||||
$hasPort = true;
|
||||
$uri = $uri->withPort($hostHeaderParts[1]);
|
||||
$uri = $uri->withPort($port);
|
||||
}
|
||||
} elseif (isset($_SERVER['SERVER_NAME'])) {
|
||||
$uri = $uri->withHost($_SERVER['SERVER_NAME']);
|
||||
@ -210,7 +232,7 @@ class ServerRequest extends Request implements ServerRequestInterface
|
||||
|
||||
$hasQuery = false;
|
||||
if (isset($_SERVER['REQUEST_URI'])) {
|
||||
$requestUriParts = explode('?', $_SERVER['REQUEST_URI']);
|
||||
$requestUriParts = explode('?', $_SERVER['REQUEST_URI'], 2);
|
||||
$uri = $uri->withPath($requestUriParts[0]);
|
||||
if (isset($requestUriParts[1])) {
|
||||
$hasQuery = true;
|
||||
@ -225,7 +247,6 @@ class ServerRequest extends Request implements ServerRequestInterface
|
||||
return $uri;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
75
vendor/guzzlehttp/psr7/src/Stream.php
vendored
75
vendor/guzzlehttp/psr7/src/Stream.php
vendored
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
@ -10,6 +11,17 @@ use Psr\Http\Message\StreamInterface;
|
||||
*/
|
||||
class Stream implements StreamInterface
|
||||
{
|
||||
/**
|
||||
* Resource modes.
|
||||
*
|
||||
* @var string
|
||||
*
|
||||
* @see http://php.net/manual/function.fopen.php
|
||||
* @see http://php.net/manual/en/function.gzopen.php
|
||||
*/
|
||||
const READABLE_MODES = '/r|a\+|ab\+|w\+|wb\+|x\+|xb\+|c\+|cb\+/';
|
||||
const WRITABLE_MODES = '/a|w|r\+|rb\+|rw|x|c/';
|
||||
|
||||
private $stream;
|
||||
private $size;
|
||||
private $seekable;
|
||||
@ -18,22 +30,6 @@ class Stream implements StreamInterface
|
||||
private $uri;
|
||||
private $customMetadata;
|
||||
|
||||
/** @var array Hash of readable and writable stream types */
|
||||
private static $readWriteHash = [
|
||||
'read' => [
|
||||
'r' => true, 'w+' => true, 'r+' => true, 'x+' => true, 'c+' => true,
|
||||
'rb' => true, 'w+b' => true, 'r+b' => true, 'x+b' => true,
|
||||
'c+b' => true, 'rt' => true, 'w+t' => true, 'r+t' => true,
|
||||
'x+t' => true, 'c+t' => true, 'a+' => true
|
||||
],
|
||||
'write' => [
|
||||
'w' => true, 'w+' => true, 'rw' => true, 'r+' => true, 'x+' => true,
|
||||
'c+' => true, 'wb' => true, 'w+b' => true, 'r+b' => true,
|
||||
'x+b' => true, 'c+b' => true, 'w+t' => true, 'r+t' => true,
|
||||
'x+t' => true, 'c+t' => true, 'a' => true, 'a+' => true
|
||||
]
|
||||
];
|
||||
|
||||
/**
|
||||
* This constructor accepts an associative array of options.
|
||||
*
|
||||
@ -65,20 +61,11 @@ class Stream implements StreamInterface
|
||||
$this->stream = $stream;
|
||||
$meta = stream_get_meta_data($this->stream);
|
||||
$this->seekable = $meta['seekable'];
|
||||
$this->readable = isset(self::$readWriteHash['read'][$meta['mode']]);
|
||||
$this->writable = isset(self::$readWriteHash['write'][$meta['mode']]);
|
||||
$this->readable = (bool)preg_match(self::READABLE_MODES, $meta['mode']);
|
||||
$this->writable = (bool)preg_match(self::WRITABLE_MODES, $meta['mode']);
|
||||
$this->uri = $this->getMetadata('uri');
|
||||
}
|
||||
|
||||
public function __get($name)
|
||||
{
|
||||
if ($name == 'stream') {
|
||||
throw new \RuntimeException('The stream is detached');
|
||||
}
|
||||
|
||||
throw new \BadMethodCallException('No value for ' . $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Closes the stream when the destructed
|
||||
*/
|
||||
@ -90,8 +77,10 @@ class Stream implements StreamInterface
|
||||
public function __toString()
|
||||
{
|
||||
try {
|
||||
$this->seek(0);
|
||||
return (string) stream_get_contents($this->stream);
|
||||
if ($this->isSeekable()) {
|
||||
$this->seek(0);
|
||||
}
|
||||
return $this->getContents();
|
||||
} catch (\Exception $e) {
|
||||
return '';
|
||||
}
|
||||
@ -99,6 +88,10 @@ class Stream implements StreamInterface
|
||||
|
||||
public function getContents()
|
||||
{
|
||||
if (!isset($this->stream)) {
|
||||
throw new \RuntimeException('Stream is detached');
|
||||
}
|
||||
|
||||
$contents = stream_get_contents($this->stream);
|
||||
|
||||
if ($contents === false) {
|
||||
@ -173,11 +166,19 @@ class Stream implements StreamInterface
|
||||
|
||||
public function eof()
|
||||
{
|
||||
return !$this->stream || feof($this->stream);
|
||||
if (!isset($this->stream)) {
|
||||
throw new \RuntimeException('Stream is detached');
|
||||
}
|
||||
|
||||
return feof($this->stream);
|
||||
}
|
||||
|
||||
public function tell()
|
||||
{
|
||||
if (!isset($this->stream)) {
|
||||
throw new \RuntimeException('Stream is detached');
|
||||
}
|
||||
|
||||
$result = ftell($this->stream);
|
||||
|
||||
if ($result === false) {
|
||||
@ -194,9 +195,15 @@ class Stream implements StreamInterface
|
||||
|
||||
public function seek($offset, $whence = SEEK_SET)
|
||||
{
|
||||
$whence = (int) $whence;
|
||||
|
||||
if (!isset($this->stream)) {
|
||||
throw new \RuntimeException('Stream is detached');
|
||||
}
|
||||
if (!$this->seekable) {
|
||||
throw new \RuntimeException('Stream is not seekable');
|
||||
} elseif (fseek($this->stream, $offset, $whence) === -1) {
|
||||
}
|
||||
if (fseek($this->stream, $offset, $whence) === -1) {
|
||||
throw new \RuntimeException('Unable to seek to stream position '
|
||||
. $offset . ' with whence ' . var_export($whence, true));
|
||||
}
|
||||
@ -204,6 +211,9 @@ class Stream implements StreamInterface
|
||||
|
||||
public function read($length)
|
||||
{
|
||||
if (!isset($this->stream)) {
|
||||
throw new \RuntimeException('Stream is detached');
|
||||
}
|
||||
if (!$this->readable) {
|
||||
throw new \RuntimeException('Cannot read from non-readable stream');
|
||||
}
|
||||
@ -225,6 +235,9 @@ class Stream implements StreamInterface
|
||||
|
||||
public function write($string)
|
||||
{
|
||||
if (!isset($this->stream)) {
|
||||
throw new \RuntimeException('Stream is detached');
|
||||
}
|
||||
if (!$this->writable) {
|
||||
throw new \RuntimeException('Cannot write to a non-writable stream');
|
||||
}
|
||||
|
@ -1,10 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
|
||||
/**
|
||||
* Stream decorator trait
|
||||
*
|
||||
* @property StreamInterface stream
|
||||
*/
|
||||
trait StreamDecoratorTrait
|
||||
@ -52,7 +54,7 @@ trait StreamDecoratorTrait
|
||||
|
||||
public function getContents()
|
||||
{
|
||||
return copy_to_string($this);
|
||||
return Utils::copyToString($this);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -140,6 +142,7 @@ trait StreamDecoratorTrait
|
||||
* Implement in subclasses to dynamically create streams when requested.
|
||||
*
|
||||
* @return StreamInterface
|
||||
*
|
||||
* @throws \BadMethodCallException
|
||||
*/
|
||||
protected function createStream()
|
||||
|
50
vendor/guzzlehttp/psr7/src/StreamWrapper.php
vendored
50
vendor/guzzlehttp/psr7/src/StreamWrapper.php
vendored
@ -1,10 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
|
||||
/**
|
||||
* Converts Guzzle streams into PHP stream resources.
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
class StreamWrapper
|
||||
{
|
||||
@ -23,6 +26,7 @@ class StreamWrapper
|
||||
* @param StreamInterface $stream The stream to get a resource for
|
||||
*
|
||||
* @return resource
|
||||
*
|
||||
* @throws \InvalidArgumentException if stream is not readable or writable
|
||||
*/
|
||||
public static function getResource(StreamInterface $stream)
|
||||
@ -38,9 +42,21 @@ class StreamWrapper
|
||||
. 'writable, or both.');
|
||||
}
|
||||
|
||||
return fopen('guzzle://stream', $mode, null, stream_context_create([
|
||||
return fopen('guzzle://stream', $mode, null, self::createStreamContext($stream));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a stream context that can be used to open a stream as a php stream resource.
|
||||
*
|
||||
* @param StreamInterface $stream
|
||||
*
|
||||
* @return resource
|
||||
*/
|
||||
public static function createStreamContext(StreamInterface $stream)
|
||||
{
|
||||
return stream_context_create([
|
||||
'guzzle' => ['stream' => $stream]
|
||||
]));
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -94,12 +110,21 @@ class StreamWrapper
|
||||
return true;
|
||||
}
|
||||
|
||||
public function stream_cast($cast_as)
|
||||
{
|
||||
$stream = clone($this->stream);
|
||||
|
||||
return $stream->detach();
|
||||
}
|
||||
|
||||
public function stream_stat()
|
||||
{
|
||||
static $modeMap = [
|
||||
'r' => 33060,
|
||||
'rb' => 33060,
|
||||
'r+' => 33206,
|
||||
'w' => 33188
|
||||
'w' => 33188,
|
||||
'wb' => 33188
|
||||
];
|
||||
|
||||
return [
|
||||
@ -118,4 +143,23 @@ class StreamWrapper
|
||||
'blocks' => 0
|
||||
];
|
||||
}
|
||||
|
||||
public function url_stat($path, $flags)
|
||||
{
|
||||
return [
|
||||
'dev' => 0,
|
||||
'ino' => 0,
|
||||
'mode' => 0,
|
||||
'nlink' => 0,
|
||||
'uid' => 0,
|
||||
'gid' => 0,
|
||||
'rdev' => 0,
|
||||
'size' => 0,
|
||||
'atime' => 0,
|
||||
'mtime' => 0,
|
||||
'ctime' => 0,
|
||||
'blksize' => 0,
|
||||
'blocks' => 0
|
||||
];
|
||||
}
|
||||
}
|
||||
|
40
vendor/guzzlehttp/psr7/src/UploadedFile.php
vendored
40
vendor/guzzlehttp/psr7/src/UploadedFile.php
vendored
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
use InvalidArgumentException;
|
||||
@ -38,7 +39,7 @@ class UploadedFile implements UploadedFileInterface
|
||||
private $error;
|
||||
|
||||
/**
|
||||
* @var null|string
|
||||
* @var string|null
|
||||
*/
|
||||
private $file;
|
||||
|
||||
@ -59,10 +60,10 @@ class UploadedFile implements UploadedFileInterface
|
||||
|
||||
/**
|
||||
* @param StreamInterface|string|resource $streamOrFile
|
||||
* @param int $size
|
||||
* @param int $errorStatus
|
||||
* @param string|null $clientFilename
|
||||
* @param string|null $clientMediaType
|
||||
* @param int $size
|
||||
* @param int $errorStatus
|
||||
* @param string|null $clientFilename
|
||||
* @param string|null $clientMediaType
|
||||
*/
|
||||
public function __construct(
|
||||
$streamOrFile,
|
||||
@ -85,6 +86,7 @@ class UploadedFile implements UploadedFileInterface
|
||||
* Depending on the value set file or stream variable
|
||||
*
|
||||
* @param mixed $streamOrFile
|
||||
*
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
private function setStreamOrFile($streamOrFile)
|
||||
@ -104,6 +106,7 @@ class UploadedFile implements UploadedFileInterface
|
||||
|
||||
/**
|
||||
* @param int $error
|
||||
*
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
private function setError($error)
|
||||
@ -125,6 +128,7 @@ class UploadedFile implements UploadedFileInterface
|
||||
|
||||
/**
|
||||
* @param int $size
|
||||
*
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
private function setSize($size)
|
||||
@ -140,7 +144,8 @@ class UploadedFile implements UploadedFileInterface
|
||||
|
||||
/**
|
||||
* @param mixed $param
|
||||
* @return boolean
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function isStringOrNull($param)
|
||||
{
|
||||
@ -149,7 +154,8 @@ class UploadedFile implements UploadedFileInterface
|
||||
|
||||
/**
|
||||
* @param mixed $param
|
||||
* @return boolean
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function isStringNotEmpty($param)
|
||||
{
|
||||
@ -158,6 +164,7 @@ class UploadedFile implements UploadedFileInterface
|
||||
|
||||
/**
|
||||
* @param string|null $clientFilename
|
||||
*
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
private function setClientFilename($clientFilename)
|
||||
@ -173,6 +180,7 @@ class UploadedFile implements UploadedFileInterface
|
||||
|
||||
/**
|
||||
* @param string|null $clientMediaType
|
||||
*
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
private function setClientMediaType($clientMediaType)
|
||||
@ -189,7 +197,7 @@ class UploadedFile implements UploadedFileInterface
|
||||
/**
|
||||
* Return true if there is no upload error
|
||||
*
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
private function isOk()
|
||||
{
|
||||
@ -197,7 +205,7 @@ class UploadedFile implements UploadedFileInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
public function isMoved()
|
||||
{
|
||||
@ -220,6 +228,7 @@ class UploadedFile implements UploadedFileInterface
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @throws RuntimeException if the upload was not successful.
|
||||
*/
|
||||
public function getStream()
|
||||
@ -238,11 +247,13 @@ class UploadedFile implements UploadedFileInterface
|
||||
*
|
||||
* @see http://php.net/is_uploaded_file
|
||||
* @see http://php.net/move_uploaded_file
|
||||
*
|
||||
* @param string $targetPath Path to which to move the uploaded file.
|
||||
* @throws RuntimeException if the upload was not successful.
|
||||
*
|
||||
* @throws RuntimeException if the upload was not successful.
|
||||
* @throws InvalidArgumentException if the $path specified is invalid.
|
||||
* @throws RuntimeException on any error during the move operation, or on
|
||||
* the second or subsequent call to the method.
|
||||
* @throws RuntimeException on any error during the move operation, or on
|
||||
* the second or subsequent call to the method.
|
||||
*/
|
||||
public function moveTo($targetPath)
|
||||
{
|
||||
@ -259,7 +270,7 @@ class UploadedFile implements UploadedFileInterface
|
||||
? rename($this->file, $targetPath)
|
||||
: move_uploaded_file($this->file, $targetPath);
|
||||
} else {
|
||||
copy_to_stream(
|
||||
Utils::copyToStream(
|
||||
$this->getStream(),
|
||||
new LazyOpenStream($targetPath, 'w')
|
||||
);
|
||||
@ -288,6 +299,7 @@ class UploadedFile implements UploadedFileInterface
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see http://php.net/manual/en/features.file-upload.errors.php
|
||||
*
|
||||
* @return int One of PHP's UPLOAD_ERR_XXX constants.
|
||||
*/
|
||||
public function getError()
|
||||
@ -299,7 +311,7 @@ class UploadedFile implements UploadedFileInterface
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return string|null The filename sent by the client or null if none
|
||||
* was provided.
|
||||
* was provided.
|
||||
*/
|
||||
public function getClientFilename()
|
||||
{
|
||||
|
182
vendor/guzzlehttp/psr7/src/Uri.php
vendored
182
vendor/guzzlehttp/psr7/src/Uri.php
vendored
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
use Psr\Http\Message\UriInterface;
|
||||
@ -66,7 +67,7 @@ class Uri implements UriInterface
|
||||
{
|
||||
// weak type check to also accept null until we can add scalar type hints
|
||||
if ($uri != '') {
|
||||
$parts = parse_url($uri);
|
||||
$parts = self::parse($uri);
|
||||
if ($parts === false) {
|
||||
throw new \InvalidArgumentException("Unable to parse URI: $uri");
|
||||
}
|
||||
@ -74,6 +75,49 @@ class Uri implements UriInterface
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* UTF-8 aware \parse_url() replacement.
|
||||
*
|
||||
* The internal function produces broken output for non ASCII domain names
|
||||
* (IDN) when used with locales other than "C".
|
||||
*
|
||||
* On the other hand, cURL understands IDN correctly only when UTF-8 locale
|
||||
* is configured ("C.UTF-8", "en_US.UTF-8", etc.).
|
||||
*
|
||||
* @see https://bugs.php.net/bug.php?id=52923
|
||||
* @see https://www.php.net/manual/en/function.parse-url.php#114817
|
||||
* @see https://curl.haxx.se/libcurl/c/CURLOPT_URL.html#ENCODING
|
||||
*
|
||||
* @param string $url
|
||||
*
|
||||
* @return array|false
|
||||
*/
|
||||
private static function parse($url)
|
||||
{
|
||||
// If IPv6
|
||||
$prefix = '';
|
||||
if (preg_match('%^(.*://\[[0-9:a-f]+\])(.*?)$%', $url, $matches)) {
|
||||
$prefix = $matches[1];
|
||||
$url = $matches[2];
|
||||
}
|
||||
|
||||
$encodedUrl = preg_replace_callback(
|
||||
'%[^:/@?&=#]+%usD',
|
||||
static function ($matches) {
|
||||
return urlencode($matches[0]);
|
||||
},
|
||||
$url
|
||||
);
|
||||
|
||||
$result = parse_url($prefix . $encodedUrl);
|
||||
|
||||
if ($result === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return array_map('urldecode', $result);
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
{
|
||||
return self::composeComponents(
|
||||
@ -166,6 +210,7 @@ class Uri implements UriInterface
|
||||
* @param UriInterface $uri
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @see Uri::isNetworkPathReference
|
||||
* @see Uri::isAbsolutePathReference
|
||||
* @see Uri::isRelativePathReference
|
||||
@ -184,6 +229,7 @@ class Uri implements UriInterface
|
||||
* @param UriInterface $uri
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @link https://tools.ietf.org/html/rfc3986#section-4.2
|
||||
*/
|
||||
public static function isNetworkPathReference(UriInterface $uri)
|
||||
@ -199,6 +245,7 @@ class Uri implements UriInterface
|
||||
* @param UriInterface $uri
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @link https://tools.ietf.org/html/rfc3986#section-4.2
|
||||
*/
|
||||
public static function isAbsolutePathReference(UriInterface $uri)
|
||||
@ -217,6 +264,7 @@ class Uri implements UriInterface
|
||||
* @param UriInterface $uri
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @link https://tools.ietf.org/html/rfc3986#section-4.2
|
||||
*/
|
||||
public static function isRelativePathReference(UriInterface $uri)
|
||||
@ -237,6 +285,7 @@ class Uri implements UriInterface
|
||||
* @param UriInterface|null $base An optional base URI to compare against
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @link https://tools.ietf.org/html/rfc3986#section-4.4
|
||||
*/
|
||||
public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null)
|
||||
@ -301,15 +350,7 @@ class Uri implements UriInterface
|
||||
*/
|
||||
public static function withoutQueryValue(UriInterface $uri, $key)
|
||||
{
|
||||
$current = $uri->getQuery();
|
||||
if ($current === '') {
|
||||
return $uri;
|
||||
}
|
||||
|
||||
$decodedKey = rawurldecode($key);
|
||||
$result = array_filter(explode('&', $current), function ($part) use ($decodedKey) {
|
||||
return rawurldecode(explode('=', $part)[0]) !== $decodedKey;
|
||||
});
|
||||
$result = self::getFilteredQueryString($uri, [$key]);
|
||||
|
||||
return $uri->withQuery(implode('&', $result));
|
||||
}
|
||||
@ -331,26 +372,29 @@ class Uri implements UriInterface
|
||||
*/
|
||||
public static function withQueryValue(UriInterface $uri, $key, $value)
|
||||
{
|
||||
$current = $uri->getQuery();
|
||||
$result = self::getFilteredQueryString($uri, [$key]);
|
||||
|
||||
if ($current === '') {
|
||||
$result = [];
|
||||
} else {
|
||||
$decodedKey = rawurldecode($key);
|
||||
$result = array_filter(explode('&', $current), function ($part) use ($decodedKey) {
|
||||
return rawurldecode(explode('=', $part)[0]) !== $decodedKey;
|
||||
});
|
||||
}
|
||||
$result[] = self::generateQueryString($key, $value);
|
||||
|
||||
// Query string separators ("=", "&") within the key or value need to be encoded
|
||||
// (while preventing double-encoding) before setting the query string. All other
|
||||
// chars that need percent-encoding will be encoded by withQuery().
|
||||
$key = strtr($key, self::$replaceQuery);
|
||||
return $uri->withQuery(implode('&', $result));
|
||||
}
|
||||
|
||||
if ($value !== null) {
|
||||
$result[] = $key . '=' . strtr($value, self::$replaceQuery);
|
||||
} else {
|
||||
$result[] = $key;
|
||||
/**
|
||||
* Creates a new URI with multiple specific query string values.
|
||||
*
|
||||
* It has the same behavior as withQueryValue() but for an associative array of key => value.
|
||||
*
|
||||
* @param UriInterface $uri URI to use as a base.
|
||||
* @param array $keyValueArray Associative array of key and values
|
||||
*
|
||||
* @return UriInterface
|
||||
*/
|
||||
public static function withQueryValues(UriInterface $uri, array $keyValueArray)
|
||||
{
|
||||
$result = self::getFilteredQueryString($uri, array_keys($keyValueArray));
|
||||
|
||||
foreach ($keyValueArray as $key => $value) {
|
||||
$result[] = self::generateQueryString($key, $value);
|
||||
}
|
||||
|
||||
return $uri->withQuery(implode('&', $result));
|
||||
@ -362,6 +406,7 @@ class Uri implements UriInterface
|
||||
* @param array $parts
|
||||
*
|
||||
* @return UriInterface
|
||||
*
|
||||
* @link http://php.net/manual/en/function.parse-url.php
|
||||
*
|
||||
* @throws \InvalidArgumentException If the components do not form a valid URI.
|
||||
@ -442,9 +487,9 @@ class Uri implements UriInterface
|
||||
|
||||
public function withUserInfo($user, $password = null)
|
||||
{
|
||||
$info = $user;
|
||||
if ($password != '') {
|
||||
$info .= ':' . $password;
|
||||
$info = $this->filterUserInfoComponent($user);
|
||||
if ($password !== null) {
|
||||
$info .= ':' . $this->filterUserInfoComponent($password);
|
||||
}
|
||||
|
||||
if ($this->userInfo === $info) {
|
||||
@ -542,7 +587,9 @@ class Uri implements UriInterface
|
||||
$this->scheme = isset($parts['scheme'])
|
||||
? $this->filterScheme($parts['scheme'])
|
||||
: '';
|
||||
$this->userInfo = isset($parts['user']) ? $parts['user'] : '';
|
||||
$this->userInfo = isset($parts['user'])
|
||||
? $this->filterUserInfoComponent($parts['user'])
|
||||
: '';
|
||||
$this->host = isset($parts['host'])
|
||||
? $this->filterHost($parts['host'])
|
||||
: '';
|
||||
@ -559,7 +606,7 @@ class Uri implements UriInterface
|
||||
? $this->filterQueryAndFragment($parts['fragment'])
|
||||
: '';
|
||||
if (isset($parts['pass'])) {
|
||||
$this->userInfo .= ':' . $parts['pass'];
|
||||
$this->userInfo .= ':' . $this->filterUserInfoComponent($parts['pass']);
|
||||
}
|
||||
|
||||
$this->removeDefaultPort();
|
||||
@ -578,7 +625,27 @@ class Uri implements UriInterface
|
||||
throw new \InvalidArgumentException('Scheme must be a string');
|
||||
}
|
||||
|
||||
return strtolower($scheme);
|
||||
return \strtr($scheme, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $component
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @throws \InvalidArgumentException If the user info is invalid.
|
||||
*/
|
||||
private function filterUserInfoComponent($component)
|
||||
{
|
||||
if (!is_string($component)) {
|
||||
throw new \InvalidArgumentException('User info must be a string');
|
||||
}
|
||||
|
||||
return preg_replace_callback(
|
||||
'/(?:[^%' . self::$charUnreserved . self::$charSubDelims . ']+|%(?![A-Fa-f0-9]{2}))/',
|
||||
[$this, 'rawurlencodeMatchZero'],
|
||||
$component
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -594,7 +661,7 @@ class Uri implements UriInterface
|
||||
throw new \InvalidArgumentException('Host must be a string');
|
||||
}
|
||||
|
||||
return strtolower($host);
|
||||
return \strtr($host, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -611,15 +678,56 @@ class Uri implements UriInterface
|
||||
}
|
||||
|
||||
$port = (int) $port;
|
||||
if (1 > $port || 0xffff < $port) {
|
||||
if (0 > $port || 0xffff < $port) {
|
||||
throw new \InvalidArgumentException(
|
||||
sprintf('Invalid port: %d. Must be between 1 and 65535', $port)
|
||||
sprintf('Invalid port: %d. Must be between 0 and 65535', $port)
|
||||
);
|
||||
}
|
||||
|
||||
return $port;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param UriInterface $uri
|
||||
* @param array $keys
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private static function getFilteredQueryString(UriInterface $uri, array $keys)
|
||||
{
|
||||
$current = $uri->getQuery();
|
||||
|
||||
if ($current === '') {
|
||||
return [];
|
||||
}
|
||||
|
||||
$decodedKeys = array_map('rawurldecode', $keys);
|
||||
|
||||
return array_filter(explode('&', $current), function ($part) use ($decodedKeys) {
|
||||
return !in_array(rawurldecode(explode('=', $part)[0]), $decodedKeys, true);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
* @param string|null $value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private static function generateQueryString($key, $value)
|
||||
{
|
||||
// Query string separators ("=", "&") within the key or value need to be encoded
|
||||
// (while preventing double-encoding) before setting the query string. All other
|
||||
// chars that need percent-encoding will be encoded by withQuery().
|
||||
$queryString = strtr($key, self::$replaceQuery);
|
||||
|
||||
if ($value !== null) {
|
||||
$queryString .= '=' . strtr($value, self::$replaceQuery);
|
||||
}
|
||||
|
||||
return $queryString;
|
||||
}
|
||||
|
||||
private function removeDefaultPort()
|
||||
{
|
||||
if ($this->port !== null && self::isDefaultPort($this)) {
|
||||
@ -695,7 +803,7 @@ class Uri implements UriInterface
|
||||
'by adding a leading slash to the path is deprecated since version 1.4 and will throw an exception instead.',
|
||||
E_USER_DEPRECATED
|
||||
);
|
||||
$this->path = '/'. $this->path;
|
||||
$this->path = '/' . $this->path;
|
||||
//throw new \InvalidArgumentException('The path of a URI with an authority must start with a slash "/" or be empty');
|
||||
}
|
||||
}
|
||||
|
55
vendor/guzzlehttp/psr7/src/UriComparator.php
vendored
Normal file
55
vendor/guzzlehttp/psr7/src/UriComparator.php
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
use Psr\Http\Message\UriInterface;
|
||||
|
||||
/**
|
||||
* Provides methods to determine if a modified URL should be considered cross-origin.
|
||||
*
|
||||
* @author Graham Campbell
|
||||
*/
|
||||
final class UriComparator
|
||||
{
|
||||
/**
|
||||
* Determines if a modified URL should be considered cross-origin with
|
||||
* respect to an original URL.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function isCrossOrigin(UriInterface $original, UriInterface $modified)
|
||||
{
|
||||
if (\strcasecmp($original->getHost(), $modified->getHost()) !== 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($original->getScheme() !== $modified->getScheme()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (self::computePort($original) !== self::computePort($modified)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
private static function computePort(UriInterface $uri)
|
||||
{
|
||||
$port = $uri->getPort();
|
||||
|
||||
if (null !== $port) {
|
||||
return $port;
|
||||
}
|
||||
|
||||
return 'https' === $uri->getScheme() ? 443 : 80;
|
||||
}
|
||||
|
||||
private function __construct()
|
||||
{
|
||||
// cannot be instantiated
|
||||
}
|
||||
}
|
3
vendor/guzzlehttp/psr7/src/UriNormalizer.php
vendored
3
vendor/guzzlehttp/psr7/src/UriNormalizer.php
vendored
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
use Psr\Http\Message\UriInterface;
|
||||
@ -114,6 +115,7 @@ final class UriNormalizer
|
||||
* @param int $flags A bitmask of normalizations to apply, see constants
|
||||
*
|
||||
* @return UriInterface The normalized URI
|
||||
*
|
||||
* @link https://tools.ietf.org/html/rfc3986#section-6.2
|
||||
*/
|
||||
public static function normalize(UriInterface $uri, $flags = self::PRESERVING_NORMALIZATIONS)
|
||||
@ -170,6 +172,7 @@ final class UriNormalizer
|
||||
* @param int $normalizations A bitmask of normalizations to apply, see constants
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @link https://tools.ietf.org/html/rfc3986#section-6.1
|
||||
*/
|
||||
public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS)
|
||||
|
3
vendor/guzzlehttp/psr7/src/UriResolver.php
vendored
3
vendor/guzzlehttp/psr7/src/UriResolver.php
vendored
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
use Psr\Http\Message\UriInterface;
|
||||
@ -18,6 +19,7 @@ final class UriResolver
|
||||
* @param string $path
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @link http://tools.ietf.org/html/rfc3986#section-5.2.4
|
||||
*/
|
||||
public static function removeDotSegments($path)
|
||||
@ -57,6 +59,7 @@ final class UriResolver
|
||||
* @param UriInterface $rel Relative URI
|
||||
*
|
||||
* @return UriInterface
|
||||
*
|
||||
* @link http://tools.ietf.org/html/rfc3986#section-5.2
|
||||
*/
|
||||
public static function resolve(UriInterface $base, UriInterface $rel)
|
||||
|
428
vendor/guzzlehttp/psr7/src/Utils.php
vendored
Normal file
428
vendor/guzzlehttp/psr7/src/Utils.php
vendored
Normal file
@ -0,0 +1,428 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
use Psr\Http\Message\UriInterface;
|
||||
|
||||
final class Utils
|
||||
{
|
||||
/**
|
||||
* Remove the items given by the keys, case insensitively from the data.
|
||||
*
|
||||
* @param iterable<string> $keys
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function caselessRemove($keys, array $data)
|
||||
{
|
||||
$result = [];
|
||||
|
||||
foreach ($keys as &$key) {
|
||||
$key = strtolower($key);
|
||||
}
|
||||
|
||||
foreach ($data as $k => $v) {
|
||||
if (!in_array(strtolower($k), $keys)) {
|
||||
$result[$k] = $v;
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy the contents of a stream into another stream until the given number
|
||||
* of bytes have been read.
|
||||
*
|
||||
* @param StreamInterface $source Stream to read from
|
||||
* @param StreamInterface $dest Stream to write to
|
||||
* @param int $maxLen Maximum number of bytes to read. Pass -1
|
||||
* to read the entire stream.
|
||||
*
|
||||
* @throws \RuntimeException on error.
|
||||
*/
|
||||
public static function copyToStream(StreamInterface $source, StreamInterface $dest, $maxLen = -1)
|
||||
{
|
||||
$bufferSize = 8192;
|
||||
|
||||
if ($maxLen === -1) {
|
||||
while (!$source->eof()) {
|
||||
if (!$dest->write($source->read($bufferSize))) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$remaining = $maxLen;
|
||||
while ($remaining > 0 && !$source->eof()) {
|
||||
$buf = $source->read(min($bufferSize, $remaining));
|
||||
$len = strlen($buf);
|
||||
if (!$len) {
|
||||
break;
|
||||
}
|
||||
$remaining -= $len;
|
||||
$dest->write($buf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy the contents of a stream into a string until the given number of
|
||||
* bytes have been read.
|
||||
*
|
||||
* @param StreamInterface $stream Stream to read
|
||||
* @param int $maxLen Maximum number of bytes to read. Pass -1
|
||||
* to read the entire stream.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @throws \RuntimeException on error.
|
||||
*/
|
||||
public static function copyToString(StreamInterface $stream, $maxLen = -1)
|
||||
{
|
||||
$buffer = '';
|
||||
|
||||
if ($maxLen === -1) {
|
||||
while (!$stream->eof()) {
|
||||
$buf = $stream->read(1048576);
|
||||
// Using a loose equality here to match on '' and false.
|
||||
if ($buf == null) {
|
||||
break;
|
||||
}
|
||||
$buffer .= $buf;
|
||||
}
|
||||
return $buffer;
|
||||
}
|
||||
|
||||
$len = 0;
|
||||
while (!$stream->eof() && $len < $maxLen) {
|
||||
$buf = $stream->read($maxLen - $len);
|
||||
// Using a loose equality here to match on '' and false.
|
||||
if ($buf == null) {
|
||||
break;
|
||||
}
|
||||
$buffer .= $buf;
|
||||
$len = strlen($buffer);
|
||||
}
|
||||
|
||||
return $buffer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate a hash of a stream.
|
||||
*
|
||||
* This method reads the entire stream to calculate a rolling hash, based
|
||||
* on PHP's `hash_init` functions.
|
||||
*
|
||||
* @param StreamInterface $stream Stream to calculate the hash for
|
||||
* @param string $algo Hash algorithm (e.g. md5, crc32, etc)
|
||||
* @param bool $rawOutput Whether or not to use raw output
|
||||
*
|
||||
* @return string Returns the hash of the stream
|
||||
*
|
||||
* @throws \RuntimeException on error.
|
||||
*/
|
||||
public static function hash(StreamInterface $stream, $algo, $rawOutput = false)
|
||||
{
|
||||
$pos = $stream->tell();
|
||||
|
||||
if ($pos > 0) {
|
||||
$stream->rewind();
|
||||
}
|
||||
|
||||
$ctx = hash_init($algo);
|
||||
while (!$stream->eof()) {
|
||||
hash_update($ctx, $stream->read(1048576));
|
||||
}
|
||||
|
||||
$out = hash_final($ctx, (bool) $rawOutput);
|
||||
$stream->seek($pos);
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clone and modify a request with the given changes.
|
||||
*
|
||||
* This method is useful for reducing the number of clones needed to mutate
|
||||
* a message.
|
||||
*
|
||||
* The changes can be one of:
|
||||
* - method: (string) Changes the HTTP method.
|
||||
* - set_headers: (array) Sets the given headers.
|
||||
* - remove_headers: (array) Remove the given headers.
|
||||
* - body: (mixed) Sets the given body.
|
||||
* - uri: (UriInterface) Set the URI.
|
||||
* - query: (string) Set the query string value of the URI.
|
||||
* - version: (string) Set the protocol version.
|
||||
*
|
||||
* @param RequestInterface $request Request to clone and modify.
|
||||
* @param array $changes Changes to apply.
|
||||
*
|
||||
* @return RequestInterface
|
||||
*/
|
||||
public static function modifyRequest(RequestInterface $request, array $changes)
|
||||
{
|
||||
if (!$changes) {
|
||||
return $request;
|
||||
}
|
||||
|
||||
$headers = $request->getHeaders();
|
||||
|
||||
if (!isset($changes['uri'])) {
|
||||
$uri = $request->getUri();
|
||||
} else {
|
||||
// Remove the host header if one is on the URI
|
||||
if ($host = $changes['uri']->getHost()) {
|
||||
$changes['set_headers']['Host'] = $host;
|
||||
|
||||
if ($port = $changes['uri']->getPort()) {
|
||||
$standardPorts = ['http' => 80, 'https' => 443];
|
||||
$scheme = $changes['uri']->getScheme();
|
||||
if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) {
|
||||
$changes['set_headers']['Host'] .= ':' . $port;
|
||||
}
|
||||
}
|
||||
}
|
||||
$uri = $changes['uri'];
|
||||
}
|
||||
|
||||
if (!empty($changes['remove_headers'])) {
|
||||
$headers = self::caselessRemove($changes['remove_headers'], $headers);
|
||||
}
|
||||
|
||||
if (!empty($changes['set_headers'])) {
|
||||
$headers = self::caselessRemove(array_keys($changes['set_headers']), $headers);
|
||||
$headers = $changes['set_headers'] + $headers;
|
||||
}
|
||||
|
||||
if (isset($changes['query'])) {
|
||||
$uri = $uri->withQuery($changes['query']);
|
||||
}
|
||||
|
||||
if ($request instanceof ServerRequestInterface) {
|
||||
$new = (new ServerRequest(
|
||||
isset($changes['method']) ? $changes['method'] : $request->getMethod(),
|
||||
$uri,
|
||||
$headers,
|
||||
isset($changes['body']) ? $changes['body'] : $request->getBody(),
|
||||
isset($changes['version'])
|
||||
? $changes['version']
|
||||
: $request->getProtocolVersion(),
|
||||
$request->getServerParams()
|
||||
))
|
||||
->withParsedBody($request->getParsedBody())
|
||||
->withQueryParams($request->getQueryParams())
|
||||
->withCookieParams($request->getCookieParams())
|
||||
->withUploadedFiles($request->getUploadedFiles());
|
||||
|
||||
foreach ($request->getAttributes() as $key => $value) {
|
||||
$new = $new->withAttribute($key, $value);
|
||||
}
|
||||
|
||||
return $new;
|
||||
}
|
||||
|
||||
return new Request(
|
||||
isset($changes['method']) ? $changes['method'] : $request->getMethod(),
|
||||
$uri,
|
||||
$headers,
|
||||
isset($changes['body']) ? $changes['body'] : $request->getBody(),
|
||||
isset($changes['version'])
|
||||
? $changes['version']
|
||||
: $request->getProtocolVersion()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Read a line from the stream up to the maximum allowed buffer length.
|
||||
*
|
||||
* @param StreamInterface $stream Stream to read from
|
||||
* @param int|null $maxLength Maximum buffer length
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function readLine(StreamInterface $stream, $maxLength = null)
|
||||
{
|
||||
$buffer = '';
|
||||
$size = 0;
|
||||
|
||||
while (!$stream->eof()) {
|
||||
// Using a loose equality here to match on '' and false.
|
||||
if (null == ($byte = $stream->read(1))) {
|
||||
return $buffer;
|
||||
}
|
||||
$buffer .= $byte;
|
||||
// Break when a new line is found or the max length - 1 is reached
|
||||
if ($byte === "\n" || ++$size === $maxLength - 1) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $buffer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new stream based on the input type.
|
||||
*
|
||||
* Options is an associative array that can contain the following keys:
|
||||
* - metadata: Array of custom metadata.
|
||||
* - size: Size of the stream.
|
||||
*
|
||||
* This method accepts the following `$resource` types:
|
||||
* - `Psr\Http\Message\StreamInterface`: Returns the value as-is.
|
||||
* - `string`: Creates a stream object that uses the given string as the contents.
|
||||
* - `resource`: Creates a stream object that wraps the given PHP stream resource.
|
||||
* - `Iterator`: If the provided value implements `Iterator`, then a read-only
|
||||
* stream object will be created that wraps the given iterable. Each time the
|
||||
* stream is read from, data from the iterator will fill a buffer and will be
|
||||
* continuously called until the buffer is equal to the requested read size.
|
||||
* Subsequent read calls will first read from the buffer and then call `next`
|
||||
* on the underlying iterator until it is exhausted.
|
||||
* - `object` with `__toString()`: If the object has the `__toString()` method,
|
||||
* the object will be cast to a string and then a stream will be returned that
|
||||
* uses the string value.
|
||||
* - `NULL`: When `null` is passed, an empty stream object is returned.
|
||||
* - `callable` When a callable is passed, a read-only stream object will be
|
||||
* created that invokes the given callable. The callable is invoked with the
|
||||
* number of suggested bytes to read. The callable can return any number of
|
||||
* bytes, but MUST return `false` when there is no more data to return. The
|
||||
* stream object that wraps the callable will invoke the callable until the
|
||||
* number of requested bytes are available. Any additional bytes will be
|
||||
* buffered and used in subsequent reads.
|
||||
*
|
||||
* @param resource|string|int|float|bool|StreamInterface|callable|\Iterator|null $resource Entity body data
|
||||
* @param array $options Additional options
|
||||
*
|
||||
* @return StreamInterface
|
||||
*
|
||||
* @throws \InvalidArgumentException if the $resource arg is not valid.
|
||||
*/
|
||||
public static function streamFor($resource = '', array $options = [])
|
||||
{
|
||||
if (is_scalar($resource)) {
|
||||
$stream = self::tryFopen('php://temp', 'r+');
|
||||
if ($resource !== '') {
|
||||
fwrite($stream, $resource);
|
||||
fseek($stream, 0);
|
||||
}
|
||||
return new Stream($stream, $options);
|
||||
}
|
||||
|
||||
switch (gettype($resource)) {
|
||||
case 'resource':
|
||||
/*
|
||||
* The 'php://input' is a special stream with quirks and inconsistencies.
|
||||
* We avoid using that stream by reading it into php://temp
|
||||
*/
|
||||
$metaData = \stream_get_meta_data($resource);
|
||||
if (isset($metaData['uri']) && $metaData['uri'] === 'php://input') {
|
||||
$stream = self::tryFopen('php://temp', 'w+');
|
||||
fwrite($stream, stream_get_contents($resource));
|
||||
fseek($stream, 0);
|
||||
$resource = $stream;
|
||||
}
|
||||
return new Stream($resource, $options);
|
||||
case 'object':
|
||||
if ($resource instanceof StreamInterface) {
|
||||
return $resource;
|
||||
} elseif ($resource instanceof \Iterator) {
|
||||
return new PumpStream(function () use ($resource) {
|
||||
if (!$resource->valid()) {
|
||||
return false;
|
||||
}
|
||||
$result = $resource->current();
|
||||
$resource->next();
|
||||
return $result;
|
||||
}, $options);
|
||||
} elseif (method_exists($resource, '__toString')) {
|
||||
return Utils::streamFor((string) $resource, $options);
|
||||
}
|
||||
break;
|
||||
case 'NULL':
|
||||
return new Stream(self::tryFopen('php://temp', 'r+'), $options);
|
||||
}
|
||||
|
||||
if (is_callable($resource)) {
|
||||
return new PumpStream($resource, $options);
|
||||
}
|
||||
|
||||
throw new \InvalidArgumentException('Invalid resource type: ' . gettype($resource));
|
||||
}
|
||||
|
||||
/**
|
||||
* Safely opens a PHP stream resource using a filename.
|
||||
*
|
||||
* When fopen fails, PHP normally raises a warning. This function adds an
|
||||
* error handler that checks for errors and throws an exception instead.
|
||||
*
|
||||
* @param string $filename File to open
|
||||
* @param string $mode Mode used to open the file
|
||||
*
|
||||
* @return resource
|
||||
*
|
||||
* @throws \RuntimeException if the file cannot be opened
|
||||
*/
|
||||
public static function tryFopen($filename, $mode)
|
||||
{
|
||||
$ex = null;
|
||||
set_error_handler(function () use ($filename, $mode, &$ex) {
|
||||
$ex = new \RuntimeException(sprintf(
|
||||
'Unable to open "%s" using mode "%s": %s',
|
||||
$filename,
|
||||
$mode,
|
||||
func_get_args()[1]
|
||||
));
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
try {
|
||||
$handle = fopen($filename, $mode);
|
||||
} catch (\Throwable $e) {
|
||||
$ex = new \RuntimeException(sprintf(
|
||||
'Unable to open "%s" using mode "%s": %s',
|
||||
$filename,
|
||||
$mode,
|
||||
$e->getMessage()
|
||||
), 0, $e);
|
||||
}
|
||||
|
||||
restore_error_handler();
|
||||
|
||||
if ($ex) {
|
||||
/** @var $ex \RuntimeException */
|
||||
throw $ex;
|
||||
}
|
||||
|
||||
return $handle;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a UriInterface for the given value.
|
||||
*
|
||||
* This function accepts a string or UriInterface and returns a
|
||||
* UriInterface for the given value. If the value is already a
|
||||
* UriInterface, it is returned as-is.
|
||||
*
|
||||
* @param string|UriInterface $uri
|
||||
*
|
||||
* @return UriInterface
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public static function uriFor($uri)
|
||||
{
|
||||
if ($uri instanceof UriInterface) {
|
||||
return $uri;
|
||||
}
|
||||
|
||||
if (is_string($uri)) {
|
||||
return new Uri($uri);
|
||||
}
|
||||
|
||||
throw new \InvalidArgumentException('URI must be a string or UriInterface');
|
||||
}
|
||||
}
|
712
vendor/guzzlehttp/psr7/src/functions.php
vendored
712
vendor/guzzlehttp/psr7/src/functions.php
vendored
@ -1,10 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Psr7;
|
||||
|
||||
use Psr\Http\Message\MessageInterface;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
use Psr\Http\Message\UriInterface;
|
||||
|
||||
@ -14,52 +13,32 @@ use Psr\Http\Message\UriInterface;
|
||||
* @param MessageInterface $message Message to convert to a string.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @deprecated str will be removed in guzzlehttp/psr7:2.0. Use Message::toString instead.
|
||||
*/
|
||||
function str(MessageInterface $message)
|
||||
{
|
||||
if ($message instanceof RequestInterface) {
|
||||
$msg = trim($message->getMethod() . ' '
|
||||
. $message->getRequestTarget())
|
||||
. ' HTTP/' . $message->getProtocolVersion();
|
||||
if (!$message->hasHeader('host')) {
|
||||
$msg .= "\r\nHost: " . $message->getUri()->getHost();
|
||||
}
|
||||
} elseif ($message instanceof ResponseInterface) {
|
||||
$msg = 'HTTP/' . $message->getProtocolVersion() . ' '
|
||||
. $message->getStatusCode() . ' '
|
||||
. $message->getReasonPhrase();
|
||||
} else {
|
||||
throw new \InvalidArgumentException('Unknown message type');
|
||||
}
|
||||
|
||||
foreach ($message->getHeaders() as $name => $values) {
|
||||
$msg .= "\r\n{$name}: " . implode(', ', $values);
|
||||
}
|
||||
|
||||
return "{$msg}\r\n\r\n" . $message->getBody();
|
||||
return Message::toString($message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a UriInterface for the given value.
|
||||
*
|
||||
* This function accepts a string or {@see Psr\Http\Message\UriInterface} and
|
||||
* returns a UriInterface for the given value. If the value is already a
|
||||
* `UriInterface`, it is returned as-is.
|
||||
* This function accepts a string or UriInterface and returns a
|
||||
* UriInterface for the given value. If the value is already a
|
||||
* UriInterface, it is returned as-is.
|
||||
*
|
||||
* @param string|UriInterface $uri
|
||||
*
|
||||
* @return UriInterface
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @deprecated uri_for will be removed in guzzlehttp/psr7:2.0. Use Utils::uriFor instead.
|
||||
*/
|
||||
function uri_for($uri)
|
||||
{
|
||||
if ($uri instanceof UriInterface) {
|
||||
return $uri;
|
||||
} elseif (is_string($uri)) {
|
||||
return new Uri($uri);
|
||||
}
|
||||
|
||||
throw new \InvalidArgumentException('URI must be a string or UriInterface');
|
||||
return Utils::uriFor($uri);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -69,86 +48,57 @@ function uri_for($uri)
|
||||
* - metadata: Array of custom metadata.
|
||||
* - size: Size of the stream.
|
||||
*
|
||||
* @param resource|string|null|int|float|bool|StreamInterface|callable $resource Entity body data
|
||||
* @param array $options Additional options
|
||||
* This method accepts the following `$resource` types:
|
||||
* - `Psr\Http\Message\StreamInterface`: Returns the value as-is.
|
||||
* - `string`: Creates a stream object that uses the given string as the contents.
|
||||
* - `resource`: Creates a stream object that wraps the given PHP stream resource.
|
||||
* - `Iterator`: If the provided value implements `Iterator`, then a read-only
|
||||
* stream object will be created that wraps the given iterable. Each time the
|
||||
* stream is read from, data from the iterator will fill a buffer and will be
|
||||
* continuously called until the buffer is equal to the requested read size.
|
||||
* Subsequent read calls will first read from the buffer and then call `next`
|
||||
* on the underlying iterator until it is exhausted.
|
||||
* - `object` with `__toString()`: If the object has the `__toString()` method,
|
||||
* the object will be cast to a string and then a stream will be returned that
|
||||
* uses the string value.
|
||||
* - `NULL`: When `null` is passed, an empty stream object is returned.
|
||||
* - `callable` When a callable is passed, a read-only stream object will be
|
||||
* created that invokes the given callable. The callable is invoked with the
|
||||
* number of suggested bytes to read. The callable can return any number of
|
||||
* bytes, but MUST return `false` when there is no more data to return. The
|
||||
* stream object that wraps the callable will invoke the callable until the
|
||||
* number of requested bytes are available. Any additional bytes will be
|
||||
* buffered and used in subsequent reads.
|
||||
*
|
||||
* @param resource|string|int|float|bool|StreamInterface|callable|\Iterator|null $resource Entity body data
|
||||
* @param array $options Additional options
|
||||
*
|
||||
* @return StreamInterface
|
||||
*
|
||||
* @return Stream
|
||||
* @throws \InvalidArgumentException if the $resource arg is not valid.
|
||||
*
|
||||
* @deprecated stream_for will be removed in guzzlehttp/psr7:2.0. Use Utils::streamFor instead.
|
||||
*/
|
||||
function stream_for($resource = '', array $options = [])
|
||||
{
|
||||
if (is_scalar($resource)) {
|
||||
$stream = fopen('php://temp', 'r+');
|
||||
if ($resource !== '') {
|
||||
fwrite($stream, $resource);
|
||||
fseek($stream, 0);
|
||||
}
|
||||
return new Stream($stream, $options);
|
||||
}
|
||||
|
||||
switch (gettype($resource)) {
|
||||
case 'resource':
|
||||
return new Stream($resource, $options);
|
||||
case 'object':
|
||||
if ($resource instanceof StreamInterface) {
|
||||
return $resource;
|
||||
} elseif ($resource instanceof \Iterator) {
|
||||
return new PumpStream(function () use ($resource) {
|
||||
if (!$resource->valid()) {
|
||||
return false;
|
||||
}
|
||||
$result = $resource->current();
|
||||
$resource->next();
|
||||
return $result;
|
||||
}, $options);
|
||||
} elseif (method_exists($resource, '__toString')) {
|
||||
return stream_for((string) $resource, $options);
|
||||
}
|
||||
break;
|
||||
case 'NULL':
|
||||
return new Stream(fopen('php://temp', 'r+'), $options);
|
||||
}
|
||||
|
||||
if (is_callable($resource)) {
|
||||
return new PumpStream($resource, $options);
|
||||
}
|
||||
|
||||
throw new \InvalidArgumentException('Invalid resource type: ' . gettype($resource));
|
||||
return Utils::streamFor($resource, $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse an array of header values containing ";" separated data into an
|
||||
* array of associative arrays representing the header key value pair
|
||||
* data of the header. When a parameter does not contain a value, but just
|
||||
* array of associative arrays representing the header key value pair data
|
||||
* of the header. When a parameter does not contain a value, but just
|
||||
* contains a key, this function will inject a key with a '' string value.
|
||||
*
|
||||
* @param string|array $header Header to parse into components.
|
||||
*
|
||||
* @return array Returns the parsed header values.
|
||||
*
|
||||
* @deprecated parse_header will be removed in guzzlehttp/psr7:2.0. Use Header::parse instead.
|
||||
*/
|
||||
function parse_header($header)
|
||||
{
|
||||
static $trimmed = "\"' \n\t\r";
|
||||
$params = $matches = [];
|
||||
|
||||
foreach (normalize_header($header) as $val) {
|
||||
$part = [];
|
||||
foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) {
|
||||
if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) {
|
||||
$m = $matches[0];
|
||||
if (isset($m[1])) {
|
||||
$part[trim($m[0], $trimmed)] = trim($m[1], $trimmed);
|
||||
} else {
|
||||
$part[] = trim($m[0], $trimmed);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($part) {
|
||||
$params[] = $part;
|
||||
}
|
||||
}
|
||||
|
||||
return $params;
|
||||
return Header::parse($header);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -158,32 +108,20 @@ function parse_header($header)
|
||||
* @param string|array $header Header to normalize.
|
||||
*
|
||||
* @return array Returns the normalized header field values.
|
||||
*
|
||||
* @deprecated normalize_header will be removed in guzzlehttp/psr7:2.0. Use Header::normalize instead.
|
||||
*/
|
||||
function normalize_header($header)
|
||||
{
|
||||
if (!is_array($header)) {
|
||||
return array_map('trim', explode(',', $header));
|
||||
}
|
||||
|
||||
$result = [];
|
||||
foreach ($header as $value) {
|
||||
foreach ((array) $value as $v) {
|
||||
if (strpos($v, ',') === false) {
|
||||
$result[] = $v;
|
||||
continue;
|
||||
}
|
||||
foreach (preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $v) as $vv) {
|
||||
$result[] = trim($vv);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
return Header::normalize($header);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clone and modify a request with the given changes.
|
||||
*
|
||||
* This method is useful for reducing the number of clones needed to mutate a
|
||||
* message.
|
||||
*
|
||||
* The changes can be one of:
|
||||
* - method: (string) Changes the HTTP method.
|
||||
* - set_headers: (array) Sets the given headers.
|
||||
@ -197,68 +135,12 @@ function normalize_header($header)
|
||||
* @param array $changes Changes to apply.
|
||||
*
|
||||
* @return RequestInterface
|
||||
*
|
||||
* @deprecated modify_request will be removed in guzzlehttp/psr7:2.0. Use Utils::modifyRequest instead.
|
||||
*/
|
||||
function modify_request(RequestInterface $request, array $changes)
|
||||
{
|
||||
if (!$changes) {
|
||||
return $request;
|
||||
}
|
||||
|
||||
$headers = $request->getHeaders();
|
||||
|
||||
if (!isset($changes['uri'])) {
|
||||
$uri = $request->getUri();
|
||||
} else {
|
||||
// Remove the host header if one is on the URI
|
||||
if ($host = $changes['uri']->getHost()) {
|
||||
$changes['set_headers']['Host'] = $host;
|
||||
|
||||
if ($port = $changes['uri']->getPort()) {
|
||||
$standardPorts = ['http' => 80, 'https' => 443];
|
||||
$scheme = $changes['uri']->getScheme();
|
||||
if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) {
|
||||
$changes['set_headers']['Host'] .= ':'.$port;
|
||||
}
|
||||
}
|
||||
}
|
||||
$uri = $changes['uri'];
|
||||
}
|
||||
|
||||
if (!empty($changes['remove_headers'])) {
|
||||
$headers = _caseless_remove($changes['remove_headers'], $headers);
|
||||
}
|
||||
|
||||
if (!empty($changes['set_headers'])) {
|
||||
$headers = _caseless_remove(array_keys($changes['set_headers']), $headers);
|
||||
$headers = $changes['set_headers'] + $headers;
|
||||
}
|
||||
|
||||
if (isset($changes['query'])) {
|
||||
$uri = $uri->withQuery($changes['query']);
|
||||
}
|
||||
|
||||
if ($request instanceof ServerRequestInterface) {
|
||||
return new ServerRequest(
|
||||
isset($changes['method']) ? $changes['method'] : $request->getMethod(),
|
||||
$uri,
|
||||
$headers,
|
||||
isset($changes['body']) ? $changes['body'] : $request->getBody(),
|
||||
isset($changes['version'])
|
||||
? $changes['version']
|
||||
: $request->getProtocolVersion(),
|
||||
$request->getServerParams()
|
||||
);
|
||||
}
|
||||
|
||||
return new Request(
|
||||
isset($changes['method']) ? $changes['method'] : $request->getMethod(),
|
||||
$uri,
|
||||
$headers,
|
||||
isset($changes['body']) ? $changes['body'] : $request->getBody(),
|
||||
isset($changes['version'])
|
||||
? $changes['version']
|
||||
: $request->getProtocolVersion()
|
||||
);
|
||||
return Utils::modifyRequest($request, $changes);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -270,14 +152,12 @@ function modify_request(RequestInterface $request, array $changes)
|
||||
* @param MessageInterface $message Message to rewind
|
||||
*
|
||||
* @throws \RuntimeException
|
||||
*
|
||||
* @deprecated rewind_body will be removed in guzzlehttp/psr7:2.0. Use Message::rewindBody instead.
|
||||
*/
|
||||
function rewind_body(MessageInterface $message)
|
||||
{
|
||||
$body = $message->getBody();
|
||||
|
||||
if ($body->tell()) {
|
||||
$body->rewind();
|
||||
}
|
||||
Message::rewindBody($message);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -290,29 +170,14 @@ function rewind_body(MessageInterface $message)
|
||||
* @param string $mode Mode used to open the file
|
||||
*
|
||||
* @return resource
|
||||
*
|
||||
* @throws \RuntimeException if the file cannot be opened
|
||||
*
|
||||
* @deprecated try_fopen will be removed in guzzlehttp/psr7:2.0. Use Utils::tryFopen instead.
|
||||
*/
|
||||
function try_fopen($filename, $mode)
|
||||
{
|
||||
$ex = null;
|
||||
set_error_handler(function () use ($filename, $mode, &$ex) {
|
||||
$ex = new \RuntimeException(sprintf(
|
||||
'Unable to open %s using mode %s: %s',
|
||||
$filename,
|
||||
$mode,
|
||||
func_get_args()[1]
|
||||
));
|
||||
});
|
||||
|
||||
$handle = fopen($filename, $mode);
|
||||
restore_error_handler();
|
||||
|
||||
if ($ex) {
|
||||
/** @var $ex \RuntimeException */
|
||||
throw $ex;
|
||||
}
|
||||
|
||||
return $handle;
|
||||
return Utils::tryFopen($filename, $mode);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -322,37 +187,16 @@ function try_fopen($filename, $mode)
|
||||
* @param StreamInterface $stream Stream to read
|
||||
* @param int $maxLen Maximum number of bytes to read. Pass -1
|
||||
* to read the entire stream.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @throws \RuntimeException on error.
|
||||
*
|
||||
* @deprecated copy_to_string will be removed in guzzlehttp/psr7:2.0. Use Utils::copyToString instead.
|
||||
*/
|
||||
function copy_to_string(StreamInterface $stream, $maxLen = -1)
|
||||
{
|
||||
$buffer = '';
|
||||
|
||||
if ($maxLen === -1) {
|
||||
while (!$stream->eof()) {
|
||||
$buf = $stream->read(1048576);
|
||||
// Using a loose equality here to match on '' and false.
|
||||
if ($buf == null) {
|
||||
break;
|
||||
}
|
||||
$buffer .= $buf;
|
||||
}
|
||||
return $buffer;
|
||||
}
|
||||
|
||||
$len = 0;
|
||||
while (!$stream->eof() && $len < $maxLen) {
|
||||
$buf = $stream->read($maxLen - $len);
|
||||
// Using a loose equality here to match on '' and false.
|
||||
if ($buf == null) {
|
||||
break;
|
||||
}
|
||||
$buffer .= $buf;
|
||||
$len = strlen($buffer);
|
||||
}
|
||||
|
||||
return $buffer;
|
||||
return Utils::copyToString($stream, $maxLen);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -365,92 +209,48 @@ function copy_to_string(StreamInterface $stream, $maxLen = -1)
|
||||
* to read the entire stream.
|
||||
*
|
||||
* @throws \RuntimeException on error.
|
||||
*
|
||||
* @deprecated copy_to_stream will be removed in guzzlehttp/psr7:2.0. Use Utils::copyToStream instead.
|
||||
*/
|
||||
function copy_to_stream(
|
||||
StreamInterface $source,
|
||||
StreamInterface $dest,
|
||||
$maxLen = -1
|
||||
) {
|
||||
$bufferSize = 8192;
|
||||
|
||||
if ($maxLen === -1) {
|
||||
while (!$source->eof()) {
|
||||
if (!$dest->write($source->read($bufferSize))) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$remaining = $maxLen;
|
||||
while ($remaining > 0 && !$source->eof()) {
|
||||
$buf = $source->read(min($bufferSize, $remaining));
|
||||
$len = strlen($buf);
|
||||
if (!$len) {
|
||||
break;
|
||||
}
|
||||
$remaining -= $len;
|
||||
$dest->write($buf);
|
||||
}
|
||||
}
|
||||
function copy_to_stream(StreamInterface $source, StreamInterface $dest, $maxLen = -1)
|
||||
{
|
||||
return Utils::copyToStream($source, $dest, $maxLen);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate a hash of a Stream
|
||||
* Calculate a hash of a stream.
|
||||
*
|
||||
* This method reads the entire stream to calculate a rolling hash, based on
|
||||
* PHP's `hash_init` functions.
|
||||
*
|
||||
* @param StreamInterface $stream Stream to calculate the hash for
|
||||
* @param string $algo Hash algorithm (e.g. md5, crc32, etc)
|
||||
* @param bool $rawOutput Whether or not to use raw output
|
||||
*
|
||||
* @return string Returns the hash of the stream
|
||||
*
|
||||
* @throws \RuntimeException on error.
|
||||
*
|
||||
* @deprecated hash will be removed in guzzlehttp/psr7:2.0. Use Utils::hash instead.
|
||||
*/
|
||||
function hash(
|
||||
StreamInterface $stream,
|
||||
$algo,
|
||||
$rawOutput = false
|
||||
) {
|
||||
$pos = $stream->tell();
|
||||
|
||||
if ($pos > 0) {
|
||||
$stream->rewind();
|
||||
}
|
||||
|
||||
$ctx = hash_init($algo);
|
||||
while (!$stream->eof()) {
|
||||
hash_update($ctx, $stream->read(1048576));
|
||||
}
|
||||
|
||||
$out = hash_final($ctx, (bool) $rawOutput);
|
||||
$stream->seek($pos);
|
||||
|
||||
return $out;
|
||||
function hash(StreamInterface $stream, $algo, $rawOutput = false)
|
||||
{
|
||||
return Utils::hash($stream, $algo, $rawOutput);
|
||||
}
|
||||
|
||||
/**
|
||||
* Read a line from the stream up to the maximum allowed buffer length
|
||||
* Read a line from the stream up to the maximum allowed buffer length.
|
||||
*
|
||||
* @param StreamInterface $stream Stream to read from
|
||||
* @param int $maxLength Maximum buffer length
|
||||
* @param int|null $maxLength Maximum buffer length
|
||||
*
|
||||
* @return string|bool
|
||||
* @return string
|
||||
*
|
||||
* @deprecated readline will be removed in guzzlehttp/psr7:2.0. Use Utils::readLine instead.
|
||||
*/
|
||||
function readline(StreamInterface $stream, $maxLength = null)
|
||||
{
|
||||
$buffer = '';
|
||||
$size = 0;
|
||||
|
||||
while (!$stream->eof()) {
|
||||
// Using a loose equality here to match on '' and false.
|
||||
if (null == ($byte = $stream->read(1))) {
|
||||
return $buffer;
|
||||
}
|
||||
$buffer .= $byte;
|
||||
// Break when a new line is found or the max length - 1 is reached
|
||||
if ($byte === "\n" || ++$size === $maxLength - 1) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $buffer;
|
||||
return Utils::readLine($stream, $maxLength);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -459,26 +259,12 @@ function readline(StreamInterface $stream, $maxLength = null)
|
||||
* @param string $message Request message string.
|
||||
*
|
||||
* @return Request
|
||||
*
|
||||
* @deprecated parse_request will be removed in guzzlehttp/psr7:2.0. Use Message::parseRequest instead.
|
||||
*/
|
||||
function parse_request($message)
|
||||
{
|
||||
$data = _parse_message($message);
|
||||
$matches = [];
|
||||
if (!preg_match('/^[\S]+\s+([a-zA-Z]+:\/\/|\/).*/', $data['start-line'], $matches)) {
|
||||
throw new \InvalidArgumentException('Invalid request string');
|
||||
}
|
||||
$parts = explode(' ', $data['start-line'], 3);
|
||||
$version = isset($parts[2]) ? explode('/', $parts[2])[1] : '1.1';
|
||||
|
||||
$request = new Request(
|
||||
$parts[0],
|
||||
$matches[1] === '/' ? _parse_request_uri($parts[1], $data['headers']) : $parts[1],
|
||||
$data['headers'],
|
||||
$data['body'],
|
||||
$version
|
||||
);
|
||||
|
||||
return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]);
|
||||
return Message::parseRequest($message);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -487,139 +273,67 @@ function parse_request($message)
|
||||
* @param string $message Response message string.
|
||||
*
|
||||
* @return Response
|
||||
*
|
||||
* @deprecated parse_response will be removed in guzzlehttp/psr7:2.0. Use Message::parseResponse instead.
|
||||
*/
|
||||
function parse_response($message)
|
||||
{
|
||||
$data = _parse_message($message);
|
||||
// According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space
|
||||
// between status-code and reason-phrase is required. But browsers accept
|
||||
// responses without space and reason as well.
|
||||
if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) {
|
||||
throw new \InvalidArgumentException('Invalid response string');
|
||||
}
|
||||
$parts = explode(' ', $data['start-line'], 3);
|
||||
|
||||
return new Response(
|
||||
$parts[1],
|
||||
$data['headers'],
|
||||
$data['body'],
|
||||
explode('/', $parts[0])[1],
|
||||
isset($parts[2]) ? $parts[2] : null
|
||||
);
|
||||
return Message::parseResponse($message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse a query string into an associative array.
|
||||
*
|
||||
* If multiple values are found for the same key, the value of that key
|
||||
* value pair will become an array. This function does not parse nested
|
||||
* PHP style arrays into an associative array (e.g., foo[a]=1&foo[b]=2 will
|
||||
* be parsed into ['foo[a]' => '1', 'foo[b]' => '2']).
|
||||
* If multiple values are found for the same key, the value of that key value
|
||||
* pair will become an array. This function does not parse nested PHP style
|
||||
* arrays into an associative array (e.g., `foo[a]=1&foo[b]=2` will be parsed
|
||||
* into `['foo[a]' => '1', 'foo[b]' => '2'])`.
|
||||
*
|
||||
* @param string $str Query string to parse
|
||||
* @param bool|string $urlEncoding How the query string is encoded
|
||||
* @param string $str Query string to parse
|
||||
* @param int|bool $urlEncoding How the query string is encoded
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @deprecated parse_query will be removed in guzzlehttp/psr7:2.0. Use Query::parse instead.
|
||||
*/
|
||||
function parse_query($str, $urlEncoding = true)
|
||||
{
|
||||
$result = [];
|
||||
|
||||
if ($str === '') {
|
||||
return $result;
|
||||
}
|
||||
|
||||
if ($urlEncoding === true) {
|
||||
$decoder = function ($value) {
|
||||
return rawurldecode(str_replace('+', ' ', $value));
|
||||
};
|
||||
} elseif ($urlEncoding == PHP_QUERY_RFC3986) {
|
||||
$decoder = 'rawurldecode';
|
||||
} elseif ($urlEncoding == PHP_QUERY_RFC1738) {
|
||||
$decoder = 'urldecode';
|
||||
} else {
|
||||
$decoder = function ($str) { return $str; };
|
||||
}
|
||||
|
||||
foreach (explode('&', $str) as $kvp) {
|
||||
$parts = explode('=', $kvp, 2);
|
||||
$key = $decoder($parts[0]);
|
||||
$value = isset($parts[1]) ? $decoder($parts[1]) : null;
|
||||
if (!isset($result[$key])) {
|
||||
$result[$key] = $value;
|
||||
} else {
|
||||
if (!is_array($result[$key])) {
|
||||
$result[$key] = [$result[$key]];
|
||||
}
|
||||
$result[$key][] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
return Query::parse($str, $urlEncoding);
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a query string from an array of key value pairs.
|
||||
*
|
||||
* This function can use the return value of parse_query() to build a query
|
||||
* This function can use the return value of `parse_query()` to build a query
|
||||
* string. This function does not modify the provided keys when an array is
|
||||
* encountered (like http_build_query would).
|
||||
* encountered (like `http_build_query()` would).
|
||||
*
|
||||
* @param array $params Query string parameters.
|
||||
* @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
|
||||
* to encode using RFC3986, or PHP_QUERY_RFC1738
|
||||
* to encode using RFC1738.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @deprecated build_query will be removed in guzzlehttp/psr7:2.0. Use Query::build instead.
|
||||
*/
|
||||
function build_query(array $params, $encoding = PHP_QUERY_RFC3986)
|
||||
{
|
||||
if (!$params) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if ($encoding === false) {
|
||||
$encoder = function ($str) { return $str; };
|
||||
} elseif ($encoding === PHP_QUERY_RFC3986) {
|
||||
$encoder = 'rawurlencode';
|
||||
} elseif ($encoding === PHP_QUERY_RFC1738) {
|
||||
$encoder = 'urlencode';
|
||||
} else {
|
||||
throw new \InvalidArgumentException('Invalid type');
|
||||
}
|
||||
|
||||
$qs = '';
|
||||
foreach ($params as $k => $v) {
|
||||
$k = $encoder($k);
|
||||
if (!is_array($v)) {
|
||||
$qs .= $k;
|
||||
if ($v !== null) {
|
||||
$qs .= '=' . $encoder($v);
|
||||
}
|
||||
$qs .= '&';
|
||||
} else {
|
||||
foreach ($v as $vv) {
|
||||
$qs .= $k;
|
||||
if ($vv !== null) {
|
||||
$qs .= '=' . $encoder($vv);
|
||||
}
|
||||
$qs .= '&';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $qs ? (string) substr($qs, 0, -1) : '';
|
||||
return Query::build($params, $encoding);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines the mimetype of a file by looking at its extension.
|
||||
*
|
||||
* @param $filename
|
||||
* @param string $filename
|
||||
*
|
||||
* @return null|string
|
||||
* @return string|null
|
||||
*
|
||||
* @deprecated mimetype_from_filename will be removed in guzzlehttp/psr7:2.0. Use MimeType::fromFilename instead.
|
||||
*/
|
||||
function mimetype_from_filename($filename)
|
||||
{
|
||||
return mimetype_from_extension(pathinfo($filename, PATHINFO_EXTENSION));
|
||||
return MimeType::fromFilename($filename);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -628,116 +342,13 @@ function mimetype_from_filename($filename)
|
||||
* @param $extension string The file extension.
|
||||
*
|
||||
* @return string|null
|
||||
*
|
||||
* @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types
|
||||
* @deprecated mimetype_from_extension will be removed in guzzlehttp/psr7:2.0. Use MimeType::fromExtension instead.
|
||||
*/
|
||||
function mimetype_from_extension($extension)
|
||||
{
|
||||
static $mimetypes = [
|
||||
'7z' => 'application/x-7z-compressed',
|
||||
'aac' => 'audio/x-aac',
|
||||
'ai' => 'application/postscript',
|
||||
'aif' => 'audio/x-aiff',
|
||||
'asc' => 'text/plain',
|
||||
'asf' => 'video/x-ms-asf',
|
||||
'atom' => 'application/atom+xml',
|
||||
'avi' => 'video/x-msvideo',
|
||||
'bmp' => 'image/bmp',
|
||||
'bz2' => 'application/x-bzip2',
|
||||
'cer' => 'application/pkix-cert',
|
||||
'crl' => 'application/pkix-crl',
|
||||
'crt' => 'application/x-x509-ca-cert',
|
||||
'css' => 'text/css',
|
||||
'csv' => 'text/csv',
|
||||
'cu' => 'application/cu-seeme',
|
||||
'deb' => 'application/x-debian-package',
|
||||
'doc' => 'application/msword',
|
||||
'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
'dvi' => 'application/x-dvi',
|
||||
'eot' => 'application/vnd.ms-fontobject',
|
||||
'eps' => 'application/postscript',
|
||||
'epub' => 'application/epub+zip',
|
||||
'etx' => 'text/x-setext',
|
||||
'flac' => 'audio/flac',
|
||||
'flv' => 'video/x-flv',
|
||||
'gif' => 'image/gif',
|
||||
'gz' => 'application/gzip',
|
||||
'htm' => 'text/html',
|
||||
'html' => 'text/html',
|
||||
'ico' => 'image/x-icon',
|
||||
'ics' => 'text/calendar',
|
||||
'ini' => 'text/plain',
|
||||
'iso' => 'application/x-iso9660-image',
|
||||
'jar' => 'application/java-archive',
|
||||
'jpe' => 'image/jpeg',
|
||||
'jpeg' => 'image/jpeg',
|
||||
'jpg' => 'image/jpeg',
|
||||
'js' => 'text/javascript',
|
||||
'json' => 'application/json',
|
||||
'latex' => 'application/x-latex',
|
||||
'log' => 'text/plain',
|
||||
'm4a' => 'audio/mp4',
|
||||
'm4v' => 'video/mp4',
|
||||
'mid' => 'audio/midi',
|
||||
'midi' => 'audio/midi',
|
||||
'mov' => 'video/quicktime',
|
||||
'mp3' => 'audio/mpeg',
|
||||
'mp4' => 'video/mp4',
|
||||
'mp4a' => 'audio/mp4',
|
||||
'mp4v' => 'video/mp4',
|
||||
'mpe' => 'video/mpeg',
|
||||
'mpeg' => 'video/mpeg',
|
||||
'mpg' => 'video/mpeg',
|
||||
'mpg4' => 'video/mp4',
|
||||
'oga' => 'audio/ogg',
|
||||
'ogg' => 'audio/ogg',
|
||||
'ogv' => 'video/ogg',
|
||||
'ogx' => 'application/ogg',
|
||||
'pbm' => 'image/x-portable-bitmap',
|
||||
'pdf' => 'application/pdf',
|
||||
'pgm' => 'image/x-portable-graymap',
|
||||
'png' => 'image/png',
|
||||
'pnm' => 'image/x-portable-anymap',
|
||||
'ppm' => 'image/x-portable-pixmap',
|
||||
'ppt' => 'application/vnd.ms-powerpoint',
|
||||
'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
||||
'ps' => 'application/postscript',
|
||||
'qt' => 'video/quicktime',
|
||||
'rar' => 'application/x-rar-compressed',
|
||||
'ras' => 'image/x-cmu-raster',
|
||||
'rss' => 'application/rss+xml',
|
||||
'rtf' => 'application/rtf',
|
||||
'sgm' => 'text/sgml',
|
||||
'sgml' => 'text/sgml',
|
||||
'svg' => 'image/svg+xml',
|
||||
'swf' => 'application/x-shockwave-flash',
|
||||
'tar' => 'application/x-tar',
|
||||
'tif' => 'image/tiff',
|
||||
'tiff' => 'image/tiff',
|
||||
'torrent' => 'application/x-bittorrent',
|
||||
'ttf' => 'application/x-font-ttf',
|
||||
'txt' => 'text/plain',
|
||||
'wav' => 'audio/x-wav',
|
||||
'webm' => 'video/webm',
|
||||
'wma' => 'audio/x-ms-wma',
|
||||
'wmv' => 'video/x-ms-wmv',
|
||||
'woff' => 'application/x-font-woff',
|
||||
'wsdl' => 'application/wsdl+xml',
|
||||
'xbm' => 'image/x-xbitmap',
|
||||
'xls' => 'application/vnd.ms-excel',
|
||||
'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
'xml' => 'application/xml',
|
||||
'xpm' => 'image/x-xpixmap',
|
||||
'xwd' => 'image/x-xwindowdump',
|
||||
'yaml' => 'text/yaml',
|
||||
'yml' => 'text/yaml',
|
||||
'zip' => 'application/zip',
|
||||
];
|
||||
|
||||
$extension = strtolower($extension);
|
||||
|
||||
return isset($mimetypes[$extension])
|
||||
? $mimetypes[$extension]
|
||||
: null;
|
||||
return MimeType::fromExtension($extension);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -750,37 +361,14 @@ function mimetype_from_extension($extension)
|
||||
* @param string $message HTTP request or response to parse.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @deprecated _parse_message will be removed in guzzlehttp/psr7:2.0. Use Message::parseMessage instead.
|
||||
*/
|
||||
function _parse_message($message)
|
||||
{
|
||||
if (!$message) {
|
||||
throw new \InvalidArgumentException('Invalid message');
|
||||
}
|
||||
|
||||
// Iterate over each line in the message, accounting for line endings
|
||||
$lines = preg_split('/(\\r?\\n)/', $message, -1, PREG_SPLIT_DELIM_CAPTURE);
|
||||
$result = ['start-line' => array_shift($lines), 'headers' => [], 'body' => ''];
|
||||
array_shift($lines);
|
||||
|
||||
for ($i = 0, $totalLines = count($lines); $i < $totalLines; $i += 2) {
|
||||
$line = $lines[$i];
|
||||
// If two line breaks were encountered, then this is the end of body
|
||||
if (empty($line)) {
|
||||
if ($i < $totalLines - 1) {
|
||||
$result['body'] = implode('', array_slice($lines, $i + 2));
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (strpos($line, ':')) {
|
||||
$parts = explode(':', $line, 2);
|
||||
$key = trim($parts[0]);
|
||||
$value = isset($parts[1]) ? trim($parts[1]) : '';
|
||||
$result['headers'][$key][] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
return Message::parseMessage($message);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -790,39 +378,45 @@ function _parse_message($message)
|
||||
* @param array $headers Array of headers (each value an array).
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @deprecated _parse_request_uri will be removed in guzzlehttp/psr7:2.0. Use Message::parseRequestUri instead.
|
||||
*/
|
||||
function _parse_request_uri($path, array $headers)
|
||||
{
|
||||
$hostKey = array_filter(array_keys($headers), function ($k) {
|
||||
return strtolower($k) === 'host';
|
||||
});
|
||||
|
||||
// If no host is found, then a full URI cannot be constructed.
|
||||
if (!$hostKey) {
|
||||
return $path;
|
||||
}
|
||||
|
||||
$host = $headers[reset($hostKey)][0];
|
||||
$scheme = substr($host, -4) === ':443' ? 'https' : 'http';
|
||||
|
||||
return $scheme . '://' . $host . '/' . ltrim($path, '/');
|
||||
return Message::parseRequestUri($path, $headers);
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
/**
|
||||
* Get a short summary of the message body.
|
||||
*
|
||||
* Will return `null` if the response is not printable.
|
||||
*
|
||||
* @param MessageInterface $message The message to get the body summary
|
||||
* @param int $truncateAt The maximum allowed size of the summary
|
||||
*
|
||||
* @return string|null
|
||||
*
|
||||
* @deprecated get_message_body_summary will be removed in guzzlehttp/psr7:2.0. Use Message::bodySummary instead.
|
||||
*/
|
||||
function get_message_body_summary(MessageInterface $message, $truncateAt = 120)
|
||||
{
|
||||
return Message::bodySummary($message, $truncateAt);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the items given by the keys, case insensitively from the data.
|
||||
*
|
||||
* @param iterable<string> $keys
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @deprecated _caseless_remove will be removed in guzzlehttp/psr7:2.0. Use Utils::caselessRemove instead.
|
||||
*/
|
||||
function _caseless_remove($keys, array $data)
|
||||
{
|
||||
$result = [];
|
||||
|
||||
foreach ($keys as &$key) {
|
||||
$key = strtolower($key);
|
||||
}
|
||||
|
||||
foreach ($data as $k => $v) {
|
||||
if (!in_array(strtolower($k), $keys)) {
|
||||
$result[$k] = $v;
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
return Utils::caselessRemove($keys, $data);
|
||||
}
|
||||
|
@ -1,164 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Cookie\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Symfony\Component\HttpFoundation\Cookie;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Illuminate\Contracts\Encryption\DecryptException;
|
||||
use Illuminate\Contracts\Encryption\Encrypter as EncrypterContract;
|
||||
|
||||
class EncryptCookies
|
||||
{
|
||||
/**
|
||||
* The encrypter instance.
|
||||
*
|
||||
* @var \Illuminate\Contracts\Encryption\Encrypter
|
||||
*/
|
||||
protected $encrypter;
|
||||
|
||||
/**
|
||||
* The names of the cookies that should not be encrypted.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $except = [];
|
||||
|
||||
/**
|
||||
* Create a new CookieGuard instance.
|
||||
*
|
||||
* @param \Illuminate\Contracts\Encryption\Encrypter $encrypter
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(EncrypterContract $encrypter)
|
||||
{
|
||||
$this->encrypter = $encrypter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable encryption for the given cookie name(s).
|
||||
*
|
||||
* @param string|array $cookieName
|
||||
* @return void
|
||||
*/
|
||||
public function disableFor($cookieName)
|
||||
{
|
||||
$this->except = array_merge($this->except, (array) $cookieName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
return $this->encrypt($next($this->decrypt($request)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Decrypt the cookies on the request.
|
||||
*
|
||||
* @param \Symfony\Component\HttpFoundation\Request $request
|
||||
* @return \Symfony\Component\HttpFoundation\Request
|
||||
*/
|
||||
protected function decrypt(Request $request)
|
||||
{
|
||||
foreach ($request->cookies as $key => $c) {
|
||||
if ($this->isDisabled($key)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
$request->cookies->set($key, $this->decryptCookie($c));
|
||||
} catch (DecryptException $e) {
|
||||
$request->cookies->set($key, null);
|
||||
}
|
||||
}
|
||||
|
||||
return $request;
|
||||
}
|
||||
|
||||
/**
|
||||
* Decrypt the given cookie and return the value.
|
||||
*
|
||||
* @param string|array $cookie
|
||||
* @return string|array
|
||||
*/
|
||||
protected function decryptCookie($cookie)
|
||||
{
|
||||
return is_array($cookie)
|
||||
? $this->decryptArray($cookie)
|
||||
: $this->encrypter->decrypt($cookie);
|
||||
}
|
||||
|
||||
/**
|
||||
* Decrypt an array based cookie.
|
||||
*
|
||||
* @param array $cookie
|
||||
* @return array
|
||||
*/
|
||||
protected function decryptArray(array $cookie)
|
||||
{
|
||||
$decrypted = [];
|
||||
|
||||
foreach ($cookie as $key => $value) {
|
||||
if (is_string($value)) {
|
||||
$decrypted[$key] = $this->encrypter->decrypt($value);
|
||||
}
|
||||
}
|
||||
|
||||
return $decrypted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Encrypt the cookies on an outgoing response.
|
||||
*
|
||||
* @param \Symfony\Component\HttpFoundation\Response $response
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
protected function encrypt(Response $response)
|
||||
{
|
||||
foreach ($response->headers->getCookies() as $cookie) {
|
||||
if ($this->isDisabled($cookie->getName())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$response->headers->setCookie($this->duplicate(
|
||||
$cookie, $this->encrypter->encrypt($cookie->getValue())
|
||||
));
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Duplicate a cookie with a new value.
|
||||
*
|
||||
* @param \Symfony\Component\HttpFoundation\Cookie $c
|
||||
* @param mixed $value
|
||||
* @return \Symfony\Component\HttpFoundation\Cookie
|
||||
*/
|
||||
protected function duplicate(Cookie $c, $value)
|
||||
{
|
||||
return new Cookie(
|
||||
$c->getName(), $value, $c->getExpiresTime(), $c->getPath(),
|
||||
$c->getDomain(), $c->isSecure(), $c->isHttpOnly(), $c->isRaw(),
|
||||
$c->getSameSite()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether encryption has been disabled for the given cookie.
|
||||
*
|
||||
* @param string $name
|
||||
* @return bool
|
||||
*/
|
||||
public function isDisabled($name)
|
||||
{
|
||||
return in_array($name, $this->except);
|
||||
}
|
||||
}
|
@ -1,193 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Eloquent\Concerns;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
trait GuardsAttributes
|
||||
{
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [];
|
||||
|
||||
/**
|
||||
* The attributes that aren't mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $guarded = ['*'];
|
||||
|
||||
/**
|
||||
* Indicates if all mass assignment is enabled.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected static $unguarded = false;
|
||||
|
||||
/**
|
||||
* Get the fillable attributes for the model.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getFillable()
|
||||
{
|
||||
return $this->fillable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the fillable attributes for the model.
|
||||
*
|
||||
* @param array $fillable
|
||||
* @return $this
|
||||
*/
|
||||
public function fillable(array $fillable)
|
||||
{
|
||||
$this->fillable = $fillable;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the guarded attributes for the model.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getGuarded()
|
||||
{
|
||||
return $this->guarded;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the guarded attributes for the model.
|
||||
*
|
||||
* @param array $guarded
|
||||
* @return $this
|
||||
*/
|
||||
public function guard(array $guarded)
|
||||
{
|
||||
$this->guarded = $guarded;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable all mass assignable restrictions.
|
||||
*
|
||||
* @param bool $state
|
||||
* @return void
|
||||
*/
|
||||
public static function unguard($state = true)
|
||||
{
|
||||
static::$unguarded = $state;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable the mass assignment restrictions.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function reguard()
|
||||
{
|
||||
static::$unguarded = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if current state is "unguarded".
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function isUnguarded()
|
||||
{
|
||||
return static::$unguarded;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the given callable while being unguarded.
|
||||
*
|
||||
* @param callable $callback
|
||||
* @return mixed
|
||||
*/
|
||||
public static function unguarded(callable $callback)
|
||||
{
|
||||
if (static::$unguarded) {
|
||||
return $callback();
|
||||
}
|
||||
|
||||
static::unguard();
|
||||
|
||||
try {
|
||||
return $callback();
|
||||
} finally {
|
||||
static::reguard();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the given attribute may be mass assigned.
|
||||
*
|
||||
* @param string $key
|
||||
* @return bool
|
||||
*/
|
||||
public function isFillable($key)
|
||||
{
|
||||
if (static::$unguarded) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// If the key is in the "fillable" array, we can of course assume that it's
|
||||
// a fillable attribute. Otherwise, we will check the guarded array when
|
||||
// we need to determine if the attribute is black-listed on the model.
|
||||
if (in_array($key, $this->getFillable())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// If the attribute is explicitly listed in the "guarded" array then we can
|
||||
// return false immediately. This means this attribute is definitely not
|
||||
// fillable and there is no point in going any further in this method.
|
||||
if ($this->isGuarded($key)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return empty($this->getFillable()) &&
|
||||
! Str::startsWith($key, '_');
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the given key is guarded.
|
||||
*
|
||||
* @param string $key
|
||||
* @return bool
|
||||
*/
|
||||
public function isGuarded($key)
|
||||
{
|
||||
return in_array($key, $this->getGuarded()) || $this->getGuarded() == ['*'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the model is totally guarded.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function totallyGuarded()
|
||||
{
|
||||
return count($this->getFillable()) == 0 && $this->getGuarded() == ['*'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the fillable attributes of a given array.
|
||||
*
|
||||
* @param array $attributes
|
||||
* @return array
|
||||
*/
|
||||
protected function fillableFromArray(array $attributes)
|
||||
{
|
||||
if (count($this->getFillable()) > 0 && ! static::$unguarded) {
|
||||
return array_intersect_key($attributes, array_flip($this->getFillable()));
|
||||
}
|
||||
|
||||
return $attributes;
|
||||
}
|
||||
}
|
@ -1,167 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Foundation\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Foundation\Application;
|
||||
use Illuminate\Support\InteractsWithTime;
|
||||
use Symfony\Component\HttpFoundation\Cookie;
|
||||
use Illuminate\Contracts\Encryption\Encrypter;
|
||||
use Illuminate\Session\TokenMismatchException;
|
||||
|
||||
class VerifyCsrfToken
|
||||
{
|
||||
use InteractsWithTime;
|
||||
|
||||
/**
|
||||
* The application instance.
|
||||
*
|
||||
* @var \Illuminate\Foundation\Application
|
||||
*/
|
||||
protected $app;
|
||||
|
||||
/**
|
||||
* The encrypter implementation.
|
||||
*
|
||||
* @var \Illuminate\Contracts\Encryption\Encrypter
|
||||
*/
|
||||
protected $encrypter;
|
||||
|
||||
/**
|
||||
* The URIs that should be excluded from CSRF verification.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $except = [];
|
||||
|
||||
/**
|
||||
* Create a new middleware instance.
|
||||
*
|
||||
* @param \Illuminate\Foundation\Application $app
|
||||
* @param \Illuminate\Contracts\Encryption\Encrypter $encrypter
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Application $app, Encrypter $encrypter)
|
||||
{
|
||||
$this->app = $app;
|
||||
$this->encrypter = $encrypter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Illuminate\Session\TokenMismatchException
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
if (
|
||||
$this->isReading($request) ||
|
||||
$this->runningUnitTests() ||
|
||||
$this->inExceptArray($request) ||
|
||||
$this->tokensMatch($request)
|
||||
) {
|
||||
return $this->addCookieToResponse($request, $next($request));
|
||||
}
|
||||
|
||||
throw new TokenMismatchException;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the HTTP request uses a ‘read’ verb.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return bool
|
||||
*/
|
||||
protected function isReading($request)
|
||||
{
|
||||
return in_array($request->method(), ['HEAD', 'GET', 'OPTIONS']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the application is running unit tests.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function runningUnitTests()
|
||||
{
|
||||
return $this->app->runningInConsole() && $this->app->runningUnitTests();
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the request has a URI that should pass through CSRF verification.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return bool
|
||||
*/
|
||||
protected function inExceptArray($request)
|
||||
{
|
||||
foreach ($this->except as $except) {
|
||||
if ($except !== '/') {
|
||||
$except = trim($except, '/');
|
||||
}
|
||||
|
||||
if ($request->fullUrlIs($except) || $request->is($except)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the session and input CSRF tokens match.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return bool
|
||||
*/
|
||||
protected function tokensMatch($request)
|
||||
{
|
||||
$token = $this->getTokenFromRequest($request);
|
||||
|
||||
return is_string($request->session()->token()) &&
|
||||
is_string($token) &&
|
||||
hash_equals($request->session()->token(), $token);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the CSRF token from the request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return string
|
||||
*/
|
||||
protected function getTokenFromRequest($request)
|
||||
{
|
||||
$token = $request->input('_token') ?: $request->header('X-CSRF-TOKEN');
|
||||
|
||||
if (! $token && $header = $request->header('X-XSRF-TOKEN')) {
|
||||
$token = $this->encrypter->decrypt($header);
|
||||
}
|
||||
|
||||
return $token;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the CSRF token to the response cookies.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Symfony\Component\HttpFoundation\Response $response
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
protected function addCookieToResponse($request, $response)
|
||||
{
|
||||
$config = config('session');
|
||||
|
||||
$response->headers->setCookie(
|
||||
new Cookie(
|
||||
'XSRF-TOKEN', $request->session()->token(), $this->availableAt(60 * $config['lifetime']),
|
||||
$config['path'], $config['domain'], $config['secure'], false, false, $config['same_site'] ?? null
|
||||
)
|
||||
);
|
||||
|
||||
return $response;
|
||||
}
|
||||
}
|
@ -1,248 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Queue;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Support\ProcessUtils;
|
||||
use Symfony\Component\Process\Process;
|
||||
use Symfony\Component\Process\PhpExecutableFinder;
|
||||
|
||||
class Listener
|
||||
{
|
||||
/**
|
||||
* The command working path.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $commandPath;
|
||||
|
||||
/**
|
||||
* The environment the workers should run under.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $environment;
|
||||
|
||||
/**
|
||||
* The amount of seconds to wait before polling the queue.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $sleep = 3;
|
||||
|
||||
/**
|
||||
* The amount of times to try a job before logging it failed.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $maxTries = 0;
|
||||
|
||||
/**
|
||||
* The queue worker command line.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $workerCommand;
|
||||
|
||||
/**
|
||||
* The output handler callback.
|
||||
*
|
||||
* @var \Closure|null
|
||||
*/
|
||||
protected $outputHandler;
|
||||
|
||||
/**
|
||||
* Create a new queue listener.
|
||||
*
|
||||
* @param string $commandPath
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($commandPath)
|
||||
{
|
||||
$this->commandPath = $commandPath;
|
||||
$this->workerCommand = $this->buildCommandTemplate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the environment specific worker command.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function buildCommandTemplate()
|
||||
{
|
||||
$command = 'queue:work %s --once --queue=%s --delay=%s --memory=%s --sleep=%s --tries=%s';
|
||||
|
||||
return "{$this->phpBinary()} {$this->artisanBinary()} {$command}";
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the PHP binary.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function phpBinary()
|
||||
{
|
||||
return ProcessUtils::escapeArgument(
|
||||
(new PhpExecutableFinder)->find(false)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Artisan binary.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function artisanBinary()
|
||||
{
|
||||
return defined('ARTISAN_BINARY')
|
||||
? ProcessUtils::escapeArgument(ARTISAN_BINARY)
|
||||
: 'artisan';
|
||||
}
|
||||
|
||||
/**
|
||||
* Listen to the given queue connection.
|
||||
*
|
||||
* @param string $connection
|
||||
* @param string $queue
|
||||
* @param \Illuminate\Queue\ListenerOptions $options
|
||||
* @return void
|
||||
*/
|
||||
public function listen($connection, $queue, ListenerOptions $options)
|
||||
{
|
||||
$process = $this->makeProcess($connection, $queue, $options);
|
||||
|
||||
while (true) {
|
||||
$this->runProcess($process, $options->memory);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new Symfony process for the worker.
|
||||
*
|
||||
* @param string $connection
|
||||
* @param string $queue
|
||||
* @param \Illuminate\Queue\ListenerOptions $options
|
||||
* @return \Symfony\Component\Process\Process
|
||||
*/
|
||||
public function makeProcess($connection, $queue, ListenerOptions $options)
|
||||
{
|
||||
$command = $this->workerCommand;
|
||||
|
||||
// If the environment is set, we will append it to the command string so the
|
||||
// workers will run under the specified environment. Otherwise, they will
|
||||
// just run under the production environment which is not always right.
|
||||
if (isset($options->environment)) {
|
||||
$command = $this->addEnvironment($command, $options);
|
||||
}
|
||||
|
||||
// Next, we will just format out the worker commands with all of the various
|
||||
// options available for the command. This will produce the final command
|
||||
// line that we will pass into a Symfony process object for processing.
|
||||
$command = $this->formatCommand(
|
||||
$command, $connection, $queue, $options
|
||||
);
|
||||
|
||||
return new Process(
|
||||
$command, $this->commandPath, null, null, $options->timeout
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the environment option to the given command.
|
||||
*
|
||||
* @param string $command
|
||||
* @param \Illuminate\Queue\ListenerOptions $options
|
||||
* @return string
|
||||
*/
|
||||
protected function addEnvironment($command, ListenerOptions $options)
|
||||
{
|
||||
return $command.' --env='.ProcessUtils::escapeArgument($options->environment);
|
||||
}
|
||||
|
||||
/**
|
||||
* Format the given command with the listener options.
|
||||
*
|
||||
* @param string $command
|
||||
* @param string $connection
|
||||
* @param string $queue
|
||||
* @param \Illuminate\Queue\ListenerOptions $options
|
||||
* @return string
|
||||
*/
|
||||
protected function formatCommand($command, $connection, $queue, ListenerOptions $options)
|
||||
{
|
||||
return sprintf(
|
||||
$command,
|
||||
ProcessUtils::escapeArgument($connection),
|
||||
ProcessUtils::escapeArgument($queue),
|
||||
$options->delay, $options->memory,
|
||||
$options->sleep, $options->maxTries
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the given process.
|
||||
*
|
||||
* @param \Symfony\Component\Process\Process $process
|
||||
* @param int $memory
|
||||
* @return void
|
||||
*/
|
||||
public function runProcess(Process $process, $memory)
|
||||
{
|
||||
$process->run(function ($type, $line) {
|
||||
$this->handleWorkerOutput($type, $line);
|
||||
});
|
||||
|
||||
// Once we have run the job we'll go check if the memory limit has been exceeded
|
||||
// for the script. If it has, we will kill this script so the process manager
|
||||
// will restart this with a clean slate of memory automatically on exiting.
|
||||
if ($this->memoryExceeded($memory)) {
|
||||
$this->stop();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle output from the worker process.
|
||||
*
|
||||
* @param int $type
|
||||
* @param string $line
|
||||
* @return void
|
||||
*/
|
||||
protected function handleWorkerOutput($type, $line)
|
||||
{
|
||||
if (isset($this->outputHandler)) {
|
||||
call_user_func($this->outputHandler, $type, $line);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the memory limit has been exceeded.
|
||||
*
|
||||
* @param int $memoryLimit
|
||||
* @return bool
|
||||
*/
|
||||
public function memoryExceeded($memoryLimit)
|
||||
{
|
||||
return (memory_get_usage() / 1024 / 1024) >= $memoryLimit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop listening and bail out of the script.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function stop()
|
||||
{
|
||||
die;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the output handler callback.
|
||||
*
|
||||
* @param \Closure $outputHandler
|
||||
* @return void
|
||||
*/
|
||||
public function setOutputHandler(Closure $outputHandler)
|
||||
{
|
||||
$this->outputHandler = $outputHandler;
|
||||
}
|
||||
}
|
@ -1,74 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\View\Compilers;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use Illuminate\Filesystem\Filesystem;
|
||||
|
||||
abstract class Compiler
|
||||
{
|
||||
/**
|
||||
* The Filesystem instance.
|
||||
*
|
||||
* @var \Illuminate\Filesystem\Filesystem
|
||||
*/
|
||||
protected $files;
|
||||
|
||||
/**
|
||||
* Get the cache path for the compiled views.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $cachePath;
|
||||
|
||||
/**
|
||||
* Create a new compiler instance.
|
||||
*
|
||||
* @param \Illuminate\Filesystem\Filesystem $files
|
||||
* @param string $cachePath
|
||||
* @return void
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function __construct(Filesystem $files, $cachePath)
|
||||
{
|
||||
if (! $cachePath) {
|
||||
throw new InvalidArgumentException('Please provide a valid cache path.');
|
||||
}
|
||||
|
||||
$this->files = $files;
|
||||
$this->cachePath = $cachePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the path to the compiled version of a view.
|
||||
*
|
||||
* @param string $path
|
||||
* @return string
|
||||
*/
|
||||
public function getCompiledPath($path)
|
||||
{
|
||||
return $this->cachePath.'/'.sha1($path).'.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the view at the given path is expired.
|
||||
*
|
||||
* @param string $path
|
||||
* @return bool
|
||||
*/
|
||||
public function isExpired($path)
|
||||
{
|
||||
$compiled = $this->getCompiledPath($path);
|
||||
|
||||
// If the compiled file doesn't exist we will indicate that the view is expired
|
||||
// so that it can be re-compiled. Else, we will verify the last modification
|
||||
// of the views is less than the modification times of the compiled views.
|
||||
if (! $this->files->exists($compiled)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return $this->files->lastModified($path) >=
|
||||
$this->files->lastModified($compiled);
|
||||
}
|
||||
}
|
@ -1,116 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\View\Compilers\Concerns;
|
||||
|
||||
use Illuminate\View\Factory as ViewFactory;
|
||||
|
||||
trait CompilesLayouts
|
||||
{
|
||||
/**
|
||||
* The name of the last section that was started.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $lastSection;
|
||||
|
||||
/**
|
||||
* Compile the extends statements into valid PHP.
|
||||
*
|
||||
* @param string $expression
|
||||
* @return string
|
||||
*/
|
||||
protected function compileExtends($expression)
|
||||
{
|
||||
$expression = $this->stripParentheses($expression);
|
||||
|
||||
$echo = "<?php echo \$__env->make({$expression}, array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>";
|
||||
|
||||
$this->footer[] = $echo;
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Compile the section statements into valid PHP.
|
||||
*
|
||||
* @param string $expression
|
||||
* @return string
|
||||
*/
|
||||
protected function compileSection($expression)
|
||||
{
|
||||
$this->lastSection = trim($expression, "()'\" ");
|
||||
|
||||
return "<?php \$__env->startSection{$expression}; ?>";
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace the @parent directive to a placeholder.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function compileParent()
|
||||
{
|
||||
return ViewFactory::parentPlaceholder($this->lastSection ?: '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Compile the yield statements into valid PHP.
|
||||
*
|
||||
* @param string $expression
|
||||
* @return string
|
||||
*/
|
||||
protected function compileYield($expression)
|
||||
{
|
||||
return "<?php echo \$__env->yieldContent{$expression}; ?>";
|
||||
}
|
||||
|
||||
/**
|
||||
* Compile the show statements into valid PHP.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function compileShow()
|
||||
{
|
||||
return '<?php echo $__env->yieldSection(); ?>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Compile the append statements into valid PHP.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function compileAppend()
|
||||
{
|
||||
return '<?php $__env->appendSection(); ?>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Compile the overwrite statements into valid PHP.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function compileOverwrite()
|
||||
{
|
||||
return '<?php $__env->stopSection(true); ?>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Compile the stop statements into valid PHP.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function compileStop()
|
||||
{
|
||||
return '<?php $__env->stopSection(); ?>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Compile the end-section statements into valid PHP.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function compileEndsection()
|
||||
{
|
||||
return '<?php $__env->stopSection(); ?>';
|
||||
}
|
||||
}
|
@ -1,218 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\View\Concerns;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use Illuminate\Contracts\View\View;
|
||||
|
||||
trait ManagesLayouts
|
||||
{
|
||||
/**
|
||||
* All of the finished, captured sections.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $sections = [];
|
||||
|
||||
/**
|
||||
* The stack of in-progress sections.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $sectionStack = [];
|
||||
|
||||
/**
|
||||
* The parent placeholder for the request.
|
||||
*
|
||||
* @var mixed
|
||||
*/
|
||||
protected static $parentPlaceholder = [];
|
||||
|
||||
/**
|
||||
* Start injecting content into a section.
|
||||
*
|
||||
* @param string $section
|
||||
* @param string|null $content
|
||||
* @return void
|
||||
*/
|
||||
public function startSection($section, $content = null)
|
||||
{
|
||||
if ($content === null) {
|
||||
if (ob_start()) {
|
||||
$this->sectionStack[] = $section;
|
||||
}
|
||||
} else {
|
||||
$this->extendSection($section, $content instanceof View ? $content : e($content));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inject inline content into a section.
|
||||
*
|
||||
* @param string $section
|
||||
* @param string $content
|
||||
* @return void
|
||||
*/
|
||||
public function inject($section, $content)
|
||||
{
|
||||
$this->startSection($section, $content);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop injecting content into a section and return its contents.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function yieldSection()
|
||||
{
|
||||
if (empty($this->sectionStack)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $this->yieldContent($this->stopSection());
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop injecting content into a section.
|
||||
*
|
||||
* @param bool $overwrite
|
||||
* @return string
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function stopSection($overwrite = false)
|
||||
{
|
||||
if (empty($this->sectionStack)) {
|
||||
throw new InvalidArgumentException('Cannot end a section without first starting one.');
|
||||
}
|
||||
|
||||
$last = array_pop($this->sectionStack);
|
||||
|
||||
if ($overwrite) {
|
||||
$this->sections[$last] = ob_get_clean();
|
||||
} else {
|
||||
$this->extendSection($last, ob_get_clean());
|
||||
}
|
||||
|
||||
return $last;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop injecting content into a section and append it.
|
||||
*
|
||||
* @return string
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function appendSection()
|
||||
{
|
||||
if (empty($this->sectionStack)) {
|
||||
throw new InvalidArgumentException('Cannot end a section without first starting one.');
|
||||
}
|
||||
|
||||
$last = array_pop($this->sectionStack);
|
||||
|
||||
if (isset($this->sections[$last])) {
|
||||
$this->sections[$last] .= ob_get_clean();
|
||||
} else {
|
||||
$this->sections[$last] = ob_get_clean();
|
||||
}
|
||||
|
||||
return $last;
|
||||
}
|
||||
|
||||
/**
|
||||
* Append content to a given section.
|
||||
*
|
||||
* @param string $section
|
||||
* @param string $content
|
||||
* @return void
|
||||
*/
|
||||
protected function extendSection($section, $content)
|
||||
{
|
||||
if (isset($this->sections[$section])) {
|
||||
$content = str_replace(static::parentPlaceholder($section), $content, $this->sections[$section]);
|
||||
}
|
||||
|
||||
$this->sections[$section] = $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the string contents of a section.
|
||||
*
|
||||
* @param string $section
|
||||
* @param string $default
|
||||
* @return string
|
||||
*/
|
||||
public function yieldContent($section, $default = '')
|
||||
{
|
||||
$sectionContent = $default instanceof View ? $default : e($default);
|
||||
|
||||
if (isset($this->sections[$section])) {
|
||||
$sectionContent = $this->sections[$section];
|
||||
}
|
||||
|
||||
$sectionContent = str_replace('@@parent', '--parent--holder--', $sectionContent);
|
||||
|
||||
return str_replace(
|
||||
'--parent--holder--', '@parent', str_replace(static::parentPlaceholder($section), '', $sectionContent)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the parent placeholder for the current request.
|
||||
*
|
||||
* @param string $section
|
||||
* @return string
|
||||
*/
|
||||
public static function parentPlaceholder($section = '')
|
||||
{
|
||||
if (! isset(static::$parentPlaceholder[$section])) {
|
||||
static::$parentPlaceholder[$section] = '##parent-placeholder-'.sha1($section).'##';
|
||||
}
|
||||
|
||||
return static::$parentPlaceholder[$section];
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if section exists.
|
||||
*
|
||||
* @param string $name
|
||||
* @return bool
|
||||
*/
|
||||
public function hasSection($name)
|
||||
{
|
||||
return array_key_exists($name, $this->sections);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the contents of a section.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $default
|
||||
* @return mixed
|
||||
*/
|
||||
public function getSection($name, $default = null)
|
||||
{
|
||||
return $this->getSections()[$name] ?? $default;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the entire array of sections.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getSections()
|
||||
{
|
||||
return $this->sections;
|
||||
}
|
||||
|
||||
/**
|
||||
* Flush all of the sections.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function flushSections()
|
||||
{
|
||||
$this->sections = [];
|
||||
$this->sectionStack = [];
|
||||
}
|
||||
}
|
@ -29,6 +29,7 @@ abstract class AbstractAdapter implements AdapterInterface
|
||||
|
||||
if ($prefix === '') {
|
||||
$this->pathPrefix = null;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -76,6 +76,13 @@ abstract class AbstractFtpAdapter extends AbstractAdapter
|
||||
*/
|
||||
protected $safeStorage;
|
||||
|
||||
/**
|
||||
* True to enable timestamps for FTP servers that return unix-style listings.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $enableTimestampsOnUnixListings = false;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
@ -309,6 +316,20 @@ abstract class AbstractFtpAdapter extends AbstractAdapter
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* True to enable timestamps for FTP servers that return unix-style listings.
|
||||
*
|
||||
* @param bool $bool
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setEnableTimestampsOnUnixListings($bool = false)
|
||||
{
|
||||
$this->enableTimestampsOnUnixListings = $bool;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
@ -389,6 +410,18 @@ abstract class AbstractFtpAdapter extends AbstractAdapter
|
||||
/**
|
||||
* Normalize a Unix file entry.
|
||||
*
|
||||
* Given $item contains:
|
||||
* '-rw-r--r-- 1 ftp ftp 409 Aug 19 09:01 file1.txt'
|
||||
*
|
||||
* This function will return:
|
||||
* [
|
||||
* 'type' => 'file',
|
||||
* 'path' => 'file1.txt',
|
||||
* 'visibility' => 'public',
|
||||
* 'size' => 409,
|
||||
* 'timestamp' => 1566205260
|
||||
* ]
|
||||
*
|
||||
* @param string $item
|
||||
* @param string $base
|
||||
*
|
||||
@ -402,19 +435,62 @@ abstract class AbstractFtpAdapter extends AbstractAdapter
|
||||
throw new RuntimeException("Metadata can't be parsed from item '$item' , not enough parts.");
|
||||
}
|
||||
|
||||
list($permissions, /* $number */, /* $owner */, /* $group */, $size, /* $month */, /* $day */, /* $time*/, $name) = explode(' ', $item, 9);
|
||||
list($permissions, /* $number */, /* $owner */, /* $group */, $size, $month, $day, $timeOrYear, $name) = explode(' ', $item, 9);
|
||||
$type = $this->detectType($permissions);
|
||||
$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);
|
||||
$visibility = $permissions & 0044 ? AdapterInterface::VISIBILITY_PUBLIC : AdapterInterface::VISIBILITY_PRIVATE;
|
||||
$size = (int) $size;
|
||||
|
||||
return compact('type', 'path', 'visibility', 'size');
|
||||
$result = compact('type', 'path', 'visibility', 'size');
|
||||
if ($this->enableTimestampsOnUnixListings) {
|
||||
$timestamp = $this->normalizeUnixTimestamp($month, $day, $timeOrYear);
|
||||
$result += compact('timestamp');
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Only accurate to the minute (current year), or to the day.
|
||||
*
|
||||
* Inadequacies in timestamp accuracy are due to limitations of the FTP 'LIST' command
|
||||
*
|
||||
* Note: The 'MLSD' command is a machine-readable replacement for 'LIST'
|
||||
* but many FTP servers do not support it :(
|
||||
*
|
||||
* @param string $month e.g. 'Aug'
|
||||
* @param string $day e.g. '19'
|
||||
* @param string $timeOrYear e.g. '09:01' OR '2015'
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
protected function normalizeUnixTimestamp($month, $day, $timeOrYear)
|
||||
{
|
||||
if (is_numeric($timeOrYear)) {
|
||||
$year = $timeOrYear;
|
||||
$hour = '00';
|
||||
$minute = '00';
|
||||
$seconds = '00';
|
||||
} else {
|
||||
$year = date('Y');
|
||||
list($hour, $minute) = explode(':', $timeOrYear);
|
||||
$seconds = '00';
|
||||
}
|
||||
$dateTime = DateTime::createFromFormat('Y-M-j-G:i:s', "{$year}-{$month}-{$day}-{$hour}:{$minute}:{$seconds}");
|
||||
|
||||
return $dateTime->getTimestamp();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -487,6 +563,10 @@ abstract class AbstractFtpAdapter extends AbstractAdapter
|
||||
*/
|
||||
protected function normalizePermissions($permissions)
|
||||
{
|
||||
if (is_numeric($permissions)) {
|
||||
return ((int) $permissions) & 0777;
|
||||
}
|
||||
|
||||
// remove the type identifier
|
||||
$permissions = substr($permissions, 1);
|
||||
|
||||
@ -565,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();
|
||||
}
|
||||
@ -620,4 +697,9 @@ abstract class AbstractFtpAdapter extends AbstractAdapter
|
||||
* @return bool
|
||||
*/
|
||||
abstract public function isConnected();
|
||||
|
||||
protected function escapePath($path)
|
||||
{
|
||||
return str_replace(['*', '[', ']'], ['\\*', '\\[', '\\]'], $path);
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,9 @@
|
||||
namespace League\Flysystem\Adapter;
|
||||
|
||||
/**
|
||||
* Adapters that implement this interface let the Filesystem know that it files can be overwritten using the write
|
||||
* Adapters that implement this interface let the Filesystem know that files can be overwritten using the write
|
||||
* functions and don't need the update function to be called. This can help improve performance when asserts are disabled.
|
||||
*/
|
||||
interface CanOverwriteFiles {}
|
||||
interface CanOverwriteFiles
|
||||
{
|
||||
}
|
||||
|
73
vendor/league/flysystem/src/Adapter/Ftp.php
vendored
73
vendor/league/flysystem/src/Adapter/Ftp.php
vendored
@ -2,13 +2,14 @@
|
||||
|
||||
namespace League\Flysystem\Adapter;
|
||||
|
||||
use ErrorException;
|
||||
use League\Flysystem\Adapter\Polyfill\StreamedCopyTrait;
|
||||
use League\Flysystem\AdapterInterface;
|
||||
use League\Flysystem\Config;
|
||||
use League\Flysystem\ConnectionErrorException;
|
||||
use League\Flysystem\ConnectionRuntimeException;
|
||||
use League\Flysystem\InvalidRootException;
|
||||
use League\Flysystem\Util;
|
||||
use League\Flysystem\Util\MimeType;
|
||||
use RuntimeException;
|
||||
|
||||
class Ftp extends AbstractFtpAdapter
|
||||
{
|
||||
@ -53,6 +54,7 @@ class Ftp extends AbstractFtpAdapter
|
||||
'ignorePassiveAddress',
|
||||
'recurseManually',
|
||||
'utf8',
|
||||
'enableTimestampsOnUnixListings',
|
||||
];
|
||||
|
||||
/**
|
||||
@ -127,14 +129,21 @@ 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());
|
||||
$this->connection = @ftp_ssl_connect($this->getHost(), $this->getPort(), $this->getTimeout());
|
||||
} else {
|
||||
$this->connection = ftp_connect($this->getHost(), $this->getPort(), $this->getTimeout());
|
||||
$this->connection = @ftp_connect($this->getHost(), $this->getPort(), $this->getTimeout());
|
||||
}
|
||||
|
||||
if ( ! $this->connection) {
|
||||
throw new RuntimeException('Could not connect to host: ' . $this->getHost() . ', port:' . $this->getPort());
|
||||
$tries--;
|
||||
|
||||
if ($tries > 0) goto start_connecting;
|
||||
|
||||
throw new ConnectionRuntimeException('Could not connect to host: ' . $this->getHost() . ', port:' . $this->getPort());
|
||||
}
|
||||
|
||||
$this->login();
|
||||
@ -152,7 +161,7 @@ class Ftp extends AbstractFtpAdapter
|
||||
if ($this->utf8) {
|
||||
$response = ftp_raw($this->connection, "OPTS UTF8 ON");
|
||||
if (substr($response[0], 0, 3) !== '200') {
|
||||
throw new RuntimeException(
|
||||
throw new ConnectionRuntimeException(
|
||||
'Could not set UTF-8 mode for connection: ' . $this->getHost() . '::' . $this->getPort()
|
||||
);
|
||||
}
|
||||
@ -162,7 +171,7 @@ class Ftp extends AbstractFtpAdapter
|
||||
/**
|
||||
* Set the connections to passive mode.
|
||||
*
|
||||
* @throws RuntimeException
|
||||
* @throws ConnectionRuntimeException
|
||||
*/
|
||||
protected function setConnectionPassiveMode()
|
||||
{
|
||||
@ -171,7 +180,7 @@ class Ftp extends AbstractFtpAdapter
|
||||
}
|
||||
|
||||
if ( ! ftp_pasv($this->connection, $this->passive)) {
|
||||
throw new RuntimeException(
|
||||
throw new ConnectionRuntimeException(
|
||||
'Could not set passive mode for connection: ' . $this->getHost() . '::' . $this->getPort()
|
||||
);
|
||||
}
|
||||
@ -186,7 +195,7 @@ class Ftp extends AbstractFtpAdapter
|
||||
$connection = $this->connection;
|
||||
|
||||
if ($root && ! ftp_chdir($connection, $root)) {
|
||||
throw new RuntimeException('Root is invalid or does not exist: ' . $this->getRoot());
|
||||
throw new InvalidRootException('Root is invalid or does not exist: ' . $this->getRoot());
|
||||
}
|
||||
|
||||
// Store absolute path for further reference.
|
||||
@ -199,11 +208,12 @@ class Ftp extends AbstractFtpAdapter
|
||||
/**
|
||||
* Login.
|
||||
*
|
||||
* @throws RuntimeException
|
||||
* @throws ConnectionRuntimeException
|
||||
*/
|
||||
protected function login()
|
||||
{
|
||||
set_error_handler(function () {});
|
||||
set_error_handler(function () {
|
||||
});
|
||||
$isLoggedIn = ftp_login(
|
||||
$this->connection,
|
||||
$this->getUsername(),
|
||||
@ -213,7 +223,7 @@ class Ftp extends AbstractFtpAdapter
|
||||
|
||||
if ( ! $isLoggedIn) {
|
||||
$this->disconnect();
|
||||
throw new RuntimeException(
|
||||
throw new ConnectionRuntimeException(
|
||||
'Could not login with connection: ' . $this->getHost() . '::' . $this->getPort(
|
||||
) . ', username: ' . $this->getUsername()
|
||||
);
|
||||
@ -226,7 +236,7 @@ class Ftp extends AbstractFtpAdapter
|
||||
public function disconnect()
|
||||
{
|
||||
if (is_resource($this->connection)) {
|
||||
ftp_close($this->connection);
|
||||
@ftp_close($this->connection);
|
||||
}
|
||||
|
||||
$this->connection = null;
|
||||
@ -248,7 +258,7 @@ class Ftp extends AbstractFtpAdapter
|
||||
}
|
||||
|
||||
$result['contents'] = $contents;
|
||||
$result['mimetype'] = Util::guessMimeType($path, $contents);
|
||||
$result['mimetype'] = $config->get('mimetype') ?: Util::guessMimeType($path, $contents);
|
||||
|
||||
return $result;
|
||||
}
|
||||
@ -380,19 +390,17 @@ class Ftp extends AbstractFtpAdapter
|
||||
*/
|
||||
public function getMetadata($path)
|
||||
{
|
||||
$connection = $this->getConnection();
|
||||
|
||||
if ($path === '') {
|
||||
return ['type' => 'dir', 'path' => ''];
|
||||
}
|
||||
|
||||
if (@ftp_chdir($connection, $path) === true) {
|
||||
if (@ftp_chdir($this->getConnection(), $path) === true) {
|
||||
$this->setConnectionRoot();
|
||||
|
||||
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;
|
||||
@ -488,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);
|
||||
}
|
||||
@ -512,7 +518,9 @@ class Ftp extends AbstractFtpAdapter
|
||||
|
||||
foreach ($listing as $item) {
|
||||
$output[] = $item;
|
||||
if ($item['type'] !== 'dir') continue;
|
||||
if ($item['type'] !== 'dir') {
|
||||
continue;
|
||||
}
|
||||
$output = array_merge($output, $this->listDirectoryContentsRecursive($item['path']));
|
||||
}
|
||||
|
||||
@ -523,19 +531,13 @@ class Ftp extends AbstractFtpAdapter
|
||||
* Check if the connection is open.
|
||||
*
|
||||
* @return bool
|
||||
* @throws ErrorException
|
||||
*
|
||||
* @throws ConnectionErrorException
|
||||
*/
|
||||
public function isConnected()
|
||||
{
|
||||
try {
|
||||
return is_resource($this->connection) && ftp_rawlist($this->connection, $this->getRoot()) !== false;
|
||||
} catch (ErrorException $e) {
|
||||
if (strpos($e->getMessage(), 'ftp_rawlist') === false) {
|
||||
throw $e;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
return is_resource($this->connection)
|
||||
&& $this->getRawExecResponseCode('NOOP') === 200;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -562,7 +564,16 @@ class Ftp extends AbstractFtpAdapter
|
||||
|
||||
if ($this->isPureFtpd) {
|
||||
$path = str_replace(' ', '\ ', $path);
|
||||
$this->escapePath($path);
|
||||
}
|
||||
|
||||
return ftp_rawlist($connection, $options . ' ' . $path);
|
||||
}
|
||||
|
||||
private function getRawExecResponseCode($command)
|
||||
{
|
||||
$response = @ftp_raw($this->connection, trim($command));
|
||||
|
||||
return (int) preg_replace('/\D/', '', implode(' ', $response));
|
||||
}
|
||||
}
|
||||
|
12
vendor/league/flysystem/src/Adapter/Ftpd.php
vendored
12
vendor/league/flysystem/src/Adapter/Ftpd.php
vendored
@ -13,7 +13,15 @@ class Ftpd extends Ftp
|
||||
return ['type' => 'dir', 'path' => ''];
|
||||
}
|
||||
|
||||
if ( ! ($object = ftp_raw($this->getConnection(), 'STAT ' . $path)) || count($object) < 3) {
|
||||
if (@ftp_chdir($this->getConnection(), $path) === true) {
|
||||
$this->setConnectionRoot();
|
||||
|
||||
return ['type' => 'dir', 'path' => $path];
|
||||
}
|
||||
|
||||
$object = ftp_raw($this->getConnection(), 'STAT ' . $this->escapePath($path));
|
||||
|
||||
if ( ! $object || count($object) < 3) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -29,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 [];
|
||||
|
48
vendor/league/flysystem/src/Adapter/Local.php
vendored
48
vendor/league/flysystem/src/Adapter/Local.php
vendored
@ -5,7 +5,6 @@ namespace League\Flysystem\Adapter;
|
||||
use DirectoryIterator;
|
||||
use FilesystemIterator;
|
||||
use finfo as Finfo;
|
||||
use League\Flysystem\AdapterInterface;
|
||||
use League\Flysystem\Config;
|
||||
use League\Flysystem\Exception;
|
||||
use League\Flysystem\NotSupportedException;
|
||||
@ -39,7 +38,7 @@ class Local extends AbstractAdapter
|
||||
'dir' => [
|
||||
'public' => 0755,
|
||||
'private' => 0700,
|
||||
]
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
@ -56,6 +55,7 @@ class Local extends AbstractAdapter
|
||||
* @var int
|
||||
*/
|
||||
protected $writeFlags;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
@ -99,11 +99,17 @@ class Local extends AbstractAdapter
|
||||
{
|
||||
if ( ! is_dir($root)) {
|
||||
$umask = umask(0);
|
||||
@mkdir($root, $this->permissionMap['dir']['public'], true);
|
||||
|
||||
if ( ! @mkdir($root, $this->permissionMap['dir']['public'], true)) {
|
||||
$mkdirError = error_get_last();
|
||||
}
|
||||
|
||||
umask($umask);
|
||||
clearstatcache(false, $root);
|
||||
|
||||
if ( ! is_dir($root)) {
|
||||
throw new Exception(sprintf('Impossible to create the root directory "%s".', $root));
|
||||
$errorMessage = isset($mkdirError['message']) ? $mkdirError['message'] : '';
|
||||
throw new Exception(sprintf('Impossible to create the root directory "%s". %s', $root, $errorMessage));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -200,8 +206,9 @@ class Local extends AbstractAdapter
|
||||
|
||||
$result = compact('type', 'path', 'size', 'contents');
|
||||
|
||||
if ($mimetype = Util::guessMimeType($path, $contents)) {
|
||||
$result['mimetype'] = $mimetype;
|
||||
if ($visibility = $config->get('visibility')) {
|
||||
$this->setVisibility($path, $visibility);
|
||||
$result['visibility'] = $visibility;
|
||||
}
|
||||
|
||||
return $result;
|
||||
@ -213,7 +220,7 @@ class Local extends AbstractAdapter
|
||||
public function read($path)
|
||||
{
|
||||
$location = $this->applyPathPrefix($path);
|
||||
$contents = file_get_contents($location);
|
||||
$contents = @file_get_contents($location);
|
||||
|
||||
if ($contents === false) {
|
||||
return false;
|
||||
@ -281,6 +288,8 @@ class Local extends AbstractAdapter
|
||||
$result[] = $this->normalizeFileInfo($file);
|
||||
}
|
||||
|
||||
unset($iterator);
|
||||
|
||||
return array_filter($result);
|
||||
}
|
||||
|
||||
@ -290,6 +299,7 @@ class Local extends AbstractAdapter
|
||||
public function getMetadata($path)
|
||||
{
|
||||
$location = $this->applyPathPrefix($path);
|
||||
clearstatcache(false, $location);
|
||||
$info = new SplFileInfo($location);
|
||||
|
||||
return $this->normalizeFileInfo($info);
|
||||
@ -312,7 +322,7 @@ class Local extends AbstractAdapter
|
||||
$finfo = new Finfo(FILEINFO_MIME_TYPE);
|
||||
$mimetype = $finfo->file($location);
|
||||
|
||||
if (in_array($mimetype, ['application/octet-stream', 'inode/x-empty'])) {
|
||||
if (in_array($mimetype, ['application/octet-stream', 'inode/x-empty', 'application/x-empty'])) {
|
||||
$mimetype = Util\MimeType::detectByFilename($location);
|
||||
}
|
||||
|
||||
@ -335,7 +345,15 @@ class Local extends AbstractAdapter
|
||||
$location = $this->applyPathPrefix($path);
|
||||
clearstatcache(false, $location);
|
||||
$permissions = octdec(substr(sprintf('%o', fileperms($location)), -4));
|
||||
$visibility = $permissions & 0044 ? AdapterInterface::VISIBILITY_PUBLIC : AdapterInterface::VISIBILITY_PRIVATE;
|
||||
$type = is_dir($location) ? 'dir' : 'file';
|
||||
|
||||
foreach ($this->permissionMap[$type] as $visibility => $visibilityPermissions) {
|
||||
if ($visibilityPermissions == $permissions) {
|
||||
return compact('path', 'visibility');
|
||||
}
|
||||
}
|
||||
|
||||
$visibility = substr(sprintf('%o', fileperms($location)), -4);
|
||||
|
||||
return compact('path', 'visibility');
|
||||
}
|
||||
@ -364,11 +382,13 @@ class Local extends AbstractAdapter
|
||||
$location = $this->applyPathPrefix($dirname);
|
||||
$umask = umask(0);
|
||||
$visibility = $config->get('visibility', 'public');
|
||||
$return = ['path' => $dirname, 'type' => 'dir'];
|
||||
|
||||
if ( ! is_dir($location) && ! mkdir($location, $this->permissionMap['dir'][$visibility], true)) {
|
||||
$return = false;
|
||||
} else {
|
||||
$return = ['path' => $dirname, 'type' => 'dir'];
|
||||
if ( ! is_dir($location)) {
|
||||
if (false === @mkdir($location, $this->permissionMap['dir'][$visibility], true)
|
||||
|| false === is_dir($location)) {
|
||||
$return = false;
|
||||
}
|
||||
}
|
||||
|
||||
umask($umask);
|
||||
@ -395,6 +415,8 @@ class Local extends AbstractAdapter
|
||||
$this->deleteFileInfoObject($file);
|
||||
}
|
||||
|
||||
unset($contents);
|
||||
|
||||
return rmdir($location);
|
||||
}
|
||||
|
||||
|
@ -34,15 +34,17 @@ trait StreamedCopyTrait
|
||||
// Required abstract method
|
||||
|
||||
/**
|
||||
* @param string $path
|
||||
* @param string $path
|
||||
*
|
||||
* @return resource
|
||||
*/
|
||||
abstract public function readStream($path);
|
||||
|
||||
/**
|
||||
* @param string $path
|
||||
* @param resource $resource
|
||||
* @param Config $config
|
||||
* @param string $path
|
||||
* @param resource $resource
|
||||
* @param Config $config
|
||||
*
|
||||
* @return resource
|
||||
*/
|
||||
abstract public function writeStream($path, $resource, Config $config);
|
||||
|
2
vendor/league/flysystem/src/Config.php
vendored
2
vendor/league/flysystem/src/Config.php
vendored
@ -10,7 +10,7 @@ class Config
|
||||
protected $settings = [];
|
||||
|
||||
/**
|
||||
* @var Config
|
||||
* @var Config|null
|
||||
*/
|
||||
protected $fallback;
|
||||
|
||||
|
9
vendor/league/flysystem/src/ConnectionErrorException.php
vendored
Normal file
9
vendor/league/flysystem/src/ConnectionErrorException.php
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace League\Flysystem;
|
||||
|
||||
use ErrorException;
|
||||
|
||||
class ConnectionErrorException extends ErrorException implements FilesystemException
|
||||
{
|
||||
}
|
9
vendor/league/flysystem/src/ConnectionRuntimeException.php
vendored
Normal file
9
vendor/league/flysystem/src/ConnectionRuntimeException.php
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace League\Flysystem;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
class ConnectionRuntimeException extends RuntimeException implements FilesystemException
|
||||
{
|
||||
}
|
17
vendor/league/flysystem/src/CorruptedPathDetected.php
vendored
Normal file
17
vendor/league/flysystem/src/CorruptedPathDetected.php
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace League\Flysystem;
|
||||
|
||||
use LogicException;
|
||||
|
||||
class CorruptedPathDetected extends LogicException implements FilesystemException
|
||||
{
|
||||
/**
|
||||
* @param string $path
|
||||
* @return CorruptedPathDetected
|
||||
*/
|
||||
public static function forPath($path)
|
||||
{
|
||||
return new CorruptedPathDetected("Corrupted path detected: " . $path);
|
||||
}
|
||||
}
|
2
vendor/league/flysystem/src/Exception.php
vendored
2
vendor/league/flysystem/src/Exception.php
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
namespace League\Flysystem;
|
||||
|
||||
class Exception extends \Exception
|
||||
class Exception extends \Exception implements FilesystemException
|
||||
{
|
||||
//
|
||||
}
|
||||
|
28
vendor/league/flysystem/src/Filesystem.php
vendored
28
vendor/league/flysystem/src/Filesystem.php
vendored
@ -8,12 +8,13 @@ use League\Flysystem\Plugin\PluggableTrait;
|
||||
use League\Flysystem\Util\ContentListingFormatter;
|
||||
|
||||
/**
|
||||
* @method array getWithMetadata(string $path, array $metadata)
|
||||
* @method bool forceCopy(string $path, string $newpath)
|
||||
* @method bool forceRename(string $path, string $newpath)
|
||||
* @method array listFiles(string $path = '', boolean $recursive = false)
|
||||
* @method array listPaths(string $path = '', boolean $recursive = false)
|
||||
* @method array listWith(array $keys = [], $directory = '', $recursive = false)
|
||||
* @method void emptyDir(string $dirname)
|
||||
* @method array|false getWithMetadata(string $path, string[] $metadata)
|
||||
* @method bool forceCopy(string $path, string $newpath)
|
||||
* @method bool forceRename(string $path, string $newpath)
|
||||
* @method array listFiles(string $path = '', boolean $recursive = false)
|
||||
* @method string[] listPaths(string $path = '', boolean $recursive = false)
|
||||
* @method array listWith(string[] $keys = [], $directory = '', $recursive = false)
|
||||
*/
|
||||
class Filesystem implements FilesystemInterface
|
||||
{
|
||||
@ -74,7 +75,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 +108,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.');
|
||||
}
|
||||
|
||||
@ -115,7 +116,7 @@ class Filesystem implements FilesystemInterface
|
||||
$config = $this->prepareConfig($config);
|
||||
Util::rewindStream($resource);
|
||||
|
||||
if ( ! $this->getAdapter() instanceof CanOverwriteFiles &&$this->has($path)) {
|
||||
if ( ! $this->getAdapter() instanceof CanOverwriteFiles && $this->has($path)) {
|
||||
return (bool) $this->getAdapter()->updateStream($path, $resource, $config);
|
||||
}
|
||||
|
||||
@ -158,7 +159,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.');
|
||||
}
|
||||
|
||||
@ -270,7 +271,8 @@ class Filesystem implements FilesystemInterface
|
||||
$directory = Util::normalizePath($directory);
|
||||
$contents = $this->getAdapter()->listContents($directory, $recursive);
|
||||
|
||||
return (new ContentListingFormatter($directory, $recursive))->formatListing($contents);
|
||||
return (new ContentListingFormatter($directory, $recursive, $this->config->get('case_sensitive', true)))
|
||||
->formatListing($contents);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -300,7 +302,7 @@ class Filesystem implements FilesystemInterface
|
||||
return false;
|
||||
}
|
||||
|
||||
return $object['timestamp'];
|
||||
return (int) $object['timestamp'];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -364,7 +366,7 @@ class Filesystem implements FilesystemInterface
|
||||
|
||||
if ( ! $handler) {
|
||||
$metadata = $this->getMetadata($path);
|
||||
$handler = $metadata['type'] === 'file' ? new File($this, $path) : new Directory($this, $path);
|
||||
$handler = ($metadata && $metadata['type'] === 'file') ? new File($this, $path) : new Directory($this, $path);
|
||||
}
|
||||
|
||||
$handler->setPath($path);
|
||||
|
7
vendor/league/flysystem/src/FilesystemException.php
vendored
Normal file
7
vendor/league/flysystem/src/FilesystemException.php
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace League\Flysystem;
|
||||
|
||||
interface FilesystemException
|
||||
{
|
||||
}
|
@ -87,7 +87,7 @@ interface FilesystemInterface
|
||||
*
|
||||
* @throws FileNotFoundException
|
||||
*
|
||||
* @return string|false The timestamp or false on failure.
|
||||
* @return int|false The timestamp or false on failure.
|
||||
*/
|
||||
public function getTimestamp($path);
|
||||
|
||||
|
@ -7,6 +7,6 @@ use LogicException;
|
||||
/**
|
||||
* Thrown when the MountManager cannot find a filesystem.
|
||||
*/
|
||||
class FilesystemNotFoundException extends LogicException
|
||||
class FilesystemNotFoundException extends LogicException implements FilesystemException
|
||||
{
|
||||
}
|
||||
|
2
vendor/league/flysystem/src/Handler.php
vendored
2
vendor/league/flysystem/src/Handler.php
vendored
@ -60,7 +60,7 @@ abstract class Handler
|
||||
{
|
||||
$metadata = $this->filesystem->getMetadata($this->path);
|
||||
|
||||
return $metadata['type'];
|
||||
return $metadata ? $metadata['type'] : 'dir';
|
||||
}
|
||||
|
||||
/**
|
||||
|
9
vendor/league/flysystem/src/InvalidRootException.php
vendored
Normal file
9
vendor/league/flysystem/src/InvalidRootException.php
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace League\Flysystem;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
class InvalidRootException extends RuntimeException implements FilesystemException
|
||||
{
|
||||
}
|
@ -5,7 +5,7 @@ namespace League\Flysystem;
|
||||
use RuntimeException;
|
||||
use SplFileInfo;
|
||||
|
||||
class NotSupportedException extends RuntimeException
|
||||
class NotSupportedException extends RuntimeException implements FilesystemException
|
||||
{
|
||||
/**
|
||||
* Create a new exception for a link.
|
||||
|
@ -20,8 +20,8 @@ class GetWithMetadata extends AbstractPlugin
|
||||
/**
|
||||
* Get metadata for an object with required metadata.
|
||||
*
|
||||
* @param string $path path to file
|
||||
* @param array $metadata metadata keys
|
||||
* @param string $path path to file
|
||||
* @param string[] $metadata metadata keys
|
||||
*
|
||||
* @throws InvalidArgumentException
|
||||
* @throws FileNotFoundException
|
||||
|
@ -20,7 +20,7 @@ class ListPaths extends AbstractPlugin
|
||||
* @param string $directory
|
||||
* @param bool $recursive
|
||||
*
|
||||
* @return array paths
|
||||
* @return string[] paths
|
||||
*/
|
||||
public function handle($directory = '', $recursive = false)
|
||||
{
|
||||
|
@ -17,9 +17,9 @@ class ListWith extends AbstractPlugin
|
||||
/**
|
||||
* List contents with metadata.
|
||||
*
|
||||
* @param array $keys
|
||||
* @param string $directory
|
||||
* @param bool $recursive
|
||||
* @param string[] $keys
|
||||
* @param string $directory
|
||||
* @param bool $recursive
|
||||
*
|
||||
* @return array listing with metadata
|
||||
*/
|
||||
|
@ -4,7 +4,7 @@ namespace League\Flysystem;
|
||||
|
||||
use LogicException;
|
||||
|
||||
class RootViolationException extends LogicException
|
||||
class RootViolationException extends LogicException implements FilesystemException
|
||||
{
|
||||
//
|
||||
}
|
||||
|
34
vendor/league/flysystem/src/Util.php
vendored
34
vendor/league/flysystem/src/Util.php
vendored
@ -5,6 +5,8 @@ namespace League\Flysystem;
|
||||
use League\Flysystem\Util\MimeType;
|
||||
use LogicException;
|
||||
|
||||
use function strcmp;
|
||||
|
||||
class Util
|
||||
{
|
||||
/**
|
||||
@ -102,8 +104,7 @@ class Util
|
||||
public static function normalizeRelativePath($path)
|
||||
{
|
||||
$path = str_replace('\\', '/', $path);
|
||||
$path = static::removeFunkyWhiteSpace($path);
|
||||
|
||||
$path = static::removeFunkyWhiteSpace($path);
|
||||
$parts = [];
|
||||
|
||||
foreach (explode('/', $path) as $part) {
|
||||
@ -127,21 +128,22 @@ class Util
|
||||
}
|
||||
}
|
||||
|
||||
return implode('/', $parts);
|
||||
$path = implode('/', $parts);
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes unprintable characters and invalid unicode characters.
|
||||
* Rejects unprintable characters and invalid unicode characters.
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @return string $path
|
||||
*/
|
||||
protected static function removeFunkyWhiteSpace($path) {
|
||||
// We do this check in a loop, since removing invalid unicode characters
|
||||
// can lead to new characters being created.
|
||||
while (preg_match('#\p{C}+|^\./#u', $path)) {
|
||||
$path = preg_replace('#\p{C}+|^\./#u', '', $path);
|
||||
protected static function removeFunkyWhiteSpace($path)
|
||||
{
|
||||
if (preg_match('#\p{C}+#u', $path)) {
|
||||
throw CorruptedPathDetected::forPath($path);
|
||||
}
|
||||
|
||||
return $path;
|
||||
@ -175,7 +177,7 @@ class Util
|
||||
/**
|
||||
* Guess MIME Type based on the path of the file and it's content.
|
||||
*
|
||||
* @param string $path
|
||||
* @param string $path
|
||||
* @param string|resource $content
|
||||
*
|
||||
* @return string|null MIME Type or NULL if no extension detected
|
||||
@ -204,7 +206,7 @@ class Util
|
||||
$listedDirectories = [];
|
||||
|
||||
foreach ($listing as $object) {
|
||||
list($directories, $listedDirectories) = static::emulateObjectDirectories($object, $directories, $listedDirectories);
|
||||
[$directories, $listedDirectories] = static::emulateObjectDirectories($object, $directories, $listedDirectories);
|
||||
}
|
||||
|
||||
$directories = array_diff(array_unique($directories), array_unique($listedDirectories));
|
||||
@ -266,12 +268,16 @@ class Util
|
||||
*
|
||||
* @param resource $resource
|
||||
*
|
||||
* @return int stream size
|
||||
* @return int|null stream size
|
||||
*/
|
||||
public static function getStreamSize($resource)
|
||||
{
|
||||
$stat = fstat($resource);
|
||||
|
||||
if ( ! is_array($stat) || ! isset($stat['size'])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $stat['size'];
|
||||
}
|
||||
|
||||
@ -290,13 +296,13 @@ class Util
|
||||
$listedDirectories[] = $object['path'];
|
||||
}
|
||||
|
||||
if (empty($object['dirname'])) {
|
||||
if ( ! isset($object['dirname']) || trim($object['dirname']) === '') {
|
||||
return [$directories, $listedDirectories];
|
||||
}
|
||||
|
||||
$parent = $object['dirname'];
|
||||
|
||||
while ( ! empty($parent) && ! in_array($parent, $directories)) {
|
||||
while (isset($parent) && trim($parent) !== '' && ! in_array($parent, $directories)) {
|
||||
$directories[] = $parent;
|
||||
$parent = static::dirname($parent);
|
||||
}
|
||||
|
@ -13,19 +13,26 @@ class ContentListingFormatter
|
||||
* @var string
|
||||
*/
|
||||
private $directory;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $recursive;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $caseSensitive;
|
||||
|
||||
/**
|
||||
* @param string $directory
|
||||
* @param bool $recursive
|
||||
*/
|
||||
public function __construct($directory, $recursive)
|
||||
public function __construct($directory, $recursive, $caseSensitive = true)
|
||||
{
|
||||
$this->directory = $directory;
|
||||
$this->directory = rtrim($directory, '/');
|
||||
$this->recursive = $recursive;
|
||||
$this->caseSensitive = $caseSensitive;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -37,14 +44,9 @@ class ContentListingFormatter
|
||||
*/
|
||||
public function formatListing(array $listing)
|
||||
{
|
||||
$listing = array_values(
|
||||
array_map(
|
||||
[$this, 'addPathInfo'],
|
||||
array_filter($listing, [$this, 'isEntryOutOfScope'])
|
||||
)
|
||||
);
|
||||
$listing = array_filter(array_map([$this, 'addPathInfo'], $listing), [$this, 'isEntryOutOfScope']);
|
||||
|
||||
return $this->sortListing($listing);
|
||||
return $this->sortListing(array_values($listing));
|
||||
}
|
||||
|
||||
private function addPathInfo(array $entry)
|
||||
@ -85,7 +87,9 @@ class ContentListingFormatter
|
||||
return true;
|
||||
}
|
||||
|
||||
return strpos($entry['path'], $this->directory . '/') === 0;
|
||||
return $this->caseSensitive
|
||||
? strpos($entry['path'], $this->directory . '/') === 0
|
||||
: stripos($entry['path'], $this->directory . '/') === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -97,7 +101,9 @@ class ContentListingFormatter
|
||||
*/
|
||||
private function isDirectChild(array $entry)
|
||||
{
|
||||
return Util::dirname($entry['path']) === $this->directory;
|
||||
return $this->caseSensitive
|
||||
? $entry['dirname'] === $this->directory
|
||||
: strcasecmp($this->directory, $entry['dirname']) === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
211
vendor/league/flysystem/src/Util/MimeType.php
vendored
211
vendor/league/flysystem/src/Util/MimeType.php
vendored
@ -2,219 +2,72 @@
|
||||
|
||||
namespace League\Flysystem\Util;
|
||||
|
||||
use finfo;
|
||||
use ErrorException;
|
||||
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/x-comma-separated-values',
|
||||
'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',
|
||||
'ppt' => 'application/powerpoint',
|
||||
'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
||||
'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',
|
||||
'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',
|
||||
'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',
|
||||
'dot' => 'application/msword',
|
||||
'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
'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',
|
||||
];
|
||||
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.
|
||||
}
|
||||
} // @codeCoverageIgnoreEnd
|
||||
return 'text/plain';
|
||||
}
|
||||
|
||||
/**
|
||||
* 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';
|
||||
}
|
||||
|
||||
/**
|
||||
|
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;
|
||||
}
|
||||
}
|
14
vendor/league/mime-type-detection/src/ExtensionLookup.php
vendored
Normal file
14
vendor/league/mime-type-detection/src/ExtensionLookup.php
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace League\MimeTypeDetection;
|
||||
|
||||
interface ExtensionLookup
|
||||
{
|
||||
public function lookupExtension(string $mimetype): ?string;
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function lookupAllExtensions(string $mimetype): array;
|
||||
}
|
56
vendor/league/mime-type-detection/src/ExtensionMimeTypeDetector.php
vendored
Normal file
56
vendor/league/mime-type-detection/src/ExtensionMimeTypeDetector.php
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace League\MimeTypeDetection;
|
||||
|
||||
use const PATHINFO_EXTENSION;
|
||||
|
||||
class ExtensionMimeTypeDetector implements MimeTypeDetector, ExtensionLookup
|
||||
{
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
|
||||
public function lookupExtension(string $mimetype): ?string
|
||||
{
|
||||
return $this->extensions instanceof ExtensionLookup
|
||||
? $this->extensions->lookupExtension($mimetype)
|
||||
: null;
|
||||
}
|
||||
|
||||
public function lookupAllExtensions(string $mimetype): array
|
||||
{
|
||||
return $this->extensions instanceof ExtensionLookup
|
||||
? $this->extensions->lookupAllExtensions($mimetype)
|
||||
: [];
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user