From 177e54f1f2989a9da8e09c12c9fde1a143117357 Mon Sep 17 00:00:00 2001 From: FreeScout Date: Thu, 16 Jan 2025 23:28:40 -0800 Subject: [PATCH] Add vendor files to dist --- vendor/composer/autoload_classmap.php | 110 +- vendor/composer/autoload_psr4.php | 29 +- vendor/composer/autoload_static.php | 220 +- vendor/composer/installed.php | 4 +- vendor/guzzlehttp/guzzle/src/HandlerStack.php | 277 -- .../src/Illuminate/Auth/Access/Gate.php | 560 ---- .../Broadcasting/BroadcastManager.php | 312 --- .../src/Illuminate/Bus/Dispatcher.php | 212 -- .../src/Illuminate/Console/Application.php | 283 -- .../Illuminate/Database/Eloquent/Builder.php | 1330 --------- .../Eloquent/Concerns/HasGlobalScopes.php | 71 - .../Concerns/QueriesRelationships.php | 310 -- .../Database/Eloquent/Relations/Relation.php | 385 --- .../src/Illuminate/Database/Query/Builder.php | 2485 ----------------- .../Illuminate/Database/Schema/Builder.php | 304 -- .../src/Illuminate/Http/RedirectResponse.php | 238 -- .../framework/src/Illuminate/Log/Writer.php | 377 --- .../framework/src/Illuminate/Mail/Mailer.php | 554 ---- .../Notifications/ChannelManager.php | 171 -- .../Notifications/NotificationSender.php | 181 -- .../Notifications/RoutesNotifications.php | 54 - .../Notifications/SendQueuedNotifications.php | 93 - .../src/Illuminate/Pipeline/Pipeline.php | 186 -- .../src/Illuminate/Validation/Factory.php | 283 -- .../Validation/ValidationRuleParser.php | 275 -- .../src/Illuminate/View/FileViewFinder.php | 298 -- vendor/league/flysystem/src/Filesystem.php | 409 --- .../flysystem/src/FilesystemInterface.php | 284 -- vendor/mews/purifier/src/Purifier.php | 275 -- .../src/Cron/CronExpression.php | 389 --- .../nesbot/carbon/src/Carbon/Translator.php | 143 - vendor/ramsey/uuid/src/UuidFactory.php | 315 --- .../lib/classes/Swift/Attachment.php | 54 - .../lib/classes/Swift/Encoder/QpEncoder.php | 300 -- .../lib/classes/Swift/KeyCache.php | 105 - .../classes/Swift/KeyCache/DiskKeyCache.php | 295 -- .../KeyCache/SimpleKeyCacheInputStream.php | 123 - .../swiftmailer/lib/classes/Swift/Message.php | 279 -- .../ContentEncoder/Base64ContentEncoder.php | 101 - .../Mime/ContentEncoder/QpContentEncoder.php | 134 - .../Swift/Mime/Headers/AbstractHeader.php | 476 ---- .../Mime/Headers/IdentificationHeader.php | 186 -- .../Swift/Mime/Headers/MailboxHeader.php | 360 --- .../Mime/Headers/ParameterizedHeader.php | 255 -- .../lib/classes/Swift/Mime/MimePart.php | 208 -- .../Swift/Mime/SimpleHeaderFactory.php | 195 -- .../classes/Swift/Mime/SimpleHeaderSet.php | 399 --- .../lib/classes/Swift/MimePart.php | 45 - .../lib/classes/Swift/SendmailTransport.php | 33 - .../lib/classes/Swift/SmtpTransport.php | 42 - .../lib/classes/Swift/SwiftException.php | 28 - .../Swift/Transport/AbstractSmtpTransport.php | 543 ---- .../Swift/Transport/Esmtp/AuthHandler.php | 268 -- .../Swift/Transport/EsmtpTransport.php | 446 --- vendor/symfony/console/Application.php | 1276 --------- vendor/symfony/console/Command/Command.php | 666 ----- .../console/Helper/HelperInterface.php | 39 - .../symfony/console/Helper/ProcessHelper.php | 145 - vendor/symfony/console/Input/ArrayInput.php | 208 -- vendor/symfony/console/Input/Input.php | 203 -- .../debug/Exception/FatalErrorException.php | 82 - .../http-foundation/StreamedResponse.php | 146 - .../Exception/AccessDeniedHttpException.php | 29 - .../MethodNotAllowedHttpException.php | 31 - .../Exception/NotFoundHttpException.php | 28 - .../ServiceUnavailableHttpException.php | 34 - .../Exception/UnauthorizedHttpException.php | 31 - .../Formatter/MessageFormatter.php | 48 - .../translation/Loader/ArrayLoader.php | 66 - vendor/symfony/translation/Translator.php | 450 --- vendor/webklex/php-imap/src/ClientManager.php | 276 -- .../webklex/php-imap/src/EncodingAliases.php | 482 ---- vendor/webklex/php-imap/src/Folder.php | 475 ---- .../webklex/php-imap/src/Query/WhereQuery.php | 546 ---- 74 files changed, 243 insertions(+), 21310 deletions(-) delete mode 100644 vendor/guzzlehttp/guzzle/src/HandlerStack.php delete mode 100644 vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php delete mode 100644 vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php delete mode 100644 vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php delete mode 100755 vendor/laravel/framework/src/Illuminate/Console/Application.php delete mode 100755 vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php delete mode 100644 vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasGlobalScopes.php delete mode 100644 vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php delete mode 100755 vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php delete mode 100755 vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php delete mode 100755 vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php delete mode 100755 vendor/laravel/framework/src/Illuminate/Http/RedirectResponse.php delete mode 100755 vendor/laravel/framework/src/Illuminate/Log/Writer.php delete mode 100755 vendor/laravel/framework/src/Illuminate/Mail/Mailer.php delete mode 100644 vendor/laravel/framework/src/Illuminate/Notifications/ChannelManager.php delete mode 100644 vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php delete mode 100644 vendor/laravel/framework/src/Illuminate/Notifications/RoutesNotifications.php delete mode 100644 vendor/laravel/framework/src/Illuminate/Notifications/SendQueuedNotifications.php delete mode 100644 vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php delete mode 100755 vendor/laravel/framework/src/Illuminate/Validation/Factory.php delete mode 100644 vendor/laravel/framework/src/Illuminate/Validation/ValidationRuleParser.php delete mode 100755 vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php delete mode 100644 vendor/league/flysystem/src/Filesystem.php delete mode 100644 vendor/league/flysystem/src/FilesystemInterface.php delete mode 100644 vendor/mews/purifier/src/Purifier.php delete mode 100644 vendor/mtdowling/cron-expression/src/Cron/CronExpression.php delete mode 100644 vendor/nesbot/carbon/src/Carbon/Translator.php delete mode 100644 vendor/ramsey/uuid/src/UuidFactory.php delete mode 100644 vendor/swiftmailer/swiftmailer/lib/classes/Swift/Attachment.php delete mode 100644 vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php delete mode 100644 vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache.php delete mode 100644 vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php delete mode 100644 vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/SimpleKeyCacheInputStream.php delete mode 100644 vendor/swiftmailer/swiftmailer/lib/classes/Swift/Message.php delete mode 100644 vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/Base64ContentEncoder.php delete mode 100644 vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php delete mode 100644 vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/AbstractHeader.php delete mode 100644 vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php delete mode 100644 vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php delete mode 100644 vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php delete mode 100644 vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimePart.php delete mode 100644 vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php delete mode 100644 vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php delete mode 100644 vendor/swiftmailer/swiftmailer/lib/classes/Swift/MimePart.php delete mode 100644 vendor/swiftmailer/swiftmailer/lib/classes/Swift/SendmailTransport.php delete mode 100644 vendor/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php delete mode 100644 vendor/swiftmailer/swiftmailer/lib/classes/Swift/SwiftException.php delete mode 100644 vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php delete mode 100644 vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php delete mode 100644 vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php delete mode 100644 vendor/symfony/console/Application.php delete mode 100644 vendor/symfony/console/Command/Command.php delete mode 100644 vendor/symfony/console/Helper/HelperInterface.php delete mode 100644 vendor/symfony/console/Helper/ProcessHelper.php delete mode 100644 vendor/symfony/console/Input/ArrayInput.php delete mode 100644 vendor/symfony/console/Input/Input.php delete mode 100644 vendor/symfony/debug/Exception/FatalErrorException.php delete mode 100644 vendor/symfony/http-foundation/StreamedResponse.php delete mode 100644 vendor/symfony/http-kernel/Exception/AccessDeniedHttpException.php delete mode 100644 vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php delete mode 100644 vendor/symfony/http-kernel/Exception/NotFoundHttpException.php delete mode 100644 vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php delete mode 100644 vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php delete mode 100644 vendor/symfony/translation/Formatter/MessageFormatter.php delete mode 100644 vendor/symfony/translation/Loader/ArrayLoader.php delete mode 100644 vendor/symfony/translation/Translator.php delete mode 100644 vendor/webklex/php-imap/src/ClientManager.php delete mode 100644 vendor/webklex/php-imap/src/EncodingAliases.php delete mode 100755 vendor/webklex/php-imap/src/Folder.php delete mode 100755 vendor/webklex/php-imap/src/Query/WhereQuery.php diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index e8c9bf568..b82ff70ef 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -184,7 +184,7 @@ 'Carbon\\CarbonPeriod' => $vendorDir . '/nesbot/carbon/src/Carbon/CarbonPeriod.php', 'Carbon\\Exceptions\\InvalidDateException' => $vendorDir . '/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php', 'Carbon\\Laravel\\ServiceProvider' => $vendorDir . '/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php', - 'Carbon\\Translator' => $vendorDir . '/nesbot/carbon/src/Carbon/Translator.php', + 'Carbon\\Translator' => $baseDir . '/overrides/nesbot/carbon/src/Carbon/Translator.php', 'Chumper\\Zipper\\Facades\\Zipper' => $vendorDir . '/chumper/zipper/src/Chumper/Zipper/Facades/Zipper.php', 'Chumper\\Zipper\\Repositories\\RepositoryInterface' => $vendorDir . '/chumper/zipper/src/Chumper/Zipper/Repositories/RepositoryInterface.php', 'Chumper\\Zipper\\Repositories\\ZipRepository' => $baseDir . '/overrides/chumper/zipper/src/Chumper/Zipper/Repositories/ZipRepository.php', @@ -207,7 +207,7 @@ 'Codedge\\Updater\\UpdaterServiceProvider' => $vendorDir . '/codedge/laravel-selfupdater/src/UpdaterServiceProvider.php', 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 'Cron\\AbstractField' => $vendorDir . '/mtdowling/cron-expression/src/Cron/AbstractField.php', - 'Cron\\CronExpression' => $vendorDir . '/mtdowling/cron-expression/src/Cron/CronExpression.php', + 'Cron\\CronExpression' => $baseDir . '/overrides/mtdowling/cron-expression/src/Cron/CronExpression.php', 'Cron\\DayOfMonthField' => $vendorDir . '/mtdowling/cron-expression/src/Cron/DayOfMonthField.php', 'Cron\\DayOfWeekField' => $vendorDir . '/mtdowling/cron-expression/src/Cron/DayOfWeekField.php', 'Cron\\FieldFactory' => $vendorDir . '/mtdowling/cron-expression/src/Cron/FieldFactory.php', @@ -724,7 +724,7 @@ 'GuzzleHttp\\Exception\\ServerException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/ServerException.php', 'GuzzleHttp\\Exception\\TooManyRedirectsException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php', 'GuzzleHttp\\Exception\\TransferException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/TransferException.php', - 'GuzzleHttp\\HandlerStack' => $vendorDir . '/guzzlehttp/guzzle/src/HandlerStack.php', + 'GuzzleHttp\\HandlerStack' => $baseDir . '/overrides/guzzlehttp/guzzle/src/HandlerStack.php', 'GuzzleHttp\\Handler\\CurlFactory' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlFactory.php', 'GuzzleHttp\\Handler\\CurlFactoryInterface' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php', 'GuzzleHttp\\Handler\\CurlHandler' => $vendorDir . '/guzzlehttp/guzzle/src/Handler/CurlHandler.php', @@ -1020,7 +1020,7 @@ 'HTMLPurifier_Zipper' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier/Zipper.php', 'Html2Text\\Html2Text' => $vendorDir . '/html2text/html2text/src/Html2Text.php', 'Illuminate\\Auth\\Access\\AuthorizationException' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Access/AuthorizationException.php', - 'Illuminate\\Auth\\Access\\Gate' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Access/Gate.php', + 'Illuminate\\Auth\\Access\\Gate' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Auth/Access/Gate.php', 'Illuminate\\Auth\\Access\\HandlesAuthorization' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Access/HandlesAuthorization.php', 'Illuminate\\Auth\\Access\\Response' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Access/Response.php', 'Illuminate\\Auth\\AuthManager' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/AuthManager.php', @@ -1060,7 +1060,7 @@ 'Illuminate\\Broadcasting\\BroadcastController' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastController.php', 'Illuminate\\Broadcasting\\BroadcastEvent' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastEvent.php', 'Illuminate\\Broadcasting\\BroadcastException' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastException.php', - 'Illuminate\\Broadcasting\\BroadcastManager' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php', + 'Illuminate\\Broadcasting\\BroadcastManager' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php', 'Illuminate\\Broadcasting\\BroadcastServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastServiceProvider.php', 'Illuminate\\Broadcasting\\Broadcasters\\Broadcaster' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php', 'Illuminate\\Broadcasting\\Broadcasters\\LogBroadcaster' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/LogBroadcaster.php', @@ -1073,7 +1073,7 @@ 'Illuminate\\Broadcasting\\PresenceChannel' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/PresenceChannel.php', 'Illuminate\\Broadcasting\\PrivateChannel' => $vendorDir . '/laravel/framework/src/Illuminate/Broadcasting/PrivateChannel.php', 'Illuminate\\Bus\\BusServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Bus/BusServiceProvider.php', - 'Illuminate\\Bus\\Dispatcher' => $vendorDir . '/laravel/framework/src/Illuminate/Bus/Dispatcher.php', + 'Illuminate\\Bus\\Dispatcher' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Bus/Dispatcher.php', 'Illuminate\\Bus\\Queueable' => $vendorDir . '/laravel/framework/src/Illuminate/Bus/Queueable.php', 'Illuminate\\Cache\\ApcStore' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/ApcStore.php', 'Illuminate\\Cache\\ApcWrapper' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/ApcWrapper.php', @@ -1105,7 +1105,7 @@ 'Illuminate\\Cache\\TaggableStore' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/TaggableStore.php', 'Illuminate\\Cache\\TaggedCache' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/TaggedCache.php', 'Illuminate\\Config\\Repository' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Config/Repository.php', - 'Illuminate\\Console\\Application' => $vendorDir . '/laravel/framework/src/Illuminate/Console/Application.php', + 'Illuminate\\Console\\Application' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Console/Application.php', 'Illuminate\\Console\\Command' => $vendorDir . '/laravel/framework/src/Illuminate/Console/Command.php', 'Illuminate\\Console\\ConfirmableTrait' => $vendorDir . '/laravel/framework/src/Illuminate/Console/ConfirmableTrait.php', 'Illuminate\\Console\\DetectsApplicationNamespace' => $vendorDir . '/laravel/framework/src/Illuminate/Console/DetectsApplicationNamespace.php', @@ -1251,16 +1251,16 @@ 'Illuminate\\Database\\DatabaseServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php', 'Illuminate\\Database\\DetectsDeadlocks' => $vendorDir . '/laravel/framework/src/Illuminate/Database/DetectsDeadlocks.php', 'Illuminate\\Database\\DetectsLostConnections' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php', - 'Illuminate\\Database\\Eloquent\\Builder' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php', + 'Illuminate\\Database\\Eloquent\\Builder' => $baseDir . '/overrides/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' => $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', + 'Illuminate\\Database\\Eloquent\\Concerns\\HasGlobalScopes' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasGlobalScopes.php', 'Illuminate\\Database\\Eloquent\\Concerns\\HasRelationships' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php', 'Illuminate\\Database\\Eloquent\\Concerns\\HasTimestamps' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php', 'Illuminate\\Database\\Eloquent\\Concerns\\HidesAttributes' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HidesAttributes.php', - 'Illuminate\\Database\\Eloquent\\Concerns\\QueriesRelationships' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php', + 'Illuminate\\Database\\Eloquent\\Concerns\\QueriesRelationships' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php', 'Illuminate\\Database\\Eloquent\\Factory' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php', 'Illuminate\\Database\\Eloquent\\FactoryBuilder' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php', 'Illuminate\\Database\\Eloquent\\JsonEncodingException' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/JsonEncodingException.php', @@ -1284,7 +1284,7 @@ 'Illuminate\\Database\\Eloquent\\Relations\\MorphTo' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php', 'Illuminate\\Database\\Eloquent\\Relations\\MorphToMany' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php', 'Illuminate\\Database\\Eloquent\\Relations\\Pivot' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Pivot.php', - 'Illuminate\\Database\\Eloquent\\Relations\\Relation' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php', + 'Illuminate\\Database\\Eloquent\\Relations\\Relation' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php', 'Illuminate\\Database\\Eloquent\\Scope' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Scope.php', 'Illuminate\\Database\\Eloquent\\SoftDeletes' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletes.php', 'Illuminate\\Database\\Eloquent\\SoftDeletingScope' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletingScope.php', @@ -1304,7 +1304,7 @@ 'Illuminate\\Database\\MySqlConnection' => $vendorDir . '/laravel/framework/src/Illuminate/Database/MySqlConnection.php', 'Illuminate\\Database\\PostgresConnection' => $vendorDir . '/laravel/framework/src/Illuminate/Database/PostgresConnection.php', 'Illuminate\\Database\\QueryException' => $vendorDir . '/laravel/framework/src/Illuminate/Database/QueryException.php', - 'Illuminate\\Database\\Query\\Builder' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Builder.php', + 'Illuminate\\Database\\Query\\Builder' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Database/Query/Builder.php', 'Illuminate\\Database\\Query\\Expression' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Expression.php', 'Illuminate\\Database\\Query\\Grammars\\Grammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php', 'Illuminate\\Database\\Query\\Grammars\\MySqlGrammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php', @@ -1320,7 +1320,7 @@ 'Illuminate\\Database\\Query\\Processors\\SqlServerProcessor' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Query/Processors/SqlServerProcessor.php', 'Illuminate\\Database\\SQLiteConnection' => $vendorDir . '/laravel/framework/src/Illuminate/Database/SQLiteConnection.php', 'Illuminate\\Database\\Schema\\Blueprint' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php', - 'Illuminate\\Database\\Schema\\Builder' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Schema/Builder.php', + 'Illuminate\\Database\\Schema\\Builder' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Database/Schema/Builder.php', 'Illuminate\\Database\\Schema\\Grammars\\ChangeColumn' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Schema/Grammars/ChangeColumn.php', 'Illuminate\\Database\\Schema\\Grammars\\Grammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php', 'Illuminate\\Database\\Schema\\Grammars\\MySqlGrammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php', @@ -1467,7 +1467,7 @@ 'Illuminate\\Http\\JsonResponse' => $vendorDir . '/laravel/framework/src/Illuminate/Http/JsonResponse.php', 'Illuminate\\Http\\Middleware\\CheckResponseForModifications' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Middleware/CheckResponseForModifications.php', 'Illuminate\\Http\\Middleware\\FrameGuard' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Middleware/FrameGuard.php', - 'Illuminate\\Http\\RedirectResponse' => $vendorDir . '/laravel/framework/src/Illuminate/Http/RedirectResponse.php', + 'Illuminate\\Http\\RedirectResponse' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Http/RedirectResponse.php', 'Illuminate\\Http\\Request' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Http/Request.php', 'Illuminate\\Http\\Resources\\CollectsResources' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Resources/CollectsResources.php', 'Illuminate\\Http\\Resources\\ConditionallyLoadsAttributes' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Resources/ConditionallyLoadsAttributes.php', @@ -1488,12 +1488,12 @@ 'Illuminate\\Http\\UploadedFile' => $vendorDir . '/laravel/framework/src/Illuminate/Http/UploadedFile.php', 'Illuminate\\Log\\Events\\MessageLogged' => $vendorDir . '/laravel/framework/src/Illuminate/Log/Events/MessageLogged.php', 'Illuminate\\Log\\LogServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Log/LogServiceProvider.php', - 'Illuminate\\Log\\Writer' => $vendorDir . '/laravel/framework/src/Illuminate/Log/Writer.php', + 'Illuminate\\Log\\Writer' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Log/Writer.php', 'Illuminate\\Mail\\Events\\MessageSending' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Events/MessageSending.php', 'Illuminate\\Mail\\Events\\MessageSent' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Events/MessageSent.php', 'Illuminate\\Mail\\MailServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php', 'Illuminate\\Mail\\Mailable' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Mailable.php', - 'Illuminate\\Mail\\Mailer' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Mailer.php', + 'Illuminate\\Mail\\Mailer' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Mail/Mailer.php', 'Illuminate\\Mail\\Markdown' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Markdown.php', 'Illuminate\\Mail\\Message' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Message.php', 'Illuminate\\Mail\\PendingMail' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/PendingMail.php', @@ -1508,7 +1508,7 @@ 'Illuminate\\Mail\\Transport\\Transport' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Transport/Transport.php', 'Illuminate\\Notifications\\Action' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Action.php', 'Illuminate\\Notifications\\AnonymousNotifiable' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/AnonymousNotifiable.php', - 'Illuminate\\Notifications\\ChannelManager' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/ChannelManager.php', + 'Illuminate\\Notifications\\ChannelManager' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Notifications/ChannelManager.php', 'Illuminate\\Notifications\\Channels\\BroadcastChannel' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Channels/BroadcastChannel.php', 'Illuminate\\Notifications\\Channels\\DatabaseChannel' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Channels/DatabaseChannel.php', 'Illuminate\\Notifications\\Channels\\MailChannel' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Channels/MailChannel.php', @@ -1532,17 +1532,17 @@ 'Illuminate\\Notifications\\Messages\\SlackMessage' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Messages/SlackMessage.php', 'Illuminate\\Notifications\\Notifiable' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Notifiable.php', 'Illuminate\\Notifications\\Notification' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/Notification.php', - 'Illuminate\\Notifications\\NotificationSender' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/NotificationSender.php', + 'Illuminate\\Notifications\\NotificationSender' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Notifications/NotificationSender.php', 'Illuminate\\Notifications\\NotificationServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/NotificationServiceProvider.php', - 'Illuminate\\Notifications\\RoutesNotifications' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/RoutesNotifications.php', - 'Illuminate\\Notifications\\SendQueuedNotifications' => $vendorDir . '/laravel/framework/src/Illuminate/Notifications/SendQueuedNotifications.php', + 'Illuminate\\Notifications\\RoutesNotifications' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Notifications/RoutesNotifications.php', + 'Illuminate\\Notifications\\SendQueuedNotifications' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Notifications/SendQueuedNotifications.php', 'Illuminate\\Pagination\\AbstractPaginator' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Pagination/AbstractPaginator.php', 'Illuminate\\Pagination\\LengthAwarePaginator' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Pagination/LengthAwarePaginator.php', 'Illuminate\\Pagination\\PaginationServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php', 'Illuminate\\Pagination\\Paginator' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Pagination/Paginator.php', 'Illuminate\\Pagination\\UrlWindow' => $vendorDir . '/laravel/framework/src/Illuminate/Pagination/UrlWindow.php', 'Illuminate\\Pipeline\\Hub' => $vendorDir . '/laravel/framework/src/Illuminate/Pipeline/Hub.php', - 'Illuminate\\Pipeline\\Pipeline' => $vendorDir . '/laravel/framework/src/Illuminate/Pipeline/Pipeline.php', + 'Illuminate\\Pipeline\\Pipeline' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Pipeline/Pipeline.php', 'Illuminate\\Pipeline\\PipelineServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Pipeline/PipelineServiceProvider.php', 'Illuminate\\Queue\\BeanstalkdQueue' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/BeanstalkdQueue.php', 'Illuminate\\Queue\\CallQueuedHandler' => $vendorDir . '/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php', @@ -1740,7 +1740,7 @@ 'Illuminate\\Validation\\Concerns\\ReplacesAttributes' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Concerns/ReplacesAttributes.php', 'Illuminate\\Validation\\Concerns\\ValidatesAttributes' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Validation/Concerns/ValidatesAttributes.php', 'Illuminate\\Validation\\DatabasePresenceVerifier' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/DatabasePresenceVerifier.php', - 'Illuminate\\Validation\\Factory' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Factory.php', + 'Illuminate\\Validation\\Factory' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Validation/Factory.php', 'Illuminate\\Validation\\PresenceVerifierInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/PresenceVerifierInterface.php', 'Illuminate\\Validation\\Rule' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Rule.php', 'Illuminate\\Validation\\Rules\\DatabaseRule' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/Rules/DatabaseRule.php', @@ -1753,7 +1753,7 @@ 'Illuminate\\Validation\\ValidatesWhenResolvedTrait' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/ValidatesWhenResolvedTrait.php', 'Illuminate\\Validation\\ValidationData' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/ValidationData.php', 'Illuminate\\Validation\\ValidationException' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/ValidationException.php', - 'Illuminate\\Validation\\ValidationRuleParser' => $vendorDir . '/laravel/framework/src/Illuminate/Validation/ValidationRuleParser.php', + 'Illuminate\\Validation\\ValidationRuleParser' => $baseDir . '/overrides/laravel/framework/src/Illuminate/Validation/ValidationRuleParser.php', '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', @@ -1784,7 +1784,7 @@ 'Illuminate\\View\\Engines\\FileEngine' => $vendorDir . '/laravel/framework/src/Illuminate/View/Engines/FileEngine.php', 'Illuminate\\View\\Engines\\PhpEngine' => $vendorDir . '/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php', 'Illuminate\\View\\Factory' => $vendorDir . '/laravel/framework/src/Illuminate/View/Factory.php', - 'Illuminate\\View\\FileViewFinder' => $vendorDir . '/laravel/framework/src/Illuminate/View/FileViewFinder.php', + 'Illuminate\\View\\FileViewFinder' => $baseDir . '/overrides/laravel/framework/src/Illuminate/View/FileViewFinder.php', 'Illuminate\\View\\Middleware\\ShareErrorsFromSession' => $vendorDir . '/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php', 'Illuminate\\View\\View' => $baseDir . '/overrides/laravel/framework/src/Illuminate/View/View.php', 'Illuminate\\View\\ViewFinderInterface' => $vendorDir . '/laravel/framework/src/Illuminate/View/ViewFinderInterface.php', @@ -1826,9 +1826,9 @@ '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\\Filesystem' => $baseDir . '/overrides/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\\FilesystemInterface' => $baseDir . '/overrides/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', @@ -1871,7 +1871,7 @@ 'Lord\\Laroute\\Routes\\Exceptions\\ZeroRoutesException' => $vendorDir . '/lord/laroute/src/Routes/Exceptions/ZeroRoutesException.php', 'MailboxesTableSeeder' => $baseDir . '/database/seeds/MailboxesTableSeeder.php', 'Mews\\Purifier\\Facades\\Purifier' => $vendorDir . '/mews/purifier/src/Facades/Purifier.php', - 'Mews\\Purifier\\Purifier' => $vendorDir . '/mews/purifier/src/Purifier.php', + 'Mews\\Purifier\\Purifier' => $baseDir . '/overrides/mews/purifier/src/Purifier.php', 'Mews\\Purifier\\PurifierServiceProvider' => $vendorDir . '/mews/purifier/src/PurifierServiceProvider.php', 'Monolog\\ErrorHandler' => $vendorDir . '/monolog/monolog/src/Monolog/ErrorHandler.php', 'Monolog\\Formatter\\ChromePHPFormatter' => $vendorDir . '/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php', @@ -2537,7 +2537,7 @@ 'Ramsey\\Uuid\\Provider\\Time\\FixedTimeProvider' => $vendorDir . '/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php', 'Ramsey\\Uuid\\Provider\\Time\\SystemTimeProvider' => $vendorDir . '/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php', 'Ramsey\\Uuid\\Uuid' => $baseDir . '/overrides/ramsey/uuid/src/Uuid.php', - 'Ramsey\\Uuid\\UuidFactory' => $vendorDir . '/ramsey/uuid/src/UuidFactory.php', + 'Ramsey\\Uuid\\UuidFactory' => $baseDir . '/overrides/ramsey/uuid/src/UuidFactory.php', 'Ramsey\\Uuid\\UuidFactoryInterface' => $vendorDir . '/ramsey/uuid/src/UuidFactoryInterface.php', 'Ramsey\\Uuid\\UuidInterface' => $vendorDir . '/ramsey/uuid/src/UuidInterface.php', 'Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewer' => $baseDir . '/overrides/rap2hpoutre/laravel-log-viewer/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php', @@ -2564,25 +2564,37 @@ 'Spatie\\String\\Str' => $baseDir . '/overrides/spatie/string/src/Str.php', 'Swift_Attachment' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Attachment.php', 'Swift_EmbeddedFile' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/EmbeddedFile.php', + 'Swift_Encoder_QpEncoder' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php', + 'Swift_KeyCache' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache.php', + 'Swift_KeyCache_DiskKeyCache' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php', + 'Swift_KeyCache_SimpleKeyCacheInputStream' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/SimpleKeyCacheInputStream.php', 'Swift_MailTransport' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/MailTransport.php', 'Swift_Message' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Message.php', 'Swift_MimePart' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/MimePart.php', 'Swift_Mime_ContentEncoder_Base64ContentEncoder' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/Base64ContentEncoder.php', + 'Swift_Mime_ContentEncoder_QpContentEncoder' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php', + 'Swift_Mime_Headers_AbstractHeader' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/AbstractHeader.php', + 'Swift_Mime_Headers_IdentificationHeader' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php', + 'Swift_Mime_Headers_MailboxHeader' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php', + 'Swift_Mime_Headers_ParameterizedHeader' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php', 'Swift_Mime_MimePart' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimePart.php', + 'Swift_Mime_SimpleHeaderFactory' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php', + 'Swift_Mime_SimpleHeaderSet' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php', 'Swift_SendmailTransport' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/SendmailTransport.php', 'Swift_SmtpTransport' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php', 'Swift_SwiftException' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/SwiftException.php', + 'Swift_Transport_AbstractSmtpTransport' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php', 'Swift_Transport_EsmtpTransport' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php', 'Swift_Transport_Esmtp_AuthHandler' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php', 'Swift_Transport_MailInvoker' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/MailInvoker.php', 'Swift_Transport_MailTransport' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/MailTransport.php', 'Swift_Transport_SimpleMailInvoker' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SimpleMailInvoker.php', 'Swift_Transport_StreamBuffer' => $baseDir . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php', - 'Symfony\\Component\\Console\\Application' => $vendorDir . '/symfony/console/Application.php', + 'Symfony\\Component\\Console\\Application' => $baseDir . '/overrides/symfony/console/Application.php', 'Symfony\\Component\\Console\\CommandLoader\\CommandLoaderInterface' => $vendorDir . '/symfony/console/CommandLoader/CommandLoaderInterface.php', 'Symfony\\Component\\Console\\CommandLoader\\ContainerCommandLoader' => $vendorDir . '/symfony/console/CommandLoader/ContainerCommandLoader.php', 'Symfony\\Component\\Console\\CommandLoader\\FactoryCommandLoader' => $vendorDir . '/symfony/console/CommandLoader/FactoryCommandLoader.php', - 'Symfony\\Component\\Console\\Command\\Command' => $vendorDir . '/symfony/console/Command/Command.php', + 'Symfony\\Component\\Console\\Command\\Command' => $baseDir . '/overrides/symfony/console/Command/Command.php', 'Symfony\\Component\\Console\\Command\\HelpCommand' => $vendorDir . '/symfony/console/Command/HelpCommand.php', 'Symfony\\Component\\Console\\Command\\ListCommand' => $vendorDir . '/symfony/console/Command/ListCommand.php', 'Symfony\\Component\\Console\\Command\\LockableTrait' => $vendorDir . '/symfony/console/Command/LockableTrait.php', @@ -2616,10 +2628,10 @@ 'Symfony\\Component\\Console\\Helper\\DescriptorHelper' => $vendorDir . '/symfony/console/Helper/DescriptorHelper.php', 'Symfony\\Component\\Console\\Helper\\FormatterHelper' => $vendorDir . '/symfony/console/Helper/FormatterHelper.php', 'Symfony\\Component\\Console\\Helper\\Helper' => $baseDir . '/overrides/symfony/console/Helper/Helper.php', - 'Symfony\\Component\\Console\\Helper\\HelperInterface' => $vendorDir . '/symfony/console/Helper/HelperInterface.php', + 'Symfony\\Component\\Console\\Helper\\HelperInterface' => $baseDir . '/overrides/symfony/console/Helper/HelperInterface.php', 'Symfony\\Component\\Console\\Helper\\HelperSet' => $baseDir . '/overrides/symfony/console/Helper/HelperSet.php', 'Symfony\\Component\\Console\\Helper\\InputAwareHelper' => $vendorDir . '/symfony/console/Helper/InputAwareHelper.php', - 'Symfony\\Component\\Console\\Helper\\ProcessHelper' => $vendorDir . '/symfony/console/Helper/ProcessHelper.php', + 'Symfony\\Component\\Console\\Helper\\ProcessHelper' => $baseDir . '/overrides/symfony/console/Helper/ProcessHelper.php', 'Symfony\\Component\\Console\\Helper\\ProgressBar' => $vendorDir . '/symfony/console/Helper/ProgressBar.php', 'Symfony\\Component\\Console\\Helper\\ProgressIndicator' => $vendorDir . '/symfony/console/Helper/ProgressIndicator.php', 'Symfony\\Component\\Console\\Helper\\QuestionHelper' => $vendorDir . '/symfony/console/Helper/QuestionHelper.php', @@ -2629,8 +2641,8 @@ 'Symfony\\Component\\Console\\Helper\\TableSeparator' => $vendorDir . '/symfony/console/Helper/TableSeparator.php', 'Symfony\\Component\\Console\\Helper\\TableStyle' => $vendorDir . '/symfony/console/Helper/TableStyle.php', 'Symfony\\Component\\Console\\Input\\ArgvInput' => $vendorDir . '/symfony/console/Input/ArgvInput.php', - 'Symfony\\Component\\Console\\Input\\ArrayInput' => $vendorDir . '/symfony/console/Input/ArrayInput.php', - 'Symfony\\Component\\Console\\Input\\Input' => $vendorDir . '/symfony/console/Input/Input.php', + 'Symfony\\Component\\Console\\Input\\ArrayInput' => $baseDir . '/overrides/symfony/console/Input/ArrayInput.php', + 'Symfony\\Component\\Console\\Input\\Input' => $baseDir . '/overrides/symfony/console/Input/Input.php', 'Symfony\\Component\\Console\\Input\\InputArgument' => $vendorDir . '/symfony/console/Input/InputArgument.php', 'Symfony\\Component\\Console\\Input\\InputAwareInterface' => $vendorDir . '/symfony/console/Input/InputAwareInterface.php', 'Symfony\\Component\\Console\\Input\\InputDefinition' => $vendorDir . '/symfony/console/Input/InputDefinition.php', @@ -2710,7 +2722,7 @@ 'Symfony\\Component\\Debug\\ExceptionHandler' => $baseDir . '/overrides/symfony/debug/ExceptionHandler.php', 'Symfony\\Component\\Debug\\Exception\\ClassNotFoundException' => $vendorDir . '/symfony/debug/Exception/ClassNotFoundException.php', 'Symfony\\Component\\Debug\\Exception\\ContextErrorException' => $vendorDir . '/symfony/debug/Exception/ContextErrorException.php', - 'Symfony\\Component\\Debug\\Exception\\FatalErrorException' => $vendorDir . '/symfony/debug/Exception/FatalErrorException.php', + 'Symfony\\Component\\Debug\\Exception\\FatalErrorException' => $baseDir . '/overrides/symfony/debug/Exception/FatalErrorException.php', 'Symfony\\Component\\Debug\\Exception\\FatalThrowableError' => $vendorDir . '/symfony/debug/Exception/FatalThrowableError.php', 'Symfony\\Component\\Debug\\Exception\\FlattenException' => $vendorDir . '/symfony/debug/Exception/FlattenException.php', 'Symfony\\Component\\Debug\\Exception\\OutOfMemoryException' => $vendorDir . '/symfony/debug/Exception/OutOfMemoryException.php', @@ -2819,7 +2831,7 @@ 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\NativeProxy' => $vendorDir . '/symfony/http-foundation/Session/Storage/Proxy/NativeProxy.php', 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\SessionHandlerProxy' => $vendorDir . '/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php', 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageInterface' => $vendorDir . '/symfony/http-foundation/Session/Storage/SessionStorageInterface.php', - 'Symfony\\Component\\HttpFoundation\\StreamedResponse' => $vendorDir . '/symfony/http-foundation/StreamedResponse.php', + 'Symfony\\Component\\HttpFoundation\\StreamedResponse' => $baseDir . '/overrides/symfony/http-foundation/StreamedResponse.php', 'Symfony\\Component\\HttpKernel\\Bundle\\Bundle' => $vendorDir . '/symfony/http-kernel/Bundle/Bundle.php', 'Symfony\\Component\\HttpKernel\\Bundle\\BundleInterface' => $vendorDir . '/symfony/http-kernel/Bundle/BundleInterface.php', 'Symfony\\Component\\HttpKernel\\CacheClearer\\CacheClearerInterface' => $vendorDir . '/symfony/http-kernel/CacheClearer/CacheClearerInterface.php', @@ -2906,21 +2918,21 @@ 'Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent' => $vendorDir . '/symfony/http-kernel/Event/GetResponseForExceptionEvent.php', 'Symfony\\Component\\HttpKernel\\Event\\KernelEvent' => $vendorDir . '/symfony/http-kernel/Event/KernelEvent.php', 'Symfony\\Component\\HttpKernel\\Event\\PostResponseEvent' => $vendorDir . '/symfony/http-kernel/Event/PostResponseEvent.php', - 'Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException' => $vendorDir . '/symfony/http-kernel/Exception/AccessDeniedHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException' => $baseDir . '/overrides/symfony/http-kernel/Exception/AccessDeniedHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\BadRequestHttpException' => $vendorDir . '/symfony/http-kernel/Exception/BadRequestHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\ConflictHttpException' => $vendorDir . '/symfony/http-kernel/Exception/ConflictHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\GoneHttpException' => $vendorDir . '/symfony/http-kernel/Exception/GoneHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\HttpException' => $baseDir . '/overrides/symfony/http-kernel/Exception/HttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\HttpExceptionInterface' => $vendorDir . '/symfony/http-kernel/Exception/HttpExceptionInterface.php', 'Symfony\\Component\\HttpKernel\\Exception\\LengthRequiredHttpException' => $vendorDir . '/symfony/http-kernel/Exception/LengthRequiredHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\MethodNotAllowedHttpException' => $vendorDir . '/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\MethodNotAllowedHttpException' => $baseDir . '/overrides/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\NotAcceptableHttpException' => $vendorDir . '/symfony/http-kernel/Exception/NotAcceptableHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException' => $vendorDir . '/symfony/http-kernel/Exception/NotFoundHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException' => $baseDir . '/overrides/symfony/http-kernel/Exception/NotFoundHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\PreconditionFailedHttpException' => $vendorDir . '/symfony/http-kernel/Exception/PreconditionFailedHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\PreconditionRequiredHttpException' => $vendorDir . '/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\ServiceUnavailableHttpException' => $vendorDir . '/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\ServiceUnavailableHttpException' => $baseDir . '/overrides/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\TooManyRequestsHttpException' => $vendorDir . '/symfony/http-kernel/Exception/TooManyRequestsHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\UnauthorizedHttpException' => $vendorDir . '/symfony/http-kernel/Exception/UnauthorizedHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\UnauthorizedHttpException' => $baseDir . '/overrides/symfony/http-kernel/Exception/UnauthorizedHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\UnprocessableEntityHttpException' => $vendorDir . '/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\UnsupportedMediaTypeHttpException' => $vendorDir . '/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php', 'Symfony\\Component\\HttpKernel\\Fragment\\AbstractSurrogateFragmentRenderer' => $vendorDir . '/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php', @@ -3060,11 +3072,11 @@ 'Symfony\\Component\\Translation\\Extractor\\PhpExtractor' => $vendorDir . '/symfony/translation/Extractor/PhpExtractor.php', 'Symfony\\Component\\Translation\\Extractor\\PhpStringTokenParser' => $vendorDir . '/symfony/translation/Extractor/PhpStringTokenParser.php', 'Symfony\\Component\\Translation\\Formatter\\ChoiceMessageFormatterInterface' => $vendorDir . '/symfony/translation/Formatter/ChoiceMessageFormatterInterface.php', - 'Symfony\\Component\\Translation\\Formatter\\MessageFormatter' => $vendorDir . '/symfony/translation/Formatter/MessageFormatter.php', + 'Symfony\\Component\\Translation\\Formatter\\MessageFormatter' => $baseDir . '/overrides/symfony/translation/Formatter/MessageFormatter.php', 'Symfony\\Component\\Translation\\Formatter\\MessageFormatterInterface' => $vendorDir . '/symfony/translation/Formatter/MessageFormatterInterface.php', 'Symfony\\Component\\Translation\\IdentityTranslator' => $vendorDir . '/symfony/translation/IdentityTranslator.php', 'Symfony\\Component\\Translation\\Interval' => $vendorDir . '/symfony/translation/Interval.php', - 'Symfony\\Component\\Translation\\Loader\\ArrayLoader' => $vendorDir . '/symfony/translation/Loader/ArrayLoader.php', + 'Symfony\\Component\\Translation\\Loader\\ArrayLoader' => $baseDir . '/overrides/symfony/translation/Loader/ArrayLoader.php', 'Symfony\\Component\\Translation\\Loader\\CsvFileLoader' => $vendorDir . '/symfony/translation/Loader/CsvFileLoader.php', 'Symfony\\Component\\Translation\\Loader\\FileLoader' => $vendorDir . '/symfony/translation/Loader/FileLoader.php', 'Symfony\\Component\\Translation\\Loader\\IcuDatFileLoader' => $vendorDir . '/symfony/translation/Loader/IcuDatFileLoader.php', @@ -3086,7 +3098,7 @@ 'Symfony\\Component\\Translation\\PluralizationRules' => $vendorDir . '/symfony/translation/PluralizationRules.php', 'Symfony\\Component\\Translation\\Reader\\TranslationReader' => $vendorDir . '/symfony/translation/Reader/TranslationReader.php', 'Symfony\\Component\\Translation\\Reader\\TranslationReaderInterface' => $vendorDir . '/symfony/translation/Reader/TranslationReaderInterface.php', - 'Symfony\\Component\\Translation\\Translator' => $vendorDir . '/symfony/translation/Translator.php', + 'Symfony\\Component\\Translation\\Translator' => $baseDir . '/overrides/symfony/translation/Translator.php', 'Symfony\\Component\\Translation\\TranslatorBagInterface' => $vendorDir . '/symfony/translation/TranslatorBagInterface.php', 'Symfony\\Component\\Translation\\TranslatorInterface' => $vendorDir . '/symfony/translation/TranslatorInterface.php', 'Symfony\\Component\\Translation\\Util\\ArrayConverter' => $vendorDir . '/symfony/translation/Util/ArrayConverter.php', @@ -3177,12 +3189,13 @@ 'Webklex\\PHPIMAP\\Attachment' => $baseDir . '/overrides/webklex/php-imap/src/Attachment.php', 'Webklex\\PHPIMAP\\Attribute' => $vendorDir . '/webklex/php-imap/src/Attribute.php', 'Webklex\\PHPIMAP\\Client' => $baseDir . '/overrides/webklex/php-imap/src/Client.php', - 'Webklex\\PHPIMAP\\ClientManager' => $vendorDir . '/webklex/php-imap/src/ClientManager.php', + 'Webklex\\PHPIMAP\\ClientManager' => $baseDir . '/overrides/webklex/php-imap/src/ClientManager.php', 'Webklex\\PHPIMAP\\Connection\\Protocols\\ImapProtocol' => $baseDir . '/overrides/webklex/php-imap/src/Connection/Protocols/ImapProtocol.php', 'Webklex\\PHPIMAP\\Connection\\Protocols\\LegacyProtocol' => $baseDir . '/overrides/webklex/php-imap/src/Connection/Protocols/LegacyProtocol.php', + 'Webklex\\PHPIMAP\\Connection\\Protocols\\PopProtocol' => $baseDir . '/overrides/webklex/php-imap/src/Connection/Protocols/PopProtocol.php', 'Webklex\\PHPIMAP\\Connection\\Protocols\\Protocol' => $vendorDir . '/webklex/php-imap/src/Connection/Protocols/Protocol.php', 'Webklex\\PHPIMAP\\Connection\\Protocols\\ProtocolInterface' => $vendorDir . '/webklex/php-imap/src/Connection/Protocols/ProtocolInterface.php', - 'Webklex\\PHPIMAP\\EncodingAliases' => $vendorDir . '/webklex/php-imap/src/EncodingAliases.php', + 'Webklex\\PHPIMAP\\EncodingAliases' => $baseDir . '/overrides/webklex/php-imap/src/EncodingAliases.php', 'Webklex\\PHPIMAP\\Events\\Event' => $vendorDir . '/webklex/php-imap/src/Events/Event.php', 'Webklex\\PHPIMAP\\Events\\FlagDeletedEvent' => $vendorDir . '/webklex/php-imap/src/Events/FlagDeletedEvent.php', 'Webklex\\PHPIMAP\\Events\\FlagNewEvent' => $vendorDir . '/webklex/php-imap/src/Events/FlagNewEvent.php', @@ -3212,13 +3225,13 @@ 'Webklex\\PHPIMAP\\Exceptions\\NotSupportedCapabilityException' => $vendorDir . '/webklex/php-imap/src/Exceptions/NotSupportedCapabilityException.php', 'Webklex\\PHPIMAP\\Exceptions\\ProtocolNotSupportedException' => $vendorDir . '/webklex/php-imap/src/Exceptions/ProtocolNotSupportedException.php', 'Webklex\\PHPIMAP\\Exceptions\\RuntimeException' => $vendorDir . '/webklex/php-imap/src/Exceptions/RuntimeException.php', - 'Webklex\\PHPIMAP\\Folder' => $vendorDir . '/webklex/php-imap/src/Folder.php', + 'Webklex\\PHPIMAP\\Folder' => $baseDir . '/overrides/webklex/php-imap/src/Folder.php', 'Webklex\\PHPIMAP\\Header' => $baseDir . '/overrides/webklex/php-imap/src/Header.php', 'Webklex\\PHPIMAP\\IMAP' => $vendorDir . '/webklex/php-imap/src/IMAP.php', 'Webklex\\PHPIMAP\\Message' => $baseDir . '/overrides/webklex/php-imap/src/Message.php', 'Webklex\\PHPIMAP\\Part' => $baseDir . '/overrides/webklex/php-imap/src/Part.php', 'Webklex\\PHPIMAP\\Query\\Query' => $baseDir . '/overrides/webklex/php-imap/src/Query/Query.php', - 'Webklex\\PHPIMAP\\Query\\WhereQuery' => $vendorDir . '/webklex/php-imap/src/Query/WhereQuery.php', + 'Webklex\\PHPIMAP\\Query\\WhereQuery' => $baseDir . '/overrides/webklex/php-imap/src/Query/WhereQuery.php', 'Webklex\\PHPIMAP\\Structure' => $baseDir . '/overrides/webklex/php-imap/src/Structure.php', 'Webklex\\PHPIMAP\\Support\\AttachmentCollection' => $vendorDir . '/webklex/php-imap/src/Support/AttachmentCollection.php', 'Webklex\\PHPIMAP\\Support\\FlagCollection' => $vendorDir . '/webklex/php-imap/src/Support/FlagCollection.php', @@ -3229,6 +3242,7 @@ 'Webklex\\PHPIMAP\\Support\\MessageCollection' => $vendorDir . '/webklex/php-imap/src/Support/MessageCollection.php', 'Webklex\\PHPIMAP\\Support\\PaginatedCollection' => $vendorDir . '/webklex/php-imap/src/Support/PaginatedCollection.php', 'Webklex\\PHPIMAP\\Traits\\HasEvents' => $vendorDir . '/webklex/php-imap/src/Traits/HasEvents.php', + 'Whoops\\Run' => $baseDir . '/overrides/filp/whoops/src/Whoops/Run.php', 'XdgBaseDir\\Xdg' => $vendorDir . '/dnoegel/php-xdg-base-dir/src/Xdg.php', 'aCssAtBlockEndToken' => $baseDir . '/overrides/natxet/cssmin/src/CssMin.php', 'aCssAtBlockStartToken' => $baseDir . '/overrides/natxet/cssmin/src/CssMin.php', diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index b98fc9ced..d0138574a 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -8,9 +8,8 @@ return array( 'enshrined\\svgSanitize\\' => array($vendorDir . '/enshrined/svg-sanitize/src'), 'XdgBaseDir\\' => array($vendorDir . '/dnoegel/php-xdg-base-dir/src'), + 'Whoops\\' => array($baseDir . '/overrides/filp/whoops/src/Whoops'), 'Webklex\\PHPIMAP\\' => array($baseDir . '/overrides/webklex/php-imap/src', $vendorDir . '/webklex/php-imap/src'), - 'Webklex\\IMAP\\Providers\\' => array($baseDir . '/overrides/webklex/laravel-imap/src/IMAP/Providers'), - 'Webklex\\IMAP\\' => array($baseDir . '/overrides/webklex/laravel-imap/src/IMAP'), 'Watson\\Rememberable\\' => array($vendorDir . '/watson/rememberable/src'), 'Underscore\\' => array($vendorDir . '/anahkiasen/underscore-php/src', $vendorDir . '/anahkiasen/underscore-php/tests'), 'TorMorten\\Eventy\\' => array($baseDir . '/overrides/tormjens/eventy/src', $vendorDir . '/tormjens/eventy/src'), @@ -23,7 +22,9 @@ 'Symfony\\Component\\VarDumper\\Dumper\\' => array($baseDir . '/overrides/symfony/var-dumper/Dumper'), 'Symfony\\Component\\VarDumper\\Cloner\\' => array($baseDir . '/overrides/symfony/var-dumper/Cloner'), 'Symfony\\Component\\VarDumper\\' => array($vendorDir . '/symfony/var-dumper'), - 'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'), + 'Symfony\\Component\\Translation\\Loader\\' => array($baseDir . '/overrides/symfony/translation/Loader'), + 'Symfony\\Component\\Translation\\Formatter\\' => array($baseDir . '/overrides/symfony/translation/Formatter'), + 'Symfony\\Component\\Translation\\' => array($baseDir . '/overrides/symfony/translation', $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'), @@ -34,12 +35,15 @@ 'Symfony\\Component\\Finder\\Iterator\\' => array($baseDir . '/overrides/symfony/finder/Iterator'), 'Symfony\\Component\\Finder\\' => array($baseDir . '/overrides/symfony/finder', $vendorDir . '/symfony/finder'), 'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'), + 'Symfony\\Component\\Debug\\Exception\\' => array($baseDir . '/overrides/symfony/debug/Exception'), 'Symfony\\Component\\Debug\\' => array($baseDir . '/overrides/symfony/debug', $vendorDir . '/symfony/debug'), 'Symfony\\Component\\CssSelector\\XPath\\Extension\\' => array($baseDir . '/overrides/symfony/css-selector/XPath/Extension'), 'Symfony\\Component\\CssSelector\\' => array($vendorDir . '/symfony/css-selector'), + 'Symfony\\Component\\Console\\Input\\' => array($baseDir . '/overrides/symfony/console/Input'), 'Symfony\\Component\\Console\\Helper\\' => array($baseDir . '/overrides/symfony/console/Helper'), 'Symfony\\Component\\Console\\Descriptor\\' => array($baseDir . '/overrides/symfony/console/Descriptor'), - 'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'), + 'Symfony\\Component\\Console\\Command\\' => array($baseDir . '/overrides/symfony/console/Command'), + 'Symfony\\Component\\Console\\' => array($baseDir . '/overrides/symfony/console', $vendorDir . '/symfony/console'), 'Spatie\\String\\' => array($baseDir . '/overrides/spatie/string/src', $vendorDir . '/spatie/string/src'), 'Spatie\\Activitylog\\' => array($vendorDir . '/spatie/laravel-activitylog/src'), 'Rap2hpoutre\\LaravelLogViewer\\' => array($baseDir . '/overrides/rap2hpoutre/laravel-log-viewer/src/Rap2hpoutre/LaravelLogViewer'), @@ -60,11 +64,11 @@ 'Nwidart\\Modules\\' => array($baseDir . '/overrides/nwidart/laravel-modules/src', $vendorDir . '/nwidart/laravel-modules/src'), 'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'), 'Modules\\' => array($baseDir . '/Modules'), - 'Mews\\Purifier\\' => array($vendorDir . '/mews/purifier/src'), + 'Mews\\Purifier\\' => array($baseDir . '/overrides/mews/purifier/src', $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'), + 'League\\Flysystem\\' => array($baseDir . '/overrides/league/flysystem/src', $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'), @@ -74,29 +78,40 @@ '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\\Validation\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Validation'), '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\\Pipeline\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Pipeline'), 'Illuminate\\Pagination\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Pagination'), + 'Illuminate\\Notifications\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Notifications'), 'Illuminate\\Mail\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Mail'), + 'Illuminate\\Log\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Log'), 'Illuminate\\Http\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Http'), 'Illuminate\\Foundation\\Testing\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Foundation/Testing'), 'Illuminate\\Foundation\\Http\\Middleware\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Foundation/Http/Middleware'), 'Illuminate\\Foundation\\Bootstrap\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Foundation/Bootstrap'), 'Illuminate\\Foundation\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Foundation'), 'Illuminate\\Filesystem\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Filesystem'), + 'Illuminate\\Database\\Schema\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Database/Schema'), + 'Illuminate\\Database\\Query\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Database/Query'), + 'Illuminate\\Database\\Eloquent\\Relations\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Database/Eloquent/Relations'), '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\\Database\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Database'), '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\\Console\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Console'), 'Illuminate\\Config\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Config'), 'Illuminate\\Cache\\Console\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Cache/Console'), 'Illuminate\\Cache\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Cache'), + 'Illuminate\\Bus\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Bus'), 'Illuminate\\Broadcasting\\Broadcasters\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Broadcasting/Broadcasters'), + 'Illuminate\\Broadcasting\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Broadcasting'), 'Illuminate\\Auth\\Middleware\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Auth/Middleware'), + 'Illuminate\\Auth\\Access\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Auth/Access'), 'Illuminate\\Auth\\' => array($baseDir . '/overrides/laravel/framework/src/Illuminate/Auth'), 'Illuminate\\' => array($vendorDir . '/laravel/framework/src/Illuminate'), 'Html2Text\\' => array($vendorDir . '/html2text/html2text/src', $vendorDir . '/html2text/html2text/test'), @@ -121,7 +136,7 @@ 'Devfactory\\Minify\\' => array($vendorDir . '/devfactory/minify/src'), 'DebugBar\\DataFormatter\\' => array($baseDir . '/overrides/maximebf/debugbar/src/DataFormatter/DataFormatter'), 'DebugBar\\' => array($baseDir . '/overrides/maximebf/debugbar/src/DebugBar'), - 'Cron\\' => array($vendorDir . '/mtdowling/cron-expression/src/Cron'), + 'Cron\\' => array($baseDir . '/overrides/mtdowling/cron-expression/src/Cron', $vendorDir . '/mtdowling/cron-expression/src/Cron'), 'Codedge\\Updater\\SourceRepositoryTypes\\' => array($baseDir . '/overrides/codedge/laravel-selfupdater/src/SourceRepositoryTypes'), 'Codedge\\Updater\\' => array($vendorDir . '/codedge/laravel-selfupdater/src'), 'Chumper\\Zipper\\Repositories\\' => array($baseDir . '/overrides/chumper/zipper/src/Chumper/Zipper/Repositories'), diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index e3dafd077..1ca9b26ff 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -41,9 +41,8 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 ), 'W' => array ( + 'Whoops\\' => 7, 'Webklex\\PHPIMAP\\' => 16, - 'Webklex\\IMAP\\Providers\\' => 23, - 'Webklex\\IMAP\\' => 13, 'Watson\\Rememberable\\' => 20, ), 'U' => @@ -65,6 +64,8 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Symfony\\Component\\VarDumper\\Dumper\\' => 35, 'Symfony\\Component\\VarDumper\\Cloner\\' => 35, 'Symfony\\Component\\VarDumper\\' => 28, + 'Symfony\\Component\\Translation\\Loader\\' => 37, + 'Symfony\\Component\\Translation\\Formatter\\' => 40, 'Symfony\\Component\\Translation\\' => 30, 'Symfony\\Component\\Routing\\' => 26, 'Symfony\\Component\\Process\\' => 26, @@ -76,11 +77,14 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Symfony\\Component\\Finder\\Iterator\\' => 34, 'Symfony\\Component\\Finder\\' => 25, 'Symfony\\Component\\EventDispatcher\\' => 34, + 'Symfony\\Component\\Debug\\Exception\\' => 34, 'Symfony\\Component\\Debug\\' => 24, 'Symfony\\Component\\CssSelector\\XPath\\Extension\\' => 46, 'Symfony\\Component\\CssSelector\\' => 30, + 'Symfony\\Component\\Console\\Input\\' => 32, 'Symfony\\Component\\Console\\Helper\\' => 33, 'Symfony\\Component\\Console\\Descriptor\\' => 37, + 'Symfony\\Component\\Console\\Command\\' => 34, 'Symfony\\Component\\Console\\' => 26, 'Spatie\\String\\' => 14, 'Spatie\\Activitylog\\' => 19, @@ -137,29 +141,40 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Illuminate\\View\\Compilers\\' => 26, 'Illuminate\\View\\' => 16, 'Illuminate\\Validation\\Concerns\\' => 31, + 'Illuminate\\Validation\\' => 22, 'Illuminate\\Support\\' => 19, 'Illuminate\\Session\\' => 19, 'Illuminate\\Routing\\' => 19, 'Illuminate\\Queue\\' => 17, + 'Illuminate\\Pipeline\\' => 20, 'Illuminate\\Pagination\\' => 22, + 'Illuminate\\Notifications\\' => 25, 'Illuminate\\Mail\\' => 16, + 'Illuminate\\Log\\' => 15, 'Illuminate\\Http\\' => 16, 'Illuminate\\Foundation\\Testing\\' => 30, 'Illuminate\\Foundation\\Http\\Middleware\\' => 38, 'Illuminate\\Foundation\\Bootstrap\\' => 32, 'Illuminate\\Foundation\\' => 22, 'Illuminate\\Filesystem\\' => 22, + 'Illuminate\\Database\\Schema\\' => 27, + 'Illuminate\\Database\\Query\\' => 26, + 'Illuminate\\Database\\Eloquent\\Relations\\' => 39, 'Illuminate\\Database\\Eloquent\\Concerns\\' => 38, 'Illuminate\\Database\\Eloquent\\' => 29, 'Illuminate\\Database\\' => 20, 'Illuminate\\Cookie\\Middleware\\' => 29, 'Illuminate\\Cookie\\' => 18, 'Illuminate\\Container\\' => 21, + 'Illuminate\\Console\\' => 19, 'Illuminate\\Config\\' => 18, 'Illuminate\\Cache\\Console\\' => 25, 'Illuminate\\Cache\\' => 17, + 'Illuminate\\Bus\\' => 15, 'Illuminate\\Broadcasting\\Broadcasters\\' => 37, + 'Illuminate\\Broadcasting\\' => 24, 'Illuminate\\Auth\\Middleware\\' => 27, + 'Illuminate\\Auth\\Access\\' => 23, 'Illuminate\\Auth\\' => 16, 'Illuminate\\' => 11, ), @@ -232,19 +247,15 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 array ( 0 => __DIR__ . '/..' . '/dnoegel/php-xdg-base-dir/src', ), + 'Whoops\\' => + array ( + 0 => __DIR__ . '/../..' . '/overrides/filp/whoops/src/Whoops', + ), 'Webklex\\PHPIMAP\\' => array ( 0 => __DIR__ . '/../..' . '/overrides/webklex/php-imap/src', 1 => __DIR__ . '/..' . '/webklex/php-imap/src', ), - 'Webklex\\IMAP\\Providers\\' => - array ( - 0 => __DIR__ . '/../..' . '/overrides/webklex/laravel-imap/src/IMAP/Providers', - ), - 'Webklex\\IMAP\\' => - array ( - 0 => __DIR__ . '/../..' . '/overrides/webklex/laravel-imap/src/IMAP', - ), 'Watson\\Rememberable\\' => array ( 0 => __DIR__ . '/..' . '/watson/rememberable/src', @@ -295,9 +306,18 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 array ( 0 => __DIR__ . '/..' . '/symfony/var-dumper', ), + 'Symfony\\Component\\Translation\\Loader\\' => + array ( + 0 => __DIR__ . '/../..' . '/overrides/symfony/translation/Loader', + ), + 'Symfony\\Component\\Translation\\Formatter\\' => + array ( + 0 => __DIR__ . '/../..' . '/overrides/symfony/translation/Formatter', + ), 'Symfony\\Component\\Translation\\' => array ( - 0 => __DIR__ . '/..' . '/symfony/translation', + 0 => __DIR__ . '/../..' . '/overrides/symfony/translation', + 1 => __DIR__ . '/..' . '/symfony/translation', ), 'Symfony\\Component\\Routing\\' => array ( @@ -344,6 +364,10 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 array ( 0 => __DIR__ . '/..' . '/symfony/event-dispatcher', ), + 'Symfony\\Component\\Debug\\Exception\\' => + array ( + 0 => __DIR__ . '/../..' . '/overrides/symfony/debug/Exception', + ), 'Symfony\\Component\\Debug\\' => array ( 0 => __DIR__ . '/../..' . '/overrides/symfony/debug', @@ -357,6 +381,10 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 array ( 0 => __DIR__ . '/..' . '/symfony/css-selector', ), + 'Symfony\\Component\\Console\\Input\\' => + array ( + 0 => __DIR__ . '/../..' . '/overrides/symfony/console/Input', + ), 'Symfony\\Component\\Console\\Helper\\' => array ( 0 => __DIR__ . '/../..' . '/overrides/symfony/console/Helper', @@ -365,9 +393,14 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 array ( 0 => __DIR__ . '/../..' . '/overrides/symfony/console/Descriptor', ), + 'Symfony\\Component\\Console\\Command\\' => + array ( + 0 => __DIR__ . '/../..' . '/overrides/symfony/console/Command', + ), 'Symfony\\Component\\Console\\' => array ( - 0 => __DIR__ . '/..' . '/symfony/console', + 0 => __DIR__ . '/../..' . '/overrides/symfony/console', + 1 => __DIR__ . '/..' . '/symfony/console', ), 'Spatie\\String\\' => array ( @@ -454,7 +487,8 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 ), 'Mews\\Purifier\\' => array ( - 0 => __DIR__ . '/..' . '/mews/purifier/src', + 0 => __DIR__ . '/../..' . '/overrides/mews/purifier/src', + 1 => __DIR__ . '/..' . '/mews/purifier/src', ), 'Lord\\Laroute\\Routes\\' => array ( @@ -470,7 +504,8 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 ), 'League\\Flysystem\\' => array ( - 0 => __DIR__ . '/..' . '/league/flysystem/src', + 0 => __DIR__ . '/../..' . '/overrides/league/flysystem/src', + 1 => __DIR__ . '/..' . '/league/flysystem/src', ), 'Laravel\\Tinker\\' => array ( @@ -509,6 +544,10 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 array ( 0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Validation/Concerns', ), + 'Illuminate\\Validation\\' => + array ( + 0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Validation', + ), 'Illuminate\\Support\\' => array ( 0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Support', @@ -525,14 +564,26 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 array ( 0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Queue', ), + 'Illuminate\\Pipeline\\' => + array ( + 0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Pipeline', + ), 'Illuminate\\Pagination\\' => array ( 0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Pagination', ), + 'Illuminate\\Notifications\\' => + array ( + 0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Notifications', + ), 'Illuminate\\Mail\\' => array ( 0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Mail', ), + 'Illuminate\\Log\\' => + array ( + 0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Log', + ), 'Illuminate\\Http\\' => array ( 0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Http', @@ -557,6 +608,18 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 array ( 0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Filesystem', ), + 'Illuminate\\Database\\Schema\\' => + array ( + 0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Database/Schema', + ), + 'Illuminate\\Database\\Query\\' => + array ( + 0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Database/Query', + ), + 'Illuminate\\Database\\Eloquent\\Relations\\' => + array ( + 0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Database/Eloquent/Relations', + ), 'Illuminate\\Database\\Eloquent\\Concerns\\' => array ( 0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Database/Eloquent/Concerns', @@ -581,6 +644,10 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 array ( 0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Container', ), + 'Illuminate\\Console\\' => + array ( + 0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Console', + ), 'Illuminate\\Config\\' => array ( 0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Config', @@ -593,14 +660,26 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 array ( 0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Cache', ), + 'Illuminate\\Bus\\' => + array ( + 0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Bus', + ), 'Illuminate\\Broadcasting\\Broadcasters\\' => array ( 0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Broadcasting/Broadcasters', ), + 'Illuminate\\Broadcasting\\' => + array ( + 0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Broadcasting', + ), 'Illuminate\\Auth\\Middleware\\' => array ( 0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Auth/Middleware', ), + 'Illuminate\\Auth\\Access\\' => + array ( + 0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Auth/Access', + ), 'Illuminate\\Auth\\' => array ( 0 => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Auth', @@ -703,7 +782,8 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 ), 'Cron\\' => array ( - 0 => __DIR__ . '/..' . '/mtdowling/cron-expression/src/Cron', + 0 => __DIR__ . '/../..' . '/overrides/mtdowling/cron-expression/src/Cron', + 1 => __DIR__ . '/..' . '/mtdowling/cron-expression/src/Cron', ), 'Codedge\\Updater\\SourceRepositoryTypes\\' => array ( @@ -984,7 +1064,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Carbon\\CarbonPeriod' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/CarbonPeriod.php', 'Carbon\\Exceptions\\InvalidDateException' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php', 'Carbon\\Laravel\\ServiceProvider' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php', - 'Carbon\\Translator' => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon/Translator.php', + 'Carbon\\Translator' => __DIR__ . '/../..' . '/overrides/nesbot/carbon/src/Carbon/Translator.php', 'Chumper\\Zipper\\Facades\\Zipper' => __DIR__ . '/..' . '/chumper/zipper/src/Chumper/Zipper/Facades/Zipper.php', 'Chumper\\Zipper\\Repositories\\RepositoryInterface' => __DIR__ . '/..' . '/chumper/zipper/src/Chumper/Zipper/Repositories/RepositoryInterface.php', 'Chumper\\Zipper\\Repositories\\ZipRepository' => __DIR__ . '/../..' . '/overrides/chumper/zipper/src/Chumper/Zipper/Repositories/ZipRepository.php', @@ -1007,7 +1087,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Codedge\\Updater\\UpdaterServiceProvider' => __DIR__ . '/..' . '/codedge/laravel-selfupdater/src/UpdaterServiceProvider.php', 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 'Cron\\AbstractField' => __DIR__ . '/..' . '/mtdowling/cron-expression/src/Cron/AbstractField.php', - 'Cron\\CronExpression' => __DIR__ . '/..' . '/mtdowling/cron-expression/src/Cron/CronExpression.php', + 'Cron\\CronExpression' => __DIR__ . '/../..' . '/overrides/mtdowling/cron-expression/src/Cron/CronExpression.php', 'Cron\\DayOfMonthField' => __DIR__ . '/..' . '/mtdowling/cron-expression/src/Cron/DayOfMonthField.php', 'Cron\\DayOfWeekField' => __DIR__ . '/..' . '/mtdowling/cron-expression/src/Cron/DayOfWeekField.php', 'Cron\\FieldFactory' => __DIR__ . '/..' . '/mtdowling/cron-expression/src/Cron/FieldFactory.php', @@ -1524,7 +1604,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'GuzzleHttp\\Exception\\ServerException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/ServerException.php', 'GuzzleHttp\\Exception\\TooManyRedirectsException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php', 'GuzzleHttp\\Exception\\TransferException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/TransferException.php', - 'GuzzleHttp\\HandlerStack' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/HandlerStack.php', + 'GuzzleHttp\\HandlerStack' => __DIR__ . '/../..' . '/overrides/guzzlehttp/guzzle/src/HandlerStack.php', 'GuzzleHttp\\Handler\\CurlFactory' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/CurlFactory.php', 'GuzzleHttp\\Handler\\CurlFactoryInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php', 'GuzzleHttp\\Handler\\CurlHandler' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Handler/CurlHandler.php', @@ -1820,7 +1900,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'HTMLPurifier_Zipper' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier/Zipper.php', 'Html2Text\\Html2Text' => __DIR__ . '/..' . '/html2text/html2text/src/Html2Text.php', 'Illuminate\\Auth\\Access\\AuthorizationException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Access/AuthorizationException.php', - 'Illuminate\\Auth\\Access\\Gate' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Access/Gate.php', + 'Illuminate\\Auth\\Access\\Gate' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Auth/Access/Gate.php', 'Illuminate\\Auth\\Access\\HandlesAuthorization' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Access/HandlesAuthorization.php', 'Illuminate\\Auth\\Access\\Response' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/Access/Response.php', 'Illuminate\\Auth\\AuthManager' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Auth/AuthManager.php', @@ -1860,7 +1940,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Illuminate\\Broadcasting\\BroadcastController' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastController.php', 'Illuminate\\Broadcasting\\BroadcastEvent' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastEvent.php', 'Illuminate\\Broadcasting\\BroadcastException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastException.php', - 'Illuminate\\Broadcasting\\BroadcastManager' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php', + 'Illuminate\\Broadcasting\\BroadcastManager' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php', 'Illuminate\\Broadcasting\\BroadcastServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/BroadcastServiceProvider.php', 'Illuminate\\Broadcasting\\Broadcasters\\Broadcaster' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php', 'Illuminate\\Broadcasting\\Broadcasters\\LogBroadcaster' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/LogBroadcaster.php', @@ -1873,7 +1953,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Illuminate\\Broadcasting\\PresenceChannel' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/PresenceChannel.php', 'Illuminate\\Broadcasting\\PrivateChannel' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Broadcasting/PrivateChannel.php', 'Illuminate\\Bus\\BusServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Bus/BusServiceProvider.php', - 'Illuminate\\Bus\\Dispatcher' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Bus/Dispatcher.php', + 'Illuminate\\Bus\\Dispatcher' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Bus/Dispatcher.php', 'Illuminate\\Bus\\Queueable' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Bus/Queueable.php', 'Illuminate\\Cache\\ApcStore' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/ApcStore.php', 'Illuminate\\Cache\\ApcWrapper' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/ApcWrapper.php', @@ -1905,7 +1985,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Illuminate\\Cache\\TaggableStore' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/TaggableStore.php', 'Illuminate\\Cache\\TaggedCache' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Cache/TaggedCache.php', 'Illuminate\\Config\\Repository' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Config/Repository.php', - 'Illuminate\\Console\\Application' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Console/Application.php', + 'Illuminate\\Console\\Application' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Console/Application.php', 'Illuminate\\Console\\Command' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Console/Command.php', 'Illuminate\\Console\\ConfirmableTrait' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Console/ConfirmableTrait.php', 'Illuminate\\Console\\DetectsApplicationNamespace' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Console/DetectsApplicationNamespace.php', @@ -2051,16 +2131,16 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Illuminate\\Database\\DatabaseServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/DatabaseServiceProvider.php', 'Illuminate\\Database\\DetectsDeadlocks' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/DetectsDeadlocks.php', 'Illuminate\\Database\\DetectsLostConnections' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Database/DetectsLostConnections.php', - 'Illuminate\\Database\\Eloquent\\Builder' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php', + 'Illuminate\\Database\\Eloquent\\Builder' => __DIR__ . '/../..' . '/overrides/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__ . '/../..' . '/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', + 'Illuminate\\Database\\Eloquent\\Concerns\\HasGlobalScopes' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasGlobalScopes.php', 'Illuminate\\Database\\Eloquent\\Concerns\\HasRelationships' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php', 'Illuminate\\Database\\Eloquent\\Concerns\\HasTimestamps' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php', 'Illuminate\\Database\\Eloquent\\Concerns\\HidesAttributes' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HidesAttributes.php', - 'Illuminate\\Database\\Eloquent\\Concerns\\QueriesRelationships' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php', + 'Illuminate\\Database\\Eloquent\\Concerns\\QueriesRelationships' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php', 'Illuminate\\Database\\Eloquent\\Factory' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Database/Eloquent/Factory.php', 'Illuminate\\Database\\Eloquent\\FactoryBuilder' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/FactoryBuilder.php', 'Illuminate\\Database\\Eloquent\\JsonEncodingException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/JsonEncodingException.php', @@ -2084,7 +2164,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Illuminate\\Database\\Eloquent\\Relations\\MorphTo' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php', 'Illuminate\\Database\\Eloquent\\Relations\\MorphToMany' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php', 'Illuminate\\Database\\Eloquent\\Relations\\Pivot' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Pivot.php', - 'Illuminate\\Database\\Eloquent\\Relations\\Relation' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php', + 'Illuminate\\Database\\Eloquent\\Relations\\Relation' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php', 'Illuminate\\Database\\Eloquent\\Scope' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/Scope.php', 'Illuminate\\Database\\Eloquent\\SoftDeletes' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletes.php', 'Illuminate\\Database\\Eloquent\\SoftDeletingScope' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletingScope.php', @@ -2104,7 +2184,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Illuminate\\Database\\MySqlConnection' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/MySqlConnection.php', 'Illuminate\\Database\\PostgresConnection' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/PostgresConnection.php', 'Illuminate\\Database\\QueryException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/QueryException.php', - 'Illuminate\\Database\\Query\\Builder' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Query/Builder.php', + 'Illuminate\\Database\\Query\\Builder' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Database/Query/Builder.php', 'Illuminate\\Database\\Query\\Expression' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Query/Expression.php', 'Illuminate\\Database\\Query\\Grammars\\Grammar' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php', 'Illuminate\\Database\\Query\\Grammars\\MySqlGrammar' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Query/Grammars/MySqlGrammar.php', @@ -2120,7 +2200,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Illuminate\\Database\\Query\\Processors\\SqlServerProcessor' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Query/Processors/SqlServerProcessor.php', 'Illuminate\\Database\\SQLiteConnection' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/SQLiteConnection.php', 'Illuminate\\Database\\Schema\\Blueprint' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php', - 'Illuminate\\Database\\Schema\\Builder' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Schema/Builder.php', + 'Illuminate\\Database\\Schema\\Builder' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Database/Schema/Builder.php', 'Illuminate\\Database\\Schema\\Grammars\\ChangeColumn' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Schema/Grammars/ChangeColumn.php', 'Illuminate\\Database\\Schema\\Grammars\\Grammar' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php', 'Illuminate\\Database\\Schema\\Grammars\\MySqlGrammar' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php', @@ -2267,7 +2347,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Illuminate\\Http\\JsonResponse' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/JsonResponse.php', 'Illuminate\\Http\\Middleware\\CheckResponseForModifications' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/Middleware/CheckResponseForModifications.php', 'Illuminate\\Http\\Middleware\\FrameGuard' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/Middleware/FrameGuard.php', - 'Illuminate\\Http\\RedirectResponse' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/RedirectResponse.php', + 'Illuminate\\Http\\RedirectResponse' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Http/RedirectResponse.php', 'Illuminate\\Http\\Request' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Http/Request.php', 'Illuminate\\Http\\Resources\\CollectsResources' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/Resources/CollectsResources.php', 'Illuminate\\Http\\Resources\\ConditionallyLoadsAttributes' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/Resources/ConditionallyLoadsAttributes.php', @@ -2288,12 +2368,12 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Illuminate\\Http\\UploadedFile' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Http/UploadedFile.php', 'Illuminate\\Log\\Events\\MessageLogged' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Log/Events/MessageLogged.php', 'Illuminate\\Log\\LogServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Log/LogServiceProvider.php', - 'Illuminate\\Log\\Writer' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Log/Writer.php', + 'Illuminate\\Log\\Writer' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Log/Writer.php', 'Illuminate\\Mail\\Events\\MessageSending' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/Events/MessageSending.php', 'Illuminate\\Mail\\Events\\MessageSent' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/Events/MessageSent.php', 'Illuminate\\Mail\\MailServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php', 'Illuminate\\Mail\\Mailable' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/Mailable.php', - 'Illuminate\\Mail\\Mailer' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/Mailer.php', + 'Illuminate\\Mail\\Mailer' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Mail/Mailer.php', 'Illuminate\\Mail\\Markdown' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/Markdown.php', 'Illuminate\\Mail\\Message' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/Message.php', 'Illuminate\\Mail\\PendingMail' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/PendingMail.php', @@ -2308,7 +2388,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Illuminate\\Mail\\Transport\\Transport' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Mail/Transport/Transport.php', 'Illuminate\\Notifications\\Action' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Action.php', 'Illuminate\\Notifications\\AnonymousNotifiable' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/AnonymousNotifiable.php', - 'Illuminate\\Notifications\\ChannelManager' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/ChannelManager.php', + 'Illuminate\\Notifications\\ChannelManager' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Notifications/ChannelManager.php', 'Illuminate\\Notifications\\Channels\\BroadcastChannel' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Channels/BroadcastChannel.php', 'Illuminate\\Notifications\\Channels\\DatabaseChannel' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Channels/DatabaseChannel.php', 'Illuminate\\Notifications\\Channels\\MailChannel' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Channels/MailChannel.php', @@ -2332,17 +2412,17 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Illuminate\\Notifications\\Messages\\SlackMessage' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Messages/SlackMessage.php', 'Illuminate\\Notifications\\Notifiable' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Notifiable.php', 'Illuminate\\Notifications\\Notification' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/Notification.php', - 'Illuminate\\Notifications\\NotificationSender' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/NotificationSender.php', + 'Illuminate\\Notifications\\NotificationSender' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Notifications/NotificationSender.php', 'Illuminate\\Notifications\\NotificationServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/NotificationServiceProvider.php', - 'Illuminate\\Notifications\\RoutesNotifications' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/RoutesNotifications.php', - 'Illuminate\\Notifications\\SendQueuedNotifications' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Notifications/SendQueuedNotifications.php', + 'Illuminate\\Notifications\\RoutesNotifications' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Notifications/RoutesNotifications.php', + 'Illuminate\\Notifications\\SendQueuedNotifications' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Notifications/SendQueuedNotifications.php', 'Illuminate\\Pagination\\AbstractPaginator' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Pagination/AbstractPaginator.php', 'Illuminate\\Pagination\\LengthAwarePaginator' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Pagination/LengthAwarePaginator.php', 'Illuminate\\Pagination\\PaginationServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php', 'Illuminate\\Pagination\\Paginator' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Pagination/Paginator.php', 'Illuminate\\Pagination\\UrlWindow' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Pagination/UrlWindow.php', 'Illuminate\\Pipeline\\Hub' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Pipeline/Hub.php', - 'Illuminate\\Pipeline\\Pipeline' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Pipeline/Pipeline.php', + 'Illuminate\\Pipeline\\Pipeline' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Pipeline/Pipeline.php', 'Illuminate\\Pipeline\\PipelineServiceProvider' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Pipeline/PipelineServiceProvider.php', 'Illuminate\\Queue\\BeanstalkdQueue' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/BeanstalkdQueue.php', 'Illuminate\\Queue\\CallQueuedHandler' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php', @@ -2540,7 +2620,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Illuminate\\Validation\\Concerns\\ReplacesAttributes' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/Concerns/ReplacesAttributes.php', 'Illuminate\\Validation\\Concerns\\ValidatesAttributes' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Validation/Concerns/ValidatesAttributes.php', 'Illuminate\\Validation\\DatabasePresenceVerifier' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/DatabasePresenceVerifier.php', - 'Illuminate\\Validation\\Factory' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/Factory.php', + 'Illuminate\\Validation\\Factory' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Validation/Factory.php', 'Illuminate\\Validation\\PresenceVerifierInterface' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/PresenceVerifierInterface.php', 'Illuminate\\Validation\\Rule' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/Rule.php', 'Illuminate\\Validation\\Rules\\DatabaseRule' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/Rules/DatabaseRule.php', @@ -2553,7 +2633,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Illuminate\\Validation\\ValidatesWhenResolvedTrait' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/ValidatesWhenResolvedTrait.php', 'Illuminate\\Validation\\ValidationData' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/ValidationData.php', 'Illuminate\\Validation\\ValidationException' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/ValidationException.php', - 'Illuminate\\Validation\\ValidationRuleParser' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/Validation/ValidationRuleParser.php', + 'Illuminate\\Validation\\ValidationRuleParser' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/Validation/ValidationRuleParser.php', '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', @@ -2584,7 +2664,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Illuminate\\View\\Engines\\FileEngine' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Engines/FileEngine.php', 'Illuminate\\View\\Engines\\PhpEngine' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php', 'Illuminate\\View\\Factory' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Factory.php', - 'Illuminate\\View\\FileViewFinder' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/FileViewFinder.php', + 'Illuminate\\View\\FileViewFinder' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/View/FileViewFinder.php', 'Illuminate\\View\\Middleware\\ShareErrorsFromSession' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php', 'Illuminate\\View\\View' => __DIR__ . '/../..' . '/overrides/laravel/framework/src/Illuminate/View/View.php', 'Illuminate\\View\\ViewFinderInterface' => __DIR__ . '/..' . '/laravel/framework/src/Illuminate/View/ViewFinderInterface.php', @@ -2626,9 +2706,9 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 '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\\Filesystem' => __DIR__ . '/../..' . '/overrides/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\\FilesystemInterface' => __DIR__ . '/../..' . '/overrides/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', @@ -2671,7 +2751,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Lord\\Laroute\\Routes\\Exceptions\\ZeroRoutesException' => __DIR__ . '/..' . '/lord/laroute/src/Routes/Exceptions/ZeroRoutesException.php', 'MailboxesTableSeeder' => __DIR__ . '/../..' . '/database/seeds/MailboxesTableSeeder.php', 'Mews\\Purifier\\Facades\\Purifier' => __DIR__ . '/..' . '/mews/purifier/src/Facades/Purifier.php', - 'Mews\\Purifier\\Purifier' => __DIR__ . '/..' . '/mews/purifier/src/Purifier.php', + 'Mews\\Purifier\\Purifier' => __DIR__ . '/../..' . '/overrides/mews/purifier/src/Purifier.php', 'Mews\\Purifier\\PurifierServiceProvider' => __DIR__ . '/..' . '/mews/purifier/src/PurifierServiceProvider.php', 'Monolog\\ErrorHandler' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/ErrorHandler.php', 'Monolog\\Formatter\\ChromePHPFormatter' => __DIR__ . '/..' . '/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php', @@ -3337,7 +3417,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Ramsey\\Uuid\\Provider\\Time\\FixedTimeProvider' => __DIR__ . '/..' . '/ramsey/uuid/src/Provider/Time/FixedTimeProvider.php', 'Ramsey\\Uuid\\Provider\\Time\\SystemTimeProvider' => __DIR__ . '/..' . '/ramsey/uuid/src/Provider/Time/SystemTimeProvider.php', 'Ramsey\\Uuid\\Uuid' => __DIR__ . '/../..' . '/overrides/ramsey/uuid/src/Uuid.php', - 'Ramsey\\Uuid\\UuidFactory' => __DIR__ . '/..' . '/ramsey/uuid/src/UuidFactory.php', + 'Ramsey\\Uuid\\UuidFactory' => __DIR__ . '/../..' . '/overrides/ramsey/uuid/src/UuidFactory.php', 'Ramsey\\Uuid\\UuidFactoryInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/UuidFactoryInterface.php', 'Ramsey\\Uuid\\UuidInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/UuidInterface.php', 'Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewer' => __DIR__ . '/../..' . '/overrides/rap2hpoutre/laravel-log-viewer/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php', @@ -3364,25 +3444,37 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Spatie\\String\\Str' => __DIR__ . '/../..' . '/overrides/spatie/string/src/Str.php', 'Swift_Attachment' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Attachment.php', 'Swift_EmbeddedFile' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/EmbeddedFile.php', + 'Swift_Encoder_QpEncoder' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php', + 'Swift_KeyCache' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache.php', + 'Swift_KeyCache_DiskKeyCache' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php', + 'Swift_KeyCache_SimpleKeyCacheInputStream' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/SimpleKeyCacheInputStream.php', 'Swift_MailTransport' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/MailTransport.php', 'Swift_Message' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Message.php', 'Swift_MimePart' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/MimePart.php', 'Swift_Mime_ContentEncoder_Base64ContentEncoder' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/Base64ContentEncoder.php', + 'Swift_Mime_ContentEncoder_QpContentEncoder' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php', + 'Swift_Mime_Headers_AbstractHeader' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/AbstractHeader.php', + 'Swift_Mime_Headers_IdentificationHeader' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php', + 'Swift_Mime_Headers_MailboxHeader' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php', + 'Swift_Mime_Headers_ParameterizedHeader' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php', 'Swift_Mime_MimePart' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimePart.php', + 'Swift_Mime_SimpleHeaderFactory' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php', + 'Swift_Mime_SimpleHeaderSet' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php', 'Swift_SendmailTransport' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/SendmailTransport.php', 'Swift_SmtpTransport' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php', 'Swift_SwiftException' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/SwiftException.php', + 'Swift_Transport_AbstractSmtpTransport' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php', 'Swift_Transport_EsmtpTransport' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php', 'Swift_Transport_Esmtp_AuthHandler' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php', 'Swift_Transport_MailInvoker' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/MailInvoker.php', 'Swift_Transport_MailTransport' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/MailTransport.php', 'Swift_Transport_SimpleMailInvoker' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SimpleMailInvoker.php', 'Swift_Transport_StreamBuffer' => __DIR__ . '/../..' . '/overrides/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php', - 'Symfony\\Component\\Console\\Application' => __DIR__ . '/..' . '/symfony/console/Application.php', + 'Symfony\\Component\\Console\\Application' => __DIR__ . '/../..' . '/overrides/symfony/console/Application.php', 'Symfony\\Component\\Console\\CommandLoader\\CommandLoaderInterface' => __DIR__ . '/..' . '/symfony/console/CommandLoader/CommandLoaderInterface.php', 'Symfony\\Component\\Console\\CommandLoader\\ContainerCommandLoader' => __DIR__ . '/..' . '/symfony/console/CommandLoader/ContainerCommandLoader.php', 'Symfony\\Component\\Console\\CommandLoader\\FactoryCommandLoader' => __DIR__ . '/..' . '/symfony/console/CommandLoader/FactoryCommandLoader.php', - 'Symfony\\Component\\Console\\Command\\Command' => __DIR__ . '/..' . '/symfony/console/Command/Command.php', + 'Symfony\\Component\\Console\\Command\\Command' => __DIR__ . '/../..' . '/overrides/symfony/console/Command/Command.php', 'Symfony\\Component\\Console\\Command\\HelpCommand' => __DIR__ . '/..' . '/symfony/console/Command/HelpCommand.php', 'Symfony\\Component\\Console\\Command\\ListCommand' => __DIR__ . '/..' . '/symfony/console/Command/ListCommand.php', 'Symfony\\Component\\Console\\Command\\LockableTrait' => __DIR__ . '/..' . '/symfony/console/Command/LockableTrait.php', @@ -3416,10 +3508,10 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Symfony\\Component\\Console\\Helper\\DescriptorHelper' => __DIR__ . '/..' . '/symfony/console/Helper/DescriptorHelper.php', 'Symfony\\Component\\Console\\Helper\\FormatterHelper' => __DIR__ . '/..' . '/symfony/console/Helper/FormatterHelper.php', 'Symfony\\Component\\Console\\Helper\\Helper' => __DIR__ . '/../..' . '/overrides/symfony/console/Helper/Helper.php', - 'Symfony\\Component\\Console\\Helper\\HelperInterface' => __DIR__ . '/..' . '/symfony/console/Helper/HelperInterface.php', + 'Symfony\\Component\\Console\\Helper\\HelperInterface' => __DIR__ . '/../..' . '/overrides/symfony/console/Helper/HelperInterface.php', 'Symfony\\Component\\Console\\Helper\\HelperSet' => __DIR__ . '/../..' . '/overrides/symfony/console/Helper/HelperSet.php', 'Symfony\\Component\\Console\\Helper\\InputAwareHelper' => __DIR__ . '/..' . '/symfony/console/Helper/InputAwareHelper.php', - 'Symfony\\Component\\Console\\Helper\\ProcessHelper' => __DIR__ . '/..' . '/symfony/console/Helper/ProcessHelper.php', + 'Symfony\\Component\\Console\\Helper\\ProcessHelper' => __DIR__ . '/../..' . '/overrides/symfony/console/Helper/ProcessHelper.php', 'Symfony\\Component\\Console\\Helper\\ProgressBar' => __DIR__ . '/..' . '/symfony/console/Helper/ProgressBar.php', 'Symfony\\Component\\Console\\Helper\\ProgressIndicator' => __DIR__ . '/..' . '/symfony/console/Helper/ProgressIndicator.php', 'Symfony\\Component\\Console\\Helper\\QuestionHelper' => __DIR__ . '/..' . '/symfony/console/Helper/QuestionHelper.php', @@ -3429,8 +3521,8 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Symfony\\Component\\Console\\Helper\\TableSeparator' => __DIR__ . '/..' . '/symfony/console/Helper/TableSeparator.php', 'Symfony\\Component\\Console\\Helper\\TableStyle' => __DIR__ . '/..' . '/symfony/console/Helper/TableStyle.php', 'Symfony\\Component\\Console\\Input\\ArgvInput' => __DIR__ . '/..' . '/symfony/console/Input/ArgvInput.php', - 'Symfony\\Component\\Console\\Input\\ArrayInput' => __DIR__ . '/..' . '/symfony/console/Input/ArrayInput.php', - 'Symfony\\Component\\Console\\Input\\Input' => __DIR__ . '/..' . '/symfony/console/Input/Input.php', + 'Symfony\\Component\\Console\\Input\\ArrayInput' => __DIR__ . '/../..' . '/overrides/symfony/console/Input/ArrayInput.php', + 'Symfony\\Component\\Console\\Input\\Input' => __DIR__ . '/../..' . '/overrides/symfony/console/Input/Input.php', 'Symfony\\Component\\Console\\Input\\InputArgument' => __DIR__ . '/..' . '/symfony/console/Input/InputArgument.php', 'Symfony\\Component\\Console\\Input\\InputAwareInterface' => __DIR__ . '/..' . '/symfony/console/Input/InputAwareInterface.php', 'Symfony\\Component\\Console\\Input\\InputDefinition' => __DIR__ . '/..' . '/symfony/console/Input/InputDefinition.php', @@ -3510,7 +3602,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Symfony\\Component\\Debug\\ExceptionHandler' => __DIR__ . '/../..' . '/overrides/symfony/debug/ExceptionHandler.php', 'Symfony\\Component\\Debug\\Exception\\ClassNotFoundException' => __DIR__ . '/..' . '/symfony/debug/Exception/ClassNotFoundException.php', 'Symfony\\Component\\Debug\\Exception\\ContextErrorException' => __DIR__ . '/..' . '/symfony/debug/Exception/ContextErrorException.php', - 'Symfony\\Component\\Debug\\Exception\\FatalErrorException' => __DIR__ . '/..' . '/symfony/debug/Exception/FatalErrorException.php', + 'Symfony\\Component\\Debug\\Exception\\FatalErrorException' => __DIR__ . '/../..' . '/overrides/symfony/debug/Exception/FatalErrorException.php', 'Symfony\\Component\\Debug\\Exception\\FatalThrowableError' => __DIR__ . '/..' . '/symfony/debug/Exception/FatalThrowableError.php', 'Symfony\\Component\\Debug\\Exception\\FlattenException' => __DIR__ . '/..' . '/symfony/debug/Exception/FlattenException.php', 'Symfony\\Component\\Debug\\Exception\\OutOfMemoryException' => __DIR__ . '/..' . '/symfony/debug/Exception/OutOfMemoryException.php', @@ -3619,7 +3711,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\NativeProxy' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Proxy/NativeProxy.php', 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\SessionHandlerProxy' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php', 'Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/SessionStorageInterface.php', - 'Symfony\\Component\\HttpFoundation\\StreamedResponse' => __DIR__ . '/..' . '/symfony/http-foundation/StreamedResponse.php', + 'Symfony\\Component\\HttpFoundation\\StreamedResponse' => __DIR__ . '/../..' . '/overrides/symfony/http-foundation/StreamedResponse.php', 'Symfony\\Component\\HttpKernel\\Bundle\\Bundle' => __DIR__ . '/..' . '/symfony/http-kernel/Bundle/Bundle.php', 'Symfony\\Component\\HttpKernel\\Bundle\\BundleInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Bundle/BundleInterface.php', 'Symfony\\Component\\HttpKernel\\CacheClearer\\CacheClearerInterface' => __DIR__ . '/..' . '/symfony/http-kernel/CacheClearer/CacheClearerInterface.php', @@ -3706,21 +3798,21 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/GetResponseForExceptionEvent.php', 'Symfony\\Component\\HttpKernel\\Event\\KernelEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/KernelEvent.php', 'Symfony\\Component\\HttpKernel\\Event\\PostResponseEvent' => __DIR__ . '/..' . '/symfony/http-kernel/Event/PostResponseEvent.php', - 'Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/AccessDeniedHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException' => __DIR__ . '/../..' . '/overrides/symfony/http-kernel/Exception/AccessDeniedHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\BadRequestHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/BadRequestHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\ConflictHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/ConflictHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\GoneHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/GoneHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\HttpException' => __DIR__ . '/../..' . '/overrides/symfony/http-kernel/Exception/HttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\HttpExceptionInterface' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/HttpExceptionInterface.php', 'Symfony\\Component\\HttpKernel\\Exception\\LengthRequiredHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/LengthRequiredHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\MethodNotAllowedHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\MethodNotAllowedHttpException' => __DIR__ . '/../..' . '/overrides/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\NotAcceptableHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/NotAcceptableHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/NotFoundHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException' => __DIR__ . '/../..' . '/overrides/symfony/http-kernel/Exception/NotFoundHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\PreconditionFailedHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/PreconditionFailedHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\PreconditionRequiredHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\ServiceUnavailableHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\ServiceUnavailableHttpException' => __DIR__ . '/../..' . '/overrides/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\TooManyRequestsHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/TooManyRequestsHttpException.php', - 'Symfony\\Component\\HttpKernel\\Exception\\UnauthorizedHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/UnauthorizedHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\UnauthorizedHttpException' => __DIR__ . '/../..' . '/overrides/symfony/http-kernel/Exception/UnauthorizedHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\UnprocessableEntityHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\UnsupportedMediaTypeHttpException' => __DIR__ . '/..' . '/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php', 'Symfony\\Component\\HttpKernel\\Fragment\\AbstractSurrogateFragmentRenderer' => __DIR__ . '/..' . '/symfony/http-kernel/Fragment/AbstractSurrogateFragmentRenderer.php', @@ -3860,11 +3952,11 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Symfony\\Component\\Translation\\Extractor\\PhpExtractor' => __DIR__ . '/..' . '/symfony/translation/Extractor/PhpExtractor.php', 'Symfony\\Component\\Translation\\Extractor\\PhpStringTokenParser' => __DIR__ . '/..' . '/symfony/translation/Extractor/PhpStringTokenParser.php', 'Symfony\\Component\\Translation\\Formatter\\ChoiceMessageFormatterInterface' => __DIR__ . '/..' . '/symfony/translation/Formatter/ChoiceMessageFormatterInterface.php', - 'Symfony\\Component\\Translation\\Formatter\\MessageFormatter' => __DIR__ . '/..' . '/symfony/translation/Formatter/MessageFormatter.php', + 'Symfony\\Component\\Translation\\Formatter\\MessageFormatter' => __DIR__ . '/../..' . '/overrides/symfony/translation/Formatter/MessageFormatter.php', 'Symfony\\Component\\Translation\\Formatter\\MessageFormatterInterface' => __DIR__ . '/..' . '/symfony/translation/Formatter/MessageFormatterInterface.php', 'Symfony\\Component\\Translation\\IdentityTranslator' => __DIR__ . '/..' . '/symfony/translation/IdentityTranslator.php', 'Symfony\\Component\\Translation\\Interval' => __DIR__ . '/..' . '/symfony/translation/Interval.php', - 'Symfony\\Component\\Translation\\Loader\\ArrayLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/ArrayLoader.php', + 'Symfony\\Component\\Translation\\Loader\\ArrayLoader' => __DIR__ . '/../..' . '/overrides/symfony/translation/Loader/ArrayLoader.php', 'Symfony\\Component\\Translation\\Loader\\CsvFileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/CsvFileLoader.php', 'Symfony\\Component\\Translation\\Loader\\FileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/FileLoader.php', 'Symfony\\Component\\Translation\\Loader\\IcuDatFileLoader' => __DIR__ . '/..' . '/symfony/translation/Loader/IcuDatFileLoader.php', @@ -3886,7 +3978,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Symfony\\Component\\Translation\\PluralizationRules' => __DIR__ . '/..' . '/symfony/translation/PluralizationRules.php', 'Symfony\\Component\\Translation\\Reader\\TranslationReader' => __DIR__ . '/..' . '/symfony/translation/Reader/TranslationReader.php', 'Symfony\\Component\\Translation\\Reader\\TranslationReaderInterface' => __DIR__ . '/..' . '/symfony/translation/Reader/TranslationReaderInterface.php', - 'Symfony\\Component\\Translation\\Translator' => __DIR__ . '/..' . '/symfony/translation/Translator.php', + 'Symfony\\Component\\Translation\\Translator' => __DIR__ . '/../..' . '/overrides/symfony/translation/Translator.php', 'Symfony\\Component\\Translation\\TranslatorBagInterface' => __DIR__ . '/..' . '/symfony/translation/TranslatorBagInterface.php', 'Symfony\\Component\\Translation\\TranslatorInterface' => __DIR__ . '/..' . '/symfony/translation/TranslatorInterface.php', 'Symfony\\Component\\Translation\\Util\\ArrayConverter' => __DIR__ . '/..' . '/symfony/translation/Util/ArrayConverter.php', @@ -3977,12 +4069,13 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Webklex\\PHPIMAP\\Attachment' => __DIR__ . '/../..' . '/overrides/webklex/php-imap/src/Attachment.php', 'Webklex\\PHPIMAP\\Attribute' => __DIR__ . '/..' . '/webklex/php-imap/src/Attribute.php', 'Webklex\\PHPIMAP\\Client' => __DIR__ . '/../..' . '/overrides/webklex/php-imap/src/Client.php', - 'Webklex\\PHPIMAP\\ClientManager' => __DIR__ . '/..' . '/webklex/php-imap/src/ClientManager.php', + 'Webklex\\PHPIMAP\\ClientManager' => __DIR__ . '/../..' . '/overrides/webklex/php-imap/src/ClientManager.php', 'Webklex\\PHPIMAP\\Connection\\Protocols\\ImapProtocol' => __DIR__ . '/../..' . '/overrides/webklex/php-imap/src/Connection/Protocols/ImapProtocol.php', 'Webklex\\PHPIMAP\\Connection\\Protocols\\LegacyProtocol' => __DIR__ . '/../..' . '/overrides/webklex/php-imap/src/Connection/Protocols/LegacyProtocol.php', + 'Webklex\\PHPIMAP\\Connection\\Protocols\\PopProtocol' => __DIR__ . '/../..' . '/overrides/webklex/php-imap/src/Connection/Protocols/PopProtocol.php', 'Webklex\\PHPIMAP\\Connection\\Protocols\\Protocol' => __DIR__ . '/..' . '/webklex/php-imap/src/Connection/Protocols/Protocol.php', 'Webklex\\PHPIMAP\\Connection\\Protocols\\ProtocolInterface' => __DIR__ . '/..' . '/webklex/php-imap/src/Connection/Protocols/ProtocolInterface.php', - 'Webklex\\PHPIMAP\\EncodingAliases' => __DIR__ . '/..' . '/webklex/php-imap/src/EncodingAliases.php', + 'Webklex\\PHPIMAP\\EncodingAliases' => __DIR__ . '/../..' . '/overrides/webklex/php-imap/src/EncodingAliases.php', 'Webklex\\PHPIMAP\\Events\\Event' => __DIR__ . '/..' . '/webklex/php-imap/src/Events/Event.php', 'Webklex\\PHPIMAP\\Events\\FlagDeletedEvent' => __DIR__ . '/..' . '/webklex/php-imap/src/Events/FlagDeletedEvent.php', 'Webklex\\PHPIMAP\\Events\\FlagNewEvent' => __DIR__ . '/..' . '/webklex/php-imap/src/Events/FlagNewEvent.php', @@ -4012,13 +4105,13 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Webklex\\PHPIMAP\\Exceptions\\NotSupportedCapabilityException' => __DIR__ . '/..' . '/webklex/php-imap/src/Exceptions/NotSupportedCapabilityException.php', 'Webklex\\PHPIMAP\\Exceptions\\ProtocolNotSupportedException' => __DIR__ . '/..' . '/webklex/php-imap/src/Exceptions/ProtocolNotSupportedException.php', 'Webklex\\PHPIMAP\\Exceptions\\RuntimeException' => __DIR__ . '/..' . '/webklex/php-imap/src/Exceptions/RuntimeException.php', - 'Webklex\\PHPIMAP\\Folder' => __DIR__ . '/..' . '/webklex/php-imap/src/Folder.php', + 'Webklex\\PHPIMAP\\Folder' => __DIR__ . '/../..' . '/overrides/webklex/php-imap/src/Folder.php', 'Webklex\\PHPIMAP\\Header' => __DIR__ . '/../..' . '/overrides/webklex/php-imap/src/Header.php', 'Webklex\\PHPIMAP\\IMAP' => __DIR__ . '/..' . '/webklex/php-imap/src/IMAP.php', 'Webklex\\PHPIMAP\\Message' => __DIR__ . '/../..' . '/overrides/webklex/php-imap/src/Message.php', 'Webklex\\PHPIMAP\\Part' => __DIR__ . '/../..' . '/overrides/webklex/php-imap/src/Part.php', 'Webklex\\PHPIMAP\\Query\\Query' => __DIR__ . '/../..' . '/overrides/webklex/php-imap/src/Query/Query.php', - 'Webklex\\PHPIMAP\\Query\\WhereQuery' => __DIR__ . '/..' . '/webklex/php-imap/src/Query/WhereQuery.php', + 'Webklex\\PHPIMAP\\Query\\WhereQuery' => __DIR__ . '/../..' . '/overrides/webklex/php-imap/src/Query/WhereQuery.php', 'Webklex\\PHPIMAP\\Structure' => __DIR__ . '/../..' . '/overrides/webklex/php-imap/src/Structure.php', 'Webklex\\PHPIMAP\\Support\\AttachmentCollection' => __DIR__ . '/..' . '/webklex/php-imap/src/Support/AttachmentCollection.php', 'Webklex\\PHPIMAP\\Support\\FlagCollection' => __DIR__ . '/..' . '/webklex/php-imap/src/Support/FlagCollection.php', @@ -4029,6 +4122,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Webklex\\PHPIMAP\\Support\\MessageCollection' => __DIR__ . '/..' . '/webklex/php-imap/src/Support/MessageCollection.php', 'Webklex\\PHPIMAP\\Support\\PaginatedCollection' => __DIR__ . '/..' . '/webklex/php-imap/src/Support/PaginatedCollection.php', 'Webklex\\PHPIMAP\\Traits\\HasEvents' => __DIR__ . '/..' . '/webklex/php-imap/src/Traits/HasEvents.php', + 'Whoops\\Run' => __DIR__ . '/../..' . '/overrides/filp/whoops/src/Whoops/Run.php', 'XdgBaseDir\\Xdg' => __DIR__ . '/..' . '/dnoegel/php-xdg-base-dir/src/Xdg.php', 'aCssAtBlockEndToken' => __DIR__ . '/../..' . '/overrides/natxet/cssmin/src/CssMin.php', 'aCssAtBlockStartToken' => __DIR__ . '/../..' . '/overrides/natxet/cssmin/src/CssMin.php', diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 14319a682..5650e18ef 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'freescout-helpdesk/freescout', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => 'fa46d45662ab0a6713dbcef7eb315d3a4d931cbe', + 'reference' => '7efa8f5a1cd821f8d6ab93bafa20191d1f14213e', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -175,7 +175,7 @@ 'freescout-helpdesk/freescout' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => 'fa46d45662ab0a6713dbcef7eb315d3a4d931cbe', + 'reference' => '7efa8f5a1cd821f8d6ab93bafa20191d1f14213e', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), diff --git a/vendor/guzzlehttp/guzzle/src/HandlerStack.php b/vendor/guzzlehttp/guzzle/src/HandlerStack.php deleted file mode 100644 index 6a49cc069..000000000 --- a/vendor/guzzlehttp/guzzle/src/HandlerStack.php +++ /dev/null @@ -1,277 +0,0 @@ -push(Middleware::httpErrors(), 'http_errors'); - $stack->push(Middleware::redirect(), 'allow_redirects'); - $stack->push(Middleware::cookies(), 'cookies'); - $stack->push(Middleware::prepareBody(), 'prepare_body'); - - return $stack; - } - - /** - * @param callable $handler Underlying HTTP handler. - */ - public function __construct(callable $handler = null) - { - $this->handler = $handler; - } - - /** - * Invokes the handler stack as a composed handler - * - * @param RequestInterface $request - * @param array $options - * - * @return ResponseInterface|PromiseInterface - */ - public function __invoke(RequestInterface $request, array $options) - { - $handler = $this->resolve(); - - return $handler($request, $options); - } - - /** - * Dumps a string representation of the stack. - * - * @return string - */ - public function __toString() - { - $depth = 0; - $stack = []; - if ($this->handler) { - $stack[] = "0) Handler: " . $this->debugCallable($this->handler); - } - - $result = ''; - foreach (array_reverse($this->stack) as $tuple) { - $depth++; - $str = "{$depth}) Name: '{$tuple[1]}', "; - $str .= "Function: " . $this->debugCallable($tuple[0]); - $result = "> {$str}\n{$result}"; - $stack[] = $str; - } - - foreach (array_keys($stack) as $k) { - $result .= "< {$stack[$k]}\n"; - } - - return $result; - } - - /** - * Set the HTTP handler that actually returns a promise. - * - * @param callable $handler Accepts a request and array of options and - * returns a Promise. - */ - public function setHandler(callable $handler) - { - $this->handler = $handler; - $this->cached = null; - } - - /** - * Returns true if the builder has a handler. - * - * @return bool - */ - public function hasHandler() - { - return (bool) $this->handler; - } - - /** - * Unshift a middleware to the bottom of the stack. - * - * @param callable $middleware Middleware function - * @param string $name Name to register for this middleware. - */ - public function unshift(callable $middleware, $name = null) - { - array_unshift($this->stack, [$middleware, $name]); - $this->cached = null; - } - - /** - * Push a middleware to the top of the stack. - * - * @param callable $middleware Middleware function - * @param string $name Name to register for this middleware. - */ - public function push(callable $middleware, $name = '') - { - $this->stack[] = [$middleware, $name]; - $this->cached = null; - } - - /** - * Add a middleware before another middleware by name. - * - * @param string $findName Middleware to find - * @param callable $middleware Middleware function - * @param string $withName Name to register for this middleware. - */ - public function before($findName, callable $middleware, $withName = '') - { - $this->splice($findName, $withName, $middleware, true); - } - - /** - * Add a middleware after another middleware by name. - * - * @param string $findName Middleware to find - * @param callable $middleware Middleware function - * @param string $withName Name to register for this middleware. - */ - public function after($findName, callable $middleware, $withName = '') - { - $this->splice($findName, $withName, $middleware, false); - } - - /** - * Remove a middleware by instance or name from the stack. - * - * @param callable|string $remove Middleware to remove by instance or name. - */ - public function remove($remove) - { - $this->cached = null; - $idx = is_callable($remove) ? 0 : 1; - $this->stack = array_values(array_filter( - $this->stack, - function ($tuple) use ($idx, $remove) { - return $tuple[$idx] !== $remove; - } - )); - } - - /** - * Compose the middleware and handler into a single callable function. - * - * @return callable - */ - public function resolve() - { - if (!$this->cached) { - if (!($prev = $this->handler)) { - throw new \LogicException('No handler has been specified'); - } - - foreach (array_reverse($this->stack) as $fn) { - $prev = $fn[0]($prev); - } - - $this->cached = $prev; - } - - return $this->cached; - } - - /** - * @param string $name - * @return int - */ - private function findByName($name) - { - foreach ($this->stack as $k => $v) { - if ($v[1] === $name) { - return $k; - } - } - - throw new \InvalidArgumentException("Middleware not found: $name"); - } - - /** - * Splices a function into the middleware list at a specific position. - * - * @param string $findName - * @param string $withName - * @param callable $middleware - * @param bool $before - */ - private function splice($findName, $withName, callable $middleware, $before) - { - $this->cached = null; - $idx = $this->findByName($findName); - $tuple = [$middleware, $withName]; - - if ($before) { - if ($idx === 0) { - array_unshift($this->stack, $tuple); - } else { - $replacement = [$tuple, $this->stack[$idx]]; - array_splice($this->stack, $idx, 1, $replacement); - } - } elseif ($idx === count($this->stack) - 1) { - $this->stack[] = $tuple; - } else { - $replacement = [$this->stack[$idx], $tuple]; - array_splice($this->stack, $idx, 1, $replacement); - } - } - - /** - * Provides a debug string for a given callable. - * - * @param array|callable $fn Function to write as a string. - * - * @return string - */ - private function debugCallable($fn) - { - if (is_string($fn)) { - return "callable({$fn})"; - } - - if (is_array($fn)) { - return is_string($fn[0]) - ? "callable({$fn[0]}::{$fn[1]})" - : "callable(['" . get_class($fn[0]) . "', '{$fn[1]}'])"; - } - - return 'callable(' . spl_object_hash($fn) . ')'; - } -} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php b/vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php deleted file mode 100644 index dfc72cf02..000000000 --- a/vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php +++ /dev/null @@ -1,560 +0,0 @@ -policies = $policies; - $this->container = $container; - $this->abilities = $abilities; - $this->userResolver = $userResolver; - $this->afterCallbacks = $afterCallbacks; - $this->beforeCallbacks = $beforeCallbacks; - } - - /** - * Determine if a given ability has been defined. - * - * @param string|array $ability - * @return bool - */ - public function has($ability) - { - $abilities = is_array($ability) ? $ability : func_get_args(); - - foreach ($abilities as $ability) { - if (! isset($this->abilities[$ability])) { - return false; - } - } - - return true; - } - - /** - * Define a new ability. - * - * @param string $ability - * @param callable|string $callback - * @return $this - * - * @throws \InvalidArgumentException - */ - public function define($ability, $callback) - { - if (is_callable($callback)) { - $this->abilities[$ability] = $callback; - } elseif (is_string($callback) && Str::contains($callback, '@')) { - $this->abilities[$ability] = $this->buildAbilityCallback($ability, $callback); - } else { - throw new InvalidArgumentException("Callback must be a callable or a 'Class@method' string."); - } - - return $this; - } - - /** - * Define abilities for a resource. - * - * @param string $name - * @param string $class - * @param array $abilities - * @return $this - */ - public function resource($name, $class, array $abilities = null) - { - $abilities = $abilities ?: [ - 'view' => 'view', - 'create' => 'create', - 'update' => 'update', - 'delete' => 'delete', - ]; - - foreach ($abilities as $ability => $method) { - $this->define($name.'.'.$ability, $class.'@'.$method); - } - - return $this; - } - - /** - * Create the ability callback for a callback string. - * - * @param string $ability - * @param string $callback - * @return \Closure - */ - protected function buildAbilityCallback($ability, $callback) - { - return function () use ($ability, $callback) { - list($class, $method) = Str::parseCallback($callback); - - $policy = $this->resolvePolicy($class); - - $arguments = func_get_args(); - - $user = array_shift($arguments); - - $result = $this->callPolicyBefore( - $policy, $user, $ability, $arguments - ); - - if (! is_null($result)) { - return $result; - } - - return $policy->{$method}(...func_get_args()); - }; - } - - /** - * Define a policy class for a given class type. - * - * @param string $class - * @param string $policy - * @return $this - */ - public function policy($class, $policy) - { - $this->policies[$class] = $policy; - - return $this; - } - - /** - * Register a callback to run before all Gate checks. - * - * @param callable $callback - * @return $this - */ - public function before(callable $callback) - { - $this->beforeCallbacks[] = $callback; - - return $this; - } - - /** - * Register a callback to run after all Gate checks. - * - * @param callable $callback - * @return $this - */ - public function after(callable $callback) - { - $this->afterCallbacks[] = $callback; - - return $this; - } - - /** - * Determine if the given ability should be granted for the current user. - * - * @param string $ability - * @param array|mixed $arguments - * @return bool - */ - public function allows($ability, $arguments = []) - { - return $this->check($ability, $arguments); - } - - /** - * Determine if the given ability should be denied for the current user. - * - * @param string $ability - * @param array|mixed $arguments - * @return bool - */ - public function denies($ability, $arguments = []) - { - return ! $this->allows($ability, $arguments); - } - - /** - * Determine if all of the given abilities should be granted for the current user. - * - * @param iterable|string $abilities - * @param array|mixed $arguments - * @return bool - */ - public function check($abilities, $arguments = []) - { - return collect($abilities)->every(function ($ability) use ($arguments) { - try { - return (bool) $this->raw($ability, $arguments); - } catch (AuthorizationException $e) { - return false; - } - }); - } - - /** - * Determine if any one of the given abilities should be granted for the current user. - * - * @param iterable|string $abilities - * @param array|mixed $arguments - * @return bool - */ - public function any($abilities, $arguments = []) - { - return collect($abilities)->contains(function ($ability) use ($arguments) { - return $this->check($ability, $arguments); - }); - } - - /** - * Determine if the given ability should be granted for the current user. - * - * @param string $ability - * @param array|mixed $arguments - * @return \Illuminate\Auth\Access\Response - * - * @throws \Illuminate\Auth\Access\AuthorizationException - */ - public function authorize($ability, $arguments = []) - { - $result = $this->raw($ability, $arguments); - - if ($result instanceof Response) { - return $result; - } - - return $result ? $this->allow() : $this->deny(); - } - - /** - * Get the raw result from the authorization callback. - * - * @param string $ability - * @param array|mixed $arguments - * @return mixed - */ - protected function raw($ability, $arguments = []) - { - if (! $user = $this->resolveUser()) { - return false; - } - - $arguments = Arr::wrap($arguments); - - // First we will call the "before" callbacks for the Gate. If any of these give - // back a non-null response, we will immediately return that result in order - // to let the developers override all checks for some authorization cases. - $result = $this->callBeforeCallbacks( - $user, $ability, $arguments - ); - - if (is_null($result)) { - $result = $this->callAuthCallback($user, $ability, $arguments); - } - - // After calling the authorization callback, we will call the "after" callbacks - // that are registered with the Gate, which allows a developer to do logging - // if that is required for this application. Then we'll return the result. - $this->callAfterCallbacks( - $user, $ability, $arguments, $result - ); - - return $result; - } - - /** - * Resolve and call the appropriate authorization callback. - * - * @param \Illuminate\Contracts\Auth\Authenticatable $user - * @param string $ability - * @param array $arguments - * @return bool - */ - protected function callAuthCallback($user, $ability, array $arguments) - { - $callback = $this->resolveAuthCallback($user, $ability, $arguments); - - return $callback($user, ...$arguments); - } - - /** - * Call all of the before callbacks and return if a result is given. - * - * @param \Illuminate\Contracts\Auth\Authenticatable $user - * @param string $ability - * @param array $arguments - * @return bool|null - */ - protected function callBeforeCallbacks($user, $ability, array $arguments) - { - $arguments = array_merge([$user, $ability], [$arguments]); - - foreach ($this->beforeCallbacks as $before) { - if (! is_null($result = $before(...$arguments))) { - return $result; - } - } - } - - /** - * Call all of the after callbacks with check result. - * - * @param \Illuminate\Contracts\Auth\Authenticatable $user - * @param string $ability - * @param array $arguments - * @param bool $result - * @return void - */ - protected function callAfterCallbacks($user, $ability, array $arguments, $result) - { - $arguments = array_merge([$user, $ability, $result], [$arguments]); - - foreach ($this->afterCallbacks as $after) { - $after(...$arguments); - } - } - - /** - * Resolve the callable for the given ability and arguments. - * - * @param \Illuminate\Contracts\Auth\Authenticatable $user - * @param string $ability - * @param array $arguments - * @return callable - */ - protected function resolveAuthCallback($user, $ability, array $arguments) - { - if (isset($arguments[0]) && - ! is_null($policy = $this->getPolicyFor($arguments[0])) && - $callback = $this->resolvePolicyCallback($user, $ability, $arguments, $policy)) { - return $callback; - } - - if (isset($this->abilities[$ability])) { - return $this->abilities[$ability]; - } - - return function () { - return false; - }; - } - - /** - * Get a policy instance for a given class. - * - * @param object|string $class - * @return mixed - */ - public function getPolicyFor($class) - { - if (is_object($class)) { - $class = get_class($class); - } - - if (! is_string($class)) { - return; - } - - if (isset($this->policies[$class])) { - return $this->resolvePolicy($this->policies[$class]); - } - - foreach ($this->policies as $expected => $policy) { - if (is_subclass_of($class, $expected)) { - return $this->resolvePolicy($policy); - } - } - } - - /** - * Build a policy class instance of the given type. - * - * @param object|string $class - * @return mixed - */ - public function resolvePolicy($class) - { - return $this->container->make($class); - } - - /** - * Resolve the callback for a policy check. - * - * @param \Illuminate\Contracts\Auth\Authenticatable $user - * @param string $ability - * @param array $arguments - * @param mixed $policy - * @return bool|callable - */ - protected function resolvePolicyCallback($user, $ability, array $arguments, $policy) - { - if (! is_callable([$policy, $this->formatAbilityToMethod($ability)])) { - return false; - } - - return function () use ($user, $ability, $arguments, $policy) { - // This callback will be responsible for calling the policy's before method and - // running this policy method if necessary. This is used to when objects are - // mapped to policy objects in the user's configurations or on this class. - $result = $this->callPolicyBefore( - $policy, $user, $ability, $arguments - ); - - // When we receive a non-null result from this before method, we will return it - // as the "final" results. This will allow developers to override the checks - // in this policy to return the result for all rules defined in the class. - if (! is_null($result)) { - return $result; - } - - $ability = $this->formatAbilityToMethod($ability); - - // If this first argument is a string, that means they are passing a class name - // to the policy. We will remove the first argument from this argument array - // because this policy already knows what type of models it can authorize. - if (isset($arguments[0]) && is_string($arguments[0])) { - array_shift($arguments); - } - - return is_callable([$policy, $ability]) - ? $policy->{$ability}($user, ...$arguments) - : false; - }; - } - - /** - * Call the "before" method on the given policy, if applicable. - * - * @param mixed $policy - * @param \Illuminate\Contracts\Auth\Authenticatable $user - * @param string $ability - * @param array $arguments - * @return mixed - */ - protected function callPolicyBefore($policy, $user, $ability, $arguments) - { - if (method_exists($policy, 'before')) { - return $policy->before($user, $ability, ...$arguments); - } - } - - /** - * Format the policy ability into a method name. - * - * @param string $ability - * @return string - */ - protected function formatAbilityToMethod($ability) - { - return strpos($ability, '-') !== false ? Str::camel($ability) : $ability; - } - - /** - * Get a gate instance for the given user. - * - * @param \Illuminate\Contracts\Auth\Authenticatable|mixed $user - * @return static - */ - public function forUser($user) - { - $callback = function () use ($user) { - return $user; - }; - - return new static( - $this->container, $callback, $this->abilities, - $this->policies, $this->beforeCallbacks, $this->afterCallbacks - ); - } - - /** - * Resolve the user from the user resolver. - * - * @return mixed - */ - protected function resolveUser() - { - return call_user_func($this->userResolver); - } - - /** - * Get all of the defined abilities. - * - * @return array - */ - public function abilities() - { - return $this->abilities; - } - - /** - * Get all of the defined policies. - * - * @return array - */ - public function policies() - { - return $this->policies; - } -} diff --git a/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php b/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php deleted file mode 100644 index 1b4f6101d..000000000 --- a/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php +++ /dev/null @@ -1,312 +0,0 @@ -app = $app; - } - - /** - * Register the routes for handling broadcast authentication and sockets. - * - * @param array|null $attributes - * @return void - */ - public function routes(array $attributes = null) - { - if ($this->app->routesAreCached()) { - return; - } - - $attributes = $attributes ?: ['middleware' => ['web']]; - - $this->app['router']->group($attributes, function ($router) { - $router->post('/broadcasting/auth', '\\'.BroadcastController::class.'@authenticate'); - }); - } - - /** - * Get the socket ID for the given request. - * - * @param \Illuminate\Http\Request|null $request - * @return string|null - */ - public function socket($request = null) - { - if (! $request && ! $this->app->bound('request')) { - return; - } - - $request = $request ?: $this->app['request']; - - return $request->header('X-Socket-ID'); - } - - /** - * Begin broadcasting an event. - * - * @param mixed|null $event - * @return \Illuminate\Broadcasting\PendingBroadcast|void - */ - public function event($event = null) - { - return new PendingBroadcast($this->app->make('events'), $event); - } - - /** - * Queue the given event for broadcast. - * - * @param mixed $event - * @return void - */ - public function queue($event) - { - $connection = $event instanceof ShouldBroadcastNow ? 'sync' : null; - - if (is_null($connection) && isset($event->connection)) { - $connection = $event->connection; - } - - $queue = null; - - if (method_exists($event, 'broadcastQueue')) { - $queue = $event->broadcastQueue(); - } elseif (isset($event->broadcastQueue)) { - $queue = $event->broadcastQueue; - } elseif (isset($event->queue)) { - $queue = $event->queue; - } - - $this->app->make('queue')->connection($connection)->pushOn( - $queue, new BroadcastEvent(clone $event) - ); - } - - /** - * Get a driver instance. - * - * @param string $driver - * @return mixed - */ - public function connection($driver = null) - { - return $this->driver($driver); - } - - /** - * Get a driver instance. - * - * @param string $name - * @return mixed - */ - public function driver($name = null) - { - $name = $name ?: $this->getDefaultDriver(); - - return $this->drivers[$name] = $this->get($name); - } - - /** - * Attempt to get the connection from the local cache. - * - * @param string $name - * @return \Illuminate\Contracts\Broadcasting\Broadcaster - */ - protected function get($name) - { - return $this->drivers[$name] ?? $this->resolve($name); - } - - /** - * Resolve the given store. - * - * @param string $name - * @return \Illuminate\Contracts\Broadcasting\Broadcaster - * - * @throws \InvalidArgumentException - */ - protected function resolve($name) - { - $config = $this->getConfig($name); - - if (is_null($config)) { - throw new InvalidArgumentException("Broadcaster [{$name}] is not defined."); - } - - if (isset($this->customCreators[$config['driver']])) { - return $this->callCustomCreator($config); - } - - $driverMethod = 'create'.ucfirst($config['driver']).'Driver'; - - if (! method_exists($this, $driverMethod)) { - throw new InvalidArgumentException("Driver [{$config['driver']}] is not supported."); - } - - return $this->{$driverMethod}($config); - } - - /** - * Call a custom driver creator. - * - * @param array $config - * @return mixed - */ - protected function callCustomCreator(array $config) - { - return $this->customCreators[$config['driver']]($this->app, $config); - } - - /** - * Create an instance of the driver. - * - * @param array $config - * @return \Illuminate\Contracts\Broadcasting\Broadcaster - */ - protected function createPusherDriver(array $config) - { - return new PusherBroadcaster( - new Pusher($config['key'], $config['secret'], - $config['app_id'], $config['options'] ?? []) - ); - } - - /** - * Create an instance of the driver. - * - * @param array $config - * @return \Illuminate\Contracts\Broadcasting\Broadcaster - */ - protected function createRedisDriver(array $config) - { - return new RedisBroadcaster( - $this->app->make('redis'), $config['connection'] ?? null - ); - } - - /** - * Create an instance of the driver. - * - * @param array $config - * @return \Illuminate\Contracts\Broadcasting\Broadcaster - */ - protected function createLogDriver(array $config) - { - return new LogBroadcaster( - $this->app->make(LoggerInterface::class) - ); - } - - /** - * Create an instance of the driver. - * - * @param array $config - * @return \Illuminate\Contracts\Broadcasting\Broadcaster - */ - protected function createNullDriver(array $config) - { - return new NullBroadcaster; - } - - /** - * Get the connection configuration. - * - * @param string $name - * @return array - */ - protected function getConfig($name) - { - return $this->app['config']["broadcasting.connections.{$name}"]; - } - - /** - * Get the default driver name. - * - * @return string - */ - public function getDefaultDriver() - { - return $this->app['config']['broadcasting.default']; - } - - /** - * Set the default driver name. - * - * @param string $name - * @return void - */ - public function setDefaultDriver($name) - { - $this->app['config']['broadcasting.default'] = $name; - } - - /** - * Register a custom driver creator Closure. - * - * @param string $driver - * @param \Closure $callback - * @return $this - */ - public function extend($driver, Closure $callback) - { - $this->customCreators[$driver] = $callback; - - return $this; - } - - /** - * Dynamically call the default driver instance. - * - * @param string $method - * @param array $parameters - * @return mixed - */ - public function __call($method, $parameters) - { - return $this->driver()->$method(...$parameters); - } -} diff --git a/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php b/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php deleted file mode 100644 index 1a7b9a408..000000000 --- a/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php +++ /dev/null @@ -1,212 +0,0 @@ -container = $container; - $this->queueResolver = $queueResolver; - $this->pipeline = new Pipeline($container); - } - - /** - * Dispatch a command to its appropriate handler. - * - * @param mixed $command - * @return mixed - */ - public function dispatch($command) - { - if ($this->queueResolver && $this->commandShouldBeQueued($command)) { - return $this->dispatchToQueue($command); - } - - return $this->dispatchNow($command); - } - - /** - * Dispatch a command to its appropriate handler in the current process. - * - * @param mixed $command - * @param mixed $handler - * @return mixed - */ - public function dispatchNow($command, $handler = null) - { - if ($handler || $handler = $this->getCommandHandler($command)) { - $callback = function ($command) use ($handler) { - return $handler->handle($command); - }; - } else { - $callback = function ($command) { - return $this->container->call([$command, 'handle']); - }; - } - - return $this->pipeline->send($command)->through($this->pipes)->then($callback); - } - - /** - * Determine if the given command has a handler. - * - * @param mixed $command - * @return bool - */ - public function hasCommandHandler($command) - { - return array_key_exists(get_class($command), $this->handlers); - } - - /** - * Retrieve the handler for a command. - * - * @param mixed $command - * @return bool|mixed - */ - public function getCommandHandler($command) - { - if ($this->hasCommandHandler($command)) { - return $this->container->make($this->handlers[get_class($command)]); - } - - return false; - } - - /** - * Determine if the given command should be queued. - * - * @param mixed $command - * @return bool - */ - protected function commandShouldBeQueued($command) - { - return $command instanceof ShouldQueue; - } - - /** - * Dispatch a command to its appropriate handler behind a queue. - * - * @param mixed $command - * @return mixed - * - * @throws \RuntimeException - */ - public function dispatchToQueue($command) - { - $connection = $command->connection ?? null; - - $queue = call_user_func($this->queueResolver, $connection); - - if (! $queue instanceof Queue) { - throw new RuntimeException('Queue resolver did not return a Queue implementation.'); - } - - if (method_exists($command, 'queue')) { - return $command->queue($queue, $command); - } - - return $this->pushCommandToQueue($queue, $command); - } - - /** - * Push the command onto the given queue instance. - * - * @param \Illuminate\Contracts\Queue\Queue $queue - * @param mixed $command - * @return mixed - */ - protected function pushCommandToQueue($queue, $command) - { - if (isset($command->queue, $command->delay)) { - return $queue->laterOn($command->queue, $command->delay, $command); - } - - if (isset($command->queue)) { - return $queue->pushOn($command->queue, $command); - } - - if (isset($command->delay)) { - return $queue->later($command->delay, $command); - } - - return $queue->push($command); - } - - /** - * Set the pipes through which commands should be piped before dispatching. - * - * @param array $pipes - * @return $this - */ - public function pipeThrough(array $pipes) - { - $this->pipes = $pipes; - - return $this; - } - - /** - * Map a command to a handler. - * - * @param array $map - * @return $this - */ - public function map(array $map) - { - $this->handlers = array_merge($this->handlers, $map); - - return $this; - } -} diff --git a/vendor/laravel/framework/src/Illuminate/Console/Application.php b/vendor/laravel/framework/src/Illuminate/Console/Application.php deleted file mode 100755 index c53221bf0..000000000 --- a/vendor/laravel/framework/src/Illuminate/Console/Application.php +++ /dev/null @@ -1,283 +0,0 @@ -laravel = $laravel; - $this->events = $events; - $this->setAutoExit(false); - $this->setCatchExceptions(false); - - $this->events->dispatch(new Events\ArtisanStarting($this)); - - $this->bootstrap(); - } - - /** - * {@inheritdoc} - */ - public function run(InputInterface $input = null, OutputInterface $output = null) - { - $commandName = $this->getCommandName( - $input = $input ?: new ArgvInput - ); - - $this->events->fire( - new Events\CommandStarting( - $commandName, $input, $output = $output ?: new ConsoleOutput - ) - ); - - $exitCode = parent::run($input, $output); - - $this->events->fire( - new Events\CommandFinished($commandName, $input, $output, $exitCode) - ); - - return $exitCode; - } - - /** - * Determine the proper PHP executable. - * - * @return string - */ - public static function phpBinary() - { - return ProcessUtils::escapeArgument((new PhpExecutableFinder)->find(false)); - } - - /** - * Determine the proper Artisan executable. - * - * @return string - */ - public static function artisanBinary() - { - return defined('ARTISAN_BINARY') ? ProcessUtils::escapeArgument(ARTISAN_BINARY) : 'artisan'; - } - - /** - * Format the given command as a fully-qualified executable command. - * - * @param string $string - * @return string - */ - public static function formatCommandString($string) - { - return sprintf('%s %s %s', static::phpBinary(), static::artisanBinary(), $string); - } - - /** - * Register a console "starting" bootstrapper. - * - * @param \Closure $callback - * @return void - */ - public static function starting(Closure $callback) - { - static::$bootstrappers[] = $callback; - } - - /** - * Bootstrap the console application. - * - * @return void - */ - protected function bootstrap() - { - foreach (static::$bootstrappers as $bootstrapper) { - $bootstrapper($this); - } - } - - /** - * Clear the console application bootstrappers. - * - * @return void - */ - public static function forgetBootstrappers() - { - static::$bootstrappers = []; - } - - /** - * Run an Artisan console command by name. - * - * @param string $command - * @param array $parameters - * @param \Symfony\Component\Console\Output\OutputInterface $outputBuffer - * @return int - */ - public function call($command, array $parameters = [], $outputBuffer = null) - { - $parameters = collect($parameters)->prepend($command); - - $this->lastOutput = $outputBuffer ?: new BufferedOutput; - - $this->setCatchExceptions(false); - - $result = $this->run(new ArrayInput($parameters->toArray()), $this->lastOutput); - - $this->setCatchExceptions(true); - - return $result; - } - - /** - * Get the output for the last run command. - * - * @return string - */ - public function output() - { - return $this->lastOutput ? $this->lastOutput->fetch() : ''; - } - - /** - * Add a command to the console. - * - * @param \Symfony\Component\Console\Command\Command $command - * @return \Symfony\Component\Console\Command\Command - */ - public function add(SymfonyCommand $command) - { - if ($command instanceof Command) { - $command->setLaravel($this->laravel); - } - - return $this->addToParent($command); - } - - /** - * Add the command to the parent instance. - * - * @param \Symfony\Component\Console\Command\Command $command - * @return \Symfony\Component\Console\Command\Command - */ - protected function addToParent(SymfonyCommand $command) - { - return parent::add($command); - } - - /** - * Add a command, resolving through the application. - * - * @param string $command - * @return \Symfony\Component\Console\Command\Command - */ - public function resolve($command) - { - return $this->add($this->laravel->make($command)); - } - - /** - * Resolve an array of commands through the application. - * - * @param array|mixed $commands - * @return $this - */ - public function resolveCommands($commands) - { - $commands = is_array($commands) ? $commands : func_get_args(); - - foreach ($commands as $command) { - $this->resolve($command); - } - - return $this; - } - - /** - * Get the default input definitions for the applications. - * - * This is used to add the --env option to every available command. - * - * @return \Symfony\Component\Console\Input\InputDefinition - */ - protected function getDefaultInputDefinition() - { - return tap(parent::getDefaultInputDefinition(), function ($definition) { - $definition->addOption($this->getEnvironmentOption()); - }); - } - - /** - * Get the global environment option for the definition. - * - * @return \Symfony\Component\Console\Input\InputOption - */ - protected function getEnvironmentOption() - { - $message = 'The environment the command should run under'; - - return new InputOption('--env', null, InputOption::VALUE_OPTIONAL, $message); - } - - /** - * Get the Laravel application instance. - * - * @return \Illuminate\Contracts\Foundation\Application - */ - public function getLaravel() - { - return $this->laravel; - } -} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php deleted file mode 100755 index 60e21e14e..000000000 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php +++ /dev/null @@ -1,1330 +0,0 @@ -query = $query; - } - - /** - * Create and return an un-saved model instance. - * - * @param array $attributes - * @return \Illuminate\Database\Eloquent\Model - */ - public function make(array $attributes = []) - { - return $this->newModelInstance($attributes); - } - - /** - * Register a new global scope. - * - * @param string $identifier - * @param \Illuminate\Database\Eloquent\Scope|\Closure $scope - * @return $this - */ - public function withGlobalScope($identifier, $scope) - { - $this->scopes[$identifier] = $scope; - - if (method_exists($scope, 'extend')) { - $scope->extend($this); - } - - return $this; - } - - /** - * Remove a registered global scope. - * - * @param \Illuminate\Database\Eloquent\Scope|string $scope - * @return $this - */ - public function withoutGlobalScope($scope) - { - if (! is_string($scope)) { - $scope = get_class($scope); - } - - unset($this->scopes[$scope]); - - $this->removedScopes[] = $scope; - - return $this; - } - - /** - * Remove all or passed registered global scopes. - * - * @param array|null $scopes - * @return $this - */ - public function withoutGlobalScopes(array $scopes = null) - { - if (is_array($scopes)) { - foreach ($scopes as $scope) { - $this->withoutGlobalScope($scope); - } - } else { - $this->scopes = []; - } - - return $this; - } - - /** - * Get an array of global scopes that were removed from the query. - * - * @return array - */ - public function removedScopes() - { - return $this->removedScopes; - } - - /** - * Add a where clause on the primary key to the query. - * - * @param mixed $id - * @return $this - */ - public function whereKey($id) - { - if (is_array($id) || $id instanceof Arrayable) { - $this->query->whereIn($this->model->getQualifiedKeyName(), $id); - - return $this; - } - - return $this->where($this->model->getQualifiedKeyName(), '=', $id); - } - - /** - * Add a where clause on the primary key to the query. - * - * @param mixed $id - * @return $this - */ - public function whereKeyNot($id) - { - if (is_array($id) || $id instanceof Arrayable) { - $this->query->whereNotIn($this->model->getQualifiedKeyName(), $id); - - return $this; - } - - return $this->where($this->model->getQualifiedKeyName(), '!=', $id); - } - - /** - * Add a basic where clause to the query. - * - * @param string|array|\Closure $column - * @param string $operator - * @param mixed $value - * @param string $boolean - * @return $this - */ - public function where($column, $operator = null, $value = null, $boolean = 'and') - { - if ($column instanceof Closure) { - $query = $this->model->newQueryWithoutScopes(); - - $column($query); - - $this->query->addNestedWhereQuery($query->getQuery(), $boolean); - } else { - $this->query->where(...func_get_args()); - } - - return $this; - } - - /** - * Add an "or where" clause to the query. - * - * @param \Closure|array|string $column - * @param string $operator - * @param mixed $value - * @return \Illuminate\Database\Eloquent\Builder|static - */ - public function orWhere($column, $operator = null, $value = null) - { - list($value, $operator) = $this->query->prepareValueAndOperator( - $value, $operator, func_num_args() == 2 - ); - - return $this->where($column, $operator, $value, 'or'); - } - - /** - * Create a collection of models from plain arrays. - * - * @param array $items - * @return \Illuminate\Database\Eloquent\Collection - */ - public function hydrate(array $items) - { - $instance = $this->newModelInstance(); - - return $instance->newCollection(array_map(function ($item) use ($instance) { - return $instance->newFromBuilder($item); - }, $items)); - } - - /** - * Create a collection of models from a raw query. - * - * @param string $query - * @param array $bindings - * @return \Illuminate\Database\Eloquent\Collection - */ - public function fromQuery($query, $bindings = []) - { - return $this->hydrate( - $this->query->getConnection()->select($query, $bindings) - ); - } - - /** - * Find a model by its primary key. - * - * @param mixed $id - * @param array $columns - * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|static[]|static|null - */ - public function find($id, $columns = ['*']) - { - if (is_array($id) || $id instanceof Arrayable) { - return $this->findMany($id, $columns); - } - - return $this->whereKey($id)->first($columns); - } - - /** - * Find multiple models by their primary keys. - * - * @param \Illuminate\Contracts\Support\Arrayable|array $ids - * @param array $columns - * @return \Illuminate\Database\Eloquent\Collection - */ - public function findMany($ids, $columns = ['*']) - { - if (empty($ids)) { - return $this->model->newCollection(); - } - - return $this->whereKey($ids)->get($columns); - } - - /** - * Find a model by its primary key or throw an exception. - * - * @param mixed $id - * @param array $columns - * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection - * - * @throws \Illuminate\Database\Eloquent\ModelNotFoundException - */ - public function findOrFail($id, $columns = ['*']) - { - $result = $this->find($id, $columns); - - if (is_array($id)) { - if (count($result) == count(array_unique($id))) { - return $result; - } - } elseif (! is_null($result)) { - return $result; - } - - throw (new ModelNotFoundException)->setModel( - get_class($this->model), $id - ); - } - - /** - * Find a model by its primary key or return fresh model instance. - * - * @param mixed $id - * @param array $columns - * @return \Illuminate\Database\Eloquent\Model - */ - public function findOrNew($id, $columns = ['*']) - { - if (! is_null($model = $this->find($id, $columns))) { - return $model; - } - - return $this->newModelInstance(); - } - - /** - * Get the first record matching the attributes or instantiate it. - * - * @param array $attributes - * @param array $values - * @return \Illuminate\Database\Eloquent\Model - */ - public function firstOrNew(array $attributes, array $values = []) - { - if (! is_null($instance = $this->where($attributes)->first())) { - return $instance; - } - - return $this->newModelInstance($attributes + $values); - } - - /** - * Get the first record matching the attributes or create it. - * - * @param array $attributes - * @param array $values - * @return \Illuminate\Database\Eloquent\Model - */ - public function firstOrCreate(array $attributes, array $values = []) - { - if (! is_null($instance = $this->where($attributes)->first())) { - return $instance; - } - - return tap($this->newModelInstance($attributes + $values), function ($instance) { - $instance->save(); - }); - } - - /** - * Create or update a record matching the attributes, and fill it with values. - * - * @param array $attributes - * @param array $values - * @return \Illuminate\Database\Eloquent\Model - */ - public function updateOrCreate(array $attributes, array $values = []) - { - return tap($this->firstOrNew($attributes), function ($instance) use ($values) { - $instance->fill($values)->save(); - }); - } - - /** - * Execute the query and get the first result or throw an exception. - * - * @param array $columns - * @return \Illuminate\Database\Eloquent\Model|static - * - * @throws \Illuminate\Database\Eloquent\ModelNotFoundException - */ - public function firstOrFail($columns = ['*']) - { - if (! is_null($model = $this->first($columns))) { - return $model; - } - - throw (new ModelNotFoundException)->setModel(get_class($this->model)); - } - - /** - * Execute the query and get the first result or call a callback. - * - * @param \Closure|array $columns - * @param \Closure|null $callback - * @return \Illuminate\Database\Eloquent\Model|static|mixed - */ - public function firstOr($columns = ['*'], Closure $callback = null) - { - if ($columns instanceof Closure) { - $callback = $columns; - - $columns = ['*']; - } - - if (! is_null($model = $this->first($columns))) { - return $model; - } - - return call_user_func($callback); - } - - /** - * Get a single column's value from the first result of a query. - * - * @param string $column - * @return mixed - */ - public function value($column) - { - if ($result = $this->first([$column])) { - return $result->{$column}; - } - } - - /** - * Execute the query as a "select" statement. - * - * @param array $columns - * @return \Illuminate\Database\Eloquent\Collection|static[] - */ - public function get($columns = ['*']) - { - $builder = $this->applyScopes(); - - // If we actually found models we will also eager load any relationships that - // have been specified as needing to be eager loaded, which will solve the - // n+1 query issue for the developers to avoid running a lot of queries. - if (count($models = $builder->getModels($columns)) > 0) { - $models = $builder->eagerLoadRelations($models); - } - - return $builder->getModel()->newCollection($models); - } - - /** - * Get the hydrated models without eager loading. - * - * @param array $columns - * @return \Illuminate\Database\Eloquent\Model[] - */ - public function getModels($columns = ['*']) - { - return $this->model->hydrate( - $this->query->get($columns)->all() - )->all(); - } - - /** - * Eager load the relationships for the models. - * - * @param array $models - * @return array - */ - public function eagerLoadRelations(array $models) - { - foreach ($this->eagerLoad as $name => $constraints) { - // For nested eager loads we'll skip loading them here and they will be set as an - // eager load on the query to retrieve the relation so that they will be eager - // loaded on that query, because that is where they get hydrated as models. - if (strpos($name, '.') === false) { - $models = $this->eagerLoadRelation($models, $name, $constraints); - } - } - - return $models; - } - - /** - * Eagerly load the relationship on a set of models. - * - * @param array $models - * @param string $name - * @param \Closure $constraints - * @return array - */ - protected function eagerLoadRelation(array $models, $name, Closure $constraints) - { - // First we will "back up" the existing where conditions on the query so we can - // add our eager constraints. Then we will merge the wheres that were on the - // query back to it in order that any where conditions might be specified. - $relation = $this->getRelation($name); - - $relation->addEagerConstraints($models); - - $constraints($relation); - - // Once we have the results, we just match those back up to their parent models - // using the relationship instance. Then we just return the finished arrays - // of models which have been eagerly hydrated and are readied for return. - return $relation->match( - $relation->initRelation($models, $name), - $relation->getEager(), $name - ); - } - - /** - * Get the relation instance for the given relation name. - * - * @param string $name - * @return \Illuminate\Database\Eloquent\Relations\Relation - */ - public function getRelation($name) - { - // We want to run a relationship query without any constrains so that we will - // not have to remove these where clauses manually which gets really hacky - // and error prone. We don't want constraints because we add eager ones. - $relation = Relation::noConstraints(function () use ($name) { - try { - return $this->getModel()->{$name}(); - } catch (BadMethodCallException $e) { - throw RelationNotFoundException::make($this->getModel(), $name); - } - }); - - $nested = $this->relationsNestedUnder($name); - - // If there are nested relationships set on the query, we will put those onto - // the query instances so that they can be handled after this relationship - // is loaded. In this way they will all trickle down as they are loaded. - if (count($nested) > 0) { - $relation->getQuery()->with($nested); - } - - return $relation; - } - - /** - * Get the deeply nested relations for a given top-level relation. - * - * @param string $relation - * @return array - */ - protected function relationsNestedUnder($relation) - { - $nested = []; - - // We are basically looking for any relationships that are nested deeper than - // the given top-level relationship. We will just check for any relations - // that start with the given top relations and adds them to our arrays. - foreach ($this->eagerLoad as $name => $constraints) { - if ($this->isNestedUnder($relation, $name)) { - $nested[substr($name, strlen($relation.'.'))] = $constraints; - } - } - - return $nested; - } - - /** - * Determine if the relationship is nested. - * - * @param string $relation - * @param string $name - * @return bool - */ - protected function isNestedUnder($relation, $name) - { - return Str::contains($name, '.') && Str::startsWith($name, $relation.'.'); - } - - /** - * Get a generator for the given query. - * - * @return \Generator - */ - public function cursor() - { - foreach ($this->applyScopes()->query->cursor() as $record) { - yield $this->model->newFromBuilder($record); - } - } - - /** - * Chunk the results of a query by comparing numeric IDs. - * - * @param int $count - * @param callable $callback - * @param string $column - * @param string|null $alias - * @return bool - */ - public function chunkById($count, callable $callback, $column = null, $alias = null) - { - $column = is_null($column) ? $this->getModel()->getKeyName() : $column; - - $alias = is_null($alias) ? $column : $alias; - - $lastId = 0; - - do { - $clone = clone $this; - - // We'll execute the query for the given page and get the results. If there are - // no results we can just break and return from here. When there are results - // we will call the callback with the current chunk of these results here. - $results = $clone->forPageAfterId($count, $lastId, $column)->get(); - - $countResults = $results->count(); - - if ($countResults == 0) { - break; - } - - // On each chunk result set, we will pass them to the callback and then let the - // developer take care of everything within the callback, which allows us to - // keep the memory low for spinning through large result sets for working. - if ($callback($results) === false) { - return false; - } - - $lastId = $results->last()->{$alias}; - - unset($results); - } while ($countResults == $count); - - return true; - } - - /** - * Add a generic "order by" clause if the query doesn't already have one. - * - * @return void - */ - protected function enforceOrderBy() - { - if (empty($this->query->orders) && empty($this->query->unionOrders)) { - $this->orderBy($this->model->getQualifiedKeyName(), 'asc'); - } - } - - /** - * Get an array with the values of a given column. - * - * @param string $column - * @param string|null $key - * @return \Illuminate\Support\Collection - */ - public function pluck($column, $key = null) - { - $results = $this->toBase()->pluck($column, $key); - - // If the model has a mutator for the requested column, we will spin through - // the results and mutate the values so that the mutated version of these - // columns are returned as you would expect from these Eloquent models. - if (! $this->model->hasGetMutator($column) && - ! $this->model->hasCast($column) && - ! in_array($column, $this->model->getDates())) { - return $results; - } - - return $results->map(function ($value) use ($column) { - return $this->model->newFromBuilder([$column => $value])->{$column}; - }); - } - - /** - * Paginate the given query. - * - * @param int $perPage - * @param array $columns - * @param string $pageName - * @param int|null $page - * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator - * - * @throws \InvalidArgumentException - */ - public function paginate($perPage = null, $columns = ['*'], $pageName = 'page', $page = null) - { - $page = $page ?: Paginator::resolveCurrentPage($pageName); - - $perPage = $perPage ?: $this->model->getPerPage(); - - $results = ($total = $this->toBase()->getCountForPagination()) - ? $this->forPage($page, $perPage)->get($columns) - : $this->model->newCollection(); - - return $this->paginator($results, $total, $perPage, $page, [ - 'path' => Paginator::resolveCurrentPath(), - 'pageName' => $pageName, - ]); - } - - /** - * Paginate the given query into a simple paginator. - * - * @param int $perPage - * @param array $columns - * @param string $pageName - * @param int|null $page - * @return \Illuminate\Contracts\Pagination\Paginator - */ - public function simplePaginate($perPage = null, $columns = ['*'], $pageName = 'page', $page = null) - { - $page = $page ?: Paginator::resolveCurrentPage($pageName); - - $perPage = $perPage ?: $this->model->getPerPage(); - - // Next we will set the limit and offset for this query so that when we get the - // results we get the proper section of results. Then, we'll create the full - // paginator instances for these results with the given page and per page. - $this->skip(($page - 1) * $perPage)->take($perPage + 1); - - return $this->simplePaginator($this->get($columns), $perPage, $page, [ - 'path' => Paginator::resolveCurrentPath(), - 'pageName' => $pageName, - ]); - } - - /** - * Save a new model and return the instance. - * - * @param array $attributes - * @return \Illuminate\Database\Eloquent\Model|$this - */ - public function create(array $attributes = []) - { - return tap($this->newModelInstance($attributes), function ($instance) { - $instance->save(); - }); - } - - /** - * Save a new model and return the instance. Allow mass-assignment. - * - * @param array $attributes - * @return \Illuminate\Database\Eloquent\Model|$this - */ - public function forceCreate(array $attributes) - { - return $this->model->unguarded(function () use ($attributes) { - return $this->newModelInstance()->create($attributes); - }); - } - - /** - * Update a record in the database. - * - * @param array $values - * @return int - */ - public function update(array $values) - { - return $this->toBase()->update($this->addUpdatedAtColumn($values)); - } - - /** - * Increment a column's value by a given amount. - * - * @param string $column - * @param int $amount - * @param array $extra - * @return int - */ - public function increment($column, $amount = 1, array $extra = []) - { - return $this->toBase()->increment( - $column, $amount, $this->addUpdatedAtColumn($extra) - ); - } - - /** - * Decrement a column's value by a given amount. - * - * @param string $column - * @param int $amount - * @param array $extra - * @return int - */ - public function decrement($column, $amount = 1, array $extra = []) - { - return $this->toBase()->decrement( - $column, $amount, $this->addUpdatedAtColumn($extra) - ); - } - - /** - * Add the "updated at" column to an array of values. - * - * @param array $values - * @return array - */ - protected function addUpdatedAtColumn(array $values) - { - if (! $this->model->usesTimestamps()) { - return $values; - } - - return Arr::add( - $values, $this->model->getUpdatedAtColumn(), - $this->model->freshTimestampString() - ); - } - - /** - * Delete a record from the database. - * - * @return mixed - */ - public function delete() - { - if (isset($this->onDelete)) { - return call_user_func($this->onDelete, $this); - } - - return $this->toBase()->delete(); - } - - /** - * Run the default delete function on the builder. - * - * Since we do not apply scopes here, the row will actually be deleted. - * - * @return mixed - */ - public function forceDelete() - { - return $this->query->delete(); - } - - /** - * Register a replacement for the default delete function. - * - * @param \Closure $callback - * @return void - */ - public function onDelete(Closure $callback) - { - $this->onDelete = $callback; - } - - /** - * Call the given local model scopes. - * - * @param array $scopes - * @return mixed - */ - public function scopes(array $scopes) - { - $builder = $this; - - foreach ($scopes as $scope => $parameters) { - // If the scope key is an integer, then the scope was passed as the value and - // the parameter list is empty, so we will format the scope name and these - // parameters here. Then, we'll be ready to call the scope on the model. - if (is_int($scope)) { - list($scope, $parameters) = [$parameters, []]; - } - - // Next we'll pass the scope callback to the callScope method which will take - // care of grouping the "wheres" properly so the logical order doesn't get - // messed up when adding scopes. Then we'll return back out the builder. - $builder = $builder->callScope( - [$this->model, 'scope'.ucfirst($scope)], - (array) $parameters - ); - } - - return $builder; - } - - /** - * Apply the scopes to the Eloquent builder instance and return it. - * - * @return \Illuminate\Database\Eloquent\Builder|static - */ - public function applyScopes() - { - if (! $this->scopes) { - return $this; - } - - $builder = clone $this; - - foreach ($this->scopes as $identifier => $scope) { - if (! isset($builder->scopes[$identifier])) { - continue; - } - - $builder->callScope(function (Builder $builder) use ($scope) { - // If the scope is a Closure we will just go ahead and call the scope with the - // builder instance. The "callScope" method will properly group the clauses - // that are added to this query so "where" clauses maintain proper logic. - if ($scope instanceof Closure) { - $scope($builder); - } - - // If the scope is a scope object, we will call the apply method on this scope - // passing in the builder and the model instance. After we run all of these - // scopes we will return back the builder instance to the outside caller. - if ($scope instanceof Scope) { - $scope->apply($builder, $this->getModel()); - } - }); - } - - return $builder; - } - - /** - * Apply the given scope on the current builder instance. - * - * @param callable $scope - * @param array $parameters - * @return mixed - */ - protected function callScope(callable $scope, $parameters = []) - { - array_unshift($parameters, $this); - - $query = $this->getQuery(); - - // We will keep track of how many wheres are on the query before running the - // scope so that we can properly group the added scope constraints in the - // query as their own isolated nested where statement and avoid issues. - $originalWhereCount = is_null($query->wheres) - ? 0 : count($query->wheres); - - $result = $scope(...array_values($parameters)) ?? $this; - - if (count((array) $query->wheres) > $originalWhereCount) { - $this->addNewWheresWithinGroup($query, $originalWhereCount); - } - - return $result; - } - - /** - * Nest where conditions by slicing them at the given where count. - * - * @param \Illuminate\Database\Query\Builder $query - * @param int $originalWhereCount - * @return void - */ - protected function addNewWheresWithinGroup(QueryBuilder $query, $originalWhereCount) - { - // Here, we totally remove all of the where clauses since we are going to - // rebuild them as nested queries by slicing the groups of wheres into - // their own sections. This is to prevent any confusing logic order. - $allWheres = $query->wheres; - - $query->wheres = []; - - $this->groupWhereSliceForScope( - $query, array_slice($allWheres, 0, $originalWhereCount) - ); - - $this->groupWhereSliceForScope( - $query, array_slice($allWheres, $originalWhereCount) - ); - } - - /** - * Slice where conditions at the given offset and add them to the query as a nested condition. - * - * @param \Illuminate\Database\Query\Builder $query - * @param array $whereSlice - * @return void - */ - protected function groupWhereSliceForScope(QueryBuilder $query, $whereSlice) - { - $whereBooleans = collect($whereSlice)->pluck('boolean'); - - // Here we'll check if the given subset of where clauses contains any "or" - // booleans and in this case create a nested where expression. That way - // we don't add any unnecessary nesting thus keeping the query clean. - if ($whereBooleans->contains('or')) { - $query->wheres[] = $this->createNestedWhere( - $whereSlice, $whereBooleans->first() - ); - } else { - $query->wheres = array_merge($query->wheres, $whereSlice); - } - } - - /** - * Create a where array with nested where conditions. - * - * @param array $whereSlice - * @param string $boolean - * @return array - */ - protected function createNestedWhere($whereSlice, $boolean = 'and') - { - $whereGroup = $this->getQuery()->forNestedWhere(); - - $whereGroup->wheres = $whereSlice; - - return ['type' => 'Nested', 'query' => $whereGroup, 'boolean' => $boolean]; - } - - /** - * Set the relationships that should be eager loaded. - * - * @param mixed $relations - * @return $this - */ - public function with($relations) - { - $eagerLoad = $this->parseWithRelations(is_string($relations) ? func_get_args() : $relations); - - $this->eagerLoad = array_merge($this->eagerLoad, $eagerLoad); - - return $this; - } - - /** - * Prevent the specified relations from being eager loaded. - * - * @param mixed $relations - * @return $this - */ - public function without($relations) - { - $this->eagerLoad = array_diff_key($this->eagerLoad, array_flip( - is_string($relations) ? func_get_args() : $relations - )); - - return $this; - } - - /** - * Create a new instance of the model being queried. - * - * @param array $attributes - * @return \Illuminate\Database\Eloquent\Model - */ - public function newModelInstance($attributes = []) - { - return $this->model->newInstance($attributes)->setConnection( - $this->query->getConnection()->getName() - ); - } - - /** - * Parse a list of relations into individuals. - * - * @param array $relations - * @return array - */ - protected function parseWithRelations(array $relations) - { - $results = []; - - foreach ($relations as $name => $constraints) { - // If the "relation" value is actually a numeric key, we can assume that no - // constraints have been specified for the eager load and we'll just put - // an empty Closure with the loader so that we can treat all the same. - if (is_numeric($name)) { - $name = $constraints; - - list($name, $constraints) = Str::contains($name, ':') - ? $this->createSelectWithConstraint($name) - : [$name, function () { - // - }]; - } - - // We need to separate out any nested includes. Which allows the developers - // to load deep relationships using "dots" without stating each level of - // the relationship with its own key in the array of eager load names. - $results = $this->addNestedWiths($name, $results); - - $results[$name] = $constraints; - } - - return $results; - } - - /** - * Create a constraint to select the given columns for the relation. - * - * @param string $name - * @return array - */ - protected function createSelectWithConstraint($name) - { - return [explode(':', $name)[0], function ($query) use ($name) { - $query->select(explode(',', explode(':', $name)[1])); - }]; - } - - /** - * Parse the nested relationships in a relation. - * - * @param string $name - * @param array $results - * @return array - */ - protected function addNestedWiths($name, $results) - { - $progress = []; - - // If the relation has already been set on the result array, we will not set it - // again, since that would override any constraints that were already placed - // on the relationships. We will only set the ones that are not specified. - foreach (explode('.', $name) as $segment) { - $progress[] = $segment; - - if (! isset($results[$last = implode('.', $progress)])) { - $results[$last] = function () { - // - }; - } - } - - return $results; - } - - /** - * Get the underlying query builder instance. - * - * @return \Illuminate\Database\Query\Builder - */ - public function getQuery() - { - return $this->query; - } - - /** - * Set the underlying query builder instance. - * - * @param \Illuminate\Database\Query\Builder $query - * @return $this - */ - public function setQuery($query) - { - $this->query = $query; - - return $this; - } - - /** - * Get a base query builder instance. - * - * @return \Illuminate\Database\Query\Builder - */ - public function toBase() - { - return $this->applyScopes()->getQuery(); - } - - /** - * Get the relationships being eagerly loaded. - * - * @return array - */ - public function getEagerLoads() - { - return $this->eagerLoad; - } - - /** - * Set the relationships being eagerly loaded. - * - * @param array $eagerLoad - * @return $this - */ - public function setEagerLoads(array $eagerLoad) - { - $this->eagerLoad = $eagerLoad; - - return $this; - } - - /** - * Get the model instance being queried. - * - * @return \Illuminate\Database\Eloquent\Model - */ - public function getModel() - { - return $this->model; - } - - /** - * Set a model instance for the model being queried. - * - * @param \Illuminate\Database\Eloquent\Model $model - * @return $this - */ - public function setModel(Model $model) - { - $this->model = $model; - - $this->query->from($model->getTable()); - - return $this; - } - - /** - * Qualify the given column name by the model's table. - * - * @param string $column - * @return string - */ - public function qualifyColumn($column) - { - return $this->model->qualifyColumn($column); - } - - /** - * Get the given macro by name. - * - * @param string $name - * @return \Closure - */ - public function getMacro($name) - { - return Arr::get($this->localMacros, $name); - } - - /** - * Dynamically handle calls into the query instance. - * - * @param string $method - * @param array $parameters - * @return mixed - */ - public function __call($method, $parameters) - { - if ($method === 'macro') { - $this->localMacros[$parameters[0]] = $parameters[1]; - - return; - } - - if (isset($this->localMacros[$method])) { - array_unshift($parameters, $this); - - return $this->localMacros[$method](...$parameters); - } - - if (isset(static::$macros[$method])) { - if (static::$macros[$method] instanceof Closure) { - return call_user_func_array(static::$macros[$method]->bindTo($this, static::class), $parameters); - } - - return call_user_func_array(static::$macros[$method], $parameters); - } - - if (method_exists($this->model, $scope = 'scope'.ucfirst($method))) { - return $this->callScope([$this->model, $scope], $parameters); - } - - if (in_array($method, $this->passthru)) { - return $this->toBase()->{$method}(...$parameters); - } - - $this->query->{$method}(...$parameters); - - return $this; - } - - /** - * Dynamically handle calls into the query instance. - * - * @param string $method - * @param array $parameters - * @return mixed - * - * @throws \BadMethodCallException - */ - public static function __callStatic($method, $parameters) - { - if ($method === 'macro') { - static::$macros[$parameters[0]] = $parameters[1]; - - return; - } - - if (! isset(static::$macros[$method])) { - throw new BadMethodCallException("Method {$method} does not exist."); - } - - if (static::$macros[$method] instanceof Closure) { - return call_user_func_array(Closure::bind(static::$macros[$method], null, static::class), $parameters); - } - - return call_user_func_array(static::$macros[$method], $parameters); - } - - /** - * Force a clone of the underlying query builder when cloning. - * - * @return void - */ - public function __clone() - { - $this->query = clone $this->query; - } -} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasGlobalScopes.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasGlobalScopes.php deleted file mode 100644 index 97a549f6c..000000000 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasGlobalScopes.php +++ /dev/null @@ -1,71 +0,0 @@ -=', $count = 1, $boolean = 'and', Closure $callback = null) - { - if (strpos($relation, '.') !== false) { - return $this->hasNested($relation, $operator, $count, $boolean, $callback); - } - - $relation = $this->getRelationWithoutConstraints($relation); - - // If we only need to check for the existence of the relation, then we can optimize - // the subquery to only run a "where exists" clause instead of this full "count" - // clause. This will make these queries run much faster compared with a count. - $method = $this->canUseExistsForExistenceCheck($operator, $count) - ? 'getRelationExistenceQuery' - : 'getRelationExistenceCountQuery'; - - $hasQuery = $relation->{$method}( - $relation->getRelated()->newQuery(), $this - ); - - // Next we will call any given callback as an "anonymous" scope so they can get the - // proper logical grouping of the where clauses if needed by this Eloquent query - // builder. Then, we will be ready to finalize and return this query instance. - if ($callback) { - $hasQuery->callScope($callback); - } - - return $this->addHasWhere( - $hasQuery, $relation, $operator, $count, $boolean - ); - } - - /** - * Add nested relationship count / exists conditions to the query. - * - * Sets up recursive call to whereHas until we finish the nested relation. - * - * @param string $relations - * @param string $operator - * @param int $count - * @param string $boolean - * @param \Closure|null $callback - * @return \Illuminate\Database\Eloquent\Builder|static - */ - protected function hasNested($relations, $operator = '>=', $count = 1, $boolean = 'and', $callback = null) - { - $relations = explode('.', $relations); - - $closure = function ($q) use (&$closure, &$relations, $operator, $count, $callback) { - // In order to nest "has", we need to add count relation constraints on the - // callback Closure. We'll do this by simply passing the Closure its own - // reference to itself so it calls itself recursively on each segment. - count($relations) > 1 - ? $q->whereHas(array_shift($relations), $closure) - : $q->has(array_shift($relations), $operator, $count, 'and', $callback); - }; - - return $this->has(array_shift($relations), '>=', 1, $boolean, $closure); - } - - /** - * Add a relationship count / exists condition to the query with an "or". - * - * @param string $relation - * @param string $operator - * @param int $count - * @return \Illuminate\Database\Eloquent\Builder|static - */ - public function orHas($relation, $operator = '>=', $count = 1) - { - return $this->has($relation, $operator, $count, 'or'); - } - - /** - * Add a relationship count / exists condition to the query. - * - * @param string $relation - * @param string $boolean - * @param \Closure|null $callback - * @return \Illuminate\Database\Eloquent\Builder|static - */ - public function doesntHave($relation, $boolean = 'and', Closure $callback = null) - { - return $this->has($relation, '<', 1, $boolean, $callback); - } - - /** - * Add a relationship count / exists condition to the query with an "or". - * - * @param string $relation - * @return \Illuminate\Database\Eloquent\Builder|static - */ - public function orDoesntHave($relation) - { - return $this->doesntHave($relation, 'or'); - } - - /** - * Add a relationship count / exists condition to the query with where clauses. - * - * @param string $relation - * @param \Closure|null $callback - * @param string $operator - * @param int $count - * @return \Illuminate\Database\Eloquent\Builder|static - */ - public function whereHas($relation, Closure $callback = null, $operator = '>=', $count = 1) - { - return $this->has($relation, $operator, $count, 'and', $callback); - } - - /** - * Add a relationship count / exists condition to the query with where clauses and an "or". - * - * @param string $relation - * @param \Closure $callback - * @param string $operator - * @param int $count - * @return \Illuminate\Database\Eloquent\Builder|static - */ - public function orWhereHas($relation, Closure $callback = null, $operator = '>=', $count = 1) - { - return $this->has($relation, $operator, $count, 'or', $callback); - } - - /** - * Add a relationship count / exists condition to the query with where clauses. - * - * @param string $relation - * @param \Closure|null $callback - * @return \Illuminate\Database\Eloquent\Builder|static - */ - public function whereDoesntHave($relation, Closure $callback = null) - { - return $this->doesntHave($relation, 'and', $callback); - } - - /** - * Add a relationship count / exists condition to the query with where clauses and an "or". - * - * @param string $relation - * @param \Closure $callback - * @return \Illuminate\Database\Eloquent\Builder|static - */ - public function orWhereDoesntHave($relation, Closure $callback = null) - { - return $this->doesntHave($relation, 'or', $callback); - } - - /** - * Add subselect queries to count the relations. - * - * @param mixed $relations - * @return $this - */ - public function withCount($relations) - { - if (empty($relations)) { - return $this; - } - - if (is_null($this->query->columns)) { - $this->query->select([$this->query->from.'.*']); - } - - $relations = is_array($relations) ? $relations : func_get_args(); - - foreach ($this->parseWithRelations($relations) as $name => $constraints) { - // First we will determine if the name has been aliased using an "as" clause on the name - // and if it has we will extract the actual relationship name and the desired name of - // the resulting column. This allows multiple counts on the same relationship name. - $segments = explode(' ', $name); - - unset($alias); - - if (count($segments) == 3 && Str::lower($segments[1]) == 'as') { - list($name, $alias) = [$segments[0], $segments[2]]; - } - - $relation = $this->getRelationWithoutConstraints($name); - - // Here we will get the relationship count query and prepare to add it to the main query - // as a sub-select. First, we'll get the "has" query and use that to get the relation - // count query. We will normalize the relation name then append _count as the name. - $query = $relation->getRelationExistenceCountQuery( - $relation->getRelated()->newQuery(), $this - ); - - $query->callScope($constraints); - - $query->mergeConstraintsFrom($relation->getQuery()); - - // Finally we will add the proper result column alias to the query and run the subselect - // statement against the query builder. Then we will return the builder instance back - // to the developer for further constraint chaining that needs to take place on it. - $column = $alias ?? Str::snake($name.'_count'); - - $this->selectSub($query->toBase(), $column); - } - - return $this; - } - - /** - * Add the "has" condition where clause to the query. - * - * @param \Illuminate\Database\Eloquent\Builder $hasQuery - * @param \Illuminate\Database\Eloquent\Relations\Relation $relation - * @param string $operator - * @param int $count - * @param string $boolean - * @return \Illuminate\Database\Eloquent\Builder|static - */ - protected function addHasWhere(Builder $hasQuery, Relation $relation, $operator, $count, $boolean) - { - $hasQuery->mergeConstraintsFrom($relation->getQuery()); - - return $this->canUseExistsForExistenceCheck($operator, $count) - ? $this->addWhereExistsQuery($hasQuery->toBase(), $boolean, $operator === '<' && $count === 1) - : $this->addWhereCountQuery($hasQuery->toBase(), $operator, $count, $boolean); - } - - /** - * Merge the where constraints from another query to the current query. - * - * @param \Illuminate\Database\Eloquent\Builder $from - * @return \Illuminate\Database\Eloquent\Builder|static - */ - public function mergeConstraintsFrom(Builder $from) - { - $whereBindings = $from->getQuery()->getRawBindings()['where'] ?? []; - - // Here we have some other query that we want to merge the where constraints from. We will - // copy over any where constraints on the query as well as remove any global scopes the - // query might have removed. Then we will return ourselves with the finished merging. - return $this->withoutGlobalScopes( - $from->removedScopes() - )->mergeWheres( - $from->getQuery()->wheres, $whereBindings - ); - } - - /** - * Add a sub-query count clause to this query. - * - * @param \Illuminate\Database\Query\Builder $query - * @param string $operator - * @param int $count - * @param string $boolean - * @return $this - */ - protected function addWhereCountQuery(QueryBuilder $query, $operator = '>=', $count = 1, $boolean = 'and') - { - $this->query->addBinding($query->getBindings(), 'where'); - - return $this->where( - new Expression('('.$query->toSql().')'), - $operator, - is_numeric($count) ? new Expression($count) : $count, - $boolean - ); - } - - /** - * Get the "has relation" base query instance. - * - * @param string $relation - * @return \Illuminate\Database\Eloquent\Relations\Relation - */ - protected function getRelationWithoutConstraints($relation) - { - return Relation::noConstraints(function () use ($relation) { - return $this->getModel()->{$relation}(); - }); - } - - /** - * Check if we can run an "exists" query to optimize performance. - * - * @param string $operator - * @param int $count - * @return bool - */ - protected function canUseExistsForExistenceCheck($operator, $count) - { - return ($operator === '>=' || $operator === '<') && $count === 1; - } -} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php deleted file mode 100755 index c46dc358c..000000000 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php +++ /dev/null @@ -1,385 +0,0 @@ -query = $query; - $this->parent = $parent; - $this->related = $query->getModel(); - - $this->addConstraints(); - } - - /** - * Run a callback with constraints disabled on the relation. - * - * @param \Closure $callback - * @return mixed - */ - public static function noConstraints(Closure $callback) - { - $previous = static::$constraints; - - static::$constraints = false; - - // When resetting the relation where clause, we want to shift the first element - // off of the bindings, leaving only the constraints that the developers put - // as "extra" on the relationships, and not original relation constraints. - try { - return call_user_func($callback); - } finally { - static::$constraints = $previous; - } - } - - /** - * Set the base constraints on the relation query. - * - * @return void - */ - abstract public function addConstraints(); - - /** - * Set the constraints for an eager load of the relation. - * - * @param array $models - * @return void - */ - abstract public function addEagerConstraints(array $models); - - /** - * Initialize the relation on a set of models. - * - * @param array $models - * @param string $relation - * @return array - */ - abstract public function initRelation(array $models, $relation); - - /** - * Match the eagerly loaded results to their parents. - * - * @param array $models - * @param \Illuminate\Database\Eloquent\Collection $results - * @param string $relation - * @return array - */ - abstract public function match(array $models, Collection $results, $relation); - - /** - * Get the results of the relationship. - * - * @return mixed - */ - abstract public function getResults(); - - /** - * Get the relationship for eager loading. - * - * @return \Illuminate\Database\Eloquent\Collection - */ - public function getEager() - { - return $this->get(); - } - - /** - * Execute the query as a "select" statement. - * - * @param array $columns - * @return \Illuminate\Database\Eloquent\Collection - */ - public function get($columns = ['*']) - { - return $this->query->get($columns); - } - - /** - * Touch all of the related models for the relationship. - * - * @return void - */ - public function touch() - { - $column = $this->getRelated()->getUpdatedAtColumn(); - - $this->rawUpdate([$column => $this->getRelated()->freshTimestampString()]); - } - - /** - * Run a raw update against the base query. - * - * @param array $attributes - * @return int - */ - public function rawUpdate(array $attributes = []) - { - return $this->query->withoutGlobalScopes()->update($attributes); - } - - /** - * Add the constraints for a relationship count query. - * - * @param \Illuminate\Database\Eloquent\Builder $query - * @param \Illuminate\Database\Eloquent\Builder $parentQuery - * @return \Illuminate\Database\Eloquent\Builder - */ - public function getRelationExistenceCountQuery(Builder $query, Builder $parentQuery) - { - return $this->getRelationExistenceQuery( - $query, $parentQuery, new Expression('count(*)') - )->setBindings([], 'select'); - } - - /** - * Add the constraints for an internal relationship existence query. - * - * Essentially, these queries compare on column names like whereColumn. - * - * @param \Illuminate\Database\Eloquent\Builder $query - * @param \Illuminate\Database\Eloquent\Builder $parentQuery - * @param array|mixed $columns - * @return \Illuminate\Database\Eloquent\Builder - */ - public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, $columns = ['*']) - { - return $query->select($columns)->whereColumn( - $this->getQualifiedParentKeyName(), '=', $this->getExistenceCompareKey() - ); - } - - /** - * Get all of the primary keys for an array of models. - * - * @param array $models - * @param string $key - * @return array - */ - protected function getKeys(array $models, $key = null) - { - return collect($models)->map(function ($value) use ($key) { - return $key ? $value->getAttribute($key) : $value->getKey(); - })->values()->unique()->sort()->all(); - } - - /** - * Get the underlying query for the relation. - * - * @return \Illuminate\Database\Eloquent\Builder - */ - public function getQuery() - { - return $this->query; - } - - /** - * Get the base query builder driving the Eloquent builder. - * - * @return \Illuminate\Database\Query\Builder - */ - public function getBaseQuery() - { - return $this->query->getQuery(); - } - - /** - * Get the parent model of the relation. - * - * @return \Illuminate\Database\Eloquent\Model - */ - public function getParent() - { - return $this->parent; - } - - /** - * Get the fully qualified parent key name. - * - * @return string - */ - public function getQualifiedParentKeyName() - { - return $this->parent->getQualifiedKeyName(); - } - - /** - * Get the related model of the relation. - * - * @return \Illuminate\Database\Eloquent\Model - */ - public function getRelated() - { - return $this->related; - } - - /** - * Get the name of the "created at" column. - * - * @return string - */ - public function createdAt() - { - return $this->parent->getCreatedAtColumn(); - } - - /** - * Get the name of the "updated at" column. - * - * @return string - */ - public function updatedAt() - { - return $this->parent->getUpdatedAtColumn(); - } - - /** - * Get the name of the related model's "updated at" column. - * - * @return string - */ - public function relatedUpdatedAt() - { - return $this->related->getUpdatedAtColumn(); - } - - /** - * Set or get the morph map for polymorphic relations. - * - * @param array|null $map - * @param bool $merge - * @return array - */ - public static function morphMap(array $map = null, $merge = true) - { - $map = static::buildMorphMapFromModels($map); - - if (is_array($map)) { - static::$morphMap = $merge && static::$morphMap - ? $map + static::$morphMap : $map; - } - - return static::$morphMap; - } - - /** - * Builds a table-keyed array from model class names. - * - * @param string[]|null $models - * @return array|null - */ - protected static function buildMorphMapFromModels(array $models = null) - { - if (is_null($models) || Arr::isAssoc($models)) { - return $models; - } - - return array_combine(array_map(function ($model) { - return (new $model)->getTable(); - }, $models), $models); - } - - /** - * Get the model associated with a custom polymorphic type. - * - * @param string $alias - * @return string|null - */ - public static function getMorphedModel($alias) - { - return array_key_exists($alias, self::$morphMap) - ? self::$morphMap[$alias] - : null; - } - - /** - * Handle dynamic method calls to the relationship. - * - * @param string $method - * @param array $parameters - * @return mixed - */ - public function __call($method, $parameters) - { - if (static::hasMacro($method)) { - return $this->macroCall($method, $parameters); - } - - $result = $this->query->{$method}(...$parameters); - - if ($result === $this->query) { - return $this; - } - - return $result; - } - - /** - * Force a clone of the underlying query builder when cloning. - * - * @return void - */ - public function __clone() - { - $this->query = clone $this->query; - } -} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php deleted file mode 100755 index 82f351b1d..000000000 --- a/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php +++ /dev/null @@ -1,2485 +0,0 @@ - [], - 'join' => [], - 'where' => [], - 'having' => [], - 'order' => [], - 'union' => [], - ]; - - /** - * An aggregate function and column to be run. - * - * @var array - */ - public $aggregate; - - /** - * The columns that should be returned. - * - * @var array - */ - public $columns; - - /** - * Indicates if the query returns distinct results. - * - * @var bool - */ - public $distinct = false; - - /** - * The table which the query is targeting. - * - * @var string - */ - public $from; - - /** - * The table joins for the query. - * - * @var array - */ - public $joins; - - /** - * The where constraints for the query. - * - * @var array - */ - public $wheres = []; - - /** - * The groupings for the query. - * - * @var array - */ - public $groups; - - /** - * The having constraints for the query. - * - * @var array - */ - public $havings; - - /** - * The orderings for the query. - * - * @var array - */ - public $orders; - - /** - * The maximum number of records to return. - * - * @var int - */ - public $limit; - - /** - * The number of records to skip. - * - * @var int - */ - public $offset; - - /** - * The query union statements. - * - * @var array - */ - public $unions; - - /** - * The maximum number of union records to return. - * - * @var int - */ - public $unionLimit; - - /** - * The number of union records to skip. - * - * @var int - */ - public $unionOffset; - - /** - * The orderings for the union query. - * - * @var array - */ - public $unionOrders; - - /** - * Indicates whether row locking is being used. - * - * @var string|bool - */ - public $lock; - - /** - * All of the available clause operators. - * - * @var array - */ - public $operators = [ - '=', '<', '>', '<=', '>=', '<>', '!=', '<=>', - 'like', 'like binary', 'not like', 'ilike', - '&', '|', '^', '<<', '>>', - 'rlike', 'regexp', 'not regexp', - '~', '~*', '!~', '!~*', 'similar to', - 'not similar to', 'not ilike', '~~*', '!~~*', - ]; - - /** - * Whether use write pdo for select. - * - * @var bool - */ - public $useWritePdo = false; - - /** - * Create a new query builder instance. - * - * @param \Illuminate\Database\ConnectionInterface $connection - * @param \Illuminate\Database\Query\Grammars\Grammar $grammar - * @param \Illuminate\Database\Query\Processors\Processor $processor - * @return void - */ - public function __construct(ConnectionInterface $connection, - Grammar $grammar = null, - Processor $processor = null) - { - $this->connection = $connection; - $this->grammar = $grammar ?: $connection->getQueryGrammar(); - $this->processor = $processor ?: $connection->getPostProcessor(); - } - - /** - * Set the columns to be selected. - * - * @param array|mixed $columns - * @return $this - */ - public function select($columns = ['*']) - { - $this->columns = is_array($columns) ? $columns : func_get_args(); - - return $this; - } - - /** - * Add a new "raw" select expression to the query. - * - * @param string $expression - * @param array $bindings - * @return \Illuminate\Database\Query\Builder|static - */ - public function selectRaw($expression, array $bindings = []) - { - $this->addSelect(new Expression($expression)); - - if ($bindings) { - $this->addBinding($bindings, 'select'); - } - - return $this; - } - - /** - * Add a subselect expression to the query. - * - * @param \Closure|\Illuminate\Database\Query\Builder|string $query - * @param string $as - * @return \Illuminate\Database\Query\Builder|static - * - * @throws \InvalidArgumentException - */ - public function selectSub($query, $as) - { - // If the given query is a Closure, we will execute it while passing in a new - // query instance to the Closure. This will give the developer a chance to - // format and work with the query before we cast it to a raw SQL string. - if ($query instanceof Closure) { - $callback = $query; - - $callback($query = $this->forSubQuery()); - } - - // Here, we will parse this query into an SQL string and an array of bindings - // so we can add it to the query builder using the selectRaw method so the - // query is included in the real SQL generated by this builder instance. - list($query, $bindings) = $this->parseSubSelect($query); - - return $this->selectRaw( - '('.$query.') as '.$this->grammar->wrap($as), $bindings - ); - } - - /** - * Parse the sub-select query into SQL and bindings. - * - * @param mixed $query - * @return array - */ - protected function parseSubSelect($query) - { - if ($query instanceof self) { - $query->columns = [$query->columns[0]]; - - return [$query->toSql(), $query->getBindings()]; - } elseif (is_string($query)) { - return [$query, []]; - } else { - throw new InvalidArgumentException; - } - } - - /** - * Add a new select column to the query. - * - * @param array|mixed $column - * @return $this - */ - public function addSelect($column) - { - $column = is_array($column) ? $column : func_get_args(); - - $this->columns = array_merge((array) $this->columns, $column); - - return $this; - } - - /** - * Force the query to only return distinct results. - * - * @return $this - */ - public function distinct() - { - $this->distinct = true; - - return $this; - } - - /** - * Set the table which the query is targeting. - * - * @param string $table - * @return $this - */ - public function from($table) - { - $this->from = $table; - - return $this; - } - - /** - * Add a join clause to the query. - * - * @param string $table - * @param string $first - * @param string|null $operator - * @param string|null $second - * @param string $type - * @param bool $where - * @return $this - */ - public function join($table, $first, $operator = null, $second = null, $type = 'inner', $where = false) - { - $join = new JoinClause($this, $type, $table); - - // If the first "column" of the join is really a Closure instance the developer - // is trying to build a join with a complex "on" clause containing more than - // one condition, so we'll add the join and call a Closure with the query. - if ($first instanceof Closure) { - call_user_func($first, $join); - - $this->joins[] = $join; - - $this->addBinding($join->getBindings(), 'join'); - } - - // If the column is simply a string, we can assume the join simply has a basic - // "on" clause with a single condition. So we will just build the join with - // this simple join clauses attached to it. There is not a join callback. - else { - $method = $where ? 'where' : 'on'; - - $this->joins[] = $join->$method($first, $operator, $second); - - $this->addBinding($join->getBindings(), 'join'); - } - - return $this; - } - - /** - * Add a "join where" clause to the query. - * - * @param string $table - * @param string $first - * @param string $operator - * @param string $second - * @param string $type - * @return \Illuminate\Database\Query\Builder|static - */ - public function joinWhere($table, $first, $operator, $second, $type = 'inner') - { - return $this->join($table, $first, $operator, $second, $type, true); - } - - /** - * Add a left join to the query. - * - * @param string $table - * @param string $first - * @param string|null $operator - * @param string|null $second - * @return \Illuminate\Database\Query\Builder|static - */ - public function leftJoin($table, $first, $operator = null, $second = null) - { - return $this->join($table, $first, $operator, $second, 'left'); - } - - /** - * Add a "join where" clause to the query. - * - * @param string $table - * @param string $first - * @param string $operator - * @param string $second - * @return \Illuminate\Database\Query\Builder|static - */ - public function leftJoinWhere($table, $first, $operator, $second) - { - return $this->joinWhere($table, $first, $operator, $second, 'left'); - } - - /** - * Add a right join to the query. - * - * @param string $table - * @param string $first - * @param string|null $operator - * @param string|null $second - * @return \Illuminate\Database\Query\Builder|static - */ - public function rightJoin($table, $first, $operator = null, $second = null) - { - return $this->join($table, $first, $operator, $second, 'right'); - } - - /** - * Add a "right join where" clause to the query. - * - * @param string $table - * @param string $first - * @param string $operator - * @param string $second - * @return \Illuminate\Database\Query\Builder|static - */ - public function rightJoinWhere($table, $first, $operator, $second) - { - return $this->joinWhere($table, $first, $operator, $second, 'right'); - } - - /** - * Add a "cross join" clause to the query. - * - * @param string $table - * @param string|null $first - * @param string|null $operator - * @param string|null $second - * @return \Illuminate\Database\Query\Builder|static - */ - public function crossJoin($table, $first = null, $operator = null, $second = null) - { - if ($first) { - return $this->join($table, $first, $operator, $second, 'cross'); - } - - $this->joins[] = new JoinClause($this, 'cross', $table); - - return $this; - } - - /** - * Merge an array of where clauses and bindings. - * - * @param array $wheres - * @param array $bindings - * @return void - */ - public function mergeWheres($wheres, $bindings) - { - $this->wheres = array_merge($this->wheres, (array) $wheres); - - $this->bindings['where'] = array_values( - array_merge($this->bindings['where'], (array) $bindings) - ); - } - - /** - * Add a basic where clause to the query. - * - * @param string|array|\Closure $column - * @param mixed $operator - * @param mixed $value - * @param string $boolean - * @return $this - */ - public function where($column, $operator = null, $value = null, $boolean = 'and') - { - // If the column is an array, we will assume it is an array of key-value pairs - // and can add them each as a where clause. We will maintain the boolean we - // received when the method was called and pass it into the nested where. - if (is_array($column)) { - return $this->addArrayOfWheres($column, $boolean); - } - - // Here we will make some assumptions about the operator. If only 2 values are - // passed to the method, we will assume that the operator is an equals sign - // and keep going. Otherwise, we'll require the operator to be passed in. - list($value, $operator) = $this->prepareValueAndOperator( - $value, $operator, func_num_args() == 2 - ); - - // If the columns is actually a Closure instance, we will assume the developer - // wants to begin a nested where statement which is wrapped in parenthesis. - // We'll add that Closure to the query then return back out immediately. - if ($column instanceof Closure) { - return $this->whereNested($column, $boolean); - } - - // If the given operator is not found in the list of valid operators we will - // assume that the developer is just short-cutting the '=' operators and - // we will set the operators to '=' and set the values appropriately. - if ($this->invalidOperator($operator)) { - list($value, $operator) = [$operator, '=']; - } - - // If the value is a Closure, it means the developer is performing an entire - // sub-select within the query and we will need to compile the sub-select - // within the where clause to get the appropriate query record results. - if ($value instanceof Closure) { - return $this->whereSub($column, $operator, $value, $boolean); - } - - // If the value is "null", we will just assume the developer wants to add a - // where null clause to the query. So, we will allow a short-cut here to - // that method for convenience so the developer doesn't have to check. - if (is_null($value)) { - return $this->whereNull($column, $boolean, $operator !== '='); - } - - // If the column is making a JSON reference we'll check to see if the value - // is a boolean. If it is, we'll add the raw boolean string as an actual - // value to the query to ensure this is properly handled by the query. - if (Str::contains($column, '->') && is_bool($value)) { - $value = new Expression($value ? 'true' : 'false'); - } - - // Now that we are working with just a simple query we can put the elements - // in our array and add the query binding to our array of bindings that - // will be bound to each SQL statements when it is finally executed. - $type = 'Basic'; - - $this->wheres[] = compact( - 'type', 'column', 'operator', 'value', 'boolean' - ); - - if (! $value instanceof Expression) { - $this->addBinding($value, 'where'); - } - - return $this; - } - - /** - * Add an array of where clauses to the query. - * - * @param array $column - * @param string $boolean - * @param string $method - * @return $this - */ - protected function addArrayOfWheres($column, $boolean, $method = 'where') - { - return $this->whereNested(function ($query) use ($column, $method, $boolean) { - foreach ($column as $key => $value) { - if (is_numeric($key) && is_array($value)) { - $query->{$method}(...array_values($value)); - } else { - $query->$method($key, '=', $value, $boolean); - } - } - }, $boolean); - } - - /** - * Prepare the value and operator for a where clause. - * - * @param string $value - * @param string $operator - * @param bool $useDefault - * @return array - * - * @throws \InvalidArgumentException - */ - public function prepareValueAndOperator($value, $operator, $useDefault = false) - { - if ($useDefault) { - return [$operator, '=']; - } elseif ($this->invalidOperatorAndValue($operator, $value)) { - throw new InvalidArgumentException('Illegal operator and value combination.'); - } - - return [$value, $operator]; - } - - /** - * Determine if the given operator and value combination is legal. - * - * Prevents using Null values with invalid operators. - * - * @param string $operator - * @param mixed $value - * @return bool - */ - protected function invalidOperatorAndValue($operator, $value) - { - return is_null($value) && in_array($operator, $this->operators) && - ! in_array($operator, ['=', '<>', '!=']); - } - - /** - * Determine if the given operator is supported. - * - * @param string $operator - * @return bool - */ - protected function invalidOperator($operator) - { - return ! in_array(strtolower($operator), $this->operators, true) && - ! in_array(strtolower($operator), $this->grammar->getOperators(), true); - } - - /** - * Add an "or where" clause to the query. - * - * @param string|array|\Closure $column - * @param string|null $operator - * @param mixed $value - * @return \Illuminate\Database\Query\Builder|static - */ - public function orWhere($column, $operator = null, $value = null) - { - list($value, $operator) = $this->prepareValueAndOperator( - $value, $operator, func_num_args() == 2 - ); - - return $this->where($column, $operator, $value, 'or'); - } - - /** - * Add a "where" clause comparing two columns to the query. - * - * @param string|array $first - * @param string|null $operator - * @param string|null $second - * @param string|null $boolean - * @return \Illuminate\Database\Query\Builder|static - */ - public function whereColumn($first, $operator = null, $second = null, $boolean = 'and') - { - // If the column is an array, we will assume it is an array of key-value pairs - // and can add them each as a where clause. We will maintain the boolean we - // received when the method was called and pass it into the nested where. - if (is_array($first)) { - return $this->addArrayOfWheres($first, $boolean, 'whereColumn'); - } - - // If the given operator is not found in the list of valid operators we will - // assume that the developer is just short-cutting the '=' operators and - // we will set the operators to '=' and set the values appropriately. - if ($this->invalidOperator($operator)) { - list($second, $operator) = [$operator, '=']; - } - - // Finally, we will add this where clause into this array of clauses that we - // are building for the query. All of them will be compiled via a grammar - // once the query is about to be executed and run against the database. - $type = 'Column'; - - $this->wheres[] = compact( - 'type', 'first', 'operator', 'second', 'boolean' - ); - - return $this; - } - - /** - * Add an "or where" clause comparing two columns to the query. - * - * @param string|array $first - * @param string|null $operator - * @param string|null $second - * @return \Illuminate\Database\Query\Builder|static - */ - public function orWhereColumn($first, $operator = null, $second = null) - { - return $this->whereColumn($first, $operator, $second, 'or'); - } - - /** - * Add a raw where clause to the query. - * - * @param string $sql - * @param mixed $bindings - * @param string $boolean - * @return $this - */ - public function whereRaw($sql, $bindings = [], $boolean = 'and') - { - $this->wheres[] = ['type' => 'raw', 'sql' => $sql, 'boolean' => $boolean]; - - $this->addBinding((array) $bindings, 'where'); - - return $this; - } - - /** - * Add a raw or where clause to the query. - * - * @param string $sql - * @param mixed $bindings - * @return \Illuminate\Database\Query\Builder|static - */ - public function orWhereRaw($sql, $bindings = []) - { - return $this->whereRaw($sql, $bindings, 'or'); - } - - /** - * Add a "where in" clause to the query. - * - * @param string $column - * @param mixed $values - * @param string $boolean - * @param bool $not - * @return $this - */ - public function whereIn($column, $values, $boolean = 'and', $not = false) - { - $type = $not ? 'NotIn' : 'In'; - - if ($values instanceof EloquentBuilder) { - $values = $values->getQuery(); - } - - // If the value is a query builder instance we will assume the developer wants to - // look for any values that exists within this given query. So we will add the - // query accordingly so that this query is properly executed when it is run. - if ($values instanceof self) { - return $this->whereInExistingQuery( - $column, $values, $boolean, $not - ); - } - - // If the value of the where in clause is actually a Closure, we will assume that - // the developer is using a full sub-select for this "in" statement, and will - // execute those Closures, then we can re-construct the entire sub-selects. - if ($values instanceof Closure) { - return $this->whereInSub($column, $values, $boolean, $not); - } - - // Next, if the value is Arrayable we need to cast it to its raw array form so we - // have the underlying array value instead of an Arrayable object which is not - // able to be added as a binding, etc. We will then add to the wheres array. - if ($values instanceof Arrayable) { - $values = $values->toArray(); - } - - $this->wheres[] = compact('type', 'column', 'values', 'boolean'); - - // Finally we'll add a binding for each values unless that value is an expression - // in which case we will just skip over it since it will be the query as a raw - // string and not as a parameterized place-holder to be replaced by the PDO. - foreach ($values as $value) { - if (! $value instanceof Expression) { - $this->addBinding($value, 'where'); - } - } - - return $this; - } - - /** - * Add an "or where in" clause to the query. - * - * @param string $column - * @param mixed $values - * @return \Illuminate\Database\Query\Builder|static - */ - public function orWhereIn($column, $values) - { - return $this->whereIn($column, $values, 'or'); - } - - /** - * Add a "where not in" clause to the query. - * - * @param string $column - * @param mixed $values - * @param string $boolean - * @return \Illuminate\Database\Query\Builder|static - */ - public function whereNotIn($column, $values, $boolean = 'and') - { - return $this->whereIn($column, $values, $boolean, true); - } - - /** - * Add an "or where not in" clause to the query. - * - * @param string $column - * @param mixed $values - * @return \Illuminate\Database\Query\Builder|static - */ - public function orWhereNotIn($column, $values) - { - return $this->whereNotIn($column, $values, 'or'); - } - - /** - * Add a where in with a sub-select to the query. - * - * @param string $column - * @param \Closure $callback - * @param string $boolean - * @param bool $not - * @return $this - */ - protected function whereInSub($column, Closure $callback, $boolean, $not) - { - $type = $not ? 'NotInSub' : 'InSub'; - - // To create the exists sub-select, we will actually create a query and call the - // provided callback with the query so the developer may set any of the query - // conditions they want for the in clause, then we'll put it in this array. - call_user_func($callback, $query = $this->forSubQuery()); - - $this->wheres[] = compact('type', 'column', 'query', 'boolean'); - - $this->addBinding($query->getBindings(), 'where'); - - return $this; - } - - /** - * Add an external sub-select to the query. - * - * @param string $column - * @param \Illuminate\Database\Query\Builder|static $query - * @param string $boolean - * @param bool $not - * @return $this - */ - protected function whereInExistingQuery($column, $query, $boolean, $not) - { - $type = $not ? 'NotInSub' : 'InSub'; - - $this->wheres[] = compact('type', 'column', 'query', 'boolean'); - - $this->addBinding($query->getBindings(), 'where'); - - return $this; - } - - /** - * Add a "where null" clause to the query. - * - * @param string $column - * @param string $boolean - * @param bool $not - * @return $this - */ - public function whereNull($column, $boolean = 'and', $not = false) - { - $type = $not ? 'NotNull' : 'Null'; - - $this->wheres[] = compact('type', 'column', 'boolean'); - - return $this; - } - - /** - * Add an "or where null" clause to the query. - * - * @param string $column - * @return \Illuminate\Database\Query\Builder|static - */ - public function orWhereNull($column) - { - return $this->whereNull($column, 'or'); - } - - /** - * Add a "where not null" clause to the query. - * - * @param string $column - * @param string $boolean - * @return \Illuminate\Database\Query\Builder|static - */ - public function whereNotNull($column, $boolean = 'and') - { - return $this->whereNull($column, $boolean, true); - } - - /** - * Add a where between statement to the query. - * - * @param string $column - * @param array $values - * @param string $boolean - * @param bool $not - * @return $this - */ - public function whereBetween($column, array $values, $boolean = 'and', $not = false) - { - $type = 'between'; - - $this->wheres[] = compact('column', 'type', 'boolean', 'not'); - - $this->addBinding($values, 'where'); - - return $this; - } - - /** - * Add an or where between statement to the query. - * - * @param string $column - * @param array $values - * @return \Illuminate\Database\Query\Builder|static - */ - public function orWhereBetween($column, array $values) - { - return $this->whereBetween($column, $values, 'or'); - } - - /** - * Add a where not between statement to the query. - * - * @param string $column - * @param array $values - * @param string $boolean - * @return \Illuminate\Database\Query\Builder|static - */ - public function whereNotBetween($column, array $values, $boolean = 'and') - { - return $this->whereBetween($column, $values, $boolean, true); - } - - /** - * Add an or where not between statement to the query. - * - * @param string $column - * @param array $values - * @return \Illuminate\Database\Query\Builder|static - */ - public function orWhereNotBetween($column, array $values) - { - return $this->whereNotBetween($column, $values, 'or'); - } - - /** - * Add an "or where not null" clause to the query. - * - * @param string $column - * @return \Illuminate\Database\Query\Builder|static - */ - public function orWhereNotNull($column) - { - return $this->whereNotNull($column, 'or'); - } - - /** - * Add a "where date" statement to the query. - * - * @param string $column - * @param string $operator - * @param mixed $value - * @param string $boolean - * @return \Illuminate\Database\Query\Builder|static - */ - public function whereDate($column, $operator, $value = null, $boolean = 'and') - { - list($value, $operator) = $this->prepareValueAndOperator( - $value, $operator, func_num_args() == 2 - ); - - return $this->addDateBasedWhere('Date', $column, $operator, $value, $boolean); - } - - /** - * Add an "or where date" statement to the query. - * - * @param string $column - * @param string $operator - * @param string $value - * @return \Illuminate\Database\Query\Builder|static - */ - public function orWhereDate($column, $operator, $value) - { - list($value, $operator) = $this->prepareValueAndOperator( - $value, $operator, func_num_args() == 2 - ); - - return $this->whereDate($column, $operator, $value, 'or'); - } - - /** - * Add a "where time" statement to the query. - * - * @param string $column - * @param string $operator - * @param int $value - * @param string $boolean - * @return \Illuminate\Database\Query\Builder|static - */ - public function whereTime($column, $operator, $value, $boolean = 'and') - { - return $this->addDateBasedWhere('Time', $column, $operator, $value, $boolean); - } - - /** - * Add an "or where time" statement to the query. - * - * @param string $column - * @param string $operator - * @param int $value - * @return \Illuminate\Database\Query\Builder|static - */ - public function orWhereTime($column, $operator, $value) - { - list($value, $operator) = $this->prepareValueAndOperator( - $value, $operator, func_num_args() == 2 - ); - - return $this->whereTime($column, $operator, $value, 'or'); - } - - /** - * Add a "where day" statement to the query. - * - * @param string $column - * @param string $operator - * @param mixed $value - * @param string $boolean - * @return \Illuminate\Database\Query\Builder|static - */ - public function whereDay($column, $operator, $value = null, $boolean = 'and') - { - list($value, $operator) = $this->prepareValueAndOperator( - $value, $operator, func_num_args() == 2 - ); - - return $this->addDateBasedWhere('Day', $column, $operator, $value, $boolean); - } - - /** - * Add a "where month" statement to the query. - * - * @param string $column - * @param string $operator - * @param mixed $value - * @param string $boolean - * @return \Illuminate\Database\Query\Builder|static - */ - public function whereMonth($column, $operator, $value = null, $boolean = 'and') - { - list($value, $operator) = $this->prepareValueAndOperator( - $value, $operator, func_num_args() == 2 - ); - - return $this->addDateBasedWhere('Month', $column, $operator, $value, $boolean); - } - - /** - * Add a "where year" statement to the query. - * - * @param string $column - * @param string $operator - * @param mixed $value - * @param string $boolean - * @return \Illuminate\Database\Query\Builder|static - */ - public function whereYear($column, $operator, $value = null, $boolean = 'and') - { - list($value, $operator) = $this->prepareValueAndOperator( - $value, $operator, func_num_args() == 2 - ); - - return $this->addDateBasedWhere('Year', $column, $operator, $value, $boolean); - } - - /** - * Add a date based (year, month, day, time) statement to the query. - * - * @param string $type - * @param string $column - * @param string $operator - * @param int $value - * @param string $boolean - * @return $this - */ - protected function addDateBasedWhere($type, $column, $operator, $value, $boolean = 'and') - { - $this->wheres[] = compact('column', 'type', 'boolean', 'operator', 'value'); - - if (! $value instanceof Expression) { - $this->addBinding($value, 'where'); - } - - return $this; - } - - /** - * Add a nested where statement to the query. - * - * @param \Closure $callback - * @param string $boolean - * @return \Illuminate\Database\Query\Builder|static - */ - public function whereNested(Closure $callback, $boolean = 'and') - { - call_user_func($callback, $query = $this->forNestedWhere()); - - return $this->addNestedWhereQuery($query, $boolean); - } - - /** - * Create a new query instance for nested where condition. - * - * @return \Illuminate\Database\Query\Builder - */ - public function forNestedWhere() - { - return $this->newQuery()->from($this->from); - } - - /** - * Add another query builder as a nested where to the query builder. - * - * @param \Illuminate\Database\Query\Builder|static $query - * @param string $boolean - * @return $this - */ - public function addNestedWhereQuery($query, $boolean = 'and') - { - if (count($query->wheres)) { - $type = 'Nested'; - - $this->wheres[] = compact('type', 'query', 'boolean'); - - $this->addBinding($query->getBindings(), 'where'); - } - - return $this; - } - - /** - * Add a full sub-select to the query. - * - * @param string $column - * @param string $operator - * @param \Closure $callback - * @param string $boolean - * @return $this - */ - protected function whereSub($column, $operator, Closure $callback, $boolean) - { - $type = 'Sub'; - - // Once we have the query instance we can simply execute it so it can add all - // of the sub-select's conditions to itself, and then we can cache it off - // in the array of where clauses for the "main" parent query instance. - call_user_func($callback, $query = $this->forSubQuery()); - - $this->wheres[] = compact( - 'type', 'column', 'operator', 'query', 'boolean' - ); - - $this->addBinding($query->getBindings(), 'where'); - - return $this; - } - - /** - * Add an exists clause to the query. - * - * @param \Closure $callback - * @param string $boolean - * @param bool $not - * @return $this - */ - public function whereExists(Closure $callback, $boolean = 'and', $not = false) - { - $query = $this->forSubQuery(); - - // Similar to the sub-select clause, we will create a new query instance so - // the developer may cleanly specify the entire exists query and we will - // compile the whole thing in the grammar and insert it into the SQL. - call_user_func($callback, $query); - - return $this->addWhereExistsQuery($query, $boolean, $not); - } - - /** - * Add an or exists clause to the query. - * - * @param \Closure $callback - * @param bool $not - * @return \Illuminate\Database\Query\Builder|static - */ - public function orWhereExists(Closure $callback, $not = false) - { - return $this->whereExists($callback, 'or', $not); - } - - /** - * Add a where not exists clause to the query. - * - * @param \Closure $callback - * @param string $boolean - * @return \Illuminate\Database\Query\Builder|static - */ - public function whereNotExists(Closure $callback, $boolean = 'and') - { - return $this->whereExists($callback, $boolean, true); - } - - /** - * Add a where not exists clause to the query. - * - * @param \Closure $callback - * @return \Illuminate\Database\Query\Builder|static - */ - public function orWhereNotExists(Closure $callback) - { - return $this->orWhereExists($callback, true); - } - - /** - * Add an exists clause to the query. - * - * @param \Illuminate\Database\Query\Builder $query - * @param string $boolean - * @param bool $not - * @return $this - */ - public function addWhereExistsQuery(self $query, $boolean = 'and', $not = false) - { - $type = $not ? 'NotExists' : 'Exists'; - - $this->wheres[] = compact('type', 'operator', 'query', 'boolean'); - - $this->addBinding($query->getBindings(), 'where'); - - return $this; - } - - /** - * Handles dynamic "where" clauses to the query. - * - * @param string $method - * @param string $parameters - * @return $this - */ - public function dynamicWhere($method, $parameters) - { - $finder = substr($method, 5); - - $segments = preg_split( - '/(And|Or)(?=[A-Z])/', $finder, -1, PREG_SPLIT_DELIM_CAPTURE - ); - - // The connector variable will determine which connector will be used for the - // query condition. We will change it as we come across new boolean values - // in the dynamic method strings, which could contain a number of these. - $connector = 'and'; - - $index = 0; - - foreach ($segments as $segment) { - // If the segment is not a boolean connector, we can assume it is a column's name - // and we will add it to the query as a new constraint as a where clause, then - // we can keep iterating through the dynamic method string's segments again. - if ($segment !== 'And' && $segment !== 'Or') { - $this->addDynamic($segment, $connector, $parameters, $index); - - $index++; - } - - // Otherwise, we will store the connector so we know how the next where clause we - // find in the query should be connected to the previous ones, meaning we will - // have the proper boolean connector to connect the next where clause found. - else { - $connector = $segment; - } - } - - return $this; - } - - /** - * Add a single dynamic where clause statement to the query. - * - * @param string $segment - * @param string $connector - * @param array $parameters - * @param int $index - * @return void - */ - protected function addDynamic($segment, $connector, $parameters, $index) - { - // Once we have parsed out the columns and formatted the boolean operators we - // are ready to add it to this query as a where clause just like any other - // clause on the query. Then we'll increment the parameter index values. - $bool = strtolower($connector); - - $this->where(Str::snake($segment), '=', $parameters[$index], $bool); - } - - /** - * Add a "group by" clause to the query. - * - * @param array ...$groups - * @return $this - */ - public function groupBy(...$groups) - { - foreach ($groups as $group) { - $this->groups = array_merge( - (array) $this->groups, - Arr::wrap($group) - ); - } - - return $this; - } - - /** - * Add a "having" clause to the query. - * - * @param string $column - * @param string|null $operator - * @param string|null $value - * @param string $boolean - * @return $this - */ - public function having($column, $operator = null, $value = null, $boolean = 'and') - { - $type = 'Basic'; - - // Here we will make some assumptions about the operator. If only 2 values are - // passed to the method, we will assume that the operator is an equals sign - // and keep going. Otherwise, we'll require the operator to be passed in. - list($value, $operator) = $this->prepareValueAndOperator( - $value, $operator, func_num_args() == 2 - ); - - // If the given operator is not found in the list of valid operators we will - // assume that the developer is just short-cutting the '=' operators and - // we will set the operators to '=' and set the values appropriately. - if ($this->invalidOperator($operator)) { - list($value, $operator) = [$operator, '=']; - } - - $this->havings[] = compact('type', 'column', 'operator', 'value', 'boolean'); - - if (! $value instanceof Expression) { - $this->addBinding($value, 'having'); - } - - return $this; - } - - /** - * Add a "or having" clause to the query. - * - * @param string $column - * @param string|null $operator - * @param string|null $value - * @return \Illuminate\Database\Query\Builder|static - */ - public function orHaving($column, $operator = null, $value = null) - { - return $this->having($column, $operator, $value, 'or'); - } - - /** - * Add a raw having clause to the query. - * - * @param string $sql - * @param array $bindings - * @param string $boolean - * @return $this - */ - public function havingRaw($sql, array $bindings = [], $boolean = 'and') - { - $type = 'Raw'; - - $this->havings[] = compact('type', 'sql', 'boolean'); - - $this->addBinding($bindings, 'having'); - - return $this; - } - - /** - * Add a raw or having clause to the query. - * - * @param string $sql - * @param array $bindings - * @return \Illuminate\Database\Query\Builder|static - */ - public function orHavingRaw($sql, array $bindings = []) - { - return $this->havingRaw($sql, $bindings, 'or'); - } - - /** - * Add an "order by" clause to the query. - * - * @param string $column - * @param string $direction - * @return $this - */ - public function orderBy($column, $direction = 'asc') - { - $this->{$this->unions ? 'unionOrders' : 'orders'}[] = [ - 'column' => $column, - 'direction' => strtolower($direction) == 'asc' ? 'asc' : 'desc', - ]; - - return $this; - } - - /** - * Add a descending "order by" clause to the query. - * - * @param string $column - * @return $this - */ - public function orderByDesc($column) - { - return $this->orderBy($column, 'desc'); - } - - /** - * Add an "order by" clause for a timestamp to the query. - * - * @param string $column - * @return \Illuminate\Database\Query\Builder|static - */ - public function latest($column = 'created_at') - { - return $this->orderBy($column, 'desc'); - } - - /** - * Add an "order by" clause for a timestamp to the query. - * - * @param string $column - * @return \Illuminate\Database\Query\Builder|static - */ - public function oldest($column = 'created_at') - { - return $this->orderBy($column, 'asc'); - } - - /** - * Put the query's results in random order. - * - * @param string $seed - * @return $this - */ - public function inRandomOrder($seed = '') - { - return $this->orderByRaw($this->grammar->compileRandom($seed)); - } - - /** - * Add a raw "order by" clause to the query. - * - * @param string $sql - * @param array $bindings - * @return $this - */ - public function orderByRaw($sql, $bindings = []) - { - $type = 'Raw'; - - $this->{$this->unions ? 'unionOrders' : 'orders'}[] = compact('type', 'sql'); - - $this->addBinding($bindings, 'order'); - - return $this; - } - - /** - * Alias to set the "offset" value of the query. - * - * @param int $value - * @return \Illuminate\Database\Query\Builder|static - */ - public function skip($value) - { - return $this->offset($value); - } - - /** - * Set the "offset" value of the query. - * - * @param int $value - * @return $this - */ - public function offset($value) - { - $property = $this->unions ? 'unionOffset' : 'offset'; - - $this->$property = max(0, $value); - - return $this; - } - - /** - * Alias to set the "limit" value of the query. - * - * @param int $value - * @return \Illuminate\Database\Query\Builder|static - */ - public function take($value) - { - return $this->limit($value); - } - - /** - * Set the "limit" value of the query. - * - * @param int $value - * @return $this - */ - public function limit($value) - { - $property = $this->unions ? 'unionLimit' : 'limit'; - - if ($value >= 0) { - $this->$property = $value; - } - - return $this; - } - - /** - * Set the limit and offset for a given page. - * - * @param int $page - * @param int $perPage - * @return \Illuminate\Database\Query\Builder|static - */ - public function forPage($page, $perPage = 15) - { - return $this->skip(($page - 1) * $perPage)->take($perPage); - } - - /** - * Constrain the query to the next "page" of results after a given ID. - * - * @param int $perPage - * @param int $lastId - * @param string $column - * @return \Illuminate\Database\Query\Builder|static - */ - public function forPageAfterId($perPage = 15, $lastId = 0, $column = 'id') - { - $this->orders = $this->removeExistingOrdersFor($column); - - return $this->where($column, '>', $lastId) - ->orderBy($column, 'asc') - ->take($perPage); - } - - /** - * Get an array with all orders with a given column removed. - * - * @param string $column - * @return array - */ - protected function removeExistingOrdersFor($column) - { - return Collection::make($this->orders) - ->reject(function ($order) use ($column) { - return isset($order['column']) - ? $order['column'] === $column : false; - })->values()->all(); - } - - /** - * Add a union statement to the query. - * - * @param \Illuminate\Database\Query\Builder|\Closure $query - * @param bool $all - * @return \Illuminate\Database\Query\Builder|static - */ - public function union($query, $all = false) - { - if ($query instanceof Closure) { - call_user_func($query, $query = $this->newQuery()); - } - - $this->unions[] = compact('query', 'all'); - - $this->addBinding($query->getBindings(), 'union'); - - return $this; - } - - /** - * Add a union all statement to the query. - * - * @param \Illuminate\Database\Query\Builder|\Closure $query - * @return \Illuminate\Database\Query\Builder|static - */ - public function unionAll($query) - { - return $this->union($query, true); - } - - /** - * Lock the selected rows in the table. - * - * @param string|bool $value - * @return $this - */ - public function lock($value = true) - { - $this->lock = $value; - - if (! is_null($this->lock)) { - $this->useWritePdo(); - } - - return $this; - } - - /** - * Lock the selected rows in the table for updating. - * - * @return \Illuminate\Database\Query\Builder - */ - public function lockForUpdate() - { - return $this->lock(true); - } - - /** - * Share lock the selected rows in the table. - * - * @return \Illuminate\Database\Query\Builder - */ - public function sharedLock() - { - return $this->lock(false); - } - - /** - * Get the SQL representation of the query. - * - * @return string - */ - public function toSql() - { - return $this->grammar->compileSelect($this); - } - - /** - * Execute a query for a single record by ID. - * - * @param int $id - * @param array $columns - * @return mixed|static - */ - public function find($id, $columns = ['*']) - { - return $this->where('id', '=', $id)->first($columns); - } - - /** - * Get a single column's value from the first result of a query. - * - * @param string $column - * @return mixed - */ - public function value($column) - { - $result = (array) $this->first([$column]); - - return count($result) > 0 ? reset($result) : null; - } - - /** - * Execute the query as a "select" statement. - * - * @param array $columns - * @return \Illuminate\Support\Collection - */ - public function get($columns = ['*']) - { - $original = $this->columns; - - if (is_null($original)) { - $this->columns = $columns; - } - - $results = $this->processor->processSelect($this, $this->runSelect()); - - $this->columns = $original; - - return collect($results); - } - - /** - * Run the query as a "select" statement against the connection. - * - * @return array - */ - protected function runSelect() - { - return $this->connection->select( - $this->toSql(), $this->getBindings(), ! $this->useWritePdo - ); - } - - /** - * Paginate the given query into a simple paginator. - * - * @param int $perPage - * @param array $columns - * @param string $pageName - * @param int|null $page - * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator - */ - public function paginate($perPage = 15, $columns = ['*'], $pageName = 'page', $page = null) - { - $page = $page ?: Paginator::resolveCurrentPage($pageName); - - $total = $this->getCountForPagination($columns); - - $results = $total ? $this->forPage($page, $perPage)->get($columns) : collect(); - - return $this->paginator($results, $total, $perPage, $page, [ - 'path' => Paginator::resolveCurrentPath(), - 'pageName' => $pageName, - ]); - } - - /** - * Get a paginator only supporting simple next and previous links. - * - * This is more efficient on larger data-sets, etc. - * - * @param int $perPage - * @param array $columns - * @param string $pageName - * @param int|null $page - * @return \Illuminate\Contracts\Pagination\Paginator - */ - public function simplePaginate($perPage = 15, $columns = ['*'], $pageName = 'page', $page = null) - { - $page = $page ?: Paginator::resolveCurrentPage($pageName); - - $this->skip(($page - 1) * $perPage)->take($perPage + 1); - - return $this->simplePaginator($this->get($columns), $perPage, $page, [ - 'path' => Paginator::resolveCurrentPath(), - 'pageName' => $pageName, - ]); - } - - /** - * Get the count of the total records for the paginator. - * - * @param array $columns - * @return int - */ - public function getCountForPagination($columns = ['*']) - { - $results = $this->runPaginationCountQuery($columns); - - // Once we have run the pagination count query, we will get the resulting count and - // take into account what type of query it was. When there is a group by we will - // just return the count of the entire results set since that will be correct. - if (isset($this->groups)) { - return count($results); - } elseif (! isset($results[0])) { - return 0; - } elseif (is_object($results[0])) { - return (int) $results[0]->aggregate; - } - - return (int) array_change_key_case((array) $results[0])['aggregate']; - } - - /** - * Run a pagination count query. - * - * @param array $columns - * @return array - */ - protected function runPaginationCountQuery($columns = ['*']) - { - return $this->cloneWithout(['columns', 'orders', 'limit', 'offset']) - ->cloneWithoutBindings(['select', 'order']) - ->setAggregate('count', $this->withoutSelectAliases($columns)) - ->get()->all(); - } - - /** - * Remove the column aliases since they will break count queries. - * - * @param array $columns - * @return array - */ - protected function withoutSelectAliases(array $columns) - { - return array_map(function ($column) { - return is_string($column) && ($aliasPosition = strpos(strtolower($column), ' as ')) !== false - ? substr($column, 0, $aliasPosition) : $column; - }, $columns); - } - - /** - * Get a generator for the given query. - * - * @return \Generator - */ - public function cursor() - { - if (is_null($this->columns)) { - $this->columns = ['*']; - } - - return $this->connection->cursor( - $this->toSql(), $this->getBindings(), ! $this->useWritePdo - ); - } - - /** - * Chunk the results of a query by comparing numeric IDs. - * - * @param int $count - * @param callable $callback - * @param string $column - * @param string $alias - * @return bool - */ - public function chunkById($count, callable $callback, $column = 'id', $alias = null) - { - $alias = $alias ?: $column; - - $lastId = 0; - - do { - $clone = clone $this; - - // We'll execute the query for the given page and get the results. If there are - // no results we can just break and return from here. When there are results - // we will call the callback with the current chunk of these results here. - $results = $clone->forPageAfterId($count, $lastId, $column)->get(); - - $countResults = $results->count(); - - if ($countResults == 0) { - break; - } - - // On each chunk result set, we will pass them to the callback and then let the - // developer take care of everything within the callback, which allows us to - // keep the memory low for spinning through large result sets for working. - if ($callback($results) === false) { - return false; - } - - $lastId = $results->last()->{$alias}; - - unset($results); - } while ($countResults == $count); - - return true; - } - - /** - * Throw an exception if the query doesn't have an orderBy clause. - * - * @return void - * - * @throws \RuntimeException - */ - protected function enforceOrderBy() - { - if (empty($this->orders) && empty($this->unionOrders)) { - throw new RuntimeException('You must specify an orderBy clause when using this function.'); - } - } - - /** - * Get an array with the values of a given column. - * - * @param string $column - * @param string|null $key - * @return \Illuminate\Support\Collection - */ - public function pluck($column, $key = null) - { - $results = $this->get(is_null($key) ? [$column] : [$column, $key]); - - // If the columns are qualified with a table or have an alias, we cannot use - // those directly in the "pluck" operations since the results from the DB - // are only keyed by the column itself. We'll strip the table out here. - return $results->pluck( - $this->stripTableForPluck($column), - $this->stripTableForPluck($key) - ); - } - - /** - * Strip off the table name or alias from a column identifier. - * - * @param string $column - * @return string|null - */ - protected function stripTableForPluck($column) - { - return is_null($column) ? $column : last(preg_split('~\.| ~', $column)); - } - - /** - * Concatenate values of a given column as a string. - * - * @param string $column - * @param string $glue - * @return string - */ - public function implode($column, $glue = '') - { - return $this->pluck($column)->implode($glue); - } - - /** - * Determine if any rows exist for the current query. - * - * @return bool - */ - public function exists() - { - $results = $this->connection->select( - $this->grammar->compileExists($this), $this->getBindings(), ! $this->useWritePdo - ); - - // If the results has rows, we will get the row and see if the exists column is a - // boolean true. If there is no results for this query we will return false as - // there are no rows for this query at all and we can return that info here. - if (isset($results[0])) { - $results = (array) $results[0]; - - return (bool) $results['exists']; - } - - return false; - } - - /** - * Determine if no rows exist for the current query. - * - * @return bool - */ - public function doesntExist() - { - return ! $this->exists(); - } - - /** - * Retrieve the "count" result of the query. - * - * @param string $columns - * @return int - */ - public function count($columns = '*') - { - return (int) $this->aggregate(__FUNCTION__, Arr::wrap($columns)); - } - - /** - * Retrieve the minimum value of a given column. - * - * @param string $column - * @return mixed - */ - public function min($column) - { - return $this->aggregate(__FUNCTION__, [$column]); - } - - /** - * Retrieve the maximum value of a given column. - * - * @param string $column - * @return mixed - */ - public function max($column) - { - return $this->aggregate(__FUNCTION__, [$column]); - } - - /** - * Retrieve the sum of the values of a given column. - * - * @param string $column - * @return mixed - */ - public function sum($column) - { - $result = $this->aggregate(__FUNCTION__, [$column]); - - return $result ?: 0; - } - - /** - * Retrieve the average of the values of a given column. - * - * @param string $column - * @return mixed - */ - public function avg($column) - { - return $this->aggregate(__FUNCTION__, [$column]); - } - - /** - * Alias for the "avg" method. - * - * @param string $column - * @return mixed - */ - public function average($column) - { - return $this->avg($column); - } - - /** - * Execute an aggregate function on the database. - * - * @param string $function - * @param array $columns - * @return mixed - */ - public function aggregate($function, $columns = ['*']) - { - $results = $this->cloneWithout(['columns']) - ->cloneWithoutBindings(['select']) - ->setAggregate($function, $columns) - ->get($columns); - - if (! $results->isEmpty()) { - return array_change_key_case((array) $results[0])['aggregate']; - } - } - - /** - * Execute a numeric aggregate function on the database. - * - * @param string $function - * @param array $columns - * @return float|int - */ - public function numericAggregate($function, $columns = ['*']) - { - $result = $this->aggregate($function, $columns); - - // If there is no result, we can obviously just return 0 here. Next, we will check - // if the result is an integer or float. If it is already one of these two data - // types we can just return the result as-is, otherwise we will convert this. - if (! $result) { - return 0; - } - - if (is_int($result) || is_float($result)) { - return $result; - } - - // If the result doesn't contain a decimal place, we will assume it is an int then - // cast it to one. When it does we will cast it to a float since it needs to be - // cast to the expected data type for the developers out of pure convenience. - return strpos((string) $result, '.') === false - ? (int) $result : (float) $result; - } - - /** - * Set the aggregate property without running the query. - * - * @param string $function - * @param array $columns - * @return $this - */ - protected function setAggregate($function, $columns) - { - $this->aggregate = compact('function', 'columns'); - - if (empty($this->groups)) { - $this->orders = null; - - $this->bindings['order'] = []; - } - - return $this; - } - - /** - * Insert a new record into the database. - * - * @param array $values - * @return bool - */ - public function insert(array $values) - { - // Since every insert gets treated like a batch insert, we will make sure the - // bindings are structured in a way that is convenient when building these - // inserts statements by verifying these elements are actually an array. - if (empty($values)) { - return true; - } - - if (! is_array(reset($values))) { - $values = [$values]; - } - - // Here, we will sort the insert keys for every record so that each insert is - // in the same order for the record. We need to make sure this is the case - // so there are not any errors or problems when inserting these records. - else { - foreach ($values as $key => $value) { - ksort($value); - - $values[$key] = $value; - } - } - - // Finally, we will run this query against the database connection and return - // the results. We will need to also flatten these bindings before running - // the query so they are all in one huge, flattened array for execution. - return $this->connection->insert( - $this->grammar->compileInsert($this, $values), - $this->cleanBindings(Arr::flatten($values, 1)) - ); - } - - /** - * Insert a new record and get the value of the primary key. - * - * @param array $values - * @param string|null $sequence - * @return int - */ - public function insertGetId(array $values, $sequence = null) - { - $sql = $this->grammar->compileInsertGetId($this, $values, $sequence); - - $values = $this->cleanBindings($values); - - return $this->processor->processInsertGetId($this, $sql, $values, $sequence); - } - - /** - * Update a record in the database. - * - * @param array $values - * @return int - */ - public function update(array $values) - { - $sql = $this->grammar->compileUpdate($this, $values); - - return $this->connection->update($sql, $this->cleanBindings( - $this->grammar->prepareBindingsForUpdate($this->bindings, $values) - )); - } - - /** - * Insert or update a record matching the attributes, and fill it with values. - * - * @param array $attributes - * @param array $values - * @return bool - */ - public function updateOrInsert(array $attributes, array $values = []) - { - if (! $this->where($attributes)->exists()) { - return $this->insert(array_merge($attributes, $values)); - } - - return (bool) $this->take(1)->update($values); - } - - /** - * Increment a column's value by a given amount. - * - * @param string $column - * @param int $amount - * @param array $extra - * @return int - */ - public function increment($column, $amount = 1, array $extra = []) - { - if (! is_numeric($amount)) { - throw new InvalidArgumentException('Non-numeric value passed to increment method.'); - } - - $wrapped = $this->grammar->wrap($column); - - $columns = array_merge([$column => $this->raw("$wrapped + $amount")], $extra); - - return $this->update($columns); - } - - /** - * Decrement a column's value by a given amount. - * - * @param string $column - * @param int $amount - * @param array $extra - * @return int - */ - public function decrement($column, $amount = 1, array $extra = []) - { - if (! is_numeric($amount)) { - throw new InvalidArgumentException('Non-numeric value passed to decrement method.'); - } - - $wrapped = $this->grammar->wrap($column); - - $columns = array_merge([$column => $this->raw("$wrapped - $amount")], $extra); - - return $this->update($columns); - } - - /** - * Delete a record from the database. - * - * @param mixed $id - * @return int - */ - public function delete($id = null) - { - // If an ID is passed to the method, we will set the where clause to check the - // ID to let developers to simply and quickly remove a single row from this - // database without manually specifying the "where" clauses on the query. - if (! is_null($id)) { - $this->where($this->from.'.id', '=', $id); - } - - return $this->connection->delete( - $this->grammar->compileDelete($this), $this->cleanBindings( - $this->grammar->prepareBindingsForDelete($this->bindings) - ) - ); - } - - /** - * Run a truncate statement on the table. - * - * @return void - */ - public function truncate() - { - foreach ($this->grammar->compileTruncate($this) as $sql => $bindings) { - $this->connection->statement($sql, $bindings); - } - } - - /** - * Get a new instance of the query builder. - * - * @return \Illuminate\Database\Query\Builder - */ - public function newQuery() - { - return new static($this->connection, $this->grammar, $this->processor); - } - - /** - * Create a new query instance for a sub-query. - * - * @return \Illuminate\Database\Query\Builder - */ - protected function forSubQuery() - { - return $this->newQuery(); - } - - /** - * Create a raw database expression. - * - * @param mixed $value - * @return \Illuminate\Database\Query\Expression - */ - public function raw($value) - { - return $this->connection->raw($value); - } - - /** - * Get the current query value bindings in a flattened array. - * - * @return array - */ - public function getBindings() - { - return Arr::flatten($this->bindings); - } - - /** - * Get the raw array of bindings. - * - * @return array - */ - public function getRawBindings() - { - return $this->bindings; - } - - /** - * Set the bindings on the query builder. - * - * @param array $bindings - * @param string $type - * @return $this - * - * @throws \InvalidArgumentException - */ - public function setBindings(array $bindings, $type = 'where') - { - if (! array_key_exists($type, $this->bindings)) { - throw new InvalidArgumentException("Invalid binding type: {$type}."); - } - - $this->bindings[$type] = $bindings; - - return $this; - } - - /** - * Add a binding to the query. - * - * @param mixed $value - * @param string $type - * @return $this - * - * @throws \InvalidArgumentException - */ - public function addBinding($value, $type = 'where') - { - if (! array_key_exists($type, $this->bindings)) { - throw new InvalidArgumentException("Invalid binding type: {$type}."); - } - - if (is_array($value)) { - $this->bindings[$type] = array_values(array_merge($this->bindings[$type], $value)); - } else { - $this->bindings[$type][] = $value; - } - - return $this; - } - - /** - * Merge an array of bindings into our bindings. - * - * @param \Illuminate\Database\Query\Builder $query - * @return $this - */ - public function mergeBindings(self $query) - { - $this->bindings = array_merge_recursive($this->bindings, $query->bindings); - - return $this; - } - - /** - * Remove all of the expressions from a list of bindings. - * - * @param array $bindings - * @return array - */ - protected function cleanBindings(array $bindings) - { - return array_values(array_filter($bindings, function ($binding) { - return ! $binding instanceof Expression; - })); - } - - /** - * Get the database connection instance. - * - * @return \Illuminate\Database\ConnectionInterface - */ - public function getConnection() - { - return $this->connection; - } - - /** - * Get the database query processor instance. - * - * @return \Illuminate\Database\Query\Processors\Processor - */ - public function getProcessor() - { - return $this->processor; - } - - /** - * Get the query grammar instance. - * - * @return \Illuminate\Database\Query\Grammars\Grammar - */ - public function getGrammar() - { - return $this->grammar; - } - - /** - * Use the write pdo for query. - * - * @return $this - */ - public function useWritePdo() - { - $this->useWritePdo = true; - - return $this; - } - - /** - * Clone the query without the given properties. - * - * @param array $properties - * @return static - */ - public function cloneWithout(array $properties) - { - return tap(clone $this, function ($clone) use ($properties) { - foreach ($properties as $property) { - $clone->{$property} = null; - } - }); - } - - /** - * Clone the query without the given bindings. - * - * @param array $except - * @return static - */ - public function cloneWithoutBindings(array $except) - { - return tap(clone $this, function ($clone) use ($except) { - foreach ($except as $type) { - $clone->bindings[$type] = []; - } - }); - } - - /** - * Handle dynamic method calls into the method. - * - * @param string $method - * @param array $parameters - * @return mixed - * - * @throws \BadMethodCallException - */ - public function __call($method, $parameters) - { - if (static::hasMacro($method)) { - return $this->macroCall($method, $parameters); - } - - if (Str::startsWith($method, 'where')) { - return $this->dynamicWhere($method, $parameters); - } - - $className = static::class; - - throw new BadMethodCallException("Call to undefined method {$className}::{$method}()"); - } -} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php deleted file mode 100755 index 822011538..000000000 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php +++ /dev/null @@ -1,304 +0,0 @@ -connection = $connection; - $this->grammar = $connection->getSchemaGrammar(); - } - - /** - * Set the default string length for migrations. - * - * @param int $length - * @return void - */ - public static function defaultStringLength($length) - { - static::$defaultStringLength = $length; - } - - /** - * Determine if the given table exists. - * - * @param string $table - * @return bool - */ - public function hasTable($table) - { - $table = $this->connection->getTablePrefix().$table; - - return count($this->connection->select( - $this->grammar->compileTableExists(), [$table] - )) > 0; - } - - /** - * Determine if the given table has a given column. - * - * @param string $table - * @param string $column - * @return bool - */ - public function hasColumn($table, $column) - { - return in_array( - strtolower($column), array_map('strtolower', $this->getColumnListing($table)) - ); - } - - /** - * Determine if the given table has given columns. - * - * @param string $table - * @param array $columns - * @return bool - */ - public function hasColumns($table, array $columns) - { - $tableColumns = array_map('strtolower', $this->getColumnListing($table)); - - foreach ($columns as $column) { - if (! in_array(strtolower($column), $tableColumns)) { - return false; - } - } - - return true; - } - - /** - * Get the data type for the given column name. - * - * @param string $table - * @param string $column - * @return string - */ - public function getColumnType($table, $column) - { - $table = $this->connection->getTablePrefix().$table; - - return $this->connection->getDoctrineColumn($table, $column)->getType()->getName(); - } - - /** - * Get the column listing for a given table. - * - * @param string $table - * @return array - */ - public function getColumnListing($table) - { - $results = $this->connection->select($this->grammar->compileColumnListing( - $this->connection->getTablePrefix().$table - )); - - return $this->connection->getPostProcessor()->processColumnListing($results); - } - - /** - * Modify a table on the schema. - * - * @param string $table - * @param \Closure $callback - * @return void - */ - public function table($table, Closure $callback) - { - $this->build($this->createBlueprint($table, $callback)); - } - - /** - * Create a new table on the schema. - * - * @param string $table - * @param \Closure $callback - * @return void - */ - public function create($table, Closure $callback) - { - $this->build(tap($this->createBlueprint($table), function ($blueprint) use ($callback) { - $blueprint->create(); - - $callback($blueprint); - })); - } - - /** - * Drop a table from the schema. - * - * @param string $table - * @return void - */ - public function drop($table) - { - $this->build(tap($this->createBlueprint($table), function ($blueprint) { - $blueprint->drop(); - })); - } - - /** - * Drop a table from the schema if it exists. - * - * @param string $table - * @return void - */ - public function dropIfExists($table) - { - $this->build(tap($this->createBlueprint($table), function ($blueprint) { - $blueprint->dropIfExists(); - })); - } - - /** - * Drop all tables from the database. - * - * @return void - * - * @throws \LogicException - */ - public function dropAllTables() - { - throw new LogicException('This database driver does not support dropping all tables.'); - } - - /** - * Rename a table on the schema. - * - * @param string $from - * @param string $to - * @return void - */ - public function rename($from, $to) - { - $this->build(tap($this->createBlueprint($from), function ($blueprint) use ($to) { - $blueprint->rename($to); - })); - } - - /** - * Enable foreign key constraints. - * - * @return bool - */ - public function enableForeignKeyConstraints() - { - return $this->connection->statement( - $this->grammar->compileEnableForeignKeyConstraints() - ); - } - - /** - * Disable foreign key constraints. - * - * @return bool - */ - public function disableForeignKeyConstraints() - { - return $this->connection->statement( - $this->grammar->compileDisableForeignKeyConstraints() - ); - } - - /** - * Execute the blueprint to build / modify the table. - * - * @param \Illuminate\Database\Schema\Blueprint $blueprint - * @return void - */ - protected function build(Blueprint $blueprint) - { - $blueprint->build($this->connection, $this->grammar); - } - - /** - * Create a new command set with a Closure. - * - * @param string $table - * @param \Closure|null $callback - * @return \Illuminate\Database\Schema\Blueprint - */ - protected function createBlueprint($table, Closure $callback = null) - { - if (isset($this->resolver)) { - return call_user_func($this->resolver, $table, $callback); - } - - return new Blueprint($table, $callback); - } - - /** - * Get the database connection instance. - * - * @return \Illuminate\Database\Connection - */ - public function getConnection() - { - return $this->connection; - } - - /** - * Set the database connection instance. - * - * @param \Illuminate\Database\Connection $connection - * @return $this - */ - public function setConnection(Connection $connection) - { - $this->connection = $connection; - - return $this; - } - - /** - * Set the Schema Blueprint resolver callback. - * - * @param \Closure $resolver - * @return void - */ - public function blueprintResolver(Closure $resolver) - { - $this->resolver = $resolver; - } -} diff --git a/vendor/laravel/framework/src/Illuminate/Http/RedirectResponse.php b/vendor/laravel/framework/src/Illuminate/Http/RedirectResponse.php deleted file mode 100755 index 0a462ffdb..000000000 --- a/vendor/laravel/framework/src/Illuminate/Http/RedirectResponse.php +++ /dev/null @@ -1,238 +0,0 @@ - $value]; - - foreach ($key as $k => $v) { - $this->session->flash($k, $v); - } - - return $this; - } - - /** - * Add multiple cookies to the response. - * - * @param array $cookies - * @return $this - */ - public function withCookies(array $cookies) - { - foreach ($cookies as $cookie) { - $this->headers->setCookie($cookie); - } - - return $this; - } - - /** - * Flash an array of input to the session. - * - * @param array $input - * @return $this - */ - public function withInput(array $input = null) - { - $this->session->flashInput($this->removeFilesFromInput( - ! is_null($input) ? $input : $this->request->input() - )); - - return $this; - } - - /** - * Remove all uploaded files form the given input array. - * - * @param array $input - * @return array - */ - protected function removeFilesFromInput(array $input) - { - foreach ($input as $key => $value) { - if (is_array($value)) { - $input[$key] = $this->removeFilesFromInput($value); - } - - if ($value instanceof SymfonyUploadedFile) { - unset($input[$key]); - } - } - - return $input; - } - - /** - * Flash an array of input to the session. - * - * @return $this - */ - public function onlyInput() - { - return $this->withInput($this->request->only(func_get_args())); - } - - /** - * Flash an array of input to the session. - * - * @return \Illuminate\Http\RedirectResponse - */ - public function exceptInput() - { - return $this->withInput($this->request->except(func_get_args())); - } - - /** - * Flash a container of errors to the session. - * - * @param \Illuminate\Contracts\Support\MessageProvider|array|string $provider - * @param string $key - * @return $this - */ - public function withErrors($provider, $key = 'default') - { - $value = $this->parseErrors($provider); - - $errors = $this->session->get('errors', new ViewErrorBag); - - if (! $errors instanceof ViewErrorBag) { - $errors = new ViewErrorBag; - } - - $this->session->flash( - 'errors', $errors->put($key, $value) - ); - - return $this; - } - - /** - * Parse the given errors into an appropriate value. - * - * @param \Illuminate\Contracts\Support\MessageProvider|array|string $provider - * @return \Illuminate\Support\MessageBag - */ - protected function parseErrors($provider) - { - if ($provider instanceof MessageProvider) { - return $provider->getMessageBag(); - } - - return new MessageBag((array) $provider); - } - - /** - * Get the original response content. - * - * @return null - */ - public function getOriginalContent() - { - // - } - - /** - * Get the request instance. - * - * @return \Illuminate\Http\Request|null - */ - public function getRequest() - { - return $this->request; - } - - /** - * Set the request instance. - * - * @param \Illuminate\Http\Request $request - * @return void - */ - public function setRequest(Request $request) - { - $this->request = $request; - } - - /** - * Get the session store implementation. - * - * @return \Illuminate\Session\Store|null - */ - public function getSession() - { - return $this->session; - } - - /** - * Set the session store implementation. - * - * @param \Illuminate\Session\Store $session - * @return void - */ - public function setSession(SessionStore $session) - { - $this->session = $session; - } - - /** - * Dynamically bind flash data in the session. - * - * @param string $method - * @param array $parameters - * @return $this - * - * @throws \BadMethodCallException - */ - public function __call($method, $parameters) - { - if (static::hasMacro($method)) { - return $this->macroCall($method, $parameters); - } - - if (Str::startsWith($method, 'with')) { - return $this->with(Str::snake(substr($method, 4)), $parameters[0]); - } - - throw new BadMethodCallException( - "Method [$method] does not exist on Redirect." - ); - } -} diff --git a/vendor/laravel/framework/src/Illuminate/Log/Writer.php b/vendor/laravel/framework/src/Illuminate/Log/Writer.php deleted file mode 100755 index acf77b2db..000000000 --- a/vendor/laravel/framework/src/Illuminate/Log/Writer.php +++ /dev/null @@ -1,377 +0,0 @@ - MonologLogger::DEBUG, - 'info' => MonologLogger::INFO, - 'notice' => MonologLogger::NOTICE, - 'warning' => MonologLogger::WARNING, - 'error' => MonologLogger::ERROR, - 'critical' => MonologLogger::CRITICAL, - 'alert' => MonologLogger::ALERT, - 'emergency' => MonologLogger::EMERGENCY, - ]; - - /** - * Create a new log writer instance. - * - * @param \Monolog\Logger $monolog - * @param \Illuminate\Contracts\Events\Dispatcher|null $dispatcher - * @return void - */ - public function __construct(MonologLogger $monolog, Dispatcher $dispatcher = null) - { - $this->monolog = $monolog; - - if (isset($dispatcher)) { - $this->dispatcher = $dispatcher; - } - } - - /** - * Log an emergency message to the logs. - * - * @param string $message - * @param array $context - * @return void - */ - public function emergency($message, array $context = []) - { - $this->writeLog(__FUNCTION__, $message, $context); - } - - /** - * Log an alert message to the logs. - * - * @param string $message - * @param array $context - * @return void - */ - public function alert($message, array $context = []) - { - $this->writeLog(__FUNCTION__, $message, $context); - } - - /** - * Log a critical message to the logs. - * - * @param string $message - * @param array $context - * @return void - */ - public function critical($message, array $context = []) - { - $this->writeLog(__FUNCTION__, $message, $context); - } - - /** - * Log an error message to the logs. - * - * @param string $message - * @param array $context - * @return void - */ - public function error($message, array $context = []) - { - $this->writeLog(__FUNCTION__, $message, $context); - } - - /** - * Log a warning message to the logs. - * - * @param string $message - * @param array $context - * @return void - */ - public function warning($message, array $context = []) - { - $this->writeLog(__FUNCTION__, $message, $context); - } - - /** - * Log a notice to the logs. - * - * @param string $message - * @param array $context - * @return void - */ - public function notice($message, array $context = []) - { - $this->writeLog(__FUNCTION__, $message, $context); - } - - /** - * Log an informational message to the logs. - * - * @param string $message - * @param array $context - * @return void - */ - public function info($message, array $context = []) - { - $this->writeLog(__FUNCTION__, $message, $context); - } - - /** - * Log a debug message to the logs. - * - * @param string $message - * @param array $context - * @return void - */ - public function debug($message, array $context = []) - { - $this->writeLog(__FUNCTION__, $message, $context); - } - - /** - * Log a message to the logs. - * - * @param string $level - * @param string $message - * @param array $context - * @return void - */ - public function log($level, $message, array $context = []) - { - $this->writeLog($level, $message, $context); - } - - /** - * Dynamically pass log calls into the writer. - * - * @param string $level - * @param string $message - * @param array $context - * @return void - */ - public function write($level, $message, array $context = []) - { - $this->writeLog($level, $message, $context); - } - - /** - * Write a message to Monolog. - * - * @param string $level - * @param string $message - * @param array $context - * @return void - */ - protected function writeLog($level, $message, $context) - { - $this->fireLogEvent($level, $message = $this->formatMessage($message), $context); - - $this->monolog->{$level}($message, $context); - } - - /** - * Register a file log handler. - * - * @param string $path - * @param string $level - * @return void - */ - public function useFiles($path, $level = 'debug') - { - $this->monolog->pushHandler($handler = new StreamHandler($path, $this->parseLevel($level))); - - $handler->setFormatter($this->getDefaultFormatter()); - } - - /** - * Register a daily file log handler. - * - * @param string $path - * @param int $days - * @param string $level - * @return void - */ - public function useDailyFiles($path, $days = 0, $level = 'debug') - { - $this->monolog->pushHandler( - $handler = new RotatingFileHandler($path, $days, $this->parseLevel($level)) - ); - - $handler->setFormatter($this->getDefaultFormatter()); - } - - /** - * Register a Syslog handler. - * - * @param string $name - * @param string $level - * @param mixed $facility - * @return \Psr\Log\LoggerInterface - */ - public function useSyslog($name = 'laravel', $level = 'debug', $facility = LOG_USER) - { - return $this->monolog->pushHandler(new SyslogHandler($name, $facility, $level)); - } - - /** - * Register an error_log handler. - * - * @param string $level - * @param int $messageType - * @return void - */ - public function useErrorLog($level = 'debug', $messageType = ErrorLogHandler::OPERATING_SYSTEM) - { - $this->monolog->pushHandler( - new ErrorLogHandler($messageType, $this->parseLevel($level)) - ); - } - - /** - * Register a new callback handler for when a log event is triggered. - * - * @param \Closure $callback - * @return void - * - * @throws \RuntimeException - */ - public function listen(Closure $callback) - { - if (! isset($this->dispatcher)) { - throw new RuntimeException('Events dispatcher has not been set.'); - } - - $this->dispatcher->listen(MessageLogged::class, $callback); - } - - /** - * Fires a log event. - * - * @param string $level - * @param string $message - * @param array $context - * @return void - */ - protected function fireLogEvent($level, $message, array $context = []) - { - // If the event dispatcher is set, we will pass along the parameters to the - // log listeners. These are useful for building profilers or other tools - // that aggregate all of the log messages for a given "request" cycle. - if (isset($this->dispatcher)) { - $this->dispatcher->dispatch(new MessageLogged($level, $message, $context)); - } - } - - /** - * Format the parameters for the logger. - * - * @param mixed $message - * @return mixed - */ - protected function formatMessage($message) - { - if (is_array($message)) { - return var_export($message, true); - } elseif ($message instanceof Jsonable) { - return $message->toJson(); - } elseif ($message instanceof Arrayable) { - return var_export($message->toArray(), true); - } - - return $message; - } - - /** - * Parse the string level into a Monolog constant. - * - * @param string $level - * @return int - * - * @throws \InvalidArgumentException - */ - protected function parseLevel($level) - { - if (isset($this->levels[$level])) { - return $this->levels[$level]; - } - - throw new InvalidArgumentException('Invalid log level.'); - } - - /** - * Get the underlying Monolog instance. - * - * @return \Monolog\Logger - */ - public function getMonolog() - { - return $this->monolog; - } - - /** - * Get a default Monolog formatter instance. - * - * @return \Monolog\Formatter\LineFormatter - */ - protected function getDefaultFormatter() - { - return tap(new LineFormatter(null, null, true, true), function ($formatter) { - $formatter->includeStacktraces(); - }); - } - - /** - * Get the event dispatcher instance. - * - * @return \Illuminate\Contracts\Events\Dispatcher - */ - public function getEventDispatcher() - { - return $this->dispatcher; - } - - /** - * Set the event dispatcher instance. - * - * @param \Illuminate\Contracts\Events\Dispatcher $dispatcher - * @return void - */ - public function setEventDispatcher(Dispatcher $dispatcher) - { - $this->dispatcher = $dispatcher; - } -} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php b/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php deleted file mode 100755 index 039e6415e..000000000 --- a/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php +++ /dev/null @@ -1,554 +0,0 @@ -views = $views; - $this->swift = $swift; - $this->events = $events; - } - - /** - * Set the global from address and name. - * - * @param string $address - * @param string|null $name - * @return void - */ - public function alwaysFrom($address, $name = null) - { - $this->from = compact('address', 'name'); - } - - /** - * Set the global reply-to address and name. - * - * @param string $address - * @param string|null $name - * @return void - */ - public function alwaysReplyTo($address, $name = null) - { - $this->replyTo = compact('address', 'name'); - } - - /** - * Set the global to address and name. - * - * @param string $address - * @param string|null $name - * @return void - */ - public function alwaysTo($address, $name = null) - { - $this->to = compact('address', 'name'); - } - - /** - * Begin the process of mailing a mailable class instance. - * - * @param mixed $users - * @return \Illuminate\Mail\PendingMail - */ - public function to($users) - { - return (new PendingMail($this))->to($users); - } - - /** - * Begin the process of mailing a mailable class instance. - * - * @param mixed $users - * @return \Illuminate\Mail\PendingMail - */ - public function bcc($users) - { - return (new PendingMail($this))->bcc($users); - } - - /** - * Send a new message when only a raw text part. - * - * @param string $text - * @param mixed $callback - * @return void - */ - public function raw($text, $callback) - { - return $this->send(['raw' => $text], [], $callback); - } - - /** - * Send a new message when only a plain part. - * - * @param string $view - * @param array $data - * @param mixed $callback - * @return void - */ - public function plain($view, array $data, $callback) - { - return $this->send(['text' => $view], $data, $callback); - } - - /** - * Render the given message as a view. - * - * @param string|array $view - * @param array $data - * @return string - */ - public function render($view, array $data = []) - { - // First we need to parse the view, which could either be a string or an array - // containing both an HTML and plain text versions of the view which should - // be used when sending an e-mail. We will extract both of them out here. - list($view, $plain, $raw) = $this->parseView($view); - - $data['message'] = $this->createMessage(); - - return $this->renderView($view, $data); - } - - /** - * Send a new message using a view. - * - * @param string|array|MailableContract $view - * @param array $data - * @param \Closure|string $callback - * @return void - */ - public function send($view, array $data = [], $callback = null) - { - if ($view instanceof MailableContract) { - return $this->sendMailable($view); - } - - // First we need to parse the view, which could either be a string or an array - // containing both an HTML and plain text versions of the view which should - // be used when sending an e-mail. We will extract both of them out here. - list($view, $plain, $raw) = $this->parseView($view); - - $data['message'] = $message = $this->createMessage(); - - // Once we have retrieved the view content for the e-mail we will set the body - // of this message using the HTML type, which will provide a simple wrapper - // to creating view based emails that are able to receive arrays of data. - $this->addContent($message, $view, $plain, $raw, $data); - - call_user_func($callback, $message); - - // If a global "to" address has been set, we will set that address on the mail - // message. This is primarily useful during local development in which each - // message should be delivered into a single mail address for inspection. - if (isset($this->to['address'])) { - $this->setGlobalTo($message); - } - - // Next we will determine if the message should be sent. We give the developer - // one final chance to stop this message and then we will send it to all of - // its recipients. We will then fire the sent event for the sent message. - $swiftMessage = $message->getSwiftMessage(); - - if ($this->shouldSendMessage($swiftMessage)) { - $this->sendSwiftMessage($swiftMessage); - - $this->dispatchSentEvent($message); - } - } - - /** - * Send the given mailable. - * - * @param \Illuminate\Contracts\Mail\Mailable $mailable - * @return mixed - */ - protected function sendMailable(MailableContract $mailable) - { - return $mailable instanceof ShouldQueue - ? $mailable->queue($this->queue) : $mailable->send($this); - } - - /** - * Parse the given view name or array. - * - * @param string|array $view - * @return array - * - * @throws \InvalidArgumentException - */ - protected function parseView($view) - { - if (is_string($view)) { - return [$view, null, null]; - } - - // If the given view is an array with numeric keys, we will just assume that - // both a "pretty" and "plain" view were provided, so we will return this - // array as is, since it should contain both views with numerical keys. - if (is_array($view) && isset($view[0])) { - return [$view[0], $view[1], null]; - } - - // If this view is an array but doesn't contain numeric keys, we will assume - // the views are being explicitly specified and will extract them via the - // named keys instead, allowing the developers to use one or the other. - if (is_array($view)) { - return [ - $view['html'] ?? null, - $view['text'] ?? null, - $view['raw'] ?? null, - ]; - } - - throw new InvalidArgumentException('Invalid view.'); - } - - /** - * Add the content to a given message. - * - * @param \Illuminate\Mail\Message $message - * @param string $view - * @param string $plain - * @param string $raw - * @param array $data - * @return void - */ - protected function addContent($message, $view, $plain, $raw, $data) - { - if (isset($view)) { - $message->setBody($this->renderView($view, $data), 'text/html'); - } - - if (isset($plain)) { - $method = isset($view) ? 'addPart' : 'setBody'; - - $message->$method($this->renderView($plain, $data), 'text/plain'); - } - - if (isset($raw)) { - $method = (isset($view) || isset($plain)) ? 'addPart' : 'setBody'; - - $message->$method($raw, 'text/plain'); - } - } - - /** - * Render the given view. - * - * @param string $view - * @param array $data - * @return string - */ - protected function renderView($view, $data) - { - return $view instanceof Htmlable - ? $view->toHtml() - : $this->views->make($view, $data)->render(); - } - - /** - * Set the global "to" address on the given message. - * - * @param \Illuminate\Mail\Message $message - * @return void - */ - protected function setGlobalTo($message) - { - $message->to($this->to['address'], $this->to['name'], true); - $message->cc(null, null, true); - $message->bcc(null, null, true); - } - - /** - * Queue a new e-mail message for sending. - * - * @param string|array|MailableContract $view - * @param string|null $queue - * @return mixed - */ - public function queue($view, $queue = null) - { - if (! $view instanceof MailableContract) { - throw new InvalidArgumentException('Only mailables may be queued.'); - } - - return $view->queue(is_null($queue) ? $this->queue : $queue); - } - - /** - * Queue a new e-mail message for sending on the given queue. - * - * @param string $queue - * @param string|array $view - * @return mixed - */ - public function onQueue($queue, $view) - { - return $this->queue($view, $queue); - } - - /** - * Queue a new e-mail message for sending on the given queue. - * - * This method didn't match rest of framework's "onQueue" phrasing. Added "onQueue". - * - * @param string $queue - * @param string|array $view - * @return mixed - */ - public function queueOn($queue, $view) - { - return $this->onQueue($queue, $view); - } - - /** - * Queue a new e-mail message for sending after (n) seconds. - * - * @param \DateTimeInterface|\DateInterval|int $delay - * @param string|array|MailableContract $view - * @param string|null $queue - * @return mixed - */ - public function later($delay, $view, $queue = null) - { - if (! $view instanceof MailableContract) { - throw new InvalidArgumentException('Only mailables may be queued.'); - } - - return $view->later($delay, is_null($queue) ? $this->queue : $queue); - } - - /** - * Queue a new e-mail message for sending after (n) seconds on the given queue. - * - * @param string $queue - * @param \DateTimeInterface|\DateInterval|int $delay - * @param string|array $view - * @return mixed - */ - public function laterOn($queue, $delay, $view) - { - return $this->later($delay, $view, $queue); - } - - /** - * Create a new message instance. - * - * @return \Illuminate\Mail\Message - */ - protected function createMessage() - { - $message = new Message($this->swift->createMessage('message')); - - // If a global from address has been specified we will set it on every message - // instance so the developer does not have to repeat themselves every time - // they create a new message. We'll just go ahead and push this address. - if (! empty($this->from['address'])) { - $message->from($this->from['address'], $this->from['name']); - } - - // When a global reply address was specified we will set this on every message - // instance so the developer does not have to repeat themselves every time - // they create a new message. We will just go ahead and push this address. - if (! empty($this->replyTo['address'])) { - $message->replyTo($this->replyTo['address'], $this->replyTo['name']); - } - - return $message; - } - - /** - * Send a Swift Message instance. - * - * @param \Swift_Message $message - * @return void - */ - protected function sendSwiftMessage($message) - { - try { - return $this->swift->send($message, $this->failedRecipients); - } finally { - $this->forceReconnection(); - } - } - - /** - * Determines if the message can be sent. - * - * @param \Swift_Message $message - * @return bool - */ - protected function shouldSendMessage($message) - { - if (! $this->events) { - return true; - } - - return $this->events->until( - new Events\MessageSending($message) - ) !== false; - } - - /** - * Dispatch the message sent event. - * - * @param \Illuminate\Mail\Message $message - * @return void - */ - protected function dispatchSentEvent($message) - { - if ($this->events) { - $this->events->dispatch( - new Events\MessageSent($message->getSwiftMessage()) - ); - } - } - - /** - * Force the transport to re-connect. - * - * This will prevent errors in daemon queue situations. - * - * @return void - */ - protected function forceReconnection() - { - $this->getSwiftMailer()->getTransport()->stop(); - } - - /** - * Get the view factory instance. - * - * @return \Illuminate\Contracts\View\Factory - */ - public function getViewFactory() - { - return $this->views; - } - - /** - * Get the Swift Mailer instance. - * - * @return \Swift_Mailer - */ - public function getSwiftMailer() - { - return $this->swift; - } - - /** - * Get the array of failed recipients. - * - * @return array - */ - public function failures() - { - return $this->failedRecipients; - } - - /** - * Set the Swift Mailer instance. - * - * @param \Swift_Mailer $swift - * @return void - */ - public function setSwiftMailer($swift) - { - $this->swift = $swift; - } - - /** - * Set the queue manager instance. - * - * @param \Illuminate\Contracts\Queue\Factory $queue - * @return $this - */ - public function setQueue(QueueContract $queue) - { - $this->queue = $queue; - - return $this; - } -} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/ChannelManager.php b/vendor/laravel/framework/src/Illuminate/Notifications/ChannelManager.php deleted file mode 100644 index eb8c4f29d..000000000 --- a/vendor/laravel/framework/src/Illuminate/Notifications/ChannelManager.php +++ /dev/null @@ -1,171 +0,0 @@ -app->make(Bus::class), $this->app->make(Dispatcher::class)) - )->send($notifiables, $notification); - } - - /** - * Send the given notification immediately. - * - * @param \Illuminate\Support\Collection|array|mixed $notifiables - * @param mixed $notification - * @param array|null $channels - * @return void - */ - public function sendNow($notifiables, $notification, array $channels = null) - { - return (new NotificationSender( - $this, $this->app->make(Bus::class), $this->app->make(Dispatcher::class)) - )->sendNow($notifiables, $notification, $channels); - } - - /** - * Get a channel instance. - * - * @param string|null $name - * @return mixed - */ - public function channel($name = null) - { - return $this->driver($name); - } - - /** - * Create an instance of the database driver. - * - * @return \Illuminate\Notifications\Channels\DatabaseChannel - */ - protected function createDatabaseDriver() - { - return $this->app->make(Channels\DatabaseChannel::class); - } - - /** - * Create an instance of the broadcast driver. - * - * @return \Illuminate\Notifications\Channels\BroadcastChannel - */ - protected function createBroadcastDriver() - { - return $this->app->make(Channels\BroadcastChannel::class); - } - - /** - * Create an instance of the mail driver. - * - * @return \Illuminate\Notifications\Channels\MailChannel - */ - protected function createMailDriver() - { - return $this->app->make(Channels\MailChannel::class); - } - - /** - * Create an instance of the Nexmo driver. - * - * @return \Illuminate\Notifications\Channels\NexmoSmsChannel - */ - protected function createNexmoDriver() - { - return new Channels\NexmoSmsChannel( - new NexmoClient(new NexmoCredentials( - $this->app['config']['services.nexmo.key'], - $this->app['config']['services.nexmo.secret'] - )), - $this->app['config']['services.nexmo.sms_from'] - ); - } - - /** - * Create an instance of the Slack driver. - * - * @return \Illuminate\Notifications\Channels\SlackWebhookChannel - */ - protected function createSlackDriver() - { - return new Channels\SlackWebhookChannel(new HttpClient); - } - - /** - * Create a new driver instance. - * - * @param string $driver - * @return mixed - * - * @throws \InvalidArgumentException - */ - protected function createDriver($driver) - { - try { - return parent::createDriver($driver); - } catch (InvalidArgumentException $e) { - if (class_exists($driver)) { - return $this->app->make($driver); - } - - throw $e; - } - } - - /** - * Get the default channel driver name. - * - * @return string - */ - public function getDefaultDriver() - { - return $this->defaultChannel; - } - - /** - * Get the default channel driver name. - * - * @return string - */ - public function deliversVia() - { - return $this->getDefaultDriver(); - } - - /** - * Set the default channel driver name. - * - * @param string $channel - * @return void - */ - public function deliverVia($channel) - { - $this->defaultChannel = $channel; - } -} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php b/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php deleted file mode 100644 index 7899f55af..000000000 --- a/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php +++ /dev/null @@ -1,181 +0,0 @@ -bus = $bus; - $this->events = $events; - $this->manager = $manager; - } - - /** - * Send the given notification to the given notifiable entities. - * - * @param \Illuminate\Support\Collection|array|mixed $notifiables - * @param mixed $notification - * @return void - */ - public function send($notifiables, $notification) - { - $notifiables = $this->formatNotifiables($notifiables); - - if ($notification instanceof ShouldQueue) { - return $this->queueNotification($notifiables, $notification); - } - - return $this->sendNow($notifiables, $notification); - } - - /** - * Send the given notification immediately. - * - * @param \Illuminate\Support\Collection|array|mixed $notifiables - * @param mixed $notification - * @param array $channels - * @return void - */ - public function sendNow($notifiables, $notification, array $channels = null) - { - $notifiables = $this->formatNotifiables($notifiables); - - $original = clone $notification; - - foreach ($notifiables as $notifiable) { - if (empty($viaChannels = $channels ?: $notification->via($notifiable))) { - continue; - } - - $notificationId = Uuid::uuid4()->toString(); - - foreach ((array) $viaChannels as $channel) { - $this->sendToNotifiable($notifiable, $notificationId, clone $original, $channel); - } - } - } - - /** - * Send the given notification to the given notifiable via a channel. - * - * @param mixed $notifiable - * @param string $id - * @param mixed $notification - * @param string $channel - * @return void - */ - protected function sendToNotifiable($notifiable, $id, $notification, $channel) - { - if (! $notification->id) { - $notification->id = $id; - } - - if (! $this->shouldSendNotification($notifiable, $notification, $channel)) { - return; - } - - $response = $this->manager->driver($channel)->send($notifiable, $notification); - - $this->events->dispatch( - new Events\NotificationSent($notifiable, $notification, $channel, $response) - ); - } - - /** - * Determines if the notification can be sent. - * - * @param mixed $notifiable - * @param mixed $notification - * @param string $channel - * @return bool - */ - protected function shouldSendNotification($notifiable, $notification, $channel) - { - return $this->events->until( - new Events\NotificationSending($notifiable, $notification, $channel) - ) !== false; - } - - /** - * Queue the given notification instances. - * - * @param mixed $notifiables - * @param array[\Illuminate\Notifications\Channels\Notification] $notification - * @return void - */ - protected function queueNotification($notifiables, $notification) - { - $notifiables = $this->formatNotifiables($notifiables); - - $original = clone $notification; - - foreach ($notifiables as $notifiable) { - $notificationId = Uuid::uuid4()->toString(); - - foreach ($original->via($notifiable) as $channel) { - $notification = clone $original; - - $notification->id = $notificationId; - - $this->bus->dispatch( - (new SendQueuedNotifications($notifiable, $notification, [$channel])) - ->onConnection($notification->connection) - ->onQueue($notification->queue) - ->delay($notification->delay) - ); - } - } - } - - /** - * Format the notifiables into a Collection / array if necessary. - * - * @param mixed $notifiables - * @return \Illuminate\Database\Eloquent\Collection|array - */ - protected function formatNotifiables($notifiables) - { - if (! $notifiables instanceof Collection && ! is_array($notifiables)) { - return $notifiables instanceof Model - ? new ModelCollection([$notifiables]) : [$notifiables]; - } - - return $notifiables; - } -} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/RoutesNotifications.php b/vendor/laravel/framework/src/Illuminate/Notifications/RoutesNotifications.php deleted file mode 100644 index 779d5b8fd..000000000 --- a/vendor/laravel/framework/src/Illuminate/Notifications/RoutesNotifications.php +++ /dev/null @@ -1,54 +0,0 @@ -send($this, $instance); - } - - /** - * Send the given notification immediately. - * - * @param mixed $instance - * @param array|null $channels - * @return void - */ - public function notifyNow($instance, array $channels = null) - { - app(Dispatcher::class)->sendNow($this, $instance, $channels); - } - - /** - * Get the notification routing information for the given driver. - * - * @param string $driver - * @return mixed - */ - public function routeNotificationFor($driver) - { - if (method_exists($this, $method = 'routeNotificationFor'.Str::studly($driver))) { - return $this->{$method}(); - } - - switch ($driver) { - case 'database': - return $this->notifications(); - case 'mail': - return $this->email; - case 'nexmo': - return $this->phone_number; - } - } -} diff --git a/vendor/laravel/framework/src/Illuminate/Notifications/SendQueuedNotifications.php b/vendor/laravel/framework/src/Illuminate/Notifications/SendQueuedNotifications.php deleted file mode 100644 index 31fdd9b69..000000000 --- a/vendor/laravel/framework/src/Illuminate/Notifications/SendQueuedNotifications.php +++ /dev/null @@ -1,93 +0,0 @@ -channels = $channels; - $this->notifiables = $notifiables; - $this->notification = $notification; - } - - /** - * Send the notifications. - * - * @param \Illuminate\Notifications\ChannelManager $manager - * @return void - */ - public function handle(ChannelManager $manager) - { - $manager->sendNow($this->notifiables, $this->notification, $this->channels); - } - - /** - * Get the display name for the queued job. - * - * @return string - */ - public function displayName() - { - return get_class($this->notification); - } - - /** - * Call the failed method on the notification instance. - * - * @param \Exception $e - * @return void - */ - public function failed($e) - { - if (method_exists($this->notification, 'failed')) { - $this->notification->failed($e); - } - } - - /** - * Prepare the instance for cloning. - * - * @return void - */ - public function __clone() - { - $this->notifiables = clone $this->notifiables; - $this->notification = clone $this->notification; - } -} diff --git a/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php b/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php deleted file mode 100644 index e227a583b..000000000 --- a/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php +++ /dev/null @@ -1,186 +0,0 @@ -container = $container; - } - - /** - * Set the object being sent through the pipeline. - * - * @param mixed $passable - * @return $this - */ - public function send($passable) - { - $this->passable = $passable; - - return $this; - } - - /** - * Set the array of pipes. - * - * @param array|mixed $pipes - * @return $this - */ - public function through($pipes) - { - $this->pipes = is_array($pipes) ? $pipes : func_get_args(); - - return $this; - } - - /** - * Set the method to call on the pipes. - * - * @param string $method - * @return $this - */ - public function via($method) - { - $this->method = $method; - - return $this; - } - - /** - * Run the pipeline with a final destination callback. - * - * @param \Closure $destination - * @return mixed - */ - public function then(Closure $destination) - { - $pipeline = array_reduce( - array_reverse($this->pipes), $this->carry(), $this->prepareDestination($destination) - ); - - return $pipeline($this->passable); - } - - /** - * Get the final piece of the Closure onion. - * - * @param \Closure $destination - * @return \Closure - */ - protected function prepareDestination(Closure $destination) - { - return function ($passable) use ($destination) { - return $destination($passable); - }; - } - - /** - * Get a Closure that represents a slice of the application onion. - * - * @return \Closure - */ - protected function carry() - { - return function ($stack, $pipe) { - return function ($passable) use ($stack, $pipe) { - if (is_callable($pipe)) { - // If the pipe is an instance of a Closure, we will just call it directly but - // otherwise we'll resolve the pipes out of the container and call it with - // the appropriate method and arguments, returning the results back out. - return $pipe($passable, $stack); - } elseif (! is_object($pipe)) { - list($name, $parameters) = $this->parsePipeString($pipe); - - // If the pipe is a string we will parse the string and resolve the class out - // of the dependency injection container. We can then build a callable and - // execute the pipe function giving in the parameters that are required. - $pipe = $this->getContainer()->make($name); - - $parameters = array_merge([$passable, $stack], $parameters); - } else { - // If the pipe is already an object we'll just make a callable and pass it to - // the pipe as-is. There is no need to do any extra parsing and formatting - // since the object we're given was already a fully instantiated object. - $parameters = [$passable, $stack]; - } - - return method_exists($pipe, $this->method) - ? $pipe->{$this->method}(...$parameters) - : $pipe(...$parameters); - }; - }; - } - - /** - * Parse full pipe string to get name and parameters. - * - * @param string $pipe - * @return array - */ - protected function parsePipeString($pipe) - { - list($name, $parameters) = array_pad(explode(':', $pipe, 2), 2, []); - - if (is_string($parameters)) { - $parameters = explode(',', $parameters); - } - - return [$name, $parameters]; - } - - /** - * Get the container instance. - * - * @return \Illuminate\Contracts\Container\Container - * @throws \RuntimeException - */ - protected function getContainer() - { - if (! $this->container) { - throw new RuntimeException('A container instance has not been passed to the Pipeline.'); - } - - return $this->container; - } -} diff --git a/vendor/laravel/framework/src/Illuminate/Validation/Factory.php b/vendor/laravel/framework/src/Illuminate/Validation/Factory.php deleted file mode 100755 index c31ee4a4a..000000000 --- a/vendor/laravel/framework/src/Illuminate/Validation/Factory.php +++ /dev/null @@ -1,283 +0,0 @@ -container = $container; - $this->translator = $translator; - } - - /** - * Create a new Validator instance. - * - * @param array $data - * @param array $rules - * @param array $messages - * @param array $customAttributes - * @return \Illuminate\Validation\Validator - */ - public function make(array $data, array $rules, array $messages = [], array $customAttributes = []) - { - // The presence verifier is responsible for checking the unique and exists data - // for the validator. It is behind an interface so that multiple versions of - // it may be written besides database. We'll inject it into the validator. - $validator = $this->resolve( - $data, $rules, $messages, $customAttributes - ); - - if (! is_null($this->verifier)) { - $validator->setPresenceVerifier($this->verifier); - } - - // Next we'll set the IoC container instance of the validator, which is used to - // resolve out class based validator extensions. If it is not set then these - // types of extensions will not be possible on these validation instances. - if (! is_null($this->container)) { - $validator->setContainer($this->container); - } - - $this->addExtensions($validator); - - return $validator; - } - - /** - * Validate the given data against the provided rules. - * - * @param array $data - * @param array $rules - * @param array $messages - * @param array $customAttributes - * @return void - * - * @throws \Illuminate\Validation\ValidationException - */ - public function validate(array $data, array $rules, array $messages = [], array $customAttributes = []) - { - $this->make($data, $rules, $messages, $customAttributes)->validate(); - } - - /** - * Resolve a new Validator instance. - * - * @param array $data - * @param array $rules - * @param array $messages - * @param array $customAttributes - * @return \Illuminate\Validation\Validator - */ - protected function resolve(array $data, array $rules, array $messages, array $customAttributes) - { - if (is_null($this->resolver)) { - return new Validator($this->translator, $data, $rules, $messages, $customAttributes); - } - - return call_user_func($this->resolver, $this->translator, $data, $rules, $messages, $customAttributes); - } - - /** - * Add the extensions to a validator instance. - * - * @param \Illuminate\Validation\Validator $validator - * @return void - */ - protected function addExtensions(Validator $validator) - { - $validator->addExtensions($this->extensions); - - // Next, we will add the implicit extensions, which are similar to the required - // and accepted rule in that they are run even if the attributes is not in a - // array of data that is given to a validator instances via instantiation. - $validator->addImplicitExtensions($this->implicitExtensions); - - $validator->addDependentExtensions($this->dependentExtensions); - - $validator->addReplacers($this->replacers); - - $validator->setFallbackMessages($this->fallbackMessages); - } - - /** - * Register a custom validator extension. - * - * @param string $rule - * @param \Closure|string $extension - * @param string $message - * @return void - */ - public function extend($rule, $extension, $message = null) - { - $this->extensions[$rule] = $extension; - - if ($message) { - $this->fallbackMessages[Str::snake($rule)] = $message; - } - } - - /** - * Register a custom implicit validator extension. - * - * @param string $rule - * @param \Closure|string $extension - * @param string $message - * @return void - */ - public function extendImplicit($rule, $extension, $message = null) - { - $this->implicitExtensions[$rule] = $extension; - - if ($message) { - $this->fallbackMessages[Str::snake($rule)] = $message; - } - } - - /** - * Register a custom dependent validator extension. - * - * @param string $rule - * @param \Closure|string $extension - * @param string $message - * @return void - */ - public function extendDependent($rule, $extension, $message = null) - { - $this->dependentExtensions[$rule] = $extension; - - if ($message) { - $this->fallbackMessages[Str::snake($rule)] = $message; - } - } - - /** - * Register a custom validator message replacer. - * - * @param string $rule - * @param \Closure|string $replacer - * @return void - */ - public function replacer($rule, $replacer) - { - $this->replacers[$rule] = $replacer; - } - - /** - * Set the Validator instance resolver. - * - * @param \Closure $resolver - * @return void - */ - public function resolver(Closure $resolver) - { - $this->resolver = $resolver; - } - - /** - * Get the Translator implementation. - * - * @return \Illuminate\Contracts\Translation\Translator - */ - public function getTranslator() - { - return $this->translator; - } - - /** - * Get the Presence Verifier implementation. - * - * @return \Illuminate\Validation\PresenceVerifierInterface - */ - public function getPresenceVerifier() - { - return $this->verifier; - } - - /** - * Set the Presence Verifier implementation. - * - * @param \Illuminate\Validation\PresenceVerifierInterface $presenceVerifier - * @return void - */ - public function setPresenceVerifier(PresenceVerifierInterface $presenceVerifier) - { - $this->verifier = $presenceVerifier; - } -} diff --git a/vendor/laravel/framework/src/Illuminate/Validation/ValidationRuleParser.php b/vendor/laravel/framework/src/Illuminate/Validation/ValidationRuleParser.php deleted file mode 100644 index 43a28db98..000000000 --- a/vendor/laravel/framework/src/Illuminate/Validation/ValidationRuleParser.php +++ /dev/null @@ -1,275 +0,0 @@ -data = $data; - } - - /** - * Parse the human-friendly rules into a full rules array for the validator. - * - * @param array $rules - * @return \stdClass - */ - public function explode($rules) - { - $this->implicitAttributes = []; - - $rules = $this->explodeRules($rules); - - return (object) [ - 'rules' => $rules, - 'implicitAttributes' => $this->implicitAttributes, - ]; - } - - /** - * Explode the rules into an array of explicit rules. - * - * @param array $rules - * @return array - */ - protected function explodeRules($rules) - { - foreach ($rules as $key => $rule) { - if (Str::contains($key, '*')) { - $rules = $this->explodeWildcardRules($rules, $key, [$rule]); - - unset($rules[$key]); - } else { - $rules[$key] = $this->explodeExplicitRule($rule); - } - } - - return $rules; - } - - /** - * Explode the explicit rule into an array if necessary. - * - * @param mixed $rule - * @return array - */ - protected function explodeExplicitRule($rule) - { - if (is_string($rule)) { - return explode('|', $rule); - } elseif (is_object($rule)) { - return [$this->prepareRule($rule)]; - } - - return array_map([$this, 'prepareRule'], $rule); - } - - /** - * Prepare the given rule for the Validator. - * - * @param mixed $rule - * @return mixed - */ - protected function prepareRule($rule) - { - if ($rule instanceof Closure) { - $rule = new ClosureValidationRule($rule); - } - - if (! is_object($rule) || - $rule instanceof RuleContract || - ($rule instanceof Exists && $rule->queryCallbacks()) || - ($rule instanceof Unique && $rule->queryCallbacks())) { - return $rule; - } - - return (string) $rule; - } - - /** - * Define a set of rules that apply to each element in an array attribute. - * - * @param array $results - * @param string $attribute - * @param string|array $rules - * @return array - */ - protected function explodeWildcardRules($results, $attribute, $rules) - { - $pattern = str_replace('\*', '[^\.]*', preg_quote($attribute)); - - $data = ValidationData::initializeAndGatherData($attribute, $this->data); - - foreach ($data as $key => $value) { - if (Str::startsWith($key, $attribute) || (bool) preg_match('/^'.$pattern.'\z/', $key)) { - foreach ((array) $rules as $rule) { - $this->implicitAttributes[$attribute][] = $key; - - $results = $this->mergeRules($results, $key, $rule); - } - } - } - - return $results; - } - - /** - * Merge additional rules into a given attribute(s). - * - * @param array $results - * @param string|array $attribute - * @param string|array $rules - * @return array - */ - public function mergeRules($results, $attribute, $rules = []) - { - if (is_array($attribute)) { - foreach ((array) $attribute as $innerAttribute => $innerRules) { - $results = $this->mergeRulesForAttribute($results, $innerAttribute, $innerRules); - } - - return $results; - } - - return $this->mergeRulesForAttribute( - $results, $attribute, $rules - ); - } - - /** - * Merge additional rules into a given attribute. - * - * @param array $results - * @param string $attribute - * @param string|array $rules - * @return array - */ - protected function mergeRulesForAttribute($results, $attribute, $rules) - { - $merge = head($this->explodeRules([$rules])); - - $results[$attribute] = array_merge( - isset($results[$attribute]) ? $this->explodeExplicitRule($results[$attribute]) : [], $merge - ); - - return $results; - } - - /** - * Extract the rule name and parameters from a rule. - * - * @param array|string $rules - * @return array - */ - public static function parse($rules) - { - if ($rules instanceof RuleContract) { - return [$rules, []]; - } - - if (is_array($rules)) { - $rules = static::parseArrayRule($rules); - } else { - $rules = static::parseStringRule($rules); - } - - $rules[0] = static::normalizeRule($rules[0]); - - return $rules; - } - - /** - * Parse an array based rule. - * - * @param array $rules - * @return array - */ - protected static function parseArrayRule(array $rules) - { - return [Str::studly(trim(Arr::get($rules, 0))), array_slice($rules, 1)]; - } - - /** - * Parse a string based rule. - * - * @param string $rules - * @return array - */ - protected static function parseStringRule($rules) - { - $parameters = []; - - // The format for specifying validation rules and parameters follows an - // easy {rule}:{parameters} formatting convention. For instance the - // rule "Max:3" states that the value may only be three letters. - if (strpos($rules, ':') !== false) { - list($rules, $parameter) = explode(':', $rules, 2); - - $parameters = static::parseParameters($rules, $parameter); - } - - return [Str::studly(trim($rules)), $parameters]; - } - - /** - * Parse a parameter list. - * - * @param string $rule - * @param string $parameter - * @return array - */ - protected static function parseParameters($rule, $parameter) - { - if (strtolower($rule) == 'regex') { - return [$parameter]; - } - - return str_getcsv($parameter); - } - - /** - * Normalizes a rule so that we can accept short types. - * - * @param string $rule - * @return string - */ - protected static function normalizeRule($rule) - { - switch ($rule) { - case 'Int': - return 'Integer'; - case 'Bool': - return 'Boolean'; - default: - return $rule; - } - } -} diff --git a/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php b/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php deleted file mode 100755 index cf6bb8efa..000000000 --- a/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php +++ /dev/null @@ -1,298 +0,0 @@ -files = $files; - $this->paths = $paths; - - if (isset($extensions)) { - $this->extensions = $extensions; - } - } - - /** - * Get the fully qualified location of the view. - * - * @param string $name - * @return string - */ - public function find($name) - { - if (isset($this->views[$name])) { - return $this->views[$name]; - } - - if ($this->hasHintInformation($name = trim($name))) { - return $this->views[$name] = $this->findNamespacedView($name); - } - - return $this->views[$name] = $this->findInPaths($name, $this->paths); - } - - /** - * Get the path to a template with a named path. - * - * @param string $name - * @return string - */ - protected function findNamespacedView($name) - { - list($namespace, $view) = $this->parseNamespaceSegments($name); - - return $this->findInPaths($view, $this->hints[$namespace]); - } - - /** - * Get the segments of a template with a named path. - * - * @param string $name - * @return array - * - * @throws \InvalidArgumentException - */ - protected function parseNamespaceSegments($name) - { - $segments = explode(static::HINT_PATH_DELIMITER, $name); - - if (count($segments) != 2) { - throw new InvalidArgumentException("View [$name] has an invalid name."); - } - - if (! isset($this->hints[$segments[0]])) { - throw new InvalidArgumentException("No hint path defined for [{$segments[0]}]."); - } - - return $segments; - } - - /** - * Find the given view in the list of paths. - * - * @param string $name - * @param array $paths - * @return string - * - * @throws \InvalidArgumentException - */ - protected function findInPaths($name, $paths) - { - foreach ((array) $paths as $path) { - foreach ($this->getPossibleViewFiles($name) as $file) { - if ($this->files->exists($viewPath = $path.'/'.$file)) { - return $viewPath; - } - } - } - - throw new InvalidArgumentException("View [$name] not found."); - } - - /** - * Get an array of possible view files. - * - * @param string $name - * @return array - */ - protected function getPossibleViewFiles($name) - { - return array_map(function ($extension) use ($name) { - return str_replace('.', '/', $name).'.'.$extension; - }, $this->extensions); - } - - /** - * Add a location to the finder. - * - * @param string $location - * @return void - */ - public function addLocation($location) - { - $this->paths[] = $location; - } - - /** - * Prepend a location to the finder. - * - * @param string $location - * @return void - */ - public function prependLocation($location) - { - array_unshift($this->paths, $location); - } - - /** - * Add a namespace hint to the finder. - * - * @param string $namespace - * @param string|array $hints - * @return void - */ - public function addNamespace($namespace, $hints) - { - $hints = (array) $hints; - - if (isset($this->hints[$namespace])) { - $hints = array_merge($this->hints[$namespace], $hints); - } - - $this->hints[$namespace] = $hints; - } - - /** - * Prepend a namespace hint to the finder. - * - * @param string $namespace - * @param string|array $hints - * @return void - */ - public function prependNamespace($namespace, $hints) - { - $hints = (array) $hints; - - if (isset($this->hints[$namespace])) { - $hints = array_merge($hints, $this->hints[$namespace]); - } - - $this->hints[$namespace] = $hints; - } - - /** - * Replace the namespace hints for the given namespace. - * - * @param string $namespace - * @param string|array $hints - * @return void - */ - public function replaceNamespace($namespace, $hints) - { - $this->hints[$namespace] = (array) $hints; - } - - /** - * Register an extension with the view finder. - * - * @param string $extension - * @return void - */ - public function addExtension($extension) - { - if (($index = array_search($extension, $this->extensions)) !== false) { - unset($this->extensions[$index]); - } - - array_unshift($this->extensions, $extension); - } - - /** - * Returns whether or not the view name has any hint information. - * - * @param string $name - * @return bool - */ - public function hasHintInformation($name) - { - return strpos($name, static::HINT_PATH_DELIMITER) > 0; - } - - /** - * Flush the cache of located views. - * - * @return void - */ - public function flush() - { - $this->views = []; - } - - /** - * Get the filesystem instance. - * - * @return \Illuminate\Filesystem\Filesystem - */ - public function getFilesystem() - { - return $this->files; - } - - /** - * Get the active view paths. - * - * @return array - */ - public function getPaths() - { - return $this->paths; - } - - /** - * Get the namespace to file path hints. - * - * @return array - */ - public function getHints() - { - return $this->hints; - } - - /** - * Get registered extensions. - * - * @return array - */ - public function getExtensions() - { - return $this->extensions; - } -} diff --git a/vendor/league/flysystem/src/Filesystem.php b/vendor/league/flysystem/src/Filesystem.php deleted file mode 100644 index c4eaf2781..000000000 --- a/vendor/league/flysystem/src/Filesystem.php +++ /dev/null @@ -1,409 +0,0 @@ -adapter = $adapter; - $this->setConfig($config); - } - - /** - * Get the Adapter. - * - * @return AdapterInterface adapter - */ - public function getAdapter() - { - return $this->adapter; - } - - /** - * @inheritdoc - */ - public function has($path) - { - $path = Util::normalizePath($path); - - return strlen($path) === 0 ? false : (bool) $this->getAdapter()->has($path); - } - - /** - * @inheritdoc - */ - public function write($path, $contents, array $config = []) - { - $path = Util::normalizePath($path); - $this->assertAbsent($path); - $config = $this->prepareConfig($config); - - return (bool) $this->getAdapter()->write($path, $contents, $config); - } - - /** - * @inheritdoc - */ - public function writeStream($path, $resource, array $config = []) - { - if ( ! is_resource($resource) || get_resource_type($resource) !== 'stream') { - throw new InvalidArgumentException(__METHOD__ . ' expects argument #2 to be a valid resource.'); - } - - $path = Util::normalizePath($path); - $this->assertAbsent($path); - $config = $this->prepareConfig($config); - - Util::rewindStream($resource); - - return (bool) $this->getAdapter()->writeStream($path, $resource, $config); - } - - /** - * @inheritdoc - */ - public function put($path, $contents, array $config = []) - { - $path = Util::normalizePath($path); - $config = $this->prepareConfig($config); - - if ( ! $this->getAdapter() instanceof CanOverwriteFiles && $this->has($path)) { - return (bool) $this->getAdapter()->update($path, $contents, $config); - } - - return (bool) $this->getAdapter()->write($path, $contents, $config); - } - - /** - * @inheritdoc - */ - public function putStream($path, $resource, array $config = []) - { - if ( ! is_resource($resource) || get_resource_type($resource) !== 'stream') { - throw new InvalidArgumentException(__METHOD__ . ' expects argument #2 to be a valid resource.'); - } - - $path = Util::normalizePath($path); - $config = $this->prepareConfig($config); - Util::rewindStream($resource); - - if ( ! $this->getAdapter() instanceof CanOverwriteFiles && $this->has($path)) { - return (bool) $this->getAdapter()->updateStream($path, $resource, $config); - } - - return (bool) $this->getAdapter()->writeStream($path, $resource, $config); - } - - /** - * @inheritdoc - */ - public function readAndDelete($path) - { - $path = Util::normalizePath($path); - $this->assertPresent($path); - $contents = $this->read($path); - - if ($contents === false) { - return false; - } - - $this->delete($path); - - return $contents; - } - - /** - * @inheritdoc - */ - public function update($path, $contents, array $config = []) - { - $path = Util::normalizePath($path); - $config = $this->prepareConfig($config); - - $this->assertPresent($path); - - return (bool) $this->getAdapter()->update($path, $contents, $config); - } - - /** - * @inheritdoc - */ - public function updateStream($path, $resource, array $config = []) - { - if ( ! is_resource($resource) || get_resource_type($resource) !== 'stream') { - throw new InvalidArgumentException(__METHOD__ . ' expects argument #2 to be a valid resource.'); - } - - $path = Util::normalizePath($path); - $config = $this->prepareConfig($config); - $this->assertPresent($path); - Util::rewindStream($resource); - - return (bool) $this->getAdapter()->updateStream($path, $resource, $config); - } - - /** - * @inheritdoc - */ - public function read($path) - { - $path = Util::normalizePath($path); - $this->assertPresent($path); - - if ( ! ($object = $this->getAdapter()->read($path))) { - return false; - } - - return $object['contents']; - } - - /** - * @inheritdoc - */ - public function readStream($path) - { - $path = Util::normalizePath($path); - $this->assertPresent($path); - - if ( ! $object = $this->getAdapter()->readStream($path)) { - return false; - } - - return $object['stream']; - } - - /** - * @inheritdoc - */ - public function rename($path, $newpath) - { - $path = Util::normalizePath($path); - $newpath = Util::normalizePath($newpath); - $this->assertPresent($path); - $this->assertAbsent($newpath); - - return (bool) $this->getAdapter()->rename($path, $newpath); - } - - /** - * @inheritdoc - */ - public function copy($path, $newpath) - { - $path = Util::normalizePath($path); - $newpath = Util::normalizePath($newpath); - $this->assertPresent($path); - $this->assertAbsent($newpath); - - return $this->getAdapter()->copy($path, $newpath); - } - - /** - * @inheritdoc - */ - public function delete($path) - { - $path = Util::normalizePath($path); - $this->assertPresent($path); - - return $this->getAdapter()->delete($path); - } - - /** - * @inheritdoc - */ - public function deleteDir($dirname) - { - $dirname = Util::normalizePath($dirname); - - if ($dirname === '') { - throw new RootViolationException('Root directories can not be deleted.'); - } - - return (bool) $this->getAdapter()->deleteDir($dirname); - } - - /** - * @inheritdoc - */ - public function createDir($dirname, array $config = []) - { - $dirname = Util::normalizePath($dirname); - $config = $this->prepareConfig($config); - - return (bool) $this->getAdapter()->createDir($dirname, $config); - } - - /** - * @inheritdoc - */ - public function listContents($directory = '', $recursive = false) - { - $directory = Util::normalizePath($directory); - $contents = $this->getAdapter()->listContents($directory, $recursive); - - return (new ContentListingFormatter($directory, $recursive, $this->config->get('case_sensitive', true))) - ->formatListing($contents); - } - - /** - * @inheritdoc - */ - public function getMimetype($path) - { - $path = Util::normalizePath($path); - $this->assertPresent($path); - - if (( ! $object = $this->getAdapter()->getMimetype($path)) || ! array_key_exists('mimetype', $object)) { - return false; - } - - return $object['mimetype']; - } - - /** - * @inheritdoc - */ - public function getTimestamp($path) - { - $path = Util::normalizePath($path); - $this->assertPresent($path); - - if (( ! $object = $this->getAdapter()->getTimestamp($path)) || ! array_key_exists('timestamp', $object)) { - return false; - } - - return (int) $object['timestamp']; - } - - /** - * @inheritdoc - */ - public function getVisibility($path) - { - $path = Util::normalizePath($path); - $this->assertPresent($path); - - if (( ! $object = $this->getAdapter()->getVisibility($path)) || ! array_key_exists('visibility', $object)) { - return false; - } - - return $object['visibility']; - } - - /** - * @inheritdoc - */ - public function getSize($path) - { - $path = Util::normalizePath($path); - $this->assertPresent($path); - - if (( ! $object = $this->getAdapter()->getSize($path)) || ! array_key_exists('size', $object)) { - return false; - } - - return (int) $object['size']; - } - - /** - * @inheritdoc - */ - public function setVisibility($path, $visibility) - { - $path = Util::normalizePath($path); - $this->assertPresent($path); - - return (bool) $this->getAdapter()->setVisibility($path, $visibility); - } - - /** - * @inheritdoc - */ - public function getMetadata($path) - { - $path = Util::normalizePath($path); - $this->assertPresent($path); - - return $this->getAdapter()->getMetadata($path); - } - - /** - * @inheritdoc - */ - public function get($path, Handler $handler = null) - { - $path = Util::normalizePath($path); - - if ( ! $handler) { - $metadata = $this->getMetadata($path); - $handler = ($metadata && $metadata['type'] === 'file') ? new File($this, $path) : new Directory($this, $path); - } - - $handler->setPath($path); - $handler->setFilesystem($this); - - return $handler; - } - - /** - * Assert a file is present. - * - * @param string $path path to file - * - * @throws FileNotFoundException - * - * @return void - */ - public function assertPresent($path) - { - if ($this->config->get('disable_asserts', false) === false && ! $this->has($path)) { - throw new FileNotFoundException($path); - } - } - - /** - * Assert a file is absent. - * - * @param string $path path to file - * - * @throws FileExistsException - * - * @return void - */ - public function assertAbsent($path) - { - if ($this->config->get('disable_asserts', false) === false && $this->has($path)) { - throw new FileExistsException($path); - } - } -} diff --git a/vendor/league/flysystem/src/FilesystemInterface.php b/vendor/league/flysystem/src/FilesystemInterface.php deleted file mode 100644 index a6b99ba06..000000000 --- a/vendor/league/flysystem/src/FilesystemInterface.php +++ /dev/null @@ -1,284 +0,0 @@ -files = $files; - $this->config = $config; - - $this->setUp(); - } - - /** - * Setup - * - * @throws Exception - */ - private function setUp() - { - if (!$this->config->has('purifier')) { - throw new Exception('Configuration parameters not loaded!'); - } - - $this->checkCacheDirectory(); - - // Create a new configuration object - $config = $this->getConfig(); - - // Create HTMLPurifier object - $this->purifier = new HTMLPurifier($config); - } - - /** - * Add a custom definition - * - * @see http://htmlpurifier.org/docs/enduser-customize.html - * @param array $definitionConfig - * @param HTMLPurifier_Config $configObject Defaults to using default config - * - * @return HTMLPurifier_Config $configObject - */ - private function addCustomDefinition(array $definitionConfig, HTMLPurifier_Config $configObject = null) - { - if (!$configObject) { - $configObject = HTMLPurifier_Config::createDefault(); - $configObject->loadArray($this->getConfig()); - } - - // Setup the custom definition - $configObject->set('HTML.DefinitionID', $definitionConfig['id']); - $configObject->set('HTML.DefinitionRev', $definitionConfig['rev']); - - // Enable debug mode - if (!isset($definitionConfig['debug']) || $definitionConfig['debug']) { - $configObject->set('Cache.DefinitionImpl', null); - } - - // Start configuring the definition - if ($def = $configObject->maybeGetRawHTMLDefinition()) { - // Create the definition attributes - if (!empty($definitionConfig['attributes'])) { - $this->addCustomAttributes($definitionConfig['attributes'], $def); - } - - // Create the definition elements - if (!empty($definitionConfig['elements'])) { - $this->addCustomElements($definitionConfig['elements'], $def); - } - } - - return $configObject; - } - - /** - * Add provided attributes to the provided definition - * - * @param array $attributes - * @param HTMLPurifier_HTMLDefinition $definition - * - * @return HTMLPurifier_HTMLDefinition $definition - */ - private function addCustomAttributes(array $attributes, HTMLPurifier_HTMLDefinition $definition) - { - foreach ($attributes as $attribute) { - // Get configuration of attribute - $required = !empty($attribute[3]) ? true : false; - $onElement = $attribute[0]; - $attrName = $required ? $attribute[1] . '*' : $attribute[1]; - $validValues = $attribute[2]; - - $definition->addAttribute($onElement, $attrName, $validValues); - } - - return $definition; - } - - /** - * Add provided elements to the provided definition - * - * @param array $elements - * @param HTMLPurifier_HTMLDefinition $definition - * - * @return HTMLPurifier_HTMLDefinition $definition - */ - private function addCustomElements(array $elements, HTMLPurifier_HTMLDefinition $definition) - { - foreach ($elements as $element) { - // Get configuration of element - $name = $element[0]; - $contentSet = $element[1]; - $allowedChildren = $element[2]; - $attributeCollection = $element[3]; - $attributes = isset($element[4]) ? $element[4] : null; - - if (!empty($attributes)) { - $definition->addElement($name, $contentSet, $allowedChildren, $attributeCollection, $attributes); - } else { - $definition->addElement($name, $contentSet, $allowedChildren, $attributeCollection); - } - } - } - - /** - * Check/Create cache directory - */ - private function checkCacheDirectory() - { - $cachePath = $this->config->get('purifier.cachePath'); - - if ($cachePath) { - if (!$this->files->isDirectory($cachePath)) { - $this->files->makeDirectory($cachePath, $this->config->get('purifier.cacheFileMode', 0755),true); - } - } - } - - /** - * @param null $config - * - * @return mixed|null - */ - protected function getConfig($config = null) - { - // Create a new configuration object - $configObject = HTMLPurifier_Config::createDefault(); - - // Allow configuration to be modified - if (! $this->config->get('purifier.finalize')) { - $configObject->autoFinalize = false; - } - - // Set default config - $defaultConfig = []; - $defaultConfig['Core.Encoding'] = $this->config->get('purifier.encoding'); - $defaultConfig['Cache.SerializerPath'] = $this->config->get('purifier.cachePath'); - $defaultConfig['Cache.SerializerPermissions'] = $this->config->get('purifier.cacheFileMode', 0755); - - if (! $config) { - $config = $this->config->get('purifier.settings.default'); - } elseif (is_string($config)) { - $config = $this->config->get('purifier.settings.' . $config); - } - - if (! is_array($config)) { - $config = []; - } - - // Merge configurations - $config = $defaultConfig + $config; - - // Load to Purifier config - $configObject->loadArray($config); - - // Load custom definition if set - if ($definitionConfig = $this->config->get('purifier.settings.custom_definition')) { - $this->addCustomDefinition($definitionConfig, $configObject); - } - - // Load custom elements if set - if ($elements = $this->config->get('purifier.settings.custom_elements')) { - if ($def = $configObject->maybeGetRawHTMLDefinition()) { - $this->addCustomElements($elements, $def); - } - } - - // Load custom attributes if set - if ($attributes = $this->config->get('purifier.settings.custom_attributes')) { - if ($def = $configObject->maybeGetRawHTMLDefinition()) { - $this->addCustomAttributes($attributes, $def); - } - } - - return $configObject; - } - - /** - * @param $dirty - * @param null $config - * @param \Closure|null $postCreateConfigHook - * @return mixed - */ - public function clean($dirty, $config = null, \Closure $postCreateConfigHook = null) - { - if (is_array($dirty)) { - return array_map(function ($item) use ($config) { - return $this->clean($item, $config); - }, $dirty); - } - - $configObject = null; - if ($config !== null) { - $configObject = $this->getConfig($config); - - if ($postCreateConfigHook !== null) { - $postCreateConfigHook->call($this, $configObject); - } - } - - return $this->purifier->purify($dirty, $configObject); - } - - /** - * Get HTMLPurifier instance. - * - * @return \HTMLPurifier - */ - public function getInstance() - { - return $this->purifier; - } -} diff --git a/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php b/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php deleted file mode 100644 index d69b4154e..000000000 --- a/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php +++ /dev/null @@ -1,389 +0,0 @@ - '0 0 1 1 *', - '@annually' => '0 0 1 1 *', - '@monthly' => '0 0 1 * *', - '@weekly' => '0 0 * * 0', - '@daily' => '0 0 * * *', - '@hourly' => '0 * * * *' - ); - - if (isset($mappings[$expression])) { - $expression = $mappings[$expression]; - } - - return new static($expression, $fieldFactory ?: new FieldFactory()); - } - - /** - * Validate a CronExpression. - * - * @param string $expression The CRON expression to validate. - * - * @return bool True if a valid CRON expression was passed. False if not. - * @see \Cron\CronExpression::factory - */ - public static function isValidExpression($expression) - { - try { - self::factory($expression); - } catch (InvalidArgumentException $e) { - return false; - } - - return true; - } - - /** - * Parse a CRON expression - * - * @param string $expression CRON expression (e.g. '8 * * * *') - * @param FieldFactory $fieldFactory Factory to create cron fields - */ - public function __construct($expression, FieldFactory $fieldFactory) - { - $this->fieldFactory = $fieldFactory; - $this->setExpression($expression); - } - - /** - * Set or change the CRON expression - * - * @param string $value CRON expression (e.g. 8 * * * *) - * - * @return CronExpression - * @throws \InvalidArgumentException if not a valid CRON expression - */ - public function setExpression($value) - { - $this->cronParts = preg_split('/\s/', $value, -1, PREG_SPLIT_NO_EMPTY); - if (count($this->cronParts) < 5) { - throw new InvalidArgumentException( - $value . ' is not a valid CRON expression' - ); - } - - foreach ($this->cronParts as $position => $part) { - $this->setPart($position, $part); - } - - return $this; - } - - /** - * Set part of the CRON expression - * - * @param int $position The position of the CRON expression to set - * @param string $value The value to set - * - * @return CronExpression - * @throws \InvalidArgumentException if the value is not valid for the part - */ - public function setPart($position, $value) - { - if (!$this->fieldFactory->getField($position)->validate($value)) { - throw new InvalidArgumentException( - 'Invalid CRON field value ' . $value . ' at position ' . $position - ); - } - - $this->cronParts[$position] = $value; - - return $this; - } - - /** - * Set max iteration count for searching next run dates - * - * @param int $maxIterationCount Max iteration count when searching for next run date - * - * @return CronExpression - */ - public function setMaxIterationCount($maxIterationCount) - { - $this->maxIterationCount = $maxIterationCount; - - return $this; - } - - /** - * Get a next run date relative to the current date or a specific date - * - * @param string|\DateTime $currentTime Relative calculation date - * @param int $nth Number of matches to skip before returning a - * matching next run date. 0, the default, will return the current - * date and time if the next run date falls on the current date and - * time. Setting this value to 1 will skip the first match and go to - * the second match. Setting this value to 2 will skip the first 2 - * matches and so on. - * @param bool $allowCurrentDate Set to TRUE to return the current date if - * it matches the cron expression. - * - * @return \DateTime - * @throws \RuntimeException on too many iterations - */ - public function getNextRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate = false) - { - return $this->getRunDate($currentTime, $nth, false, $allowCurrentDate); - } - - /** - * Get a previous run date relative to the current date or a specific date - * - * @param string|\DateTime $currentTime Relative calculation date - * @param int $nth Number of matches to skip before returning - * @param bool $allowCurrentDate Set to TRUE to return the - * current date if it matches the cron expression - * - * @return \DateTime - * @throws \RuntimeException on too many iterations - * @see \Cron\CronExpression::getNextRunDate - */ - public function getPreviousRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate = false) - { - return $this->getRunDate($currentTime, $nth, true, $allowCurrentDate); - } - - /** - * Get multiple run dates starting at the current date or a specific date - * - * @param int $total Set the total number of dates to calculate - * @param string|\DateTime $currentTime Relative calculation date - * @param bool $invert Set to TRUE to retrieve previous dates - * @param bool $allowCurrentDate Set to TRUE to return the - * current date if it matches the cron expression - * - * @return array Returns an array of run dates - */ - public function getMultipleRunDates($total, $currentTime = 'now', $invert = false, $allowCurrentDate = false) - { - $matches = array(); - for ($i = 0; $i < max(0, $total); $i++) { - try { - $matches[] = $this->getRunDate($currentTime, $i, $invert, $allowCurrentDate); - } catch (RuntimeException $e) { - break; - } - } - - return $matches; - } - - /** - * Get all or part of the CRON expression - * - * @param string $part Specify the part to retrieve or NULL to get the full - * cron schedule string. - * - * @return string|null Returns the CRON expression, a part of the - * CRON expression, or NULL if the part was specified but not found - */ - public function getExpression($part = null) - { - if (null === $part) { - return implode(' ', $this->cronParts); - } elseif (array_key_exists($part, $this->cronParts)) { - return $this->cronParts[$part]; - } - - return null; - } - - /** - * Helper method to output the full expression. - * - * @return string Full CRON expression - */ - public function __toString() - { - return $this->getExpression(); - } - - /** - * Determine if the cron is due to run based on the current date or a - * specific date. This method assumes that the current number of - * seconds are irrelevant, and should be called once per minute. - * - * @param string|\DateTime $currentTime Relative calculation date - * - * @return bool Returns TRUE if the cron is due to run or FALSE if not - */ - public function isDue($currentTime = 'now') - { - if ('now' === $currentTime) { - $currentDate = date('Y-m-d H:i'); - $currentTime = strtotime($currentDate); - } elseif ($currentTime instanceof DateTime) { - $currentDate = clone $currentTime; - // Ensure time in 'current' timezone is used - $currentDate->setTimezone(new DateTimeZone(date_default_timezone_get())); - $currentDate = $currentDate->format('Y-m-d H:i'); - $currentTime = strtotime($currentDate); - } elseif ($currentTime instanceof DateTimeImmutable) { - $currentDate = DateTime::createFromFormat('U', $currentTime->format('U')); - $currentDate->setTimezone(new DateTimeZone(date_default_timezone_get())); - $currentDate = $currentDate->format('Y-m-d H:i'); - $currentTime = strtotime($currentDate); - } else { - $currentTime = new DateTime($currentTime); - $currentTime->setTime($currentTime->format('H'), $currentTime->format('i'), 0); - $currentDate = $currentTime->format('Y-m-d H:i'); - $currentTime = $currentTime->getTimeStamp(); - } - - try { - return $this->getNextRunDate($currentDate, 0, true)->getTimestamp() == $currentTime; - } catch (Exception $e) { - return false; - } - } - - /** - * Get the next or previous run date of the expression relative to a date - * - * @param string|\DateTime $currentTime Relative calculation date - * @param int $nth Number of matches to skip before returning - * @param bool $invert Set to TRUE to go backwards in time - * @param bool $allowCurrentDate Set to TRUE to return the - * current date if it matches the cron expression - * - * @return \DateTime - * @throws \RuntimeException on too many iterations - */ - protected function getRunDate($currentTime = null, $nth = 0, $invert = false, $allowCurrentDate = false) - { - if ($currentTime instanceof DateTime) { - $currentDate = clone $currentTime; - } elseif ($currentTime instanceof DateTimeImmutable) { - $currentDate = DateTime::createFromFormat('U', $currentTime->format('U')); - $currentDate->setTimezone($currentTime->getTimezone()); - } else { - $currentDate = new DateTime($currentTime ?: 'now'); - $currentDate->setTimezone(new DateTimeZone(date_default_timezone_get())); - } - - $currentDate->setTime($currentDate->format('H'), $currentDate->format('i'), 0); - $nextRun = clone $currentDate; - $nth = (int) $nth; - - // We don't have to satisfy * or null fields - $parts = array(); - $fields = array(); - foreach (self::$order as $position) { - $part = $this->getExpression($position); - if (null === $part || '*' === $part) { - continue; - } - $parts[$position] = $part; - $fields[$position] = $this->fieldFactory->getField($position); - } - - // Set a hard limit to bail on an impossible date - for ($i = 0; $i < $this->maxIterationCount; $i++) { - - foreach ($parts as $position => $part) { - $satisfied = false; - // Get the field object used to validate this part - $field = $fields[$position]; - // Check if this is singular or a list - if (strpos($part, ',') === false) { - $satisfied = $field->isSatisfiedBy($nextRun, $part); - } else { - foreach (array_map('trim', explode(',', $part)) as $listPart) { - if ($field->isSatisfiedBy($nextRun, $listPart)) { - $satisfied = true; - break; - } - } - } - - // If the field is not satisfied, then start over - if (!$satisfied) { - $field->increment($nextRun, $invert, $part); - continue 2; - } - } - - // Skip this match if needed - if ((!$allowCurrentDate && $nextRun == $currentDate) || --$nth > -1) { - $this->fieldFactory->getField(0)->increment($nextRun, $invert, isset($parts[0]) ? $parts[0] : null); - continue; - } - - return $nextRun; - } - - // @codeCoverageIgnoreStart - throw new RuntimeException('Impossible CRON expression'); - // @codeCoverageIgnoreEnd - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Translator.php b/vendor/nesbot/carbon/src/Carbon/Translator.php deleted file mode 100644 index 12115b008..000000000 --- a/vendor/nesbot/carbon/src/Carbon/Translator.php +++ /dev/null @@ -1,143 +0,0 @@ -addLoader('array', new Translation\Loader\ArrayLoader()); - parent::__construct($locale, $formatter, $cacheDir, $debug); - } - - /** - * Reset messages of a locale (all locale if no locale passed). - * Remove custom messages and reload initial messages from matching - * file in Lang directory. - * - * @param string|null $locale - * - * @return bool - */ - public function resetMessages($locale = null) - { - if ($locale === null) { - static::$messages = array(); - - return true; - } - - if (file_exists($filename = __DIR__.'/Lang/'.$locale.'.php')) { - static::$messages[$locale] = require $filename; - $this->addResource('array', static::$messages[$locale], $locale); - - return true; - } - - return false; - } - - /** - * Init messages language from matching file in Lang directory. - * - * @param string $locale - * - * @return bool - */ - protected function loadMessagesFromFile($locale) - { - if (isset(static::$messages[$locale])) { - return true; - } - - return $this->resetMessages($locale); - } - - /** - * Set messages of a locale and take file first if present. - * - * @param string $locale - * @param array $messages - * - * @return $this - */ - public function setMessages($locale, $messages) - { - $this->loadMessagesFromFile($locale); - $this->addResource('array', $messages, $locale); - static::$messages[$locale] = array_merge( - isset(static::$messages[$locale]) ? static::$messages[$locale] : array(), - $messages - ); - - return $this; - } - - /** - * Get messages of a locale, if none given, return all the - * languages. - * - * @param string|null $locale - * - * @return array - */ - public function getMessages($locale = null) - { - return $locale === null ? static::$messages : static::$messages[$locale]; - } - - /** - * Set the current translator locale and indicate if the source locale file exists - * - * @param string $locale locale ex. en - * - * @return bool - */ - public function setLocale($locale) - { - $locale = preg_replace_callback('/[-_]([a-z]{2,})/', function ($matches) { - // _2-letters is a region, _3+-letters is a variant - return '_'.call_user_func(strlen($matches[1]) > 2 ? 'ucfirst' : 'strtoupper', $matches[1]); - }, strtolower($locale)); - - if ($this->loadMessagesFromFile($locale)) { - parent::setLocale($locale); - - return true; - } - - return false; - } -} diff --git a/vendor/ramsey/uuid/src/UuidFactory.php b/vendor/ramsey/uuid/src/UuidFactory.php deleted file mode 100644 index 5a57b09b2..000000000 --- a/vendor/ramsey/uuid/src/UuidFactory.php +++ /dev/null @@ -1,315 +0,0 @@ - - * @license http://opensource.org/licenses/MIT MIT - * @link https://benramsey.com/projects/ramsey-uuid/ Documentation - * @link https://packagist.org/packages/ramsey/uuid Packagist - * @link https://github.com/ramsey/uuid GitHub - */ - -namespace Ramsey\Uuid; - -use Ramsey\Uuid\Converter\NumberConverterInterface; -use Ramsey\Uuid\Exception\InvalidUuidStringException; -use Ramsey\Uuid\Provider\NodeProviderInterface; -use Ramsey\Uuid\Generator\RandomGeneratorInterface; -use Ramsey\Uuid\Generator\TimeGeneratorInterface; -use Ramsey\Uuid\Codec\CodecInterface; -use Ramsey\Uuid\Builder\UuidBuilderInterface; - -class UuidFactory implements UuidFactoryInterface -{ - /** - * @var CodecInterface - */ - private $codec = null; - - /** - * @var NodeProviderInterface - */ - private $nodeProvider = null; - - /** - * @var NumberConverterInterface - */ - private $numberConverter = null; - - /** - * @var RandomGeneratorInterface - */ - private $randomGenerator = null; - - /** - * @var TimeGeneratorInterface - */ - private $timeGenerator = null; - - /** - * @var UuidBuilderInterface - */ - private $uuidBuilder = null; - - /** - * Constructs a `UuidFactory` for creating `Ramsey\Uuid\UuidInterface` instances - * - * @param FeatureSet $features A set of features for use when creating UUIDs - */ - public function __construct(FeatureSet $features = null) - { - $features = $features ?: new FeatureSet(); - - $this->codec = $features->getCodec(); - $this->nodeProvider = $features->getNodeProvider(); - $this->numberConverter = $features->getNumberConverter(); - $this->randomGenerator = $features->getRandomGenerator(); - $this->timeGenerator = $features->getTimeGenerator(); - $this->uuidBuilder = $features->getBuilder(); - } - - /** - * Returns the UUID coder-decoder used by this factory - * - * @return CodecInterface - */ - public function getCodec() - { - return $this->codec; - } - - /** - * Sets the UUID coder-decoder used by this factory - * - * @param CodecInterface $codec - */ - public function setCodec(CodecInterface $codec) - { - $this->codec = $codec; - } - - /** - * Returns the system node ID provider used by this factory - * - * @return NodeProviderInterface - */ - public function getNodeProvider() - { - return $this->nodeProvider; - } - - /** - * Returns the random UUID generator used by this factory - * - * @return RandomGeneratorInterface - */ - public function getRandomGenerator() - { - return $this->randomGenerator; - } - - /** - * Returns the time-based UUID generator used by this factory - * - * @return TimeGeneratorInterface - */ - public function getTimeGenerator() - { - return $this->timeGenerator; - } - - /** - * Sets the time-based UUID generator this factory will use to generate version 1 UUIDs - * - * @param TimeGeneratorInterface $generator - */ - public function setTimeGenerator(TimeGeneratorInterface $generator) - { - $this->timeGenerator = $generator; - } - - /** - * Returns the number converter used by this factory - * - * @return NumberConverterInterface - */ - public function getNumberConverter() - { - return $this->numberConverter; - } - - /** - * Sets the random UUID generator this factory will use to generate version 4 UUIDs - * - * @param RandomGeneratorInterface $generator - */ - public function setRandomGenerator(RandomGeneratorInterface $generator) - { - $this->randomGenerator = $generator; - } - - /** - * Sets the number converter this factory will use - * - * @param NumberConverterInterface $converter - */ - public function setNumberConverter(NumberConverterInterface $converter) - { - $this->numberConverter = $converter; - } - - /** - * Returns the UUID builder this factory uses when creating `Uuid` instances - * - * @return UuidBuilderInterface $builder - */ - public function getUuidBuilder() - { - return $this->uuidBuilder; - } - - /** - * Sets the UUID builder this factory will use when creating `Uuid` instances - * - * @param UuidBuilderInterface $builder - */ - public function setUuidBuilder(UuidBuilderInterface $builder) - { - $this->uuidBuilder = $builder; - } - - /** - * @inheritdoc - */ - public function fromBytes($bytes) - { - return $this->codec->decodeBytes($bytes); - } - - /** - * @inheritdoc - */ - public function fromString($uuid) - { - $uuid = strtolower($uuid); - return $this->codec->decode($uuid); - } - - /** - * @inheritdoc - */ - public function fromInteger($integer) - { - $hex = $this->numberConverter->toHex($integer); - $hex = str_pad($hex, 32, '0', STR_PAD_LEFT); - - return $this->fromString($hex); - } - - /** - * @inheritdoc - */ - public function uuid1($node = null, $clockSeq = null) - { - $bytes = $this->timeGenerator->generate($node, $clockSeq); - $hex = bin2hex($bytes); - - return $this->uuidFromHashedName($hex, 1); - } - - /** - * @inheritdoc - */ - public function uuid3($ns, $name) - { - return $this->uuidFromNsAndName($ns, $name, 3, 'md5'); - } - - /** - * @inheritdoc - */ - public function uuid4() - { - $bytes = $this->randomGenerator->generate(16); - - // When converting the bytes to hex, it turns into a 32-character - // hexadecimal string that looks a lot like an MD5 hash, so at this - // point, we can just pass it to uuidFromHashedName. - $hex = bin2hex($bytes); - - return $this->uuidFromHashedName($hex, 4); - } - - /** - * @inheritdoc - */ - public function uuid5($ns, $name) - { - return $this->uuidFromNsAndName($ns, $name, 5, 'sha1'); - } - - /** - * Returns a `Uuid` - * - * Uses the configured builder and codec and the provided array of hexadecimal - * value UUID fields to construct a `Uuid` object. - * - * @param array $fields An array of fields from which to construct a UUID; - * see {@see \Ramsey\Uuid\UuidInterface::getFieldsHex()} for array structure. - * @return UuidInterface - */ - public function uuid(array $fields) - { - return $this->uuidBuilder->build($this->codec, $fields); - } - - /** - * Returns a version 3 or 5 namespaced `Uuid` - * - * @param string|UuidInterface $ns The UUID namespace to use - * @param string $name The string to hash together with the namespace - * @param int $version The version of UUID to create (3 or 5) - * @param string $hashFunction The hash function to use when hashing together - * the namespace and name - * @return UuidInterface - * @throws InvalidUuidStringException - */ - protected function uuidFromNsAndName($ns, $name, $version, $hashFunction) - { - if (!($ns instanceof UuidInterface)) { - $ns = $this->codec->decode($ns); - } - - $hash = call_user_func($hashFunction, ($ns->getBytes() . $name)); - - return $this->uuidFromHashedName($hash, $version); - } - - /** - * Returns a `Uuid` created from `$hash` with the version field set to `$version` - * and the variant field set for RFC 4122 - * - * @param string $hash The hash to use when creating the UUID - * @param int $version The UUID version to set for this hash (1, 3, 4, or 5) - * @return UuidInterface - */ - protected function uuidFromHashedName($hash, $version) - { - $timeHi = BinaryUtils::applyVersion(substr($hash, 12, 4), $version); - $clockSeqHi = BinaryUtils::applyVariant(hexdec(substr($hash, 16, 2))); - - $fields = [ - 'time_low' => substr($hash, 0, 8), - 'time_mid' => substr($hash, 8, 4), - 'time_hi_and_version' => str_pad(dechex($timeHi), 4, '0', STR_PAD_LEFT), - 'clock_seq_hi_and_reserved' => str_pad(dechex($clockSeqHi), 2, '0', STR_PAD_LEFT), - 'clock_seq_low' => substr($hash, 18, 2), - 'node' => substr($hash, 20, 12), - ]; - - return $this->uuid($fields); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Attachment.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Attachment.php deleted file mode 100644 index 79aac6a05..000000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Attachment.php +++ /dev/null @@ -1,54 +0,0 @@ -createDependenciesFor('mime.attachment') - ); - - $this->setBody($data, $contentType); - $this->setFilename($filename); - } - - /** - * Create a new Attachment from a filesystem path. - * - * @param string $path - * @param string $contentType optional - * - * @return Swift_Mime_Attachment - */ - public static function fromPath($path, $contentType = null) - { - return (new self())->setFile( - new Swift_ByteStream_FileByteStream($path), - $contentType - ); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php deleted file mode 100644 index 95b4ae97b..000000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php +++ /dev/null @@ -1,300 +0,0 @@ - '=00', 1 => '=01', 2 => '=02', 3 => '=03', 4 => '=04', - 5 => '=05', 6 => '=06', 7 => '=07', 8 => '=08', 9 => '=09', - 10 => '=0A', 11 => '=0B', 12 => '=0C', 13 => '=0D', 14 => '=0E', - 15 => '=0F', 16 => '=10', 17 => '=11', 18 => '=12', 19 => '=13', - 20 => '=14', 21 => '=15', 22 => '=16', 23 => '=17', 24 => '=18', - 25 => '=19', 26 => '=1A', 27 => '=1B', 28 => '=1C', 29 => '=1D', - 30 => '=1E', 31 => '=1F', 32 => '=20', 33 => '=21', 34 => '=22', - 35 => '=23', 36 => '=24', 37 => '=25', 38 => '=26', 39 => '=27', - 40 => '=28', 41 => '=29', 42 => '=2A', 43 => '=2B', 44 => '=2C', - 45 => '=2D', 46 => '=2E', 47 => '=2F', 48 => '=30', 49 => '=31', - 50 => '=32', 51 => '=33', 52 => '=34', 53 => '=35', 54 => '=36', - 55 => '=37', 56 => '=38', 57 => '=39', 58 => '=3A', 59 => '=3B', - 60 => '=3C', 61 => '=3D', 62 => '=3E', 63 => '=3F', 64 => '=40', - 65 => '=41', 66 => '=42', 67 => '=43', 68 => '=44', 69 => '=45', - 70 => '=46', 71 => '=47', 72 => '=48', 73 => '=49', 74 => '=4A', - 75 => '=4B', 76 => '=4C', 77 => '=4D', 78 => '=4E', 79 => '=4F', - 80 => '=50', 81 => '=51', 82 => '=52', 83 => '=53', 84 => '=54', - 85 => '=55', 86 => '=56', 87 => '=57', 88 => '=58', 89 => '=59', - 90 => '=5A', 91 => '=5B', 92 => '=5C', 93 => '=5D', 94 => '=5E', - 95 => '=5F', 96 => '=60', 97 => '=61', 98 => '=62', 99 => '=63', - 100 => '=64', 101 => '=65', 102 => '=66', 103 => '=67', 104 => '=68', - 105 => '=69', 106 => '=6A', 107 => '=6B', 108 => '=6C', 109 => '=6D', - 110 => '=6E', 111 => '=6F', 112 => '=70', 113 => '=71', 114 => '=72', - 115 => '=73', 116 => '=74', 117 => '=75', 118 => '=76', 119 => '=77', - 120 => '=78', 121 => '=79', 122 => '=7A', 123 => '=7B', 124 => '=7C', - 125 => '=7D', 126 => '=7E', 127 => '=7F', 128 => '=80', 129 => '=81', - 130 => '=82', 131 => '=83', 132 => '=84', 133 => '=85', 134 => '=86', - 135 => '=87', 136 => '=88', 137 => '=89', 138 => '=8A', 139 => '=8B', - 140 => '=8C', 141 => '=8D', 142 => '=8E', 143 => '=8F', 144 => '=90', - 145 => '=91', 146 => '=92', 147 => '=93', 148 => '=94', 149 => '=95', - 150 => '=96', 151 => '=97', 152 => '=98', 153 => '=99', 154 => '=9A', - 155 => '=9B', 156 => '=9C', 157 => '=9D', 158 => '=9E', 159 => '=9F', - 160 => '=A0', 161 => '=A1', 162 => '=A2', 163 => '=A3', 164 => '=A4', - 165 => '=A5', 166 => '=A6', 167 => '=A7', 168 => '=A8', 169 => '=A9', - 170 => '=AA', 171 => '=AB', 172 => '=AC', 173 => '=AD', 174 => '=AE', - 175 => '=AF', 176 => '=B0', 177 => '=B1', 178 => '=B2', 179 => '=B3', - 180 => '=B4', 181 => '=B5', 182 => '=B6', 183 => '=B7', 184 => '=B8', - 185 => '=B9', 186 => '=BA', 187 => '=BB', 188 => '=BC', 189 => '=BD', - 190 => '=BE', 191 => '=BF', 192 => '=C0', 193 => '=C1', 194 => '=C2', - 195 => '=C3', 196 => '=C4', 197 => '=C5', 198 => '=C6', 199 => '=C7', - 200 => '=C8', 201 => '=C9', 202 => '=CA', 203 => '=CB', 204 => '=CC', - 205 => '=CD', 206 => '=CE', 207 => '=CF', 208 => '=D0', 209 => '=D1', - 210 => '=D2', 211 => '=D3', 212 => '=D4', 213 => '=D5', 214 => '=D6', - 215 => '=D7', 216 => '=D8', 217 => '=D9', 218 => '=DA', 219 => '=DB', - 220 => '=DC', 221 => '=DD', 222 => '=DE', 223 => '=DF', 224 => '=E0', - 225 => '=E1', 226 => '=E2', 227 => '=E3', 228 => '=E4', 229 => '=E5', - 230 => '=E6', 231 => '=E7', 232 => '=E8', 233 => '=E9', 234 => '=EA', - 235 => '=EB', 236 => '=EC', 237 => '=ED', 238 => '=EE', 239 => '=EF', - 240 => '=F0', 241 => '=F1', 242 => '=F2', 243 => '=F3', 244 => '=F4', - 245 => '=F5', 246 => '=F6', 247 => '=F7', 248 => '=F8', 249 => '=F9', - 250 => '=FA', 251 => '=FB', 252 => '=FC', 253 => '=FD', 254 => '=FE', - 255 => '=FF', - ]; - - protected static $safeMapShare = []; - - /** - * A map of non-encoded ascii characters. - * - * @var string[] - */ - protected $safeMap = []; - - /** - * Creates a new QpEncoder for the given CharacterStream. - * - * @param Swift_CharacterStream $charStream to use for reading characters - * @param Swift_StreamFilter $filter if input should be canonicalized - */ - public function __construct(Swift_CharacterStream $charStream, Swift_StreamFilter $filter = null) - { - $this->charStream = $charStream; - if (!isset(self::$safeMapShare[$this->getSafeMapShareId()])) { - $this->initSafeMap(); - self::$safeMapShare[$this->getSafeMapShareId()] = $this->safeMap; - } else { - $this->safeMap = self::$safeMapShare[$this->getSafeMapShareId()]; - } - $this->filter = $filter; - } - - public function __sleep() - { - return ['charStream', 'filter']; - } - - public function __wakeup() - { - if (!isset(self::$safeMapShare[$this->getSafeMapShareId()])) { - $this->initSafeMap(); - self::$safeMapShare[$this->getSafeMapShareId()] = $this->safeMap; - } else { - $this->safeMap = self::$safeMapShare[$this->getSafeMapShareId()]; - } - } - - protected function getSafeMapShareId() - { - return get_class($this); - } - - protected function initSafeMap() - { - foreach (array_merge( - [0x09, 0x20], range(0x21, 0x3C), range(0x3E, 0x7E)) as $byte) { - $this->safeMap[$byte] = chr($byte); - } - } - - /** - * Takes an unencoded string and produces a QP encoded string from it. - * - * QP encoded strings have a maximum line length of 76 characters. - * If the first line needs to be shorter, indicate the difference with - * $firstLineOffset. - * - * @param string $string to encode - * @param int $firstLineOffset optional - * @param int $maxLineLength optional 0 indicates the default of 76 chars - * - * @return string - */ - public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0) - { - if ($maxLineLength > 76 || $maxLineLength <= 0) { - $maxLineLength = 76; - } - - $thisLineLength = $maxLineLength - $firstLineOffset; - - $lines = []; - $lNo = 0; - $lines[$lNo] = ''; - $currentLine = &$lines[$lNo++]; - $size = $lineLen = 0; - - $this->charStream->flushContents(); - $this->charStream->importString($string); - - // Fetching more than 4 chars at one is slower, as is fetching fewer bytes - // Conveniently 4 chars is the UTF-8 safe number since UTF-8 has up to 6 - // bytes per char and (6 * 4 * 3 = 72 chars per line) * =NN is 3 bytes - while (false !== $bytes = $this->nextSequence()) { - // If we're filtering the input - if (isset($this->filter)) { - // If we can't filter because we need more bytes - while ($this->filter->shouldBuffer($bytes)) { - // Then collect bytes into the buffer - if (false === $moreBytes = $this->nextSequence(1)) { - break; - } - - foreach ($moreBytes as $b) { - $bytes[] = $b; - } - } - // And filter them - $bytes = $this->filter->filter($bytes); - } - - $enc = $this->encodeByteSequence($bytes, $size); - - $i = strpos($enc, '=0D=0A'); - $newLineLength = $lineLen + (false === $i ? $size : $i); - - if ($currentLine && $newLineLength >= $thisLineLength) { - $lines[$lNo] = ''; - $currentLine = &$lines[$lNo++]; - $thisLineLength = $maxLineLength; - $lineLen = 0; - } - - $currentLine .= $enc; - - if (false === $i) { - $lineLen += $size; - } else { - // 6 is the length of '=0D=0A'. - $lineLen = $size - strrpos($enc, '=0D=0A') - 6; - } - } - - return $this->standardize(implode("=\r\n", $lines)); - } - - /** - * Updates the charset used. - * - * @param string $charset - */ - public function charsetChanged($charset) - { - $this->charStream->setCharacterSet($charset); - } - - /** - * Encode the given byte array into a verbatim QP form. - * - * @param int[] $bytes - * @param int $size - * - * @return string - */ - protected function encodeByteSequence(array $bytes, &$size) - { - $ret = ''; - $size = 0; - foreach ($bytes as $b) { - if (isset($this->safeMap[$b])) { - $ret .= $this->safeMap[$b]; - ++$size; - } else { - $ret .= self::$qpMap[$b]; - $size += 3; - } - } - - return $ret; - } - - /** - * Get the next sequence of bytes to read from the char stream. - * - * @param int $size number of bytes to read - * - * @return int[] - */ - protected function nextSequence($size = 4) - { - return $this->charStream->readBytes($size); - } - - /** - * Make sure CRLF is correct and HT/SPACE are in valid places. - * - * @param string $string - * - * @return string - */ - protected function standardize($string) - { - $string = str_replace(["\t=0D=0A", ' =0D=0A', '=0D=0A'], - ["=09\r\n", "=20\r\n", "\r\n"], $string - ); - switch ($end = ord(substr($string, -1))) { - case 0x09: - case 0x20: - $string = substr_replace($string, self::$qpMap[$end], -1); - } - - return $string; - } - - /** - * Make a deep copy of object. - */ - public function __clone() - { - $this->charStream = clone $this->charStream; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache.php deleted file mode 100644 index cd6f786df..000000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache.php +++ /dev/null @@ -1,105 +0,0 @@ -stream = $stream; - $this->path = $path; - } - - /** - * Set a string into the cache under $itemKey for the namespace $nsKey. - * - * @see MODE_WRITE, MODE_APPEND - * - * @param string $nsKey - * @param string $itemKey - * @param string $string - * @param int $mode - * - * @throws Swift_IoException - */ - public function setString($nsKey, $itemKey, $string, $mode) - { - $this->prepareCache($nsKey); - switch ($mode) { - case self::MODE_WRITE: - $fp = $this->getHandle($nsKey, $itemKey, self::POSITION_START); - break; - case self::MODE_APPEND: - $fp = $this->getHandle($nsKey, $itemKey, self::POSITION_END); - break; - default: - throw new Swift_SwiftException( - 'Invalid mode ['.$mode.'] used to set nsKey='. - $nsKey.', itemKey='.$itemKey - ); - break; - } - fwrite($fp, $string); - $this->freeHandle($nsKey, $itemKey); - } - - /** - * Set a ByteStream into the cache under $itemKey for the namespace $nsKey. - * - * @see MODE_WRITE, MODE_APPEND - * - * @param string $nsKey - * @param string $itemKey - * @param int $mode - * - * @throws Swift_IoException - */ - public function importFromByteStream($nsKey, $itemKey, Swift_OutputByteStream $os, $mode) - { - $this->prepareCache($nsKey); - switch ($mode) { - case self::MODE_WRITE: - $fp = $this->getHandle($nsKey, $itemKey, self::POSITION_START); - break; - case self::MODE_APPEND: - $fp = $this->getHandle($nsKey, $itemKey, self::POSITION_END); - break; - default: - throw new Swift_SwiftException( - 'Invalid mode ['.$mode.'] used to set nsKey='. - $nsKey.', itemKey='.$itemKey - ); - break; - } - while (false !== $bytes = $os->read(8192)) { - fwrite($fp, $bytes); - } - $this->freeHandle($nsKey, $itemKey); - } - - /** - * Provides a ByteStream which when written to, writes data to $itemKey. - * - * NOTE: The stream will always write in append mode. - * - * @param string $nsKey - * @param string $itemKey - * - * @return Swift_InputByteStream - */ - public function getInputByteStream($nsKey, $itemKey, Swift_InputByteStream $writeThrough = null) - { - $is = clone $this->stream; - $is->setKeyCache($this); - $is->setNsKey($nsKey); - $is->setItemKey($itemKey); - if (isset($writeThrough)) { - $is->setWriteThroughStream($writeThrough); - } - - return $is; - } - - /** - * Get data back out of the cache as a string. - * - * @param string $nsKey - * @param string $itemKey - * - * @throws Swift_IoException - * - * @return string - */ - public function getString($nsKey, $itemKey) - { - $this->prepareCache($nsKey); - if ($this->hasKey($nsKey, $itemKey)) { - $fp = $this->getHandle($nsKey, $itemKey, self::POSITION_START); - $str = ''; - while (!feof($fp) && false !== $bytes = fread($fp, 8192)) { - $str .= $bytes; - } - $this->freeHandle($nsKey, $itemKey); - - return $str; - } - } - - /** - * Get data back out of the cache as a ByteStream. - * - * @param string $nsKey - * @param string $itemKey - * @param Swift_InputByteStream $is to write the data to - */ - public function exportToByteStream($nsKey, $itemKey, Swift_InputByteStream $is) - { - if ($this->hasKey($nsKey, $itemKey)) { - $fp = $this->getHandle($nsKey, $itemKey, self::POSITION_START); - while (!feof($fp) && false !== $bytes = fread($fp, 8192)) { - $is->write($bytes); - } - $this->freeHandle($nsKey, $itemKey); - } - } - - /** - * Check if the given $itemKey exists in the namespace $nsKey. - * - * @param string $nsKey - * @param string $itemKey - * - * @return bool - */ - public function hasKey($nsKey, $itemKey) - { - return is_file($this->path.'/'.$nsKey.'/'.$itemKey); - } - - /** - * Clear data for $itemKey in the namespace $nsKey if it exists. - * - * @param string $nsKey - * @param string $itemKey - */ - public function clearKey($nsKey, $itemKey) - { - if ($this->hasKey($nsKey, $itemKey)) { - $this->freeHandle($nsKey, $itemKey); - unlink($this->path.'/'.$nsKey.'/'.$itemKey); - } - } - - /** - * Clear all data in the namespace $nsKey if it exists. - * - * @param string $nsKey - */ - public function clearAll($nsKey) - { - if (array_key_exists($nsKey, $this->keys)) { - foreach ($this->keys[$nsKey] as $itemKey => $null) { - $this->clearKey($nsKey, $itemKey); - } - if (is_dir($this->path.'/'.$nsKey)) { - rmdir($this->path.'/'.$nsKey); - } - unset($this->keys[$nsKey]); - } - } - - /** - * Initialize the namespace of $nsKey if needed. - * - * @param string $nsKey - */ - private function prepareCache($nsKey) - { - $cacheDir = $this->path.'/'.$nsKey; - if (!is_dir($cacheDir)) { - if (!mkdir($cacheDir)) { - throw new Swift_IoException('Failed to create cache directory '.$cacheDir); - } - $this->keys[$nsKey] = []; - } - } - - /** - * Get a file handle on the cache item. - * - * @param string $nsKey - * @param string $itemKey - * @param int $position - * - * @return resource - */ - private function getHandle($nsKey, $itemKey, $position) - { - if (!isset($this->keys[$nsKey][$itemKey])) { - $openMode = $this->hasKey($nsKey, $itemKey) ? 'r+b' : 'w+b'; - $fp = fopen($this->path.'/'.$nsKey.'/'.$itemKey, $openMode); - $this->keys[$nsKey][$itemKey] = $fp; - } - if (self::POSITION_START == $position) { - fseek($this->keys[$nsKey][$itemKey], 0, SEEK_SET); - } elseif (self::POSITION_END == $position) { - fseek($this->keys[$nsKey][$itemKey], 0, SEEK_END); - } - - return $this->keys[$nsKey][$itemKey]; - } - - private function freeHandle($nsKey, $itemKey) - { - $fp = $this->getHandle($nsKey, $itemKey, self::POSITION_CURRENT); - fclose($fp); - $this->keys[$nsKey][$itemKey] = null; - } - - /** - * Destructor. - */ - public function __destruct() - { - foreach ($this->keys as $nsKey => $null) { - $this->clearAll($nsKey); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/SimpleKeyCacheInputStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/SimpleKeyCacheInputStream.php deleted file mode 100644 index 03bab481e..000000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/SimpleKeyCacheInputStream.php +++ /dev/null @@ -1,123 +0,0 @@ -keyCache = $keyCache; - } - - /** - * Specify a stream to write through for each write(). - */ - public function setWriteThroughStream(Swift_InputByteStream $is) - { - $this->writeThrough = $is; - } - - /** - * Writes $bytes to the end of the stream. - * - * @param string $bytes - * @param Swift_InputByteStream $is optional - */ - public function write($bytes, Swift_InputByteStream $is = null) - { - $this->keyCache->setString( - $this->nsKey, $this->itemKey, $bytes, Swift_KeyCache::MODE_APPEND - ); - if (isset($is)) { - $is->write($bytes); - } - if (isset($this->writeThrough)) { - $this->writeThrough->write($bytes); - } - } - - /** - * Not used. - */ - public function commit() - { - } - - /** - * Not used. - */ - public function bind(Swift_InputByteStream $is) - { - } - - /** - * Not used. - */ - public function unbind(Swift_InputByteStream $is) - { - } - - /** - * Flush the contents of the stream (empty it) and set the internal pointer - * to the beginning. - */ - public function flushBuffers() - { - $this->keyCache->clearKey($this->nsKey, $this->itemKey); - } - - /** - * Set the nsKey which will be written to. - * - * @param string $nsKey - */ - public function setNsKey($nsKey) - { - $this->nsKey = $nsKey; - } - - /** - * Set the itemKey which will be written to. - * - * @param string $itemKey - */ - public function setItemKey($itemKey) - { - $this->itemKey = $itemKey; - } - - /** - * Any implementation should be cloneable, allowing the clone to access a - * separate $nsKey and $itemKey. - */ - public function __clone() - { - $this->writeThrough = null; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Message.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Message.php deleted file mode 100644 index 42b861fc1..000000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Message.php +++ /dev/null @@ -1,279 +0,0 @@ -createDependenciesFor('mime.message') - ); - - if (!isset($charset)) { - $charset = Swift_DependencyContainer::getInstance() - ->lookup('properties.charset'); - } - $this->setSubject($subject); - $this->setBody($body); - $this->setCharset($charset); - if ($contentType) { - $this->setContentType($contentType); - } - } - - /** - * Add a MimePart to this Message. - * - * @param string|Swift_OutputByteStream $body - * @param string $contentType - * @param string $charset - * - * @return $this - */ - public function addPart($body, $contentType = null, $charset = null) - { - return $this->attach((new Swift_MimePart($body, $contentType, $charset))->setEncoder($this->getEncoder())); - } - - /** - * Attach a new signature handler to the message. - * - * @return $this - */ - public function attachSigner(Swift_Signer $signer) - { - if ($signer instanceof Swift_Signers_HeaderSigner) { - $this->headerSigners[] = $signer; - } elseif ($signer instanceof Swift_Signers_BodySigner) { - $this->bodySigners[] = $signer; - } - - return $this; - } - - /** - * Detach a signature handler from a message. - * - * @return $this - */ - public function detachSigner(Swift_Signer $signer) - { - if ($signer instanceof Swift_Signers_HeaderSigner) { - foreach ($this->headerSigners as $k => $headerSigner) { - if ($headerSigner === $signer) { - unset($this->headerSigners[$k]); - - return $this; - } - } - } elseif ($signer instanceof Swift_Signers_BodySigner) { - foreach ($this->bodySigners as $k => $bodySigner) { - if ($bodySigner === $signer) { - unset($this->bodySigners[$k]); - - return $this; - } - } - } - - return $this; - } - - /** - * Clear all signature handlers attached to the message. - * - * @return $this - */ - public function clearSigners() - { - $this->headerSigners = []; - $this->bodySigners = []; - - return $this; - } - - /** - * Get this message as a complete string. - * - * @return string - */ - public function toString() - { - if (empty($this->headerSigners) && empty($this->bodySigners)) { - return parent::toString(); - } - - $this->saveMessage(); - - $this->doSign(); - - $string = parent::toString(); - - $this->restoreMessage(); - - return $string; - } - - /** - * Write this message to a {@link Swift_InputByteStream}. - */ - public function toByteStream(Swift_InputByteStream $is) - { - if (empty($this->headerSigners) && empty($this->bodySigners)) { - parent::toByteStream($is); - - return; - } - - $this->saveMessage(); - - $this->doSign(); - - parent::toByteStream($is); - - $this->restoreMessage(); - } - - public function __wakeup() - { - Swift_DependencyContainer::getInstance()->createDependenciesFor('mime.message'); - } - - /** - * loops through signers and apply the signatures. - */ - protected function doSign() - { - foreach ($this->bodySigners as $signer) { - $altered = $signer->getAlteredHeaders(); - $this->saveHeaders($altered); - $signer->signMessage($this); - } - - foreach ($this->headerSigners as $signer) { - $altered = $signer->getAlteredHeaders(); - $this->saveHeaders($altered); - $signer->reset(); - - $signer->setHeaders($this->getHeaders()); - - $signer->startBody(); - $this->bodyToByteStream($signer); - $signer->endBody(); - - $signer->addSignature($this->getHeaders()); - } - } - - /** - * save the message before any signature is applied. - */ - protected function saveMessage() - { - $this->savedMessage = ['headers' => []]; - $this->savedMessage['body'] = $this->getBody(); - $this->savedMessage['children'] = $this->getChildren(); - if (count($this->savedMessage['children']) > 0 && '' != $this->getBody()) { - $this->setChildren(array_merge([$this->becomeMimePart()], $this->savedMessage['children'])); - $this->setBody(''); - } - } - - /** - * save the original headers. - */ - protected function saveHeaders(array $altered) - { - foreach ($altered as $head) { - $lc = strtolower($head); - - if (!isset($this->savedMessage['headers'][$lc])) { - $this->savedMessage['headers'][$lc] = $this->getHeaders()->getAll($head); - } - } - } - - /** - * Remove or restore altered headers. - */ - protected function restoreHeaders() - { - foreach ($this->savedMessage['headers'] as $name => $savedValue) { - $headers = $this->getHeaders()->getAll($name); - - foreach ($headers as $key => $value) { - if (!isset($savedValue[$key])) { - $this->getHeaders()->remove($name, $key); - } - } - } - } - - /** - * Restore message body. - */ - protected function restoreMessage() - { - $this->setBody($this->savedMessage['body']); - $this->setChildren($this->savedMessage['children']); - - $this->restoreHeaders(); - $this->savedMessage = []; - } - - /** - * Clone Message Signers. - * - * @see Swift_Mime_SimpleMimeEntity::__clone() - */ - public function __clone() - { - parent::__clone(); - foreach ($this->bodySigners as $key => $bodySigner) { - $this->bodySigners[$key] = clone $bodySigner; - } - - foreach ($this->headerSigners as $key => $headerSigner) { - $this->headerSigners[$key] = clone $headerSigner; - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/Base64ContentEncoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/Base64ContentEncoder.php deleted file mode 100644 index 8c4e2266f..000000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/Base64ContentEncoder.php +++ /dev/null @@ -1,101 +0,0 @@ -= $maxLineLength || 76 < $maxLineLength) { - $maxLineLength = 76; - } - - $remainder = 0; - $base64ReadBufferRemainderBytes = null; - - // To reduce memory usage, the output buffer is streamed to the input buffer like so: - // Output Stream => base64encode => wrap line length => Input Stream - // HOWEVER it's important to note that base64_encode() should only be passed whole triplets of data (except for the final chunk of data) - // otherwise it will assume the input data has *ended* and it will incorrectly pad/terminate the base64 data mid-stream. - // We use $base64ReadBufferRemainderBytes to carry over 1-2 "remainder" bytes from the each chunk from OutputStream and pre-pend those onto the - // chunk of bytes read in the next iteration. - // When the OutputStream is empty, we must flush any remainder bytes. - while (true) { - $readBytes = $os->read(8192); - $atEOF = (false === $readBytes); - - if ($atEOF) { - $streamTheseBytes = $base64ReadBufferRemainderBytes; - } else { - $streamTheseBytes = $base64ReadBufferRemainderBytes.$readBytes; - } - $base64ReadBufferRemainderBytes = null; - $bytesLength = strlen($streamTheseBytes); - - if (0 === $bytesLength) { // no data left to encode - break; - } - - // if we're not on the last block of the ouput stream, make sure $streamTheseBytes ends with a complete triplet of data - // and carry over remainder 1-2 bytes to the next loop iteration - if (!$atEOF) { - $excessBytes = $bytesLength % 3; - if (0 !== $excessBytes) { - $base64ReadBufferRemainderBytes = substr($streamTheseBytes, -$excessBytes); - $streamTheseBytes = substr($streamTheseBytes, 0, $bytesLength - $excessBytes); - } - } - - $encoded = base64_encode($streamTheseBytes); - $encodedTransformed = ''; - $thisMaxLineLength = $maxLineLength - $remainder - $firstLineOffset; - - while ($thisMaxLineLength < strlen($encoded)) { - $encodedTransformed .= substr($encoded, 0, $thisMaxLineLength)."\r\n"; - $firstLineOffset = 0; - $encoded = substr($encoded, $thisMaxLineLength); - $thisMaxLineLength = $maxLineLength; - $remainder = 0; - } - - if (0 < $remainingLength = strlen($encoded)) { - $remainder += $remainingLength; - $encodedTransformed .= $encoded; - $encoded = null; - } - - $is->write($encodedTransformed); - - if ($atEOF) { - break; - } - } - } - - /** - * Get the name of this encoding scheme. - * Returns the string 'base64'. - * - * @return string - */ - public function getName() - { - return 'base64'; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php deleted file mode 100644 index 84e3d2475..000000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php +++ /dev/null @@ -1,134 +0,0 @@ -dotEscape = $dotEscape; - parent::__construct($charStream, $filter); - } - - public function __sleep() - { - return ['charStream', 'filter', 'dotEscape']; - } - - protected function getSafeMapShareId() - { - return get_class($this).($this->dotEscape ? '.dotEscape' : ''); - } - - protected function initSafeMap() - { - parent::initSafeMap(); - if ($this->dotEscape) { - /* Encode . as =2e for buggy remote servers */ - unset($this->safeMap[0x2e]); - } - } - - /** - * Encode stream $in to stream $out. - * - * QP encoded strings have a maximum line length of 76 characters. - * If the first line needs to be shorter, indicate the difference with - * $firstLineOffset. - * - * @param Swift_OutputByteStream $os output stream - * @param Swift_InputByteStream $is input stream - * @param int $firstLineOffset - * @param int $maxLineLength - */ - public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, $maxLineLength = 0) - { - if ($maxLineLength > 76 || $maxLineLength <= 0) { - $maxLineLength = 76; - } - - $thisLineLength = $maxLineLength - $firstLineOffset; - - $this->charStream->flushContents(); - $this->charStream->importByteStream($os); - - $currentLine = ''; - $prepend = ''; - $size = $lineLen = 0; - - while (false !== $bytes = $this->nextSequence()) { - // If we're filtering the input - if (isset($this->filter)) { - // If we can't filter because we need more bytes - while ($this->filter->shouldBuffer($bytes)) { - // Then collect bytes into the buffer - if (false === $moreBytes = $this->nextSequence(1)) { - break; - } - - foreach ($moreBytes as $b) { - $bytes[] = $b; - } - } - // And filter them - $bytes = $this->filter->filter($bytes); - } - - $enc = $this->encodeByteSequence($bytes, $size); - - $i = strpos($enc, '=0D=0A'); - $newLineLength = $lineLen + (false === $i ? $size : $i); - - if ($currentLine && $newLineLength >= $thisLineLength) { - $is->write($prepend.$this->standardize($currentLine)); - $currentLine = ''; - $prepend = "=\r\n"; - $thisLineLength = $maxLineLength; - $lineLen = 0; - } - - $currentLine .= $enc; - - if (false === $i) { - $lineLen += $size; - } else { - // 6 is the length of '=0D=0A'. - $lineLen = $size - strrpos($enc, '=0D=0A') - 6; - } - } - if (strlen($currentLine)) { - $is->write($prepend.$this->standardize($currentLine)); - } - } - - /** - * Get the name of this encoding scheme. - * Returns the string 'quoted-printable'. - * - * @return string - */ - public function getName() - { - return 'quoted-printable'; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/AbstractHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/AbstractHeader.php deleted file mode 100644 index 3a19404a6..000000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/AbstractHeader.php +++ /dev/null @@ -1,476 +0,0 @@ -clearCachedValueIf($charset != $this->charset); - $this->charset = $charset; - if (isset($this->encoder)) { - $this->encoder->charsetChanged($charset); - } - } - - /** - * Get the character set used in this Header. - * - * @return string - */ - public function getCharset() - { - return $this->charset; - } - - /** - * Set the language used in this Header. - * - * For example, for US English, 'en-us'. - * This can be unspecified. - * - * @param string $lang - */ - public function setLanguage($lang) - { - $this->clearCachedValueIf($this->lang != $lang); - $this->lang = $lang; - } - - /** - * Get the language used in this Header. - * - * @return string - */ - public function getLanguage() - { - return $this->lang; - } - - /** - * Set the encoder used for encoding the header. - */ - public function setEncoder(Swift_Mime_HeaderEncoder $encoder) - { - $this->encoder = $encoder; - $this->setCachedValue(null); - } - - /** - * Get the encoder used for encoding this Header. - * - * @return Swift_Mime_HeaderEncoder - */ - public function getEncoder() - { - return $this->encoder; - } - - /** - * Get the name of this header (e.g. charset). - * - * @return string - */ - public function getFieldName() - { - return $this->name; - } - - /** - * Set the maximum length of lines in the header (excluding EOL). - * - * @param int $lineLength - */ - public function setMaxLineLength($lineLength) - { - $this->clearCachedValueIf($this->lineLength != $lineLength); - $this->lineLength = $lineLength; - } - - /** - * Get the maximum permitted length of lines in this Header. - * - * @return int - */ - public function getMaxLineLength() - { - return $this->lineLength; - } - - /** - * Get this Header rendered as a RFC 2822 compliant string. - * - * @return string - * - * @throws Swift_RfcComplianceException - */ - public function toString() - { - return $this->tokensToString($this->toTokens()); - } - - /** - * Returns a string representation of this object. - * - * @return string - * - * @see toString() - */ - public function __toString() - { - return $this->toString(); - } - - /** - * Set the name of this Header field. - * - * @param string $name - */ - protected function setFieldName($name) - { - $this->name = $name; - } - - /** - * Produces a compliant, formatted RFC 2822 'phrase' based on the string given. - * - * @param string $string as displayed - * @param string $charset of the text - * @param bool $shorten the first line to make remove for header name - * - * @return string - */ - protected function createPhrase(Swift_Mime_Header $header, $string, $charset, Swift_Mime_HeaderEncoder $encoder = null, $shorten = false) - { - // Treat token as exactly what was given - $phraseStr = $string; - // If it's not valid - - if (!preg_match('/^'.self::PHRASE_PATTERN.'$/D', $phraseStr)) { - // .. but it is just ascii text, try escaping some characters - // and make it a quoted-string - if (preg_match('/^[\x00-\x08\x0B\x0C\x0E-\x7F]*$/D', $phraseStr)) { - $phraseStr = $this->escapeSpecials($phraseStr, ['"']); - $phraseStr = '"'.$phraseStr.'"'; - } else { - // ... otherwise it needs encoding - // Determine space remaining on line if first line - if ($shorten) { - $usedLength = strlen($header->getFieldName().': '); - } else { - $usedLength = 0; - } - $phraseStr = $this->encodeWords($header, $string, $usedLength); - } - } - - return $phraseStr; - } - - /** - * Escape special characters in a string (convert to quoted-pairs). - * - * @param string $token - * @param string[] $include additional chars to escape - * - * @return string - */ - private function escapeSpecials($token, $include = []) - { - foreach (array_merge(['\\'], $include) as $char) { - $token = str_replace($char, '\\'.$char, $token); - } - - return $token; - } - - /** - * Encode needed word tokens within a string of input. - * - * @param string $input - * @param string $usedLength optional - * - * @return string - */ - protected function encodeWords(Swift_Mime_Header $header, $input, $usedLength = -1) - { - $value = ''; - - $tokens = $this->getEncodableWordTokens($input); - - foreach ($tokens as $token) { - // See RFC 2822, Sect 2.2 (really 2.2 ??) - if ($this->tokenNeedsEncoding($token)) { - // Don't encode starting WSP - $firstChar = substr($token, 0, 1); - switch ($firstChar) { - case ' ': - case "\t": - $value .= $firstChar; - $token = substr($token, 1); - } - - if (-1 == $usedLength) { - $usedLength = strlen($header->getFieldName().': ') + strlen($value); - } - $value .= $this->getTokenAsEncodedWord($token, $usedLength); - - $header->setMaxLineLength(76); // Forcefully override - } else { - $value .= $token; - } - } - - return $value; - } - - /** - * Test if a token needs to be encoded or not. - * - * @param string $token - * - * @return bool - */ - protected function tokenNeedsEncoding($token) - { - return preg_match('~[\x00-\x08\x10-\x19\x7F-\xFF\r\n]~', $token); - } - - /** - * Splits a string into tokens in blocks of words which can be encoded quickly. - * - * @param string $string - * - * @return string[] - */ - protected function getEncodableWordTokens($string) - { - $tokens = []; - - $encodedToken = ''; - // Split at all whitespace boundaries - foreach (preg_split('~(?=[\t ])~', $string) as $token) { - if ($this->tokenNeedsEncoding($token)) { - $encodedToken .= $token; - } else { - if (strlen($encodedToken) > 0) { - $tokens[] = $encodedToken; - $encodedToken = ''; - } - $tokens[] = $token; - } - } - if (strlen($encodedToken)) { - $tokens[] = $encodedToken; - } - - return $tokens; - } - - /** - * Get a token as an encoded word for safe insertion into headers. - * - * @param string $token token to encode - * @param int $firstLineOffset optional - * - * @return string - */ - protected function getTokenAsEncodedWord($token, $firstLineOffset = 0) - { - // Adjust $firstLineOffset to account for space needed for syntax - $charsetDecl = $this->charset; - if (isset($this->lang)) { - $charsetDecl .= '*'.$this->lang; - } - $encodingWrapperLength = strlen( - '=?'.$charsetDecl.'?'.$this->encoder->getName().'??=' - ); - - if ($firstLineOffset >= 75) { - //Does this logic need to be here? - $firstLineOffset = 0; - } - - $encodedTextLines = explode("\r\n", - $this->encoder->encodeString( - $token, $firstLineOffset, 75 - $encodingWrapperLength, $this->charset - ) - ); - - if ('iso-2022-jp' !== strtolower($this->charset)) { - // special encoding for iso-2022-jp using mb_encode_mimeheader - foreach ($encodedTextLines as $lineNum => $line) { - $encodedTextLines[$lineNum] = '=?'.$charsetDecl. - '?'.$this->encoder->getName(). - '?'.$line.'?='; - } - } - - return implode("\r\n ", $encodedTextLines); - } - - /** - * Generates tokens from the given string which include CRLF as individual tokens. - * - * @param string $token - * - * @return string[] - */ - protected function generateTokenLines($token) - { - return preg_split('~(\r\n)~', $token, -1, PREG_SPLIT_DELIM_CAPTURE); - } - - /** - * Set a value into the cache. - * - * @param string $value - */ - protected function setCachedValue($value) - { - $this->cachedValue = $value; - } - - /** - * Get the value in the cache. - * - * @return string - */ - protected function getCachedValue() - { - return $this->cachedValue; - } - - /** - * Clear the cached value if $condition is met. - * - * @param bool $condition - */ - protected function clearCachedValueIf($condition) - { - if ($condition) { - $this->setCachedValue(null); - } - } - - /** - * Generate a list of all tokens in the final header. - * - * @param string $string The string to tokenize - * - * @return array An array of tokens as strings - */ - protected function toTokens($string = null) - { - if (null === $string) { - $string = $this->getFieldBody(); - } - - $tokens = []; - - // Generate atoms; split at all invisible boundaries followed by WSP - foreach (preg_split('~(?=[ \t])~', $string) as $token) { - $newTokens = $this->generateTokenLines($token); - foreach ($newTokens as $newToken) { - $tokens[] = $newToken; - } - } - - return $tokens; - } - - /** - * Takes an array of tokens which appear in the header and turns them into - * an RFC 2822 compliant string, adding FWSP where needed. - * - * @param string[] $tokens - * - * @return string - */ - private function tokensToString(array $tokens) - { - $lineCount = 0; - $headerLines = []; - $headerLines[] = $this->name.': '; - $currentLine = &$headerLines[$lineCount++]; - - // Build all tokens back into compliant header - foreach ($tokens as $i => $token) { - // Line longer than specified maximum or token was just a new line - if (("\r\n" == $token) || - ($i > 0 && strlen($currentLine.$token) > $this->lineLength) - && 0 < strlen($currentLine)) { - $headerLines[] = ''; - $currentLine = &$headerLines[$lineCount++]; - } - - // Append token to the line - if ("\r\n" != $token) { - $currentLine .= $token; - } - } - - // Implode with FWS (RFC 2822, 2.2.3) - return implode("\r\n", $headerLines)."\r\n"; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php deleted file mode 100644 index cadc63f85..000000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php +++ /dev/null @@ -1,186 +0,0 @@ -setFieldName($name); - $this->emailValidator = $emailValidator; - $this->addressEncoder = $addressEncoder ?? new Swift_AddressEncoder_IdnAddressEncoder(); - } - - /** - * Get the type of Header that this instance represents. - * - * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX - * @see TYPE_DATE, TYPE_ID, TYPE_PATH - * - * @return int - */ - public function getFieldType() - { - return self::TYPE_ID; - } - - /** - * Set the model for the field body. - * - * This method takes a string ID, or an array of IDs. - * - * @param mixed $model - * - * @throws Swift_RfcComplianceException - */ - public function setFieldBodyModel($model) - { - $this->setId($model); - } - - /** - * Get the model for the field body. - * - * This method returns an array of IDs - * - * @return array - */ - public function getFieldBodyModel() - { - return $this->getIds(); - } - - /** - * Set the ID used in the value of this header. - * - * @param string|array $id - * - * @throws Swift_RfcComplianceException - */ - public function setId($id) - { - $this->setIds(is_array($id) ? $id : [$id]); - } - - /** - * Get the ID used in the value of this Header. - * - * If multiple IDs are set only the first is returned. - * - * @return string - */ - public function getId() - { - if (count($this->ids) > 0) { - return $this->ids[0]; - } - } - - /** - * Set a collection of IDs to use in the value of this Header. - * - * @param string[] $ids - * - * @throws Swift_RfcComplianceException - */ - public function setIds(array $ids) - { - $actualIds = []; - - foreach ($ids as $id) { - $this->assertValidId($id); - $actualIds[] = $id; - } - - $this->clearCachedValueIf($this->ids != $actualIds); - $this->ids = $actualIds; - } - - /** - * Get the list of IDs used in this Header. - * - * @return string[] - */ - public function getIds() - { - return $this->ids; - } - - /** - * Get the string value of the body in this Header. - * - * This is not necessarily RFC 2822 compliant since folding white space will - * not be added at this stage (see {@see toString()} for that). - * - * @see toString() - * - * @throws Swift_RfcComplianceException - * - * @return string - */ - public function getFieldBody() - { - if (!$this->getCachedValue()) { - $angleAddrs = []; - - foreach ($this->ids as $id) { - $angleAddrs[] = '<'.$this->addressEncoder->encodeString($id).'>'; - } - - $this->setCachedValue(implode(' ', $angleAddrs)); - } - - return $this->getCachedValue(); - } - - /** - * Throws an Exception if the id passed does not comply with RFC 2822. - * - * @param string $id - * - * @throws Swift_RfcComplianceException - */ - private function assertValidId($id) - { - if (!$this->emailValidator->isValid($id, new RFCValidation())) { - throw new Swift_RfcComplianceException('Invalid ID given <'.$id.'>'); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php deleted file mode 100644 index 9f1fe1749..000000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php +++ /dev/null @@ -1,360 +0,0 @@ -setFieldName($name); - $this->setEncoder($encoder); - $this->emailValidator = $emailValidator; - $this->addressEncoder = $addressEncoder ?? new Swift_AddressEncoder_IdnAddressEncoder(); - } - - /** - * Get the type of Header that this instance represents. - * - * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX - * @see TYPE_DATE, TYPE_ID, TYPE_PATH - * - * @return int - */ - public function getFieldType() - { - return self::TYPE_MAILBOX; - } - - /** - * Set the model for the field body. - * - * This method takes a string, or an array of addresses. - * - * @param mixed $model - * - * @throws Swift_RfcComplianceException - */ - public function setFieldBodyModel($model) - { - $this->setNameAddresses($model); - } - - /** - * Get the model for the field body. - * - * This method returns an associative array like {@link getNameAddresses()} - * - * @throws Swift_RfcComplianceException - * - * @return array - */ - public function getFieldBodyModel() - { - return $this->getNameAddresses(); - } - - /** - * Set a list of mailboxes to be shown in this Header. - * - * The mailboxes can be a simple array of addresses, or an array of - * key=>value pairs where (email => personalName). - * Example: - * - * setNameAddresses(array( - * 'chris@swiftmailer.org' => 'Chris Corbyn', - * 'mark@swiftmailer.org' //No associated personal name - * )); - * ?> - * - * - * @see __construct() - * @see setAddresses() - * @see setValue() - * - * @param string|string[] $mailboxes - * - * @throws Swift_RfcComplianceException - */ - public function setNameAddresses($mailboxes) - { - $this->mailboxes = $this->normalizeMailboxes((array) $mailboxes); - $this->setCachedValue(null); //Clear any cached value - } - - /** - * Get the full mailbox list of this Header as an array of valid RFC 2822 strings. - * - * Example: - * - * 'Chris Corbyn', - * 'mark@swiftmailer.org' => 'Mark Corbyn') - * ); - * print_r($header->getNameAddressStrings()); - * // array ( - * // 0 => Chris Corbyn , - * // 1 => Mark Corbyn - * // ) - * ?> - * - * - * @see getNameAddresses() - * @see toString() - * - * @throws Swift_RfcComplianceException - * - * @return string[] - */ - public function getNameAddressStrings() - { - return $this->createNameAddressStrings($this->getNameAddresses()); - } - - /** - * Get all mailboxes in this Header as key=>value pairs. - * - * The key is the address and the value is the name (or null if none set). - * Example: - * - * 'Chris Corbyn', - * 'mark@swiftmailer.org' => 'Mark Corbyn') - * ); - * print_r($header->getNameAddresses()); - * // array ( - * // chris@swiftmailer.org => Chris Corbyn, - * // mark@swiftmailer.org => Mark Corbyn - * // ) - * ?> - * - * - * @see getAddresses() - * @see getNameAddressStrings() - * - * @return string[] - */ - public function getNameAddresses() - { - return $this->mailboxes; - } - - /** - * Makes this Header represent a list of plain email addresses with no names. - * - * Example: - * - * setAddresses( - * array('one@domain.tld', 'two@domain.tld', 'three@domain.tld') - * ); - * ?> - * - * - * @see setNameAddresses() - * @see setValue() - * - * @param string[] $addresses - * - * @throws Swift_RfcComplianceException - */ - public function setAddresses($addresses) - { - $this->setNameAddresses(array_values((array) $addresses)); - } - - /** - * Get all email addresses in this Header. - * - * @see getNameAddresses() - * - * @return string[] - */ - public function getAddresses() - { - return array_keys($this->mailboxes); - } - - /** - * Remove one or more addresses from this Header. - * - * @param string|string[] $addresses - */ - public function removeAddresses($addresses) - { - $this->setCachedValue(null); - foreach ((array) $addresses as $address) { - unset($this->mailboxes[$address]); - } - } - - /** - * Get the string value of the body in this Header. - * - * This is not necessarily RFC 2822 compliant since folding white space will - * not be added at this stage (see {@link toString()} for that). - * - * @see toString() - * - * @throws Swift_RfcComplianceException - * - * @return string - */ - public function getFieldBody() - { - // Compute the string value of the header only if needed - if (null === $this->getCachedValue()) { - $this->setCachedValue($this->createMailboxListString($this->mailboxes)); - } - - return $this->getCachedValue(); - } - - /** - * Normalizes a user-input list of mailboxes into consistent key=>value pairs. - * - * @param string[] $mailboxes - * - * @return string[] - */ - protected function normalizeMailboxes(array $mailboxes) - { - $actualMailboxes = []; - - foreach ($mailboxes as $key => $value) { - if (is_string($key)) { - //key is email addr - $address = $key; - $name = $value; - } else { - $address = $value; - $name = null; - } - $this->assertValidAddress($address); - $actualMailboxes[$address] = $name; - } - - return $actualMailboxes; - } - - /** - * Produces a compliant, formatted display-name based on the string given. - * - * @param string $displayName as displayed - * @param bool $shorten the first line to make remove for header name - * - * @return string - */ - protected function createDisplayNameString($displayName, $shorten = false) - { - return $this->createPhrase($this, $displayName, $this->getCharset(), $this->getEncoder(), $shorten); - } - - /** - * Creates a string form of all the mailboxes in the passed array. - * - * @param string[] $mailboxes - * - * @throws Swift_RfcComplianceException - * - * @return string - */ - protected function createMailboxListString(array $mailboxes) - { - return implode(', ', $this->createNameAddressStrings($mailboxes)); - } - - /** - * Redefine the encoding requirements for mailboxes. - * - * All "specials" must be encoded as the full header value will not be quoted - * - * @see RFC 2822 3.2.1 - * - * @param string $token - * - * @return bool - */ - protected function tokenNeedsEncoding($token) - { - return preg_match('/[()<>\[\]:;@\,."]/', $token) || parent::tokenNeedsEncoding($token); - } - - /** - * Return an array of strings conforming the the name-addr spec of RFC 2822. - * - * @param string[] $mailboxes - * - * @return string[] - */ - private function createNameAddressStrings(array $mailboxes) - { - $strings = []; - - foreach ($mailboxes as $email => $name) { - $mailboxStr = $this->addressEncoder->encodeString($email); - if (null !== $name) { - $nameStr = $this->createDisplayNameString($name, empty($strings)); - $mailboxStr = $nameStr.' <'.$mailboxStr.'>'; - } - $strings[] = $mailboxStr; - } - - return $strings; - } - - /** - * Throws an Exception if the address passed does not comply with RFC 2822. - * - * @param string $address - * - * @throws Swift_RfcComplianceException If invalid. - */ - private function assertValidAddress($address) - { - if (!$this->emailValidator->isValid($address, new RFCValidation())) { - throw new Swift_RfcComplianceException( - 'Address in mailbox given ['.$address.'] does not comply with RFC 2822, 3.6.2.' - ); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php deleted file mode 100644 index 02933c417..000000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php +++ /dev/null @@ -1,255 +0,0 @@ -paramEncoder = $paramEncoder; - } - - /** - * Get the type of Header that this instance represents. - * - * @see TYPE_TEXT, TYPE_PARAMETERIZED, TYPE_MAILBOX - * @see TYPE_DATE, TYPE_ID, TYPE_PATH - * - * @return int - */ - public function getFieldType() - { - return self::TYPE_PARAMETERIZED; - } - - /** - * Set the character set used in this Header. - * - * @param string $charset - */ - public function setCharset($charset) - { - parent::setCharset($charset); - if (isset($this->paramEncoder)) { - $this->paramEncoder->charsetChanged($charset); - } - } - - /** - * Set the value of $parameter. - * - * @param string $parameter - * @param string $value - */ - public function setParameter($parameter, $value) - { - $this->setParameters(array_merge($this->getParameters(), [$parameter => $value])); - } - - /** - * Get the value of $parameter. - * - * @param string $parameter - * - * @return string - */ - public function getParameter($parameter) - { - $params = $this->getParameters(); - - return $params[$parameter] ?? null; - } - - /** - * Set an associative array of parameter names mapped to values. - * - * @param string[] $parameters - */ - public function setParameters(array $parameters) - { - $this->clearCachedValueIf($this->params != $parameters); - $this->params = $parameters; - } - - /** - * Returns an associative array of parameter names mapped to values. - * - * @return string[] - */ - public function getParameters() - { - return $this->params; - } - - /** - * Get the value of this header prepared for rendering. - * - * @return string - */ - public function getFieldBody() //TODO: Check caching here - { - $body = parent::getFieldBody(); - foreach ($this->params as $name => $value) { - if (null !== $value) { - // Add the parameter - $body .= '; '.$this->createParameter($name, $value); - } - } - - return $body; - } - - /** - * Generate a list of all tokens in the final header. - * - * This doesn't need to be overridden in theory, but it is for implementation - * reasons to prevent potential breakage of attributes. - * - * @param string $string The string to tokenize - * - * @return array An array of tokens as strings - */ - protected function toTokens($string = null) - { - $tokens = parent::toTokens(parent::getFieldBody()); - - // Try creating any parameters - foreach ($this->params as $name => $value) { - if (null !== $value) { - // Add the semi-colon separator - $tokens[count($tokens) - 1] .= ';'; - $tokens = array_merge($tokens, $this->generateTokenLines( - ' '.$this->createParameter($name, $value) - )); - } - } - - return $tokens; - } - - /** - * Render a RFC 2047 compliant header parameter from the $name and $value. - * - * @param string $name - * @param string $value - * - * @return string - */ - private function createParameter($name, $value) - { - $origValue = $value; - - $encoded = false; - // Allow room for parameter name, indices, "=" and DQUOTEs - $maxValueLength = $this->getMaxLineLength() - strlen($name.'=*N"";') - 1; - $firstLineOffset = 0; - - // If it's not already a valid parameter value... - if (!preg_match('/^'.self::TOKEN_REGEX.'$/D', $value)) { - // TODO: text, or something else?? - // ... and it's not ascii - if (!preg_match('/^[\x00-\x08\x0B\x0C\x0E-\x7F]*$/D', $value)) { - $encoded = true; - // Allow space for the indices, charset and language - $maxValueLength = $this->getMaxLineLength() - strlen($name.'*N*="";') - 1; - $firstLineOffset = strlen( - $this->getCharset()."'".$this->getLanguage()."'" - ); - } - } - - // Encode if we need to - if ($encoded || strlen($value) > $maxValueLength) { - if (isset($this->paramEncoder)) { - $value = $this->paramEncoder->encodeString( - $origValue, $firstLineOffset, $maxValueLength, $this->getCharset() - ); - } else { - // We have to go against RFC 2183/2231 in some areas for interoperability - $value = $this->getTokenAsEncodedWord($origValue); - $encoded = false; - } - } - - $valueLines = isset($this->paramEncoder) ? explode("\r\n", $value) : [$value]; - - // Need to add indices - if (count($valueLines) > 1) { - $paramLines = []; - foreach ($valueLines as $i => $line) { - $paramLines[] = $name.'*'.$i. - $this->getEndOfParameterValue($line, true, 0 == $i); - } - - return implode(";\r\n ", $paramLines); - } else { - return $name.$this->getEndOfParameterValue( - $valueLines[0], $encoded, true - ); - } - } - - /** - * Returns the parameter value from the "=" and beyond. - * - * @param string $value to append - * @param bool $encoded - * @param bool $firstLine - * - * @return string - */ - private function getEndOfParameterValue($value, $encoded = false, $firstLine = false) - { - if (!preg_match('/^'.self::TOKEN_REGEX.'$/D', $value)) { - $value = '"'.$value.'"'; - } - $prepend = '='; - if ($encoded) { - $prepend = '*='; - if ($firstLine) { - $prepend = '*='.$this->getCharset()."'".$this->getLanguage(). - "'"; - } - } - - return $prepend.$value; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimePart.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimePart.php deleted file mode 100644 index 54c8b3aca..000000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimePart.php +++ /dev/null @@ -1,208 +0,0 @@ -setContentType('text/plain'); - if (null !== $charset) { - $this->setCharset($charset); - } - } - - /** - * Set the body of this entity, either as a string, or as an instance of - * {@link Swift_OutputByteStream}. - * - * @param mixed $body - * @param string $contentType optional - * @param string $charset optional - * - * @return $this - */ - public function setBody($body, $contentType = null, $charset = null) - { - if (isset($charset)) { - $this->setCharset($charset); - } - $body = $this->convertString($body); - - parent::setBody($body, $contentType); - - return $this; - } - - /** - * Get the character set of this entity. - * - * @return string - */ - public function getCharset() - { - return $this->getHeaderParameter('Content-Type', 'charset'); - } - - /** - * Set the character set of this entity. - * - * @param string $charset - * - * @return $this - */ - public function setCharset($charset) - { - $this->setHeaderParameter('Content-Type', 'charset', $charset); - if ($charset !== $this->userCharset) { - $this->clearCache(); - } - $this->userCharset = $charset; - parent::charsetChanged($charset); - - return $this; - } - - /** - * Get the format of this entity (i.e. flowed or fixed). - * - * @return string - */ - public function getFormat() - { - return $this->getHeaderParameter('Content-Type', 'format'); - } - - /** - * Set the format of this entity (flowed or fixed). - * - * @param string $format - * - * @return $this - */ - public function setFormat($format) - { - $this->setHeaderParameter('Content-Type', 'format', $format); - $this->userFormat = $format; - - return $this; - } - - /** - * Test if delsp is being used for this entity. - * - * @return bool - */ - public function getDelSp() - { - return 'yes' === $this->getHeaderParameter('Content-Type', 'delsp'); - } - - /** - * Turn delsp on or off for this entity. - * - * @param bool $delsp - * - * @return $this - */ - public function setDelSp($delsp = true) - { - $this->setHeaderParameter('Content-Type', 'delsp', $delsp ? 'yes' : null); - $this->userDelSp = $delsp; - - return $this; - } - - /** - * Get the nesting level of this entity. - * - * @see LEVEL_TOP, LEVEL_ALTERNATIVE, LEVEL_MIXED, LEVEL_RELATED - * - * @return int - */ - public function getNestingLevel() - { - return $this->nestingLevel; - } - - /** - * Receive notification that the charset has changed on this document, or a - * parent document. - * - * @param string $charset - */ - public function charsetChanged($charset) - { - $this->setCharset($charset); - } - - /** Fix the content-type and encoding of this entity */ - protected function fixHeaders() - { - parent::fixHeaders(); - if (count($this->getChildren())) { - $this->setHeaderParameter('Content-Type', 'charset', null); - $this->setHeaderParameter('Content-Type', 'format', null); - $this->setHeaderParameter('Content-Type', 'delsp', null); - } else { - $this->setCharset($this->userCharset); - $this->setFormat($this->userFormat); - $this->setDelSp($this->userDelSp); - } - } - - /** Set the nesting level of this entity */ - protected function setNestingLevel($level) - { - $this->nestingLevel = $level; - } - - /** Encode charset when charset is not utf-8 */ - protected function convertString($string) - { - $charset = strtolower($this->getCharset()); - if (!in_array($charset, ['utf-8', 'iso-8859-1', 'iso-8859-15', ''])) { - // mb_convert_encoding must be the first one to check, since iconv cannot convert some words. - if (function_exists('mb_convert_encoding')) { - $string = mb_convert_encoding($string, $charset, 'utf-8'); - } elseif (function_exists('iconv')) { - $string = iconv('utf-8//TRANSLIT//IGNORE', $charset, $string); - } else { - throw new Swift_SwiftException('No suitable convert encoding function (use UTF-8 as your charset or install the mbstring or iconv extension).'); - } - - return $string; - } - - return $string; - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php deleted file mode 100644 index 93af99634..000000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php +++ /dev/null @@ -1,195 +0,0 @@ -encoder = $encoder; - $this->paramEncoder = $paramEncoder; - $this->emailValidator = $emailValidator; - $this->charset = $charset; - $this->addressEncoder = $addressEncoder ?? new Swift_AddressEncoder_IdnAddressEncoder(); - } - - /** - * Create a new Mailbox Header with a list of $addresses. - * - * @param string $name - * @param array|string|null $addresses - * - * @return Swift_Mime_Header - */ - public function createMailboxHeader($name, $addresses = null) - { - $header = new Swift_Mime_Headers_MailboxHeader($name, $this->encoder, $this->emailValidator, $this->addressEncoder); - if (isset($addresses)) { - $header->setFieldBodyModel($addresses); - } - $this->setHeaderCharset($header); - - return $header; - } - - /** - * Create a new Date header using $dateTime. - * - * @param string $name - * @param DateTimeInterface|null $dateTime - * - * @return Swift_Mime_Header - */ - public function createDateHeader($name, DateTimeInterface $dateTime = null) - { - $header = new Swift_Mime_Headers_DateHeader($name); - if (isset($dateTime)) { - $header->setFieldBodyModel($dateTime); - } - $this->setHeaderCharset($header); - - return $header; - } - - /** - * Create a new basic text header with $name and $value. - * - * @param string $name - * @param string $value - * - * @return Swift_Mime_Header - */ - public function createTextHeader($name, $value = null) - { - $header = new Swift_Mime_Headers_UnstructuredHeader($name, $this->encoder); - if (isset($value)) { - $header->setFieldBodyModel($value); - } - $this->setHeaderCharset($header); - - return $header; - } - - /** - * Create a new ParameterizedHeader with $name, $value and $params. - * - * @param string $name - * @param string $value - * @param array $params - * - * @return Swift_Mime_Headers_ParameterizedHeader - */ - public function createParameterizedHeader($name, $value = null, $params = []) - { - $header = new Swift_Mime_Headers_ParameterizedHeader($name, $this->encoder, ('content-disposition' == strtolower($name)) ? $this->paramEncoder : null); - if (isset($value)) { - $header->setFieldBodyModel($value); - } - foreach ($params as $k => $v) { - $header->setParameter($k, $v); - } - $this->setHeaderCharset($header); - - return $header; - } - - /** - * Create a new ID header for Message-ID or Content-ID. - * - * @param string $name - * @param string|array $ids - * - * @return Swift_Mime_Header - */ - public function createIdHeader($name, $ids = null) - { - $header = new Swift_Mime_Headers_IdentificationHeader($name, $this->emailValidator); - if (isset($ids)) { - $header->setFieldBodyModel($ids); - } - $this->setHeaderCharset($header); - - return $header; - } - - /** - * Create a new Path header with an address (path) in it. - * - * @param string $name - * @param string $path - * - * @return Swift_Mime_Header - */ - public function createPathHeader($name, $path = null) - { - $header = new Swift_Mime_Headers_PathHeader($name, $this->emailValidator); - if (isset($path)) { - $header->setFieldBodyModel($path); - } - $this->setHeaderCharset($header); - - return $header; - } - - /** - * Notify this observer that the entity's charset has changed. - * - * @param string $charset - */ - public function charsetChanged($charset) - { - $this->charset = $charset; - $this->encoder->charsetChanged($charset); - $this->paramEncoder->charsetChanged($charset); - } - - /** - * Make a deep copy of object. - */ - public function __clone() - { - $this->encoder = clone $this->encoder; - $this->paramEncoder = clone $this->paramEncoder; - } - - /** Apply the charset to the Header */ - private function setHeaderCharset(Swift_Mime_Header $header) - { - if (isset($this->charset)) { - $header->setCharset($this->charset); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php deleted file mode 100644 index a2c319131..000000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php +++ /dev/null @@ -1,399 +0,0 @@ -factory = $factory; - if (isset($charset)) { - $this->setCharset($charset); - } - } - - public function newInstance() - { - return new self($this->factory); - } - - /** - * Set the charset used by these headers. - * - * @param string $charset - */ - public function setCharset($charset) - { - $this->charset = $charset; - $this->factory->charsetChanged($charset); - $this->notifyHeadersOfCharset($charset); - } - - /** - * Add a new Mailbox Header with a list of $addresses. - * - * @param string $name - * @param array|string $addresses - */ - public function addMailboxHeader($name, $addresses = null) - { - $this->storeHeader($name, $this->factory->createMailboxHeader($name, $addresses)); - } - - /** - * Add a new Date header using $dateTime. - * - * @param string $name - */ - public function addDateHeader($name, DateTimeInterface $dateTime = null) - { - $this->storeHeader($name, $this->factory->createDateHeader($name, $dateTime)); - } - - /** - * Add a new basic text header with $name and $value. - * - * @param string $name - * @param string $value - */ - public function addTextHeader($name, $value = null) - { - $this->storeHeader($name, $this->factory->createTextHeader($name, $value)); - } - - /** - * Add a new ParameterizedHeader with $name, $value and $params. - * - * @param string $name - * @param string $value - * @param array $params - */ - public function addParameterizedHeader($name, $value = null, $params = []) - { - $this->storeHeader($name, $this->factory->createParameterizedHeader($name, $value, $params)); - } - - /** - * Add a new ID header for Message-ID or Content-ID. - * - * @param string $name - * @param string|array $ids - */ - public function addIdHeader($name, $ids = null) - { - $this->storeHeader($name, $this->factory->createIdHeader($name, $ids)); - } - - /** - * Add a new Path header with an address (path) in it. - * - * @param string $name - * @param string $path - */ - public function addPathHeader($name, $path = null) - { - $this->storeHeader($name, $this->factory->createPathHeader($name, $path)); - } - - /** - * Returns true if at least one header with the given $name exists. - * - * If multiple headers match, the actual one may be specified by $index. - * - * @param string $name - * @param int $index - * - * @return bool - */ - public function has($name, $index = 0) - { - $lowerName = strtolower($name); - - if (!array_key_exists($lowerName, $this->headers)) { - return false; - } - - if (func_num_args() < 2) { - // index was not specified, so we only need to check that there is at least one header value set - return (bool) count($this->headers[$lowerName]); - } - - return array_key_exists($index, $this->headers[$lowerName]); - } - - /** - * Set a header in the HeaderSet. - * - * The header may be a previously fetched header via {@link get()} or it may - * be one that has been created separately. - * - * If $index is specified, the header will be inserted into the set at this - * offset. - * - * @param int $index - */ - public function set(Swift_Mime_Header $header, $index = 0) - { - $this->storeHeader($header->getFieldName(), $header, $index); - } - - /** - * Get the header with the given $name. - * - * If multiple headers match, the actual one may be specified by $index. - * Returns NULL if none present. - * - * @param string $name - * @param int $index - * - * @return Swift_Mime_Header - */ - public function get($name, $index = 0) - { - $name = strtolower($name); - - if (func_num_args() < 2) { - if ($this->has($name)) { - $values = array_values($this->headers[$name]); - - return array_shift($values); - } - } else { - if ($this->has($name, $index)) { - return $this->headers[$name][$index]; - } - } - } - - /** - * Get all headers with the given $name. - * - * @param string $name - * - * @return array - */ - public function getAll($name = null) - { - if (!isset($name)) { - $headers = []; - foreach ($this->headers as $collection) { - $headers = array_merge($headers, $collection); - } - - return $headers; - } - - $lowerName = strtolower($name); - if (!array_key_exists($lowerName, $this->headers)) { - return []; - } - - return $this->headers[$lowerName]; - } - - /** - * Return the name of all Headers. - * - * @return array - */ - public function listAll() - { - $headers = $this->headers; - if ($this->canSort()) { - uksort($headers, [$this, 'sortHeaders']); - } - - return array_keys($headers); - } - - /** - * Remove the header with the given $name if it's set. - * - * If multiple headers match, the actual one may be specified by $index. - * - * @param string $name - * @param int $index - */ - public function remove($name, $index = 0) - { - $lowerName = strtolower($name); - unset($this->headers[$lowerName][$index]); - } - - /** - * Remove all headers with the given $name. - * - * @param string $name - */ - public function removeAll($name) - { - $lowerName = strtolower($name); - unset($this->headers[$lowerName]); - } - - /** - * Define a list of Header names as an array in the correct order. - * - * These Headers will be output in the given order where present. - */ - public function defineOrdering(array $sequence) - { - $this->order = array_flip(array_map('strtolower', $sequence)); - } - - /** - * Set a list of header names which must always be displayed when set. - * - * Usually headers without a field value won't be output unless set here. - */ - public function setAlwaysDisplayed(array $names) - { - $this->required = array_flip(array_map('strtolower', $names)); - } - - /** - * Notify this observer that the entity's charset has changed. - * - * @param string $charset - */ - public function charsetChanged($charset) - { - $this->setCharset($charset); - } - - /** - * Returns a string with a representation of all headers. - * - * @return string - */ - public function toString() - { - $string = ''; - $headers = $this->headers; - if ($this->canSort()) { - uksort($headers, [$this, 'sortHeaders']); - } - foreach ($headers as $collection) { - foreach ($collection as $header) { - if ($this->isDisplayed($header) || '' != $header->getFieldBody()) { - $string .= $header->toString(); - } - } - } - - return $string; - } - - /** - * Returns a string representation of this object. - * - * @return string - * - * @see toString() - */ - public function __toString() - { - return $this->toString(); - } - - /** Save a Header to the internal collection */ - private function storeHeader($name, Swift_Mime_Header $header, $offset = null) - { - if (!isset($this->headers[strtolower($name)])) { - $this->headers[strtolower($name)] = []; - } - if (!isset($offset)) { - $this->headers[strtolower($name)][] = $header; - } else { - $this->headers[strtolower($name)][$offset] = $header; - } - } - - /** Test if the headers can be sorted */ - private function canSort() - { - return count($this->order) > 0; - } - - /** uksort() algorithm for Header ordering */ - private function sortHeaders($a, $b) - { - $lowerA = strtolower($a); - $lowerB = strtolower($b); - $aPos = array_key_exists($lowerA, $this->order) ? $this->order[$lowerA] : -1; - $bPos = array_key_exists($lowerB, $this->order) ? $this->order[$lowerB] : -1; - - if (-1 === $aPos && -1 === $bPos) { - // just be sure to be determinist here - return $a > $b ? -1 : 1; - } - - if (-1 == $aPos) { - return 1; - } elseif (-1 == $bPos) { - return -1; - } - - return $aPos < $bPos ? -1 : 1; - } - - /** Test if the given Header is always displayed */ - private function isDisplayed(Swift_Mime_Header $header) - { - return array_key_exists(strtolower($header->getFieldName()), $this->required); - } - - /** Notify all Headers of the new charset */ - private function notifyHeadersOfCharset($charset) - { - foreach ($this->headers as $headerGroup) { - foreach ($headerGroup as $header) { - $header->setCharset($charset); - } - } - } - - /** - * Make a deep copy of object. - */ - public function __clone() - { - $this->factory = clone $this->factory; - foreach ($this->headers as $groupKey => $headerGroup) { - foreach ($headerGroup as $key => $header) { - $this->headers[$groupKey][$key] = clone $header; - } - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MimePart.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MimePart.php deleted file mode 100644 index 14f84324a..000000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MimePart.php +++ /dev/null @@ -1,45 +0,0 @@ -createDependenciesFor('mime.part') - ); - - if (!isset($charset)) { - $charset = Swift_DependencyContainer::getInstance() - ->lookup('properties.charset'); - } - $this->setBody($body); - $this->setCharset($charset); - if ($contentType) { - $this->setContentType($contentType); - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SendmailTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SendmailTransport.php deleted file mode 100644 index 2aa7e3261..000000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SendmailTransport.php +++ /dev/null @@ -1,33 +0,0 @@ -createDependenciesFor('transport.sendmail') - ); - - $this->setCommand($command); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php deleted file mode 100644 index e241e6786..000000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php +++ /dev/null @@ -1,42 +0,0 @@ -createDependenciesFor('transport.smtp') - ); - - $this->setHost($host); - $this->setPort($port); - $this->setEncryption($encryption); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SwiftException.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SwiftException.php deleted file mode 100644 index 15e68b18e..000000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SwiftException.php +++ /dev/null @@ -1,28 +0,0 @@ -buffer = $buf; - $this->eventDispatcher = $dispatcher; - $this->addressEncoder = $addressEncoder ?? new Swift_AddressEncoder_IdnAddressEncoder(); - $this->setLocalDomain($localDomain); - } - - /** - * Set the name of the local domain which Swift will identify itself as. - * - * This should be a fully-qualified domain name and should be truly the domain - * you're using. - * - * If your server does not have a domain name, use the IP address. This will - * automatically be wrapped in square brackets as described in RFC 5321, - * section 4.1.3. - * - * @param string $domain - * - * @return $this - */ - public function setLocalDomain($domain) - { - if ('[' !== substr($domain, 0, 1)) { - if (filter_var($domain, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { - $domain = '['.$domain.']'; - } elseif (filter_var($domain, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) { - $domain = '[IPv6:'.$domain.']'; - } - } - - $this->domain = $domain; - - return $this; - } - - /** - * Get the name of the domain Swift will identify as. - * - * If an IP address was specified, this will be returned wrapped in square - * brackets as described in RFC 5321, section 4.1.3. - * - * @return string - */ - public function getLocalDomain() - { - return $this->domain; - } - - /** - * Sets the source IP. - * - * @param string $source - */ - public function setSourceIp($source) - { - $this->sourceIp = $source; - } - - /** - * Returns the IP used to connect to the destination. - * - * @return string - */ - public function getSourceIp() - { - return $this->sourceIp; - } - - public function setAddressEncoder(Swift_AddressEncoder $addressEncoder) - { - $this->addressEncoder = $addressEncoder; - } - - public function getAddressEncoder() - { - return $this->addressEncoder; - } - - /** - * Start the SMTP connection. - */ - public function start() - { - if (!$this->started) { - if ($evt = $this->eventDispatcher->createTransportChangeEvent($this)) { - $this->eventDispatcher->dispatchEvent($evt, 'beforeTransportStarted'); - if ($evt->bubbleCancelled()) { - return; - } - } - - try { - $this->buffer->initialize($this->getBufferParams()); - } catch (Swift_TransportException $e) { - $this->throwException($e); - } - $this->readGreeting(); - $this->doHeloCommand(); - - if ($evt) { - $this->eventDispatcher->dispatchEvent($evt, 'transportStarted'); - } - - $this->started = true; - } - } - - /** - * Test if an SMTP connection has been established. - * - * @return bool - */ - public function isStarted() - { - return $this->started; - } - - /** - * Send the given Message. - * - * Recipient/sender data will be retrieved from the Message API. - * The return value is the number of recipients who were accepted for delivery. - * - * @param string[] $failedRecipients An array of failures by-reference - * - * @return int - */ - public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) - { - if (!$this->isStarted()) { - $this->start(); - } - - $sent = 0; - $failedRecipients = (array) $failedRecipients; - - if ($evt = $this->eventDispatcher->createSendEvent($this, $message)) { - $this->eventDispatcher->dispatchEvent($evt, 'beforeSendPerformed'); - if ($evt->bubbleCancelled()) { - return 0; - } - } - - if (!$reversePath = $this->getReversePath($message)) { - $this->throwException(new Swift_TransportException('Cannot send message without a sender address')); - } - - $to = (array) $message->getTo(); - $cc = (array) $message->getCc(); - $tos = array_merge($to, $cc); - $bcc = (array) $message->getBcc(); - - $message->setBcc([]); - - try { - $sent += $this->sendTo($message, $reversePath, $tos, $failedRecipients); - $sent += $this->sendBcc($message, $reversePath, $bcc, $failedRecipients); - } finally { - $message->setBcc($bcc); - } - - if ($evt) { - if ($sent == count($to) + count($cc) + count($bcc)) { - $evt->setResult(Swift_Events_SendEvent::RESULT_SUCCESS); - } elseif ($sent > 0) { - $evt->setResult(Swift_Events_SendEvent::RESULT_TENTATIVE); - } else { - $evt->setResult(Swift_Events_SendEvent::RESULT_FAILED); - } - $evt->setFailedRecipients($failedRecipients); - $this->eventDispatcher->dispatchEvent($evt, 'sendPerformed'); - } - - $message->generateId(); //Make sure a new Message ID is used - - return $sent; - } - - /** - * Stop the SMTP connection. - */ - public function stop() - { - if ($this->started) { - if ($evt = $this->eventDispatcher->createTransportChangeEvent($this)) { - $this->eventDispatcher->dispatchEvent($evt, 'beforeTransportStopped'); - if ($evt->bubbleCancelled()) { - return; - } - } - - try { - $this->executeCommand("QUIT\r\n", [221]); - } catch (Swift_TransportException $e) { - } - - try { - $this->buffer->terminate(); - - if ($evt) { - $this->eventDispatcher->dispatchEvent($evt, 'transportStopped'); - } - } catch (Swift_TransportException $e) { - $this->throwException($e); - } - } - $this->started = false; - } - - /** - * {@inheritdoc} - */ - public function ping() - { - try { - if (!$this->isStarted()) { - $this->start(); - } - - $this->executeCommand("NOOP\r\n", [250]); - } catch (Swift_TransportException $e) { - try { - $this->stop(); - } catch (Swift_TransportException $e) { - } - - return false; - } - - return true; - } - - /** - * Register a plugin. - */ - public function registerPlugin(Swift_Events_EventListener $plugin) - { - $this->eventDispatcher->bindEventListener($plugin); - } - - /** - * Reset the current mail transaction. - */ - public function reset() - { - $this->executeCommand("RSET\r\n", [250], $failures, true); - } - - /** - * Get the IoBuffer where read/writes are occurring. - * - * @return Swift_Transport_IoBuffer - */ - public function getBuffer() - { - return $this->buffer; - } - - /** - * Run a command against the buffer, expecting the given response codes. - * - * If no response codes are given, the response will not be validated. - * If codes are given, an exception will be thrown on an invalid response. - * If the command is RCPT TO, and the pipeline is non-empty, no exception - * will be thrown; instead the failing address is added to $failures. - * - * @param string $command - * @param int[] $codes - * @param string[] $failures An array of failures by-reference - * @param bool $pipeline Do not wait for response - * @param string $address The address, if command is RCPT TO. - * - * @return string|null The server response, or null if pipelining is enabled - */ - public function executeCommand($command, $codes = [], &$failures = null, $pipeline = false, $address = null) - { - $failures = (array) $failures; - $seq = $this->buffer->write($command); - if ($evt = $this->eventDispatcher->createCommandEvent($this, $command, $codes)) { - $this->eventDispatcher->dispatchEvent($evt, 'commandSent'); - } - - $this->pipeline[] = [$command, $seq, $codes, $address]; - if ($pipeline && $this->pipelining) { - $response = null; - } else { - while ($this->pipeline) { - list($command, $seq, $codes, $address) = array_shift($this->pipeline); - $response = $this->getFullResponse($seq); - try { - $this->assertResponseCode($response, $codes); - } catch (Swift_TransportException $e) { - if ($this->pipeline && $address) { - $failures[] = $address; - } else { - $this->throwException($e); - } - } - } - } - - return $response; - } - - /** Read the opening SMTP greeting */ - protected function readGreeting() - { - $this->assertResponseCode($this->getFullResponse(0), [220]); - } - - /** Send the HELO welcome */ - protected function doHeloCommand() - { - $this->executeCommand( - sprintf("HELO %s\r\n", $this->domain), [250] - ); - } - - /** Send the MAIL FROM command */ - protected function doMailFromCommand($address) - { - $address = $this->addressEncoder->encodeString($address); - $this->executeCommand( - sprintf("MAIL FROM:<%s>\r\n", $address), [250], $failures, true - ); - } - - /** Send the RCPT TO command */ - protected function doRcptToCommand($address) - { - $address = $this->addressEncoder->encodeString($address); - $this->executeCommand( - sprintf("RCPT TO:<%s>\r\n", $address), [250, 251, 252], $failures, true, $address - ); - } - - /** Send the DATA command */ - protected function doDataCommand(&$failedRecipients) - { - $this->executeCommand("DATA\r\n", [354], $failedRecipients); - } - - /** Stream the contents of the message over the buffer */ - protected function streamMessage(Swift_Mime_SimpleMessage $message) - { - $this->buffer->setWriteTranslations(["\r\n." => "\r\n.."]); - try { - $message->toByteStream($this->buffer); - $this->buffer->flushBuffers(); - } catch (Swift_TransportException $e) { - $this->throwException($e); - } - $this->buffer->setWriteTranslations([]); - $this->executeCommand("\r\n.\r\n", [250]); - } - - /** Determine the best-use reverse path for this message */ - protected function getReversePath(Swift_Mime_SimpleMessage $message) - { - $return = $message->getReturnPath(); - $sender = $message->getSender(); - $from = $message->getFrom(); - $path = null; - if (!empty($return)) { - $path = $return; - } elseif (!empty($sender)) { - // Don't use array_keys - reset($sender); // Reset Pointer to first pos - $path = key($sender); // Get key - } elseif (!empty($from)) { - reset($from); // Reset Pointer to first pos - $path = key($from); // Get key - } - - return $path; - } - - /** Throw a TransportException, first sending it to any listeners */ - protected function throwException(Swift_TransportException $e) - { - if ($evt = $this->eventDispatcher->createTransportExceptionEvent($this, $e)) { - $this->eventDispatcher->dispatchEvent($evt, 'exceptionThrown'); - if (!$evt->bubbleCancelled()) { - throw $e; - } - } else { - throw $e; - } - } - - /** Throws an Exception if a response code is incorrect */ - protected function assertResponseCode($response, $wanted) - { - if (!$response) { - $this->throwException(new Swift_TransportException('Expected response code '.implode('/', $wanted).' but got an empty response')); - } - - list($code) = sscanf($response, '%3d'); - $valid = (empty($wanted) || in_array($code, $wanted)); - - if ($evt = $this->eventDispatcher->createResponseEvent($this, $response, - $valid)) { - $this->eventDispatcher->dispatchEvent($evt, 'responseReceived'); - } - - if (!$valid) { - $this->throwException(new Swift_TransportException('Expected response code '.implode('/', $wanted).' but got code "'.$code.'", with message "'.$response.'"', $code)); - } - } - - /** Get an entire multi-line response using its sequence number */ - protected function getFullResponse($seq) - { - $response = ''; - try { - do { - $line = $this->buffer->readLine($seq); - $response .= $line; - } while (null !== $line && false !== $line && ' ' != $line[3]); - } catch (Swift_TransportException $e) { - $this->throwException($e); - } catch (Swift_IoException $e) { - $this->throwException(new Swift_TransportException($e->getMessage(), 0, $e)); - } - - return $response; - } - - /** Send an email to the given recipients from the given reverse path */ - private function doMailTransaction($message, $reversePath, array $recipients, array &$failedRecipients) - { - $sent = 0; - $this->doMailFromCommand($reversePath); - foreach ($recipients as $forwardPath) { - try { - $this->doRcptToCommand($forwardPath); - ++$sent; - } catch (Swift_TransportException $e) { - $failedRecipients[] = $forwardPath; - } catch (Swift_AddressEncoderException $e) { - $failedRecipients[] = $forwardPath; - } - } - - if (0 != $sent) { - $sent += count($failedRecipients); - $this->doDataCommand($failedRecipients); - $sent -= count($failedRecipients); - - $this->streamMessage($message); - } else { - $this->reset(); - } - - return $sent; - } - - /** Send a message to the given To: recipients */ - private function sendTo(Swift_Mime_SimpleMessage $message, $reversePath, array $to, array &$failedRecipients) - { - if (empty($to)) { - return 0; - } - - return $this->doMailTransaction($message, $reversePath, array_keys($to), - $failedRecipients); - } - - /** Send a message to all Bcc: recipients */ - private function sendBcc(Swift_Mime_SimpleMessage $message, $reversePath, array $bcc, array &$failedRecipients) - { - $sent = 0; - foreach ($bcc as $forwardPath => $name) { - $message->setBcc([$forwardPath => $name]); - $sent += $this->doMailTransaction( - $message, $reversePath, [$forwardPath], $failedRecipients - ); - } - - return $sent; - } - - /** - * Destructor. - */ - public function __destruct() - { - try { - $this->stop(); - } catch (Exception $e) { - } - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php deleted file mode 100644 index 4798dbd14..000000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php +++ /dev/null @@ -1,268 +0,0 @@ -setAuthenticators($authenticators); - } - - /** - * Set the Authenticators which can process a login request. - * - * @param Swift_Transport_Esmtp_Authenticator[] $authenticators - */ - public function setAuthenticators(array $authenticators) - { - $this->authenticators = $authenticators; - } - - /** - * Get the Authenticators which can process a login request. - * - * @return Swift_Transport_Esmtp_Authenticator[] - */ - public function getAuthenticators() - { - return $this->authenticators; - } - - /** - * Set the username to authenticate with. - * - * @param string $username - */ - public function setUsername($username) - { - $this->username = $username; - } - - /** - * Get the username to authenticate with. - * - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Set the password to authenticate with. - * - * @param string $password - */ - public function setPassword($password) - { - $this->password = $password; - } - - /** - * Get the password to authenticate with. - * - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * Set the auth mode to use to authenticate. - * - * @param string $mode - */ - public function setAuthMode($mode) - { - $this->auth_mode = $mode; - } - - /** - * Get the auth mode to use to authenticate. - * - * @return string - */ - public function getAuthMode() - { - return $this->auth_mode; - } - - /** - * Get the name of the ESMTP extension this handles. - * - * @return string - */ - public function getHandledKeyword() - { - return 'AUTH'; - } - - /** - * Set the parameters which the EHLO greeting indicated. - * - * @param string[] $parameters - */ - public function setKeywordParams(array $parameters) - { - $this->esmtpParams = $parameters; - } - - /** - * Runs immediately after a EHLO has been issued. - * - * @param Swift_Transport_SmtpAgent $agent to read/write - */ - public function afterEhlo(Swift_Transport_SmtpAgent $agent) - { - if ($this->username) { - $count = 0; - $errors = []; - foreach ($this->getAuthenticatorsForAgent() as $authenticator) { - if (in_array(strtolower($authenticator->getAuthKeyword()), array_map('strtolower', $this->esmtpParams))) { - ++$count; - try { - if ($authenticator->authenticate($agent, $this->username, $this->password)) { - return; - } - } catch (Swift_TransportException $e) { - // keep the error message, but tries the other authenticators - $errors[] = [$authenticator->getAuthKeyword(), $e]; - } - } - } - - $message = 'Failed to authenticate on SMTP server with username "'.$this->username.'" using '.$count.' possible authenticators.'; - foreach ($errors as $error) { - $message .= ' Authenticator '.$error[0].' returned '.$error[1].'.'; - } - throw new Swift_TransportException($message); - } - } - - /** - * Not used. - */ - public function getMailParams() - { - return []; - } - - /** - * Not used. - */ - public function getRcptParams() - { - return []; - } - - /** - * Not used. - */ - public function onCommand(Swift_Transport_SmtpAgent $agent, $command, $codes = [], &$failedRecipients = null, &$stop = false) - { - } - - /** - * Returns +1, -1 or 0 according to the rules for usort(). - * - * This method is called to ensure extensions can be execute in an appropriate order. - * - * @param string $esmtpKeyword to compare with - * - * @return int - */ - public function getPriorityOver($esmtpKeyword) - { - return 0; - } - - /** - * Returns an array of method names which are exposed to the Esmtp class. - * - * @return string[] - */ - public function exposeMixinMethods() - { - return ['setUsername', 'getUsername', 'setPassword', 'getPassword', 'setAuthMode', 'getAuthMode']; - } - - /** - * Not used. - */ - public function resetState() - { - } - - /** - * Returns the authenticator list for the given agent. - * - * @return array - */ - protected function getAuthenticatorsForAgent() - { - if (!$mode = strtolower($this->auth_mode)) { - return $this->authenticators; - } - - foreach ($this->authenticators as $authenticator) { - if (strtolower($authenticator->getAuthKeyword()) == $mode) { - return [$authenticator]; - } - } - - throw new Swift_TransportException('Auth mode '.$mode.' is invalid'); - } -} diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php deleted file mode 100644 index d1f1c2cf7..000000000 --- a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php +++ /dev/null @@ -1,446 +0,0 @@ - 'tcp', - 'host' => 'localhost', - 'port' => 25, - 'timeout' => 30, - 'blocking' => 1, - 'tls' => false, - 'type' => Swift_Transport_IoBuffer::TYPE_SOCKET, - 'stream_context_options' => [], - ]; - - /** - * Creates a new EsmtpTransport using the given I/O buffer. - * - * @param Swift_Transport_EsmtpHandler[] $extensionHandlers - * @param string $localDomain - */ - public function __construct(Swift_Transport_IoBuffer $buf, array $extensionHandlers, Swift_Events_EventDispatcher $dispatcher, $localDomain = '127.0.0.1', Swift_AddressEncoder $addressEncoder = null) - { - parent::__construct($buf, $dispatcher, $localDomain, $addressEncoder); - $this->setExtensionHandlers($extensionHandlers); - } - - /** - * Set the host to connect to. - * - * Literal IPv6 addresses should be wrapped in square brackets. - * - * @param string $host - * - * @return $this - */ - public function setHost($host) - { - $this->params['host'] = $host; - - return $this; - } - - /** - * Get the host to connect to. - * - * @return string - */ - public function getHost() - { - return $this->params['host']; - } - - /** - * Set the port to connect to. - * - * @param int $port - * - * @return $this - */ - public function setPort($port) - { - $this->params['port'] = (int) $port; - - return $this; - } - - /** - * Get the port to connect to. - * - * @return int - */ - public function getPort() - { - return $this->params['port']; - } - - /** - * Set the connection timeout. - * - * @param int $timeout seconds - * - * @return $this - */ - public function setTimeout($timeout) - { - $this->params['timeout'] = (int) $timeout; - $this->buffer->setParam('timeout', (int) $timeout); - - return $this; - } - - /** - * Get the connection timeout. - * - * @return int - */ - public function getTimeout() - { - return $this->params['timeout']; - } - - /** - * Set the encryption type (tls or ssl). - * - * @param string $encryption - * - * @return $this - */ - public function setEncryption($encryption) - { - $encryption = strtolower($encryption); - if ('tls' == $encryption) { - $this->params['protocol'] = 'tcp'; - $this->params['tls'] = true; - } else { - $this->params['protocol'] = $encryption; - $this->params['tls'] = false; - } - - return $this; - } - - /** - * Get the encryption type. - * - * @return string - */ - public function getEncryption() - { - return $this->params['tls'] ? 'tls' : $this->params['protocol']; - } - - /** - * Sets the stream context options. - * - * @param array $options - * - * @return $this - */ - public function setStreamOptions($options) - { - $this->params['stream_context_options'] = $options; - - return $this; - } - - /** - * Returns the stream context options. - * - * @return array - */ - public function getStreamOptions() - { - return $this->params['stream_context_options']; - } - - /** - * Sets the source IP. - * - * IPv6 addresses should be wrapped in square brackets. - * - * @param string $source - * - * @return $this - */ - public function setSourceIp($source) - { - $this->params['sourceIp'] = $source; - - return $this; - } - - /** - * Returns the IP used to connect to the destination. - * - * @return string - */ - public function getSourceIp() - { - return $this->params['sourceIp'] ?? null; - } - - /** - * Sets whether SMTP pipelining is enabled. - * - * By default, support is auto-detected using the PIPELINING SMTP extension. - * Use this function to override that in the unlikely event of compatibility - * issues. - * - * @param bool $enabled - * - * @return $this - */ - public function setPipelining($enabled) - { - $this->pipelining = $enabled; - - return $this; - } - - /** - * Returns whether SMTP pipelining is enabled. - * - * @return bool|null a boolean if pipelining is explicitly enabled or disabled, - * or null if support is auto-detected. - */ - public function getPipelining() - { - return $this->pipelining; - } - - /** - * Set ESMTP extension handlers. - * - * @param Swift_Transport_EsmtpHandler[] $handlers - * - * @return $this - */ - public function setExtensionHandlers(array $handlers) - { - $assoc = []; - foreach ($handlers as $handler) { - $assoc[$handler->getHandledKeyword()] = $handler; - } - uasort($assoc, function ($a, $b) { - return $a->getPriorityOver($b->getHandledKeyword()); - }); - $this->handlers = $assoc; - $this->setHandlerParams(); - - return $this; - } - - /** - * Get ESMTP extension handlers. - * - * @return Swift_Transport_EsmtpHandler[] - */ - public function getExtensionHandlers() - { - return array_values($this->handlers); - } - - /** - * Run a command against the buffer, expecting the given response codes. - * - * If no response codes are given, the response will not be validated. - * If codes are given, an exception will be thrown on an invalid response. - * - * @param string $command - * @param int[] $codes - * @param string[] $failures An array of failures by-reference - * @param bool $pipeline Do not wait for response - * @param string $address The address, if command is RCPT TO. - * - * @return string|null The server response, or null if pipelining is enabled - */ - public function executeCommand($command, $codes = [], &$failures = null, $pipeline = false, $address = null) - { - $failures = (array) $failures; - $stopSignal = false; - $response = null; - foreach ($this->getActiveHandlers() as $handler) { - $response = $handler->onCommand( - $this, $command, $codes, $failures, $stopSignal - ); - if ($stopSignal) { - return $response; - } - } - - return parent::executeCommand($command, $codes, $failures, $pipeline, $address); - } - - /** Mixin handling method for ESMTP handlers */ - public function __call($method, $args) - { - foreach ($this->handlers as $handler) { - if (in_array(strtolower($method), - array_map('strtolower', (array) $handler->exposeMixinMethods()) - )) { - $return = call_user_func_array([$handler, $method], $args); - // Allow fluid method calls - if (null === $return && 'set' == substr($method, 0, 3)) { - return $this; - } else { - return $return; - } - } - } - trigger_error('Call to undefined method '.$method, E_USER_ERROR); - } - - /** Get the params to initialize the buffer */ - protected function getBufferParams() - { - return $this->params; - } - - /** Overridden to perform EHLO instead */ - protected function doHeloCommand() - { - try { - $response = $this->executeCommand( - sprintf("EHLO %s\r\n", $this->domain), [250] - ); - } catch (Swift_TransportException $e) { - return parent::doHeloCommand(); - } - - if ($this->params['tls']) { - try { - $this->executeCommand("STARTTLS\r\n", [220]); - - if (!$this->buffer->startTLS()) { - throw new Swift_TransportException('Unable to connect with TLS encryption'); - } - - try { - $response = $this->executeCommand( - sprintf("EHLO %s\r\n", $this->domain), [250] - ); - } catch (Swift_TransportException $e) { - return parent::doHeloCommand(); - } - } catch (Swift_TransportException $e) { - $this->throwException($e); - } - } - - $this->capabilities = $this->getCapabilities($response); - if (!isset($this->pipelining)) { - $this->pipelining = isset($this->capabilities['PIPELINING']); - } - - $this->setHandlerParams(); - foreach ($this->getActiveHandlers() as $handler) { - $handler->afterEhlo($this); - } - } - - /** Overridden to add Extension support */ - protected function doMailFromCommand($address) - { - $address = $this->addressEncoder->encodeString($address); - $handlers = $this->getActiveHandlers(); - $params = []; - foreach ($handlers as $handler) { - $params = array_merge($params, (array) $handler->getMailParams()); - } - $paramStr = !empty($params) ? ' '.implode(' ', $params) : ''; - $this->executeCommand( - sprintf("MAIL FROM:<%s>%s\r\n", $address, $paramStr), [250], $failures, true - ); - } - - /** Overridden to add Extension support */ - protected function doRcptToCommand($address) - { - $address = $this->addressEncoder->encodeString($address); - $handlers = $this->getActiveHandlers(); - $params = []; - foreach ($handlers as $handler) { - $params = array_merge($params, (array) $handler->getRcptParams()); - } - $paramStr = !empty($params) ? ' '.implode(' ', $params) : ''; - $this->executeCommand( - sprintf("RCPT TO:<%s>%s\r\n", $address, $paramStr), [250, 251, 252], $failures, true, $address - ); - } - - /** Determine ESMTP capabilities by function group */ - private function getCapabilities($ehloResponse) - { - $capabilities = []; - $ehloResponse = trim($ehloResponse); - $lines = explode("\r\n", $ehloResponse); - array_shift($lines); - foreach ($lines as $line) { - if (preg_match('/^[0-9]{3}[ -]([A-Z0-9-]+)((?:[ =].*)?)$/Di', $line, $matches)) { - $keyword = strtoupper($matches[1]); - $paramStr = strtoupper(ltrim($matches[2], ' =')); - $params = !empty($paramStr) ? explode(' ', $paramStr) : []; - $capabilities[$keyword] = $params; - } - } - - return $capabilities; - } - - /** Set parameters which are used by each extension handler */ - private function setHandlerParams() - { - foreach ($this->handlers as $keyword => $handler) { - if (array_key_exists($keyword, $this->capabilities)) { - $handler->setKeywordParams($this->capabilities[$keyword]); - } - } - } - - /** Get ESMTP handlers which are currently ok to use */ - private function getActiveHandlers() - { - $handlers = []; - foreach ($this->handlers as $keyword => $handler) { - if (array_key_exists($keyword, $this->capabilities)) { - $handlers[] = $handler; - } - } - - return $handlers; - } -} diff --git a/vendor/symfony/console/Application.php b/vendor/symfony/console/Application.php deleted file mode 100644 index e9e3defa1..000000000 --- a/vendor/symfony/console/Application.php +++ /dev/null @@ -1,1276 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Command\HelpCommand; -use Symfony\Component\Console\Command\ListCommand; -use Symfony\Component\Console\CommandLoader\CommandLoaderInterface; -use Symfony\Component\Console\Event\ConsoleCommandEvent; -use Symfony\Component\Console\Event\ConsoleErrorEvent; -use Symfony\Component\Console\Event\ConsoleExceptionEvent; -use Symfony\Component\Console\Event\ConsoleTerminateEvent; -use Symfony\Component\Console\Exception\CommandNotFoundException; -use Symfony\Component\Console\Exception\ExceptionInterface; -use Symfony\Component\Console\Exception\LogicException; -use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Helper\DebugFormatterHelper; -use Symfony\Component\Console\Helper\FormatterHelper; -use Symfony\Component\Console\Helper\Helper; -use Symfony\Component\Console\Helper\HelperSet; -use Symfony\Component\Console\Helper\ProcessHelper; -use Symfony\Component\Console\Helper\QuestionHelper; -use Symfony\Component\Console\Input\ArgvInput; -use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputAwareInterface; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Input\StreamableInputInterface; -use Symfony\Component\Console\Output\ConsoleOutput; -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Debug\ErrorHandler; -use Symfony\Component\Debug\Exception\FatalThrowableError; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; - -/** - * An Application is the container for a collection of commands. - * - * It is the main entry point of a Console application. - * - * This class is optimized for a standard CLI environment. - * - * Usage: - * - * $app = new Application('myapp', '1.0 (stable)'); - * $app->add(new SimpleCommand()); - * $app->run(); - * - * @author Fabien Potencier - */ -class Application -{ - private $commands = []; - private $wantHelps = false; - private $runningCommand; - private $name; - private $version; - private $commandLoader; - private $catchExceptions = true; - private $autoExit = true; - private $definition; - private $helperSet; - private $dispatcher; - private $terminal; - private $defaultCommand; - private $singleCommand = false; - private $initialized; - - /** - * @param string $name The name of the application - * @param string $version The version of the application - */ - public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN') - { - $this->name = $name; - $this->version = $version; - $this->terminal = new Terminal(); - $this->defaultCommand = 'list'; - } - - public function setDispatcher(EventDispatcherInterface $dispatcher) - { - $this->dispatcher = $dispatcher; - } - - public function setCommandLoader(CommandLoaderInterface $commandLoader) - { - $this->commandLoader = $commandLoader; - } - - /** - * Runs the current application. - * - * @return int 0 if everything went fine, or an error code - * - * @throws \Exception When running fails. Bypass this when {@link setCatchExceptions()}. - */ - public function run(InputInterface $input = null, OutputInterface $output = null) - { - putenv('LINES='.$this->terminal->getHeight()); - putenv('COLUMNS='.$this->terminal->getWidth()); - - if (null === $input) { - $input = new ArgvInput(); - } - - if (null === $output) { - $output = new ConsoleOutput(); - } - - $renderException = function ($e) use ($output) { - if (!$e instanceof \Exception) { - $e = class_exists(FatalThrowableError::class) ? new FatalThrowableError($e) : new \ErrorException($e->getMessage(), $e->getCode(), \E_ERROR, $e->getFile(), $e->getLine()); - } - if ($output instanceof ConsoleOutputInterface) { - $this->renderException($e, $output->getErrorOutput()); - } else { - $this->renderException($e, $output); - } - }; - if ($phpHandler = set_exception_handler($renderException)) { - restore_exception_handler(); - if (!\is_array($phpHandler) || !$phpHandler[0] instanceof ErrorHandler) { - $debugHandler = true; - } elseif ($debugHandler = $phpHandler[0]->setExceptionHandler($renderException)) { - $phpHandler[0]->setExceptionHandler($debugHandler); - } - } - - if (null !== $this->dispatcher && $this->dispatcher->hasListeners(ConsoleEvents::EXCEPTION)) { - @trigger_error(sprintf('The "ConsoleEvents::EXCEPTION" event is deprecated since Symfony 3.3 and will be removed in 4.0. Listen to the "ConsoleEvents::ERROR" event instead.'), \E_USER_DEPRECATED); - } - - $this->configureIO($input, $output); - - try { - $exitCode = $this->doRun($input, $output); - } catch (\Exception $e) { - if (!$this->catchExceptions) { - throw $e; - } - - $renderException($e); - - $exitCode = $e->getCode(); - if (is_numeric($exitCode)) { - $exitCode = (int) $exitCode; - if (0 === $exitCode) { - $exitCode = 1; - } - } else { - $exitCode = 1; - } - } finally { - // if the exception handler changed, keep it - // otherwise, unregister $renderException - if (!$phpHandler) { - if (set_exception_handler($renderException) === $renderException) { - restore_exception_handler(); - } - restore_exception_handler(); - } elseif (!$debugHandler) { - $finalHandler = $phpHandler[0]->setExceptionHandler(null); - if ($finalHandler !== $renderException) { - $phpHandler[0]->setExceptionHandler($finalHandler); - } - } - } - - if ($this->autoExit) { - if ($exitCode > 255) { - $exitCode = 255; - } - - exit($exitCode); - } - - return $exitCode; - } - - /** - * Runs the current application. - * - * @return int 0 if everything went fine, or an error code - */ - public function doRun(InputInterface $input, OutputInterface $output) - { - if (true === $input->hasParameterOption(['--version', '-V'], true)) { - $output->writeln($this->getLongVersion()); - - return 0; - } - - try { - // Makes ArgvInput::getFirstArgument() able to distinguish an option from an argument. - $input->bind($this->getDefinition()); - } catch (ExceptionInterface $e) { - // Errors must be ignored, full binding/validation happens later when the command is known. - } - - $name = $this->getCommandName($input); - if (true === $input->hasParameterOption(['--help', '-h'], true)) { - if (!$name) { - $name = 'help'; - $input = new ArrayInput(['command_name' => $this->defaultCommand]); - } else { - $this->wantHelps = true; - } - } - - if (!$name) { - $name = $this->defaultCommand; - $definition = $this->getDefinition(); - $definition->setArguments(array_merge( - $definition->getArguments(), - [ - 'command' => new InputArgument('command', InputArgument::OPTIONAL, $definition->getArgument('command')->getDescription(), $name), - ] - )); - } - - try { - $e = $this->runningCommand = null; - // the command name MUST be the first element of the input - $command = $this->find($name); - } catch (\Exception $e) { - } catch (\Throwable $e) { - } - if (null !== $e) { - if (null !== $this->dispatcher) { - $event = new ConsoleErrorEvent($input, $output, $e); - $this->dispatcher->dispatch(ConsoleEvents::ERROR, $event); - $e = $event->getError(); - - if (0 === $event->getExitCode()) { - return 0; - } - } - - throw $e; - } - - $this->runningCommand = $command; - $exitCode = $this->doRunCommand($command, $input, $output); - $this->runningCommand = null; - - return $exitCode; - } - - public function setHelperSet(HelperSet $helperSet) - { - $this->helperSet = $helperSet; - } - - /** - * Get the helper set associated with the command. - * - * @return HelperSet The HelperSet instance associated with this command - */ - public function getHelperSet() - { - if (!$this->helperSet) { - $this->helperSet = $this->getDefaultHelperSet(); - } - - return $this->helperSet; - } - - public function setDefinition(InputDefinition $definition) - { - $this->definition = $definition; - } - - /** - * Gets the InputDefinition related to this Application. - * - * @return InputDefinition The InputDefinition instance - */ - public function getDefinition() - { - if (!$this->definition) { - $this->definition = $this->getDefaultInputDefinition(); - } - - if ($this->singleCommand) { - $inputDefinition = $this->definition; - $inputDefinition->setArguments(); - - return $inputDefinition; - } - - return $this->definition; - } - - /** - * Gets the help message. - * - * @return string A help message - */ - public function getHelp() - { - return $this->getLongVersion(); - } - - /** - * Gets whether to catch exceptions or not during commands execution. - * - * @return bool Whether to catch exceptions or not during commands execution - */ - public function areExceptionsCaught() - { - return $this->catchExceptions; - } - - /** - * Sets whether to catch exceptions or not during commands execution. - * - * @param bool $boolean Whether to catch exceptions or not during commands execution - */ - public function setCatchExceptions($boolean) - { - $this->catchExceptions = (bool) $boolean; - } - - /** - * Gets whether to automatically exit after a command execution or not. - * - * @return bool Whether to automatically exit after a command execution or not - */ - public function isAutoExitEnabled() - { - return $this->autoExit; - } - - /** - * Sets whether to automatically exit after a command execution or not. - * - * @param bool $boolean Whether to automatically exit after a command execution or not - */ - public function setAutoExit($boolean) - { - $this->autoExit = (bool) $boolean; - } - - /** - * Gets the name of the application. - * - * @return string The application name - */ - public function getName() - { - return $this->name; - } - - /** - * Sets the application name. - * - * @param string $name The application name - */ - public function setName($name) - { - $this->name = $name; - } - - /** - * Gets the application version. - * - * @return string The application version - */ - public function getVersion() - { - return $this->version; - } - - /** - * Sets the application version. - * - * @param string $version The application version - */ - public function setVersion($version) - { - $this->version = $version; - } - - /** - * Returns the long version of the application. - * - * @return string The long application version - */ - public function getLongVersion() - { - if ('UNKNOWN' !== $this->getName()) { - if ('UNKNOWN' !== $this->getVersion()) { - return sprintf('%s %s', $this->getName(), $this->getVersion()); - } - - return $this->getName(); - } - - return 'Console Tool'; - } - - /** - * Registers a new command. - * - * @param string $name The command name - * - * @return Command The newly created command - */ - public function register($name) - { - return $this->add(new Command($name)); - } - - /** - * Adds an array of command objects. - * - * If a Command is not enabled it will not be added. - * - * @param Command[] $commands An array of commands - */ - public function addCommands(array $commands) - { - foreach ($commands as $command) { - $this->add($command); - } - } - - /** - * Adds a command object. - * - * If a command with the same name already exists, it will be overridden. - * If the command is not enabled it will not be added. - * - * @return Command|null The registered command if enabled or null - */ - public function add(Command $command) - { - $this->init(); - - $command->setApplication($this); - - if (!$command->isEnabled()) { - $command->setApplication(null); - - return null; - } - - // Will throw if the command is not correctly initialized. - $command->getDefinition(); - - if (!$command->getName()) { - throw new LogicException(sprintf('The command defined in "%s" cannot have an empty name.', \get_class($command))); - } - - $this->commands[$command->getName()] = $command; - - foreach ($command->getAliases() as $alias) { - $this->commands[$alias] = $command; - } - - return $command; - } - - /** - * Returns a registered command by name or alias. - * - * @param string $name The command name or alias - * - * @return Command A Command object - * - * @throws CommandNotFoundException When given command name does not exist - */ - public function get($name) - { - $this->init(); - - if (!$this->has($name)) { - throw new CommandNotFoundException(sprintf('The command "%s" does not exist.', $name)); - } - - // When the command has a different name than the one used at the command loader level - if (!isset($this->commands[$name])) { - throw new CommandNotFoundException(sprintf('The "%s" command cannot be found because it is registered under multiple names. Make sure you don\'t set a different name via constructor or "setName()".', $name)); - } - - $command = $this->commands[$name]; - - if ($this->wantHelps) { - $this->wantHelps = false; - - $helpCommand = $this->get('help'); - $helpCommand->setCommand($command); - - return $helpCommand; - } - - return $command; - } - - /** - * Returns true if the command exists, false otherwise. - * - * @param string $name The command name or alias - * - * @return bool true if the command exists, false otherwise - */ - public function has($name) - { - $this->init(); - - return isset($this->commands[$name]) || ($this->commandLoader && $this->commandLoader->has($name) && $this->add($this->commandLoader->get($name))); - } - - /** - * Returns an array of all unique namespaces used by currently registered commands. - * - * It does not return the global namespace which always exists. - * - * @return string[] An array of namespaces - */ - public function getNamespaces() - { - $namespaces = []; - foreach ($this->all() as $command) { - if ($command->isHidden()) { - continue; - } - - $namespaces = array_merge($namespaces, $this->extractAllNamespaces($command->getName())); - - foreach ($command->getAliases() as $alias) { - $namespaces = array_merge($namespaces, $this->extractAllNamespaces($alias)); - } - } - - return array_values(array_unique(array_filter($namespaces))); - } - - /** - * Finds a registered namespace by a name or an abbreviation. - * - * @param string $namespace A namespace or abbreviation to search for - * - * @return string A registered namespace - * - * @throws CommandNotFoundException When namespace is incorrect or ambiguous - */ - public function findNamespace($namespace) - { - $allNamespaces = $this->getNamespaces(); - $expr = preg_replace_callback('{([^:]+|)}', function ($matches) { return preg_quote($matches[1]).'[^:]*'; }, $namespace); - $namespaces = preg_grep('{^'.$expr.'}', $allNamespaces); - - if (empty($namespaces)) { - $message = sprintf('There are no commands defined in the "%s" namespace.', $namespace); - - if ($alternatives = $this->findAlternatives($namespace, $allNamespaces)) { - if (1 == \count($alternatives)) { - $message .= "\n\nDid you mean this?\n "; - } else { - $message .= "\n\nDid you mean one of these?\n "; - } - - $message .= implode("\n ", $alternatives); - } - - throw new CommandNotFoundException($message, $alternatives); - } - - $exact = \in_array($namespace, $namespaces, true); - if (\count($namespaces) > 1 && !$exact) { - throw new CommandNotFoundException(sprintf("The namespace \"%s\" is ambiguous.\nDid you mean one of these?\n%s.", $namespace, $this->getAbbreviationSuggestions(array_values($namespaces))), array_values($namespaces)); - } - - return $exact ? $namespace : reset($namespaces); - } - - /** - * Finds a command by name or alias. - * - * Contrary to get, this command tries to find the best - * match if you give it an abbreviation of a name or alias. - * - * @param string $name A command name or a command alias - * - * @return Command A Command instance - * - * @throws CommandNotFoundException When command name is incorrect or ambiguous - */ - public function find($name) - { - $this->init(); - - $aliases = []; - - foreach ($this->commands as $command) { - foreach ($command->getAliases() as $alias) { - if (!$this->has($alias)) { - $this->commands[$alias] = $command; - } - } - } - - if ($this->has($name)) { - return $this->get($name); - } - - $allCommands = $this->commandLoader ? array_merge($this->commandLoader->getNames(), array_keys($this->commands)) : array_keys($this->commands); - $expr = preg_replace_callback('{([^:]+|)}', function ($matches) { return preg_quote($matches[1]).'[^:]*'; }, $name); - $commands = preg_grep('{^'.$expr.'}', $allCommands); - - if (empty($commands)) { - $commands = preg_grep('{^'.$expr.'}i', $allCommands); - } - - // if no commands matched or we just matched namespaces - if (empty($commands) || \count(preg_grep('{^'.$expr.'$}i', $commands)) < 1) { - if (false !== $pos = strrpos($name, ':')) { - // check if a namespace exists and contains commands - $this->findNamespace(substr($name, 0, $pos)); - } - - $message = sprintf('Command "%s" is not defined.', $name); - - if ($alternatives = $this->findAlternatives($name, $allCommands)) { - // remove hidden commands - $alternatives = array_filter($alternatives, function ($name) { - return !$this->get($name)->isHidden(); - }); - - if (1 == \count($alternatives)) { - $message .= "\n\nDid you mean this?\n "; - } else { - $message .= "\n\nDid you mean one of these?\n "; - } - $message .= implode("\n ", $alternatives); - } - - throw new CommandNotFoundException($message, array_values($alternatives)); - } - - // filter out aliases for commands which are already on the list - if (\count($commands) > 1) { - $commandList = $this->commandLoader ? array_merge(array_flip($this->commandLoader->getNames()), $this->commands) : $this->commands; - $commands = array_unique(array_filter($commands, function ($nameOrAlias) use (&$commandList, $commands, &$aliases) { - if (!$commandList[$nameOrAlias] instanceof Command) { - $commandList[$nameOrAlias] = $this->commandLoader->get($nameOrAlias); - } - - $commandName = $commandList[$nameOrAlias]->getName(); - - $aliases[$nameOrAlias] = $commandName; - - return $commandName === $nameOrAlias || !\in_array($commandName, $commands); - })); - } - - $exact = \in_array($name, $commands, true) || isset($aliases[$name]); - if (\count($commands) > 1 && !$exact) { - $usableWidth = $this->terminal->getWidth() - 10; - $abbrevs = array_values($commands); - $maxLen = 0; - foreach ($abbrevs as $abbrev) { - $maxLen = max(Helper::strlen($abbrev), $maxLen); - } - $abbrevs = array_map(function ($cmd) use ($commandList, $usableWidth, $maxLen) { - if ($commandList[$cmd]->isHidden()) { - return false; - } - - $abbrev = str_pad($cmd, $maxLen, ' ').' '.$commandList[$cmd]->getDescription(); - - return Helper::strlen($abbrev) > $usableWidth ? Helper::substr($abbrev, 0, $usableWidth - 3).'...' : $abbrev; - }, array_values($commands)); - $suggestions = $this->getAbbreviationSuggestions(array_filter($abbrevs)); - - throw new CommandNotFoundException(sprintf("Command \"%s\" is ambiguous.\nDid you mean one of these?\n%s.", $name, $suggestions), array_values($commands)); - } - - return $this->get($exact ? $name : reset($commands)); - } - - /** - * Gets the commands (registered in the given namespace if provided). - * - * The array keys are the full names and the values the command instances. - * - * @param string $namespace A namespace name - * - * @return Command[] An array of Command instances - */ - public function all($namespace = null) - { - $this->init(); - - if (null === $namespace) { - if (!$this->commandLoader) { - return $this->commands; - } - - $commands = $this->commands; - foreach ($this->commandLoader->getNames() as $name) { - if (!isset($commands[$name]) && $this->has($name)) { - $commands[$name] = $this->get($name); - } - } - - return $commands; - } - - $commands = []; - foreach ($this->commands as $name => $command) { - if ($namespace === $this->extractNamespace($name, substr_count($namespace, ':') + 1)) { - $commands[$name] = $command; - } - } - - if ($this->commandLoader) { - foreach ($this->commandLoader->getNames() as $name) { - if (!isset($commands[$name]) && $namespace === $this->extractNamespace($name, substr_count($namespace, ':') + 1) && $this->has($name)) { - $commands[$name] = $this->get($name); - } - } - } - - return $commands; - } - - /** - * Returns an array of possible abbreviations given a set of names. - * - * @param array $names An array of names - * - * @return array An array of abbreviations - */ - public static function getAbbreviations($names) - { - $abbrevs = []; - foreach ($names as $name) { - for ($len = \strlen($name); $len > 0; --$len) { - $abbrev = substr($name, 0, $len); - $abbrevs[$abbrev][] = $name; - } - } - - return $abbrevs; - } - - /** - * Renders a caught exception. - */ - public function renderException(\Exception $e, OutputInterface $output) - { - $output->writeln('', OutputInterface::VERBOSITY_QUIET); - - $this->doRenderException($e, $output); - - if (null !== $this->runningCommand) { - $output->writeln(sprintf('%s', sprintf($this->runningCommand->getSynopsis(), $this->getName())), OutputInterface::VERBOSITY_QUIET); - $output->writeln('', OutputInterface::VERBOSITY_QUIET); - } - } - - protected function doRenderException(\Exception $e, OutputInterface $output) - { - do { - $message = trim($e->getMessage()); - if ('' === $message || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { - $title = sprintf(' [%s%s] ', \get_class($e), 0 !== ($code = $e->getCode()) ? ' ('.$code.')' : ''); - $len = Helper::strlen($title); - } else { - $len = 0; - } - - $width = $this->terminal->getWidth() ? $this->terminal->getWidth() - 1 : \PHP_INT_MAX; - // HHVM only accepts 32 bits integer in str_split, even when PHP_INT_MAX is a 64 bit integer: https://github.com/facebook/hhvm/issues/1327 - if (\defined('HHVM_VERSION') && $width > 1 << 31) { - $width = 1 << 31; - } - $lines = []; - foreach ('' !== $message ? preg_split('/\r?\n/', $message) : [] as $line) { - foreach ($this->splitStringByWidth($line, $width - 4) as $line) { - // pre-format lines to get the right string length - $lineLength = Helper::strlen($line) + 4; - $lines[] = [$line, $lineLength]; - - $len = max($lineLength, $len); - } - } - - $messages = []; - if (!$e instanceof ExceptionInterface || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { - $messages[] = sprintf('%s', OutputFormatter::escape(sprintf('In %s line %s:', basename($e->getFile()) ?: 'n/a', $e->getLine() ?: 'n/a'))); - } - $messages[] = $emptyLine = sprintf('%s', str_repeat(' ', $len)); - if ('' === $message || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { - $messages[] = sprintf('%s%s', $title, str_repeat(' ', max(0, $len - Helper::strlen($title)))); - } - foreach ($lines as $line) { - $messages[] = sprintf(' %s %s', OutputFormatter::escape($line[0]), str_repeat(' ', $len - $line[1])); - } - $messages[] = $emptyLine; - $messages[] = ''; - - $output->writeln($messages, OutputInterface::VERBOSITY_QUIET); - - if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { - $output->writeln('Exception trace:', OutputInterface::VERBOSITY_QUIET); - - // exception related properties - $trace = $e->getTrace(); - - array_unshift($trace, [ - 'function' => '', - 'file' => $e->getFile() ?: 'n/a', - 'line' => $e->getLine() ?: 'n/a', - 'args' => [], - ]); - - for ($i = 0, $count = \count($trace); $i < $count; ++$i) { - $class = isset($trace[$i]['class']) ? $trace[$i]['class'] : ''; - $type = isset($trace[$i]['type']) ? $trace[$i]['type'] : ''; - $function = isset($trace[$i]['function']) ? $trace[$i]['function'] : ''; - $file = isset($trace[$i]['file']) ? $trace[$i]['file'] : 'n/a'; - $line = isset($trace[$i]['line']) ? $trace[$i]['line'] : 'n/a'; - - $output->writeln(sprintf(' %s%s at %s:%s', $class, $function ? $type.$function.'()' : '', $file, $line), OutputInterface::VERBOSITY_QUIET); - } - - $output->writeln('', OutputInterface::VERBOSITY_QUIET); - } - } while ($e = $e->getPrevious()); - } - - /** - * Tries to figure out the terminal width in which this application runs. - * - * @return int|null - * - * @deprecated since version 3.2, to be removed in 4.0. Create a Terminal instance instead. - */ - protected function getTerminalWidth() - { - @trigger_error(sprintf('The "%s()" method is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), \E_USER_DEPRECATED); - - return $this->terminal->getWidth(); - } - - /** - * Tries to figure out the terminal height in which this application runs. - * - * @return int|null - * - * @deprecated since version 3.2, to be removed in 4.0. Create a Terminal instance instead. - */ - protected function getTerminalHeight() - { - @trigger_error(sprintf('The "%s()" method is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), \E_USER_DEPRECATED); - - return $this->terminal->getHeight(); - } - - /** - * Tries to figure out the terminal dimensions based on the current environment. - * - * @return array Array containing width and height - * - * @deprecated since version 3.2, to be removed in 4.0. Create a Terminal instance instead. - */ - public function getTerminalDimensions() - { - @trigger_error(sprintf('The "%s()" method is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), \E_USER_DEPRECATED); - - return [$this->terminal->getWidth(), $this->terminal->getHeight()]; - } - - /** - * Sets terminal dimensions. - * - * Can be useful to force terminal dimensions for functional tests. - * - * @param int $width The width - * @param int $height The height - * - * @return $this - * - * @deprecated since version 3.2, to be removed in 4.0. Set the COLUMNS and LINES env vars instead. - */ - public function setTerminalDimensions($width, $height) - { - @trigger_error(sprintf('The "%s()" method is deprecated as of 3.2 and will be removed in 4.0. Set the COLUMNS and LINES env vars instead.', __METHOD__), \E_USER_DEPRECATED); - - putenv('COLUMNS='.$width); - putenv('LINES='.$height); - - return $this; - } - - /** - * Configures the input and output instances based on the user arguments and options. - */ - protected function configureIO(InputInterface $input, OutputInterface $output) - { - if (true === $input->hasParameterOption(['--ansi'], true)) { - $output->setDecorated(true); - } elseif (true === $input->hasParameterOption(['--no-ansi'], true)) { - $output->setDecorated(false); - } - - if (true === $input->hasParameterOption(['--no-interaction', '-n'], true)) { - $input->setInteractive(false); - } elseif (\function_exists('posix_isatty')) { - $inputStream = null; - - if ($input instanceof StreamableInputInterface) { - $inputStream = $input->getStream(); - } - - // This check ensures that calling QuestionHelper::setInputStream() works - // To be removed in 4.0 (in the same time as QuestionHelper::setInputStream) - if (!$inputStream && $this->getHelperSet()->has('question')) { - $inputStream = $this->getHelperSet()->get('question')->getInputStream(false); - } - - if (!@posix_isatty($inputStream) && false === getenv('SHELL_INTERACTIVE')) { - $input->setInteractive(false); - } - } - - switch ($shellVerbosity = (int) getenv('SHELL_VERBOSITY')) { - case -1: $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); break; - case 1: $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); break; - case 2: $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE); break; - case 3: $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG); break; - default: $shellVerbosity = 0; break; - } - - if (true === $input->hasParameterOption(['--quiet', '-q'], true)) { - $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); - $shellVerbosity = -1; - } else { - if ($input->hasParameterOption('-vvv', true) || $input->hasParameterOption('--verbose=3', true) || 3 === $input->getParameterOption('--verbose', false, true)) { - $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG); - $shellVerbosity = 3; - } elseif ($input->hasParameterOption('-vv', true) || $input->hasParameterOption('--verbose=2', true) || 2 === $input->getParameterOption('--verbose', false, true)) { - $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE); - $shellVerbosity = 2; - } elseif ($input->hasParameterOption('-v', true) || $input->hasParameterOption('--verbose=1', true) || $input->hasParameterOption('--verbose', true) || $input->getParameterOption('--verbose', false, true)) { - $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); - $shellVerbosity = 1; - } - } - - if (-1 === $shellVerbosity) { - $input->setInteractive(false); - } - - putenv('SHELL_VERBOSITY='.$shellVerbosity); - $_ENV['SHELL_VERBOSITY'] = $shellVerbosity; - $_SERVER['SHELL_VERBOSITY'] = $shellVerbosity; - } - - /** - * Runs the current command. - * - * If an event dispatcher has been attached to the application, - * events are also dispatched during the life-cycle of the command. - * - * @return int 0 if everything went fine, or an error code - */ - protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output) - { - foreach ($command->getHelperSet() as $helper) { - if ($helper instanceof InputAwareInterface) { - $helper->setInput($input); - } - } - - if (null === $this->dispatcher) { - return $command->run($input, $output); - } - - // bind before the console.command event, so the listeners have access to input options/arguments - try { - $command->mergeApplicationDefinition(); - $input->bind($command->getDefinition()); - } catch (ExceptionInterface $e) { - // ignore invalid options/arguments for now, to allow the event listeners to customize the InputDefinition - } - - $event = new ConsoleCommandEvent($command, $input, $output); - $e = null; - - try { - $this->dispatcher->dispatch(ConsoleEvents::COMMAND, $event); - - if ($event->commandShouldRun()) { - $exitCode = $command->run($input, $output); - } else { - $exitCode = ConsoleCommandEvent::RETURN_CODE_DISABLED; - } - } catch (\Exception $e) { - } catch (\Throwable $e) { - } - if (null !== $e) { - if ($this->dispatcher->hasListeners(ConsoleEvents::EXCEPTION)) { - $x = $e instanceof \Exception ? $e : new FatalThrowableError($e); - $event = new ConsoleExceptionEvent($command, $input, $output, $x, $x->getCode()); - $this->dispatcher->dispatch(ConsoleEvents::EXCEPTION, $event); - - if ($x !== $event->getException()) { - $e = $event->getException(); - } - } - $event = new ConsoleErrorEvent($input, $output, $e, $command); - $this->dispatcher->dispatch(ConsoleEvents::ERROR, $event); - $e = $event->getError(); - - if (0 === $exitCode = $event->getExitCode()) { - $e = null; - } - } - - $event = new ConsoleTerminateEvent($command, $input, $output, $exitCode); - $this->dispatcher->dispatch(ConsoleEvents::TERMINATE, $event); - - if (null !== $e) { - throw $e; - } - - return $event->getExitCode(); - } - - /** - * Gets the name of the command based on input. - * - * @return string|null - */ - protected function getCommandName(InputInterface $input) - { - return $this->singleCommand ? $this->defaultCommand : $input->getFirstArgument(); - } - - /** - * Gets the default input definition. - * - * @return InputDefinition An InputDefinition instance - */ - protected function getDefaultInputDefinition() - { - return new InputDefinition([ - new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'), - - new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'), - new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message'), - new InputOption('--verbose', '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug'), - new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version'), - new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output'), - new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output'), - new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question'), - ]); - } - - /** - * Gets the default commands that should always be available. - * - * @return Command[] An array of default Command instances - */ - protected function getDefaultCommands() - { - return [new HelpCommand(), new ListCommand()]; - } - - /** - * Gets the default helper set with the helpers that should always be available. - * - * @return HelperSet A HelperSet instance - */ - protected function getDefaultHelperSet() - { - return new HelperSet([ - new FormatterHelper(), - new DebugFormatterHelper(), - new ProcessHelper(), - new QuestionHelper(), - ]); - } - - /** - * Returns abbreviated suggestions in string format. - * - * @param array $abbrevs Abbreviated suggestions to convert - * - * @return string A formatted string of abbreviated suggestions - */ - private function getAbbreviationSuggestions($abbrevs) - { - return ' '.implode("\n ", $abbrevs); - } - - /** - * Returns the namespace part of the command name. - * - * This method is not part of public API and should not be used directly. - * - * @param string $name The full name of the command - * @param string $limit The maximum number of parts of the namespace - * - * @return string The namespace of the command - */ - public function extractNamespace($name, $limit = null) - { - $parts = explode(':', $name, -1); - - return implode(':', null === $limit ? $parts : \array_slice($parts, 0, $limit)); - } - - /** - * Finds alternative of $name among $collection, - * if nothing is found in $collection, try in $abbrevs. - * - * @param string $name The string - * @param iterable $collection The collection - * - * @return string[] A sorted array of similar string - */ - private function findAlternatives($name, $collection) - { - $threshold = 1e3; - $alternatives = []; - - $collectionParts = []; - foreach ($collection as $item) { - $collectionParts[$item] = explode(':', $item); - } - - foreach (explode(':', $name) as $i => $subname) { - foreach ($collectionParts as $collectionName => $parts) { - $exists = isset($alternatives[$collectionName]); - if (!isset($parts[$i]) && $exists) { - $alternatives[$collectionName] += $threshold; - continue; - } elseif (!isset($parts[$i])) { - continue; - } - - $lev = levenshtein($subname, $parts[$i]); - if ($lev <= \strlen($subname) / 3 || '' !== $subname && false !== strpos($parts[$i], $subname)) { - $alternatives[$collectionName] = $exists ? $alternatives[$collectionName] + $lev : $lev; - } elseif ($exists) { - $alternatives[$collectionName] += $threshold; - } - } - } - - foreach ($collection as $item) { - $lev = levenshtein($name, $item); - if ($lev <= \strlen($name) / 3 || false !== strpos($item, $name)) { - $alternatives[$item] = isset($alternatives[$item]) ? $alternatives[$item] - $lev : $lev; - } - } - - $alternatives = array_filter($alternatives, function ($lev) use ($threshold) { return $lev < 2 * $threshold; }); - ksort($alternatives, \SORT_NATURAL | \SORT_FLAG_CASE); - - return array_keys($alternatives); - } - - /** - * Sets the default Command name. - * - * @param string $commandName The Command name - * @param bool $isSingleCommand Set to true if there is only one command in this application - * - * @return self - */ - public function setDefaultCommand($commandName, $isSingleCommand = false) - { - $this->defaultCommand = $commandName; - - if ($isSingleCommand) { - // Ensure the command exist - $this->find($commandName); - - $this->singleCommand = true; - } - - return $this; - } - - /** - * @internal - */ - public function isSingleCommand() - { - return $this->singleCommand; - } - - private function splitStringByWidth($string, $width) - { - // str_split is not suitable for multi-byte characters, we should use preg_split to get char array properly. - // additionally, array_slice() is not enough as some character has doubled width. - // we need a function to split string not by character count but by string width - if (false === $encoding = mb_detect_encoding($string, null, true)) { - return str_split($string, $width); - } - - $utf8String = mb_convert_encoding($string, 'utf8', $encoding); - $lines = []; - $line = ''; - foreach (preg_split('//u', $utf8String) as $char) { - // test if $char could be appended to current line - if (mb_strwidth($line.$char, 'utf8') <= $width) { - $line .= $char; - continue; - } - // if not, push current line to array and make new line - $lines[] = str_pad($line, $width); - $line = $char; - } - - $lines[] = \count($lines) ? str_pad($line, $width) : $line; - - mb_convert_variables($encoding, 'utf8', $lines); - - return $lines; - } - - /** - * Returns all namespaces of the command name. - * - * @param string $name The full name of the command - * - * @return string[] The namespaces of the command - */ - private function extractAllNamespaces($name) - { - // -1 as third argument is needed to skip the command short name when exploding - $parts = explode(':', $name, -1); - $namespaces = []; - - foreach ($parts as $part) { - if (\count($namespaces)) { - $namespaces[] = end($namespaces).':'.$part; - } else { - $namespaces[] = $part; - } - } - - return $namespaces; - } - - private function init() - { - if ($this->initialized) { - return; - } - $this->initialized = true; - - foreach ($this->getDefaultCommands() as $command) { - $this->add($command); - } - } -} diff --git a/vendor/symfony/console/Command/Command.php b/vendor/symfony/console/Command/Command.php deleted file mode 100644 index d896f67fd..000000000 --- a/vendor/symfony/console/Command/Command.php +++ /dev/null @@ -1,666 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Command; - -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Exception\ExceptionInterface; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\LogicException; -use Symfony\Component\Console\Helper\HelperSet; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * Base class for all commands. - * - * @author Fabien Potencier - */ -class Command -{ - /** - * @var string|null The default command name - */ - protected static $defaultName; - - private $application; - private $name; - private $processTitle; - private $aliases = []; - private $definition; - private $hidden = false; - private $help = ''; - private $description = ''; - private $ignoreValidationErrors = false; - private $applicationDefinitionMerged = false; - private $applicationDefinitionMergedWithArgs = false; - private $code; - private $synopsis = []; - private $usages = []; - private $helperSet; - - /** - * @return string|null The default command name or null when no default name is set - */ - public static function getDefaultName() - { - $class = static::class; - $r = new \ReflectionProperty($class, 'defaultName'); - - return $class === $r->class ? static::$defaultName : null; - } - - /** - * @param string|null $name The name of the command; passing null means it must be set in configure() - * - * @throws LogicException When the command name is empty - */ - public function __construct($name = null) - { - $this->definition = new InputDefinition(); - - if (null !== $name || null !== $name = static::getDefaultName()) { - $this->setName($name); - } - - $this->configure(); - } - - /** - * Ignores validation errors. - * - * This is mainly useful for the help command. - */ - public function ignoreValidationErrors() - { - $this->ignoreValidationErrors = true; - } - - public function setApplication(Application $application = null) - { - $this->application = $application; - if ($application) { - $this->setHelperSet($application->getHelperSet()); - } else { - $this->helperSet = null; - } - } - - public function setHelperSet(HelperSet $helperSet) - { - $this->helperSet = $helperSet; - } - - /** - * Gets the helper set. - * - * @return HelperSet|null A HelperSet instance - */ - public function getHelperSet() - { - return $this->helperSet; - } - - /** - * Gets the application instance for this command. - * - * @return Application|null An Application instance - */ - public function getApplication() - { - return $this->application; - } - - /** - * Checks whether the command is enabled or not in the current environment. - * - * Override this to check for x or y and return false if the command can not - * run properly under the current conditions. - * - * @return bool - */ - public function isEnabled() - { - return true; - } - - /** - * Configures the current command. - */ - protected function configure() - { - } - - /** - * Executes the current command. - * - * This method is not abstract because you can use this class - * as a concrete class. In this case, instead of defining the - * execute() method, you set the code to execute by passing - * a Closure to the setCode() method. - * - * @return int|null null or 0 if everything went fine, or an error code - * - * @throws LogicException When this abstract method is not implemented - * - * @see setCode() - */ - protected function execute(InputInterface $input, OutputInterface $output) - { - throw new LogicException('You must override the execute() method in the concrete command class.'); - } - - /** - * Interacts with the user. - * - * This method is executed before the InputDefinition is validated. - * This means that this is the only place where the command can - * interactively ask for values of missing required arguments. - */ - protected function interact(InputInterface $input, OutputInterface $output) - { - } - - /** - * Initializes the command after the input has been bound and before the input - * is validated. - * - * This is mainly useful when a lot of commands extends one main command - * where some things need to be initialized based on the input arguments and options. - * - * @see InputInterface::bind() - * @see InputInterface::validate() - */ - protected function initialize(InputInterface $input, OutputInterface $output) - { - } - - /** - * Runs the command. - * - * The code to execute is either defined directly with the - * setCode() method or by overriding the execute() method - * in a sub-class. - * - * @return int The command exit code - * - * @throws \Exception When binding input fails. Bypass this by calling {@link ignoreValidationErrors()}. - * - * @see setCode() - * @see execute() - */ - public function run(InputInterface $input, OutputInterface $output) - { - // force the creation of the synopsis before the merge with the app definition - $this->getSynopsis(true); - $this->getSynopsis(false); - - // add the application arguments and options - $this->mergeApplicationDefinition(); - - // bind the input against the command specific arguments/options - try { - $input->bind($this->definition); - } catch (ExceptionInterface $e) { - if (!$this->ignoreValidationErrors) { - throw $e; - } - } - - $this->initialize($input, $output); - - if (null !== $this->processTitle) { - if (\function_exists('cli_set_process_title')) { - if (!@cli_set_process_title($this->processTitle)) { - if ('Darwin' === \PHP_OS) { - $output->writeln('Running "cli_set_process_title" as an unprivileged user is not supported on MacOS.', OutputInterface::VERBOSITY_VERY_VERBOSE); - } else { - cli_set_process_title($this->processTitle); - } - } - } elseif (\function_exists('setproctitle')) { - setproctitle($this->processTitle); - } elseif (OutputInterface::VERBOSITY_VERY_VERBOSE === $output->getVerbosity()) { - $output->writeln('Install the proctitle PECL to be able to change the process title.'); - } - } - - if ($input->isInteractive()) { - $this->interact($input, $output); - } - - // The command name argument is often omitted when a command is executed directly with its run() method. - // It would fail the validation if we didn't make sure the command argument is present, - // since it's required by the application. - if ($input->hasArgument('command') && null === $input->getArgument('command')) { - $input->setArgument('command', $this->getName()); - } - - $input->validate(); - - if ($this->code) { - $statusCode = \call_user_func($this->code, $input, $output); - } else { - $statusCode = $this->execute($input, $output); - } - - return is_numeric($statusCode) ? (int) $statusCode : 0; - } - - /** - * Sets the code to execute when running this command. - * - * If this method is used, it overrides the code defined - * in the execute() method. - * - * @param callable $code A callable(InputInterface $input, OutputInterface $output) - * - * @return $this - * - * @throws InvalidArgumentException - * - * @see execute() - */ - public function setCode(callable $code) - { - if ($code instanceof \Closure) { - $r = new \ReflectionFunction($code); - if (null === $r->getClosureThis()) { - if (\PHP_VERSION_ID < 70000) { - // Bug in PHP5: https://bugs.php.net/64761 - // This means that we cannot bind static closures and therefore we must - // ignore any errors here. There is no way to test if the closure is - // bindable. - $code = @\Closure::bind($code, $this); - } else { - $code = \Closure::bind($code, $this); - } - } - } - - $this->code = $code; - - return $this; - } - - /** - * Merges the application definition with the command definition. - * - * This method is not part of public API and should not be used directly. - * - * @param bool $mergeArgs Whether to merge or not the Application definition arguments to Command definition arguments - */ - public function mergeApplicationDefinition($mergeArgs = true) - { - if (null === $this->application || (true === $this->applicationDefinitionMerged && ($this->applicationDefinitionMergedWithArgs || !$mergeArgs))) { - return; - } - - $this->definition->addOptions($this->application->getDefinition()->getOptions()); - - $this->applicationDefinitionMerged = true; - - if ($mergeArgs) { - $currentArguments = $this->definition->getArguments(); - $this->definition->setArguments($this->application->getDefinition()->getArguments()); - $this->definition->addArguments($currentArguments); - - $this->applicationDefinitionMergedWithArgs = true; - } - } - - /** - * Sets an array of argument and option instances. - * - * @param array|InputDefinition $definition An array of argument and option instances or a definition instance - * - * @return $this - */ - public function setDefinition($definition) - { - if ($definition instanceof InputDefinition) { - $this->definition = $definition; - } else { - $this->definition->setDefinition($definition); - } - - $this->applicationDefinitionMerged = false; - - return $this; - } - - /** - * Gets the InputDefinition attached to this Command. - * - * @return InputDefinition An InputDefinition instance - */ - public function getDefinition() - { - if (null === $this->definition) { - throw new LogicException(sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', static::class)); - } - - return $this->definition; - } - - /** - * Gets the InputDefinition to be used to create representations of this Command. - * - * Can be overridden to provide the original command representation when it would otherwise - * be changed by merging with the application InputDefinition. - * - * This method is not part of public API and should not be used directly. - * - * @return InputDefinition An InputDefinition instance - */ - public function getNativeDefinition() - { - return $this->getDefinition(); - } - - /** - * Adds an argument. - * - * @param string $name The argument name - * @param int|null $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL - * @param string $description A description text - * @param string|string[]|null $default The default value (for InputArgument::OPTIONAL mode only) - * - * @throws InvalidArgumentException When argument mode is not valid - * - * @return $this - */ - public function addArgument($name, $mode = null, $description = '', $default = null) - { - $this->definition->addArgument(new InputArgument($name, $mode, $description, $default)); - - return $this; - } - - /** - * Adds an option. - * - * @param string $name The option name - * @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts - * @param int|null $mode The option mode: One of the InputOption::VALUE_* constants - * @param string $description A description text - * @param string|string[]|int|bool|null $default The default value (must be null for InputOption::VALUE_NONE) - * - * @throws InvalidArgumentException If option mode is invalid or incompatible - * - * @return $this - */ - public function addOption($name, $shortcut = null, $mode = null, $description = '', $default = null) - { - $this->definition->addOption(new InputOption($name, $shortcut, $mode, $description, $default)); - - return $this; - } - - /** - * Sets the name of the command. - * - * This method can set both the namespace and the name if - * you separate them by a colon (:) - * - * $command->setName('foo:bar'); - * - * @param string $name The command name - * - * @return $this - * - * @throws InvalidArgumentException When the name is invalid - */ - public function setName($name) - { - $this->validateName($name); - - $this->name = $name; - - return $this; - } - - /** - * Sets the process title of the command. - * - * This feature should be used only when creating a long process command, - * like a daemon. - * - * @param string $title The process title - * - * @return $this - */ - public function setProcessTitle($title) - { - $this->processTitle = $title; - - return $this; - } - - /** - * Returns the command name. - * - * @return string|null - */ - public function getName() - { - return $this->name; - } - - /** - * @param bool $hidden Whether or not the command should be hidden from the list of commands - * - * @return Command The current instance - */ - public function setHidden($hidden) - { - $this->hidden = (bool) $hidden; - - return $this; - } - - /** - * @return bool whether the command should be publicly shown or not - */ - public function isHidden() - { - return $this->hidden; - } - - /** - * Sets the description for the command. - * - * @param string $description The description for the command - * - * @return $this - */ - public function setDescription($description) - { - $this->description = $description; - - return $this; - } - - /** - * Returns the description for the command. - * - * @return string The description for the command - */ - public function getDescription() - { - return $this->description; - } - - /** - * Sets the help for the command. - * - * @param string $help The help for the command - * - * @return $this - */ - public function setHelp($help) - { - $this->help = $help; - - return $this; - } - - /** - * Returns the help for the command. - * - * @return string The help for the command - */ - public function getHelp() - { - return $this->help; - } - - /** - * Returns the processed help for the command replacing the %command.name% and - * %command.full_name% patterns with the real values dynamically. - * - * @return string The processed help for the command - */ - public function getProcessedHelp() - { - $name = $this->name; - $isSingleCommand = $this->application && $this->application->isSingleCommand(); - - $placeholders = [ - '%command.name%', - '%command.full_name%', - ]; - $replacements = [ - $name, - $isSingleCommand ? $_SERVER['PHP_SELF'] : $_SERVER['PHP_SELF'].' '.$name, - ]; - - return str_replace($placeholders, $replacements, $this->getHelp() ?: $this->getDescription()); - } - - /** - * Sets the aliases for the command. - * - * @param string[] $aliases An array of aliases for the command - * - * @return $this - * - * @throws InvalidArgumentException When an alias is invalid - */ - public function setAliases($aliases) - { - if (!\is_array($aliases) && !$aliases instanceof \Traversable) { - throw new InvalidArgumentException('$aliases must be an array or an instance of \Traversable.'); - } - - foreach ($aliases as $alias) { - $this->validateName($alias); - } - - $this->aliases = $aliases; - - return $this; - } - - /** - * Returns the aliases for the command. - * - * @return array An array of aliases for the command - */ - public function getAliases() - { - return $this->aliases; - } - - /** - * Returns the synopsis for the command. - * - * @param bool $short Whether to show the short version of the synopsis (with options folded) or not - * - * @return string The synopsis - */ - public function getSynopsis($short = false) - { - $key = $short ? 'short' : 'long'; - - if (!isset($this->synopsis[$key])) { - $this->synopsis[$key] = trim(sprintf('%s %s', $this->name, $this->definition->getSynopsis($short))); - } - - return $this->synopsis[$key]; - } - - /** - * Add a command usage example. - * - * @param string $usage The usage, it'll be prefixed with the command name - * - * @return $this - */ - public function addUsage($usage) - { - if (0 !== strpos($usage, $this->name)) { - $usage = sprintf('%s %s', $this->name, $usage); - } - - $this->usages[] = $usage; - - return $this; - } - - /** - * Returns alternative usages of the command. - * - * @return array - */ - public function getUsages() - { - return $this->usages; - } - - /** - * Gets a helper instance by name. - * - * @param string $name The helper name - * - * @return mixed The helper value - * - * @throws LogicException if no HelperSet is defined - * @throws InvalidArgumentException if the helper is not defined - */ - public function getHelper($name) - { - if (null === $this->helperSet) { - throw new LogicException(sprintf('Cannot retrieve helper "%s" because there is no HelperSet defined. Did you forget to add your command to the application or to set the application on the command using the setApplication() method? You can also set the HelperSet directly using the setHelperSet() method.', $name)); - } - - return $this->helperSet->get($name); - } - - /** - * Validates a command name. - * - * It must be non-empty and parts can optionally be separated by ":". - * - * @param string $name - * - * @throws InvalidArgumentException When the name is invalid - */ - private function validateName($name) - { - if (!preg_match('/^[^\:]++(\:[^\:]++)*$/', $name)) { - throw new InvalidArgumentException(sprintf('Command name "%s" is invalid.', $name)); - } - } -} diff --git a/vendor/symfony/console/Helper/HelperInterface.php b/vendor/symfony/console/Helper/HelperInterface.php deleted file mode 100644 index 1ce823587..000000000 --- a/vendor/symfony/console/Helper/HelperInterface.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -/** - * HelperInterface is the interface all helpers must implement. - * - * @author Fabien Potencier - */ -interface HelperInterface -{ - /** - * Sets the helper set associated with this helper. - */ - public function setHelperSet(HelperSet $helperSet = null); - - /** - * Gets the helper set associated with this helper. - * - * @return HelperSet A HelperSet instance - */ - public function getHelperSet(); - - /** - * Returns the canonical name of this helper. - * - * @return string The canonical name - */ - public function getName(); -} diff --git a/vendor/symfony/console/Helper/ProcessHelper.php b/vendor/symfony/console/Helper/ProcessHelper.php deleted file mode 100644 index 6cafb1fac..000000000 --- a/vendor/symfony/console/Helper/ProcessHelper.php +++ /dev/null @@ -1,145 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Helper; - -use Symfony\Component\Console\Output\ConsoleOutputInterface; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Process\Exception\ProcessFailedException; -use Symfony\Component\Process\Process; - -/** - * The ProcessHelper class provides helpers to run external processes. - * - * @author Fabien Potencier - */ -class ProcessHelper extends Helper -{ - /** - * Runs an external process. - * - * @param OutputInterface $output An OutputInterface instance - * @param string|array|Process $cmd An instance of Process or an array of arguments to escape and run or a command to run - * @param string|null $error An error message that must be displayed if something went wrong - * @param callable|null $callback A PHP callback to run whenever there is some - * output available on STDOUT or STDERR - * @param int $verbosity The threshold for verbosity - * - * @return Process The process that ran - */ - public function run(OutputInterface $output, $cmd, $error = null, callable $callback = null, $verbosity = OutputInterface::VERBOSITY_VERY_VERBOSE) - { - if (!class_exists(Process::class)) { - throw new \LogicException('The ProcessHelper cannot be run as the Process component is not installed. Try running "compose require symfony/process".'); - } - - if ($output instanceof ConsoleOutputInterface) { - $output = $output->getErrorOutput(); - } - - $formatter = $this->getHelperSet()->get('debug_formatter'); - - if ($cmd instanceof Process) { - $process = $cmd; - } else { - $process = new Process($cmd); - } - - if ($verbosity <= $output->getVerbosity()) { - $output->write($formatter->start(spl_object_hash($process), $this->escapeString($process->getCommandLine()))); - } - - if ($output->isDebug()) { - $callback = $this->wrapCallback($output, $process, $callback); - } - - $process->run($callback); - - if ($verbosity <= $output->getVerbosity()) { - $message = $process->isSuccessful() ? 'Command ran successfully' : sprintf('%s Command did not run successfully', $process->getExitCode()); - $output->write($formatter->stop(spl_object_hash($process), $message, $process->isSuccessful())); - } - - if (!$process->isSuccessful() && null !== $error) { - $output->writeln(sprintf('%s', $this->escapeString($error))); - } - - return $process; - } - - /** - * Runs the process. - * - * This is identical to run() except that an exception is thrown if the process - * exits with a non-zero exit code. - * - * @param OutputInterface $output An OutputInterface instance - * @param string|Process $cmd An instance of Process or a command to run - * @param string|null $error An error message that must be displayed if something went wrong - * @param callable|null $callback A PHP callback to run whenever there is some - * output available on STDOUT or STDERR - * - * @return Process The process that ran - * - * @throws ProcessFailedException - * - * @see run() - */ - public function mustRun(OutputInterface $output, $cmd, $error = null, callable $callback = null) - { - $process = $this->run($output, $cmd, $error, $callback); - - if (!$process->isSuccessful()) { - throw new ProcessFailedException($process); - } - - return $process; - } - - /** - * Wraps a Process callback to add debugging output. - * - * @param OutputInterface $output An OutputInterface interface - * @param Process $process The Process - * @param callable|null $callback A PHP callable - * - * @return callable - */ - public function wrapCallback(OutputInterface $output, Process $process, callable $callback = null) - { - if ($output instanceof ConsoleOutputInterface) { - $output = $output->getErrorOutput(); - } - - $formatter = $this->getHelperSet()->get('debug_formatter'); - - return function ($type, $buffer) use ($output, $process, $callback, $formatter) { - $output->write($formatter->progress(spl_object_hash($process), $this->escapeString($buffer), Process::ERR === $type)); - - if (null !== $callback) { - \call_user_func($callback, $type, $buffer); - } - }; - } - - private function escapeString($str) - { - return str_replace('<', '\\<', $str); - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'process'; - } -} diff --git a/vendor/symfony/console/Input/ArrayInput.php b/vendor/symfony/console/Input/ArrayInput.php deleted file mode 100644 index b2ebc7c22..000000000 --- a/vendor/symfony/console/Input/ArrayInput.php +++ /dev/null @@ -1,208 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Input; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\InvalidOptionException; - -/** - * ArrayInput represents an input provided as an array. - * - * Usage: - * - * $input = new ArrayInput(['command' => 'foo:bar', 'foo' => 'bar', '--bar' => 'foobar']); - * - * @author Fabien Potencier - */ -class ArrayInput extends Input -{ - private $parameters; - - public function __construct(array $parameters, InputDefinition $definition = null) - { - $this->parameters = $parameters; - - parent::__construct($definition); - } - - /** - * {@inheritdoc} - */ - public function getFirstArgument() - { - foreach ($this->parameters as $param => $value) { - if ($param && \is_string($param) && '-' === $param[0]) { - continue; - } - - return $value; - } - - return null; - } - - /** - * {@inheritdoc} - */ - public function hasParameterOption($values, $onlyParams = false) - { - $values = (array) $values; - - foreach ($this->parameters as $k => $v) { - if (!\is_int($k)) { - $v = $k; - } - - if ($onlyParams && '--' === $v) { - return false; - } - - if (\in_array($v, $values)) { - return true; - } - } - - return false; - } - - /** - * {@inheritdoc} - */ - public function getParameterOption($values, $default = false, $onlyParams = false) - { - $values = (array) $values; - - foreach ($this->parameters as $k => $v) { - if ($onlyParams && ('--' === $k || (\is_int($k) && '--' === $v))) { - return $default; - } - - if (\is_int($k)) { - if (\in_array($v, $values)) { - return true; - } - } elseif (\in_array($k, $values)) { - return $v; - } - } - - return $default; - } - - /** - * Returns a stringified representation of the args passed to the command. - * - * @return string - */ - public function __toString() - { - $params = []; - foreach ($this->parameters as $param => $val) { - if ($param && \is_string($param) && '-' === $param[0]) { - if (\is_array($val)) { - foreach ($val as $v) { - $params[] = $param.('' != $v ? '='.$this->escapeToken($v) : ''); - } - } else { - $params[] = $param.('' != $val ? '='.$this->escapeToken($val) : ''); - } - } else { - $params[] = \is_array($val) ? implode(' ', array_map([$this, 'escapeToken'], $val)) : $this->escapeToken($val); - } - } - - return implode(' ', $params); - } - - /** - * {@inheritdoc} - */ - protected function parse() - { - foreach ($this->parameters as $key => $value) { - if ('--' === $key) { - return; - } - if (0 === strpos($key, '--')) { - $this->addLongOption(substr($key, 2), $value); - } elseif (0 === strpos($key, '-')) { - $this->addShortOption(substr($key, 1), $value); - } else { - $this->addArgument($key, $value); - } - } - } - - /** - * Adds a short option value. - * - * @param string $shortcut The short option key - * @param mixed $value The value for the option - * - * @throws InvalidOptionException When option given doesn't exist - */ - private function addShortOption($shortcut, $value) - { - if (!$this->definition->hasShortcut($shortcut)) { - throw new InvalidOptionException(sprintf('The "-%s" option does not exist.', $shortcut)); - } - - $this->addLongOption($this->definition->getOptionForShortcut($shortcut)->getName(), $value); - } - - /** - * Adds a long option value. - * - * @param string $name The long option key - * @param mixed $value The value for the option - * - * @throws InvalidOptionException When option given doesn't exist - * @throws InvalidOptionException When a required value is missing - */ - private function addLongOption($name, $value) - { - if (!$this->definition->hasOption($name)) { - throw new InvalidOptionException(sprintf('The "--%s" option does not exist.', $name)); - } - - $option = $this->definition->getOption($name); - - if (null === $value) { - if ($option->isValueRequired()) { - throw new InvalidOptionException(sprintf('The "--%s" option requires a value.', $name)); - } - - if (!$option->isValueOptional()) { - $value = true; - } - } - - $this->options[$name] = $value; - } - - /** - * Adds an argument value. - * - * @param string $name The argument name - * @param mixed $value The value for the argument - * - * @throws InvalidArgumentException When argument given doesn't exist - */ - private function addArgument($name, $value) - { - if (!$this->definition->hasArgument($name)) { - throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); - } - - $this->arguments[$name] = $value; - } -} diff --git a/vendor/symfony/console/Input/Input.php b/vendor/symfony/console/Input/Input.php deleted file mode 100644 index c1220316d..000000000 --- a/vendor/symfony/console/Input/Input.php +++ /dev/null @@ -1,203 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Input; - -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Exception\RuntimeException; - -/** - * Input is the base class for all concrete Input classes. - * - * Three concrete classes are provided by default: - * - * * `ArgvInput`: The input comes from the CLI arguments (argv) - * * `StringInput`: The input is provided as a string - * * `ArrayInput`: The input is provided as an array - * - * @author Fabien Potencier - */ -abstract class Input implements InputInterface, StreamableInputInterface -{ - protected $definition; - protected $stream; - protected $options = []; - protected $arguments = []; - protected $interactive = true; - - public function __construct(InputDefinition $definition = null) - { - if (null === $definition) { - $this->definition = new InputDefinition(); - } else { - $this->bind($definition); - $this->validate(); - } - } - - /** - * {@inheritdoc} - */ - public function bind(InputDefinition $definition) - { - $this->arguments = []; - $this->options = []; - $this->definition = $definition; - - $this->parse(); - } - - /** - * Processes command line arguments. - */ - abstract protected function parse(); - - /** - * {@inheritdoc} - */ - public function validate() - { - $definition = $this->definition; - $givenArguments = $this->arguments; - - $missingArguments = array_filter(array_keys($definition->getArguments()), function ($argument) use ($definition, $givenArguments) { - return !\array_key_exists($argument, $givenArguments) && $definition->getArgument($argument)->isRequired(); - }); - - if (\count($missingArguments) > 0) { - throw new RuntimeException(sprintf('Not enough arguments (missing: "%s").', implode(', ', $missingArguments))); - } - } - - /** - * {@inheritdoc} - */ - public function isInteractive() - { - return $this->interactive; - } - - /** - * {@inheritdoc} - */ - public function setInteractive($interactive) - { - $this->interactive = (bool) $interactive; - } - - /** - * {@inheritdoc} - */ - public function getArguments() - { - return array_merge($this->definition->getArgumentDefaults(), $this->arguments); - } - - /** - * {@inheritdoc} - */ - public function getArgument($name) - { - if (!$this->definition->hasArgument($name)) { - throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); - } - - return isset($this->arguments[$name]) ? $this->arguments[$name] : $this->definition->getArgument($name)->getDefault(); - } - - /** - * {@inheritdoc} - */ - public function setArgument($name, $value) - { - if (!$this->definition->hasArgument($name)) { - throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); - } - - $this->arguments[$name] = $value; - } - - /** - * {@inheritdoc} - */ - public function hasArgument($name) - { - return $this->definition->hasArgument($name); - } - - /** - * {@inheritdoc} - */ - public function getOptions() - { - return array_merge($this->definition->getOptionDefaults(), $this->options); - } - - /** - * {@inheritdoc} - */ - public function getOption($name) - { - if (!$this->definition->hasOption($name)) { - throw new InvalidArgumentException(sprintf('The "%s" option does not exist.', $name)); - } - - return \array_key_exists($name, $this->options) ? $this->options[$name] : $this->definition->getOption($name)->getDefault(); - } - - /** - * {@inheritdoc} - */ - public function setOption($name, $value) - { - if (!$this->definition->hasOption($name)) { - throw new InvalidArgumentException(sprintf('The "%s" option does not exist.', $name)); - } - - $this->options[$name] = $value; - } - - /** - * {@inheritdoc} - */ - public function hasOption($name) - { - return $this->definition->hasOption($name); - } - - /** - * Escapes a token through escapeshellarg if it contains unsafe chars. - * - * @param string $token - * - * @return string - */ - public function escapeToken($token) - { - return preg_match('{^[\w-]+$}', $token) ? $token : escapeshellarg($token); - } - - /** - * {@inheritdoc} - */ - public function setStream($stream) - { - $this->stream = $stream; - } - - /** - * {@inheritdoc} - */ - public function getStream() - { - return $this->stream; - } -} diff --git a/vendor/symfony/debug/Exception/FatalErrorException.php b/vendor/symfony/debug/Exception/FatalErrorException.php deleted file mode 100644 index 8d996a422..000000000 --- a/vendor/symfony/debug/Exception/FatalErrorException.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Debug\Exception; - -/** - * Fatal Error Exception. - * - * @author Konstanton Myakshin - */ -class FatalErrorException extends \ErrorException -{ - public function __construct($message, $code, $severity, $filename, $lineno, $traceOffset = null, $traceArgs = true, array $trace = null, $previous = null) - { - parent::__construct($message, $code, $severity, $filename, $lineno, $previous); - - if (null !== $trace) { - if (!$traceArgs) { - foreach ($trace as &$frame) { - unset($frame['args'], $frame['this'], $frame); - } - } - - $this->setTrace($trace); - } elseif (null !== $traceOffset) { - if (\function_exists('xdebug_get_function_stack')) { - $trace = xdebug_get_function_stack(); - if (0 < $traceOffset) { - array_splice($trace, -$traceOffset); - } - - foreach ($trace as &$frame) { - if (!isset($frame['type'])) { - // XDebug pre 2.1.1 doesn't currently set the call type key http://bugs.xdebug.org/view.php?id=695 - if (isset($frame['class'])) { - $frame['type'] = '::'; - } - } elseif ('dynamic' === $frame['type']) { - $frame['type'] = '->'; - } elseif ('static' === $frame['type']) { - $frame['type'] = '::'; - } - - // XDebug also has a different name for the parameters array - if (!$traceArgs) { - unset($frame['params'], $frame['args']); - } elseif (isset($frame['params']) && !isset($frame['args'])) { - $frame['args'] = $frame['params']; - unset($frame['params']); - } - } - - unset($frame); - $trace = array_reverse($trace); - } elseif (\function_exists('symfony_debug_backtrace')) { - $trace = symfony_debug_backtrace(); - if (0 < $traceOffset) { - array_splice($trace, 0, $traceOffset); - } - } else { - $trace = array(); - } - - $this->setTrace($trace); - } - } - - protected function setTrace($trace) - { - $traceReflector = new \ReflectionProperty('Exception', 'trace'); - $traceReflector->setAccessible(true); - $traceReflector->setValue($this, $trace); - } -} diff --git a/vendor/symfony/http-foundation/StreamedResponse.php b/vendor/symfony/http-foundation/StreamedResponse.php deleted file mode 100644 index 3a55d5d2b..000000000 --- a/vendor/symfony/http-foundation/StreamedResponse.php +++ /dev/null @@ -1,146 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * StreamedResponse represents a streamed HTTP response. - * - * A StreamedResponse uses a callback for its content. - * - * The callback should use the standard PHP functions like echo - * to stream the response back to the client. The flush() function - * can also be used if needed. - * - * @see flush() - * - * @author Fabien Potencier - */ -class StreamedResponse extends Response -{ - protected $callback; - protected $streamed; - private $headersSent; - - /** - * @param callable|null $callback A valid PHP callback or null to set it later - * @param int $status The response status code - * @param array $headers An array of response headers - */ - public function __construct(callable $callback = null, $status = 200, $headers = array()) - { - parent::__construct(null, $status, $headers); - - if (null !== $callback) { - $this->setCallback($callback); - } - $this->streamed = false; - $this->headersSent = false; - } - - /** - * Factory method for chainability. - * - * @param callable|null $callback A valid PHP callback or null to set it later - * @param int $status The response status code - * @param array $headers An array of response headers - * - * @return static - */ - public static function create($callback = null, $status = 200, $headers = array()) - { - return new static($callback, $status, $headers); - } - - /** - * Sets the PHP callback associated with this Response. - * - * @param callable $callback A valid PHP callback - * - * @return $this - */ - public function setCallback(callable $callback) - { - $this->callback = $callback; - - return $this; - } - - /** - * {@inheritdoc} - * - * This method only sends the headers once. - * - * @return $this - */ - public function sendHeaders() - { - if ($this->headersSent) { - return $this; - } - - $this->headersSent = true; - - return parent::sendHeaders(); - } - - /** - * {@inheritdoc} - * - * This method only sends the content once. - * - * @return $this - */ - public function sendContent() - { - if ($this->streamed) { - return $this; - } - - $this->streamed = true; - - if (null === $this->callback) { - throw new \LogicException('The Response callback must not be null.'); - } - - \call_user_func($this->callback); - - return $this; - } - - /** - * {@inheritdoc} - * - * @throws \LogicException when the content is not null - * - * @return $this - */ - public function setContent($content) - { - if (null !== $content) { - throw new \LogicException('The content cannot be set on a StreamedResponse instance.'); - } - - $this->streamed = true; - - return $this; - } - - /** - * {@inheritdoc} - * - * @return false - */ - public function getContent() - { - return false; - } -} diff --git a/vendor/symfony/http-kernel/Exception/AccessDeniedHttpException.php b/vendor/symfony/http-kernel/Exception/AccessDeniedHttpException.php deleted file mode 100644 index 394188426..000000000 --- a/vendor/symfony/http-kernel/Exception/AccessDeniedHttpException.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Fabien Potencier - * @author Christophe Coevoet - */ -class AccessDeniedHttpException extends HttpException -{ - /** - * @param string $message The internal exception message - * @param \Exception $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct($message = null, \Exception $previous = null, $code = 0) - { - parent::__construct(403, $message, $previous, array(), $code); - } -} diff --git a/vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php b/vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php deleted file mode 100644 index e308a5fee..000000000 --- a/vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Kris Wallsmith - */ -class MethodNotAllowedHttpException extends HttpException -{ - /** - * @param array $allow An array of allowed methods - * @param string $message The internal exception message - * @param \Exception $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct(array $allow, $message = null, \Exception $previous = null, $code = 0) - { - $headers = array('Allow' => strtoupper(implode(', ', $allow))); - - parent::__construct(405, $message, $previous, $headers, $code); - } -} diff --git a/vendor/symfony/http-kernel/Exception/NotFoundHttpException.php b/vendor/symfony/http-kernel/Exception/NotFoundHttpException.php deleted file mode 100644 index 878173cc7..000000000 --- a/vendor/symfony/http-kernel/Exception/NotFoundHttpException.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Fabien Potencier - */ -class NotFoundHttpException extends HttpException -{ - /** - * @param string $message The internal exception message - * @param \Exception $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct($message = null, \Exception $previous = null, $code = 0) - { - parent::__construct(404, $message, $previous, array(), $code); - } -} diff --git a/vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php b/vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php deleted file mode 100644 index b2767c3fd..000000000 --- a/vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Ben Ramsey - */ -class ServiceUnavailableHttpException extends HttpException -{ - /** - * @param int|string $retryAfter The number of seconds or HTTP-date after which the request may be retried - * @param string $message The internal exception message - * @param \Exception $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct($retryAfter = null, $message = null, \Exception $previous = null, $code = 0) - { - $headers = array(); - if ($retryAfter) { - $headers = array('Retry-After' => $retryAfter); - } - - parent::__construct(503, $message, $previous, $headers, $code); - } -} diff --git a/vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php b/vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php deleted file mode 100644 index 05ac875c5..000000000 --- a/vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Exception; - -/** - * @author Ben Ramsey - */ -class UnauthorizedHttpException extends HttpException -{ - /** - * @param string $challenge WWW-Authenticate challenge string - * @param string $message The internal exception message - * @param \Exception $previous The previous exception - * @param int $code The internal exception code - */ - public function __construct($challenge, $message = null, \Exception $previous = null, $code = 0) - { - $headers = array('WWW-Authenticate' => $challenge); - - parent::__construct(401, $message, $previous, $headers, $code); - } -} diff --git a/vendor/symfony/translation/Formatter/MessageFormatter.php b/vendor/symfony/translation/Formatter/MessageFormatter.php deleted file mode 100644 index e174be36c..000000000 --- a/vendor/symfony/translation/Formatter/MessageFormatter.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Formatter; - -use Symfony\Component\Translation\MessageSelector; - -/** - * @author Abdellatif Ait boudad - */ -class MessageFormatter implements MessageFormatterInterface, ChoiceMessageFormatterInterface -{ - private $selector; - - /** - * @param MessageSelector|null $selector The message selector for pluralization - */ - public function __construct(MessageSelector $selector = null) - { - $this->selector = $selector ?: new MessageSelector(); - } - - /** - * {@inheritdoc} - */ - public function format($message, $locale, array $parameters = array()) - { - return strtr($message, $parameters); - } - - /** - * {@inheritdoc} - */ - public function choiceFormat($message, $number, $locale, array $parameters = array()) - { - $parameters = array_merge(array('%count%' => $number), $parameters); - - return $this->format($this->selector->choose($message, (int) $number, $locale), $locale, $parameters); - } -} diff --git a/vendor/symfony/translation/Loader/ArrayLoader.php b/vendor/symfony/translation/Loader/ArrayLoader.php deleted file mode 100644 index 7bbfca68a..000000000 --- a/vendor/symfony/translation/Loader/ArrayLoader.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Loader; - -use Symfony\Component\Translation\MessageCatalogue; - -/** - * ArrayLoader loads translations from a PHP array. - * - * @author Fabien Potencier - */ -class ArrayLoader implements LoaderInterface -{ - /** - * {@inheritdoc} - */ - public function load($resource, $locale, $domain = 'messages') - { - $this->flatten($resource); - $catalogue = new MessageCatalogue($locale); - $catalogue->add($resource, $domain); - - return $catalogue; - } - - /** - * Flattens an nested array of translations. - * - * The scheme used is: - * 'key' => array('key2' => array('key3' => 'value')) - * Becomes: - * 'key.key2.key3' => 'value' - * - * This function takes an array by reference and will modify it - * - * @param array &$messages The array that will be flattened - * @param array $subnode Current subnode being parsed, used internally for recursive calls - * @param string $path Current path being parsed, used internally for recursive calls - */ - private function flatten(array &$messages, array $subnode = null, $path = null) - { - if (null === $subnode) { - $subnode = &$messages; - } - foreach ($subnode as $key => $value) { - if (\is_array($value)) { - $nodePath = $path ? $path.'.'.$key : $key; - $this->flatten($messages, $value, $nodePath); - if (null === $path) { - unset($messages[$key]); - } - } elseif (null !== $path) { - $messages[$path.'.'.$key] = $value; - } - } - } -} diff --git a/vendor/symfony/translation/Translator.php b/vendor/symfony/translation/Translator.php deleted file mode 100644 index b76aabb8d..000000000 --- a/vendor/symfony/translation/Translator.php +++ /dev/null @@ -1,450 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation; - -use Symfony\Component\Config\ConfigCacheFactory; -use Symfony\Component\Config\ConfigCacheFactoryInterface; -use Symfony\Component\Config\ConfigCacheInterface; -use Symfony\Component\Translation\Exception\InvalidArgumentException; -use Symfony\Component\Translation\Exception\LogicException; -use Symfony\Component\Translation\Exception\NotFoundResourceException; -use Symfony\Component\Translation\Exception\RuntimeException; -use Symfony\Component\Translation\Formatter\ChoiceMessageFormatterInterface; -use Symfony\Component\Translation\Formatter\MessageFormatter; -use Symfony\Component\Translation\Formatter\MessageFormatterInterface; -use Symfony\Component\Translation\Loader\LoaderInterface; - -/** - * @author Fabien Potencier - */ -class Translator implements TranslatorInterface, TranslatorBagInterface -{ - /** - * @var MessageCatalogueInterface[] - */ - protected $catalogues = array(); - - /** - * @var string - */ - private $locale; - - /** - * @var array - */ - private $fallbackLocales = array(); - - /** - * @var LoaderInterface[] - */ - private $loaders = array(); - - /** - * @var array - */ - private $resources = array(); - - /** - * @var MessageFormatterInterface - */ - private $formatter; - - /** - * @var string - */ - private $cacheDir; - - /** - * @var bool - */ - private $debug; - - /** - * @var ConfigCacheFactoryInterface|null - */ - private $configCacheFactory; - - /** - * @param string $locale The locale - * @param MessageFormatterInterface|null $formatter The message formatter - * @param string|null $cacheDir The directory to use for the cache - * @param bool $debug Use cache in debug mode ? - * - * @throws InvalidArgumentException If a locale contains invalid characters - */ - public function __construct($locale, $formatter = null, $cacheDir = null, $debug = false) - { - $this->setLocale($locale); - - if ($formatter instanceof MessageSelector) { - $formatter = new MessageFormatter($formatter); - @trigger_error(sprintf('Passing a "%s" instance into the "%s()" method as a second argument is deprecated since Symfony 3.4 and will be removed in 4.0. Inject a "%s" implementation instead.', MessageSelector::class, __METHOD__, MessageFormatterInterface::class), E_USER_DEPRECATED); - } elseif (null === $formatter) { - $formatter = new MessageFormatter(); - } - - $this->formatter = $formatter; - $this->cacheDir = $cacheDir; - $this->debug = $debug; - } - - public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory) - { - $this->configCacheFactory = $configCacheFactory; - } - - /** - * Adds a Loader. - * - * @param string $format The name of the loader (@see addResource()) - * @param LoaderInterface $loader A LoaderInterface instance - */ - public function addLoader($format, LoaderInterface $loader) - { - $this->loaders[$format] = $loader; - } - - /** - * Adds a Resource. - * - * @param string $format The name of the loader (@see addLoader()) - * @param mixed $resource The resource name - * @param string $locale The locale - * @param string $domain The domain - * - * @throws InvalidArgumentException If the locale contains invalid characters - */ - public function addResource($format, $resource, $locale, $domain = null) - { - if (null === $domain) { - $domain = 'messages'; - } - - $this->assertValidLocale($locale); - - $this->resources[$locale][] = array($format, $resource, $domain); - - if (\in_array($locale, $this->fallbackLocales)) { - $this->catalogues = array(); - } else { - unset($this->catalogues[$locale]); - } - } - - /** - * {@inheritdoc} - */ - public function setLocale($locale) - { - $this->assertValidLocale($locale); - $this->locale = $locale; - } - - /** - * {@inheritdoc} - */ - public function getLocale() - { - return $this->locale; - } - - /** - * Sets the fallback locales. - * - * @param array $locales The fallback locales - * - * @throws InvalidArgumentException If a locale contains invalid characters - */ - public function setFallbackLocales(array $locales) - { - // needed as the fallback locales are linked to the already loaded catalogues - $this->catalogues = array(); - - foreach ($locales as $locale) { - $this->assertValidLocale($locale); - } - - $this->fallbackLocales = $locales; - } - - /** - * Gets the fallback locales. - * - * @return array $locales The fallback locales - */ - public function getFallbackLocales() - { - return $this->fallbackLocales; - } - - /** - * {@inheritdoc} - */ - public function trans($id, array $parameters = array(), $domain = null, $locale = null) - { - if (null === $domain) { - $domain = 'messages'; - } - - return $this->formatter->format($this->getCatalogue($locale)->get((string) $id, $domain), $locale, $parameters); - } - - /** - * {@inheritdoc} - */ - public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) - { - if (!$this->formatter instanceof ChoiceMessageFormatterInterface) { - throw new LogicException(sprintf('The formatter "%s" does not support plural translations.', \get_class($this->formatter))); - } - - if (null === $domain) { - $domain = 'messages'; - } - - $id = (string) $id; - $catalogue = $this->getCatalogue($locale); - $locale = $catalogue->getLocale(); - while (!$catalogue->defines($id, $domain)) { - if ($cat = $catalogue->getFallbackCatalogue()) { - $catalogue = $cat; - $locale = $catalogue->getLocale(); - } else { - break; - } - } - - return $this->formatter->choiceFormat($catalogue->get($id, $domain), $number, $locale, $parameters); - } - - /** - * {@inheritdoc} - */ - public function getCatalogue($locale = null) - { - if (null === $locale) { - $locale = $this->getLocale(); - } else { - $this->assertValidLocale($locale); - } - - if (!isset($this->catalogues[$locale])) { - $this->loadCatalogue($locale); - } - - return $this->catalogues[$locale]; - } - - /** - * Gets the loaders. - * - * @return array LoaderInterface[] - */ - protected function getLoaders() - { - return $this->loaders; - } - - /** - * @param string $locale - */ - protected function loadCatalogue($locale) - { - if (null === $this->cacheDir) { - $this->initializeCatalogue($locale); - } else { - $this->initializeCacheCatalogue($locale); - } - } - - /** - * @param string $locale - */ - protected function initializeCatalogue($locale) - { - $this->assertValidLocale($locale); - - try { - $this->doLoadCatalogue($locale); - } catch (NotFoundResourceException $e) { - if (!$this->computeFallbackLocales($locale)) { - throw $e; - } - } - $this->loadFallbackCatalogues($locale); - } - - /** - * @param string $locale - */ - private function initializeCacheCatalogue($locale) - { - if (isset($this->catalogues[$locale])) { - /* Catalogue already initialized. */ - return; - } - - $this->assertValidLocale($locale); - $cache = $this->getConfigCacheFactory()->cache($this->getCatalogueCachePath($locale), - function (ConfigCacheInterface $cache) use ($locale) { - $this->dumpCatalogue($locale, $cache); - } - ); - - if (isset($this->catalogues[$locale])) { - /* Catalogue has been initialized as it was written out to cache. */ - return; - } - - /* Read catalogue from cache. */ - $this->catalogues[$locale] = include $cache->getPath(); - } - - private function dumpCatalogue($locale, ConfigCacheInterface $cache) - { - $this->initializeCatalogue($locale); - $fallbackContent = $this->getFallbackContent($this->catalogues[$locale]); - - $content = sprintf(<<catalogues[$locale]->all(), true), - $fallbackContent - ); - - $cache->write($content, $this->catalogues[$locale]->getResources()); - } - - private function getFallbackContent(MessageCatalogue $catalogue) - { - $fallbackContent = ''; - $current = ''; - $replacementPattern = '/[^a-z0-9_]/i'; - $fallbackCatalogue = $catalogue->getFallbackCatalogue(); - while ($fallbackCatalogue) { - $fallback = $fallbackCatalogue->getLocale(); - $fallbackSuffix = ucfirst(preg_replace($replacementPattern, '_', $fallback)); - $currentSuffix = ucfirst(preg_replace($replacementPattern, '_', $current)); - - $fallbackContent .= sprintf(<<<'EOF' -$catalogue%s = new MessageCatalogue('%s', %s); -$catalogue%s->addFallbackCatalogue($catalogue%s); - -EOF - , - $fallbackSuffix, - $fallback, - var_export($fallbackCatalogue->all(), true), - $currentSuffix, - $fallbackSuffix - ); - $current = $fallbackCatalogue->getLocale(); - $fallbackCatalogue = $fallbackCatalogue->getFallbackCatalogue(); - } - - return $fallbackContent; - } - - private function getCatalogueCachePath($locale) - { - return $this->cacheDir.'/catalogue.'.$locale.'.'.strtr(substr(base64_encode(hash('sha256', serialize($this->fallbackLocales), true)), 0, 7), '/', '_').'.php'; - } - - private function doLoadCatalogue($locale) - { - $this->catalogues[$locale] = new MessageCatalogue($locale); - - if (isset($this->resources[$locale])) { - foreach ($this->resources[$locale] as $resource) { - if (!isset($this->loaders[$resource[0]])) { - throw new RuntimeException(sprintf('The "%s" translation loader is not registered.', $resource[0])); - } - $this->catalogues[$locale]->addCatalogue($this->loaders[$resource[0]]->load($resource[1], $locale, $resource[2])); - } - } - } - - private function loadFallbackCatalogues($locale) - { - $current = $this->catalogues[$locale]; - - foreach ($this->computeFallbackLocales($locale) as $fallback) { - if (!isset($this->catalogues[$fallback])) { - $this->initializeCatalogue($fallback); - } - - $fallbackCatalogue = new MessageCatalogue($fallback, $this->catalogues[$fallback]->all()); - foreach ($this->catalogues[$fallback]->getResources() as $resource) { - $fallbackCatalogue->addResource($resource); - } - $current->addFallbackCatalogue($fallbackCatalogue); - $current = $fallbackCatalogue; - } - } - - protected function computeFallbackLocales($locale) - { - $locales = array(); - foreach ($this->fallbackLocales as $fallback) { - if ($fallback === $locale) { - continue; - } - - $locales[] = $fallback; - } - - if (false !== strrchr($locale, '_')) { - array_unshift($locales, substr($locale, 0, -\strlen(strrchr($locale, '_')))); - } - - return array_unique($locales); - } - - /** - * Asserts that the locale is valid, throws an Exception if not. - * - * @param string $locale Locale to tests - * - * @throws InvalidArgumentException If the locale contains invalid characters - */ - protected function assertValidLocale($locale) - { - if (1 !== preg_match('/^[a-z0-9@_\\.\\-]*$/i', $locale)) { - throw new InvalidArgumentException(sprintf('Invalid "%s" locale.', $locale)); - } - } - - /** - * Provides the ConfigCache factory implementation, falling back to a - * default implementation if necessary. - * - * @return ConfigCacheFactoryInterface $configCacheFactory - */ - private function getConfigCacheFactory() - { - if (!$this->configCacheFactory) { - $this->configCacheFactory = new ConfigCacheFactory($this->debug); - } - - return $this->configCacheFactory; - } -} diff --git a/vendor/webklex/php-imap/src/ClientManager.php b/vendor/webklex/php-imap/src/ClientManager.php deleted file mode 100644 index 61557ef29..000000000 --- a/vendor/webklex/php-imap/src/ClientManager.php +++ /dev/null @@ -1,276 +0,0 @@ -setConfig($config); - } - - /** - * Dynamically pass calls to the default account. - * @param string $method - * @param array $parameters - * - * @return mixed - * @throws Exceptions\MaskNotFoundException - */ - public function __call(string $method, array $parameters) { - $callable = [$this->account(), $method]; - - return call_user_func_array($callable, $parameters); - } - - /** - * Safely create a new client instance which is not listed in accounts - * @param array $config - * - * @return Client - * @throws Exceptions\MaskNotFoundException - */ - public function make(array $config): Client { - return new Client($config); - } - - /** - * Get a dotted config parameter - * @param string $key - * @param null $default - * - * @return mixed|null - */ - public static function get(string $key, $default = null) { - $parts = explode('.', $key); - $value = null; - foreach($parts as $part) { - if($value === null) { - if(isset(self::$config[$part])) { - $value = self::$config[$part]; - }else{ - break; - } - }else{ - if(isset($value[$part])) { - $value = $value[$part]; - }else{ - break; - } - } - } - - return $value === null ? $default : $value; - } - - /** - * Resolve a account instance. - * @param string|null $name - * - * @return Client - * @throws Exceptions\MaskNotFoundException - */ - public function account(string $name = null): Client { - $name = $name ?: $this->getDefaultAccount(); - - // If the connection has not been resolved we will resolve it now as all - // the connections are resolved when they are actually needed, so we do - // not make any unnecessary connection to the various queue end-points. - if (!isset($this->accounts[$name])) { - $this->accounts[$name] = $this->resolve($name); - } - - return $this->accounts[$name]; - } - - /** - * Resolve an account. - * @param string $name - * - * @return Client - * @throws Exceptions\MaskNotFoundException - */ - protected function resolve(string $name): Client { - $config = $this->getClientConfig($name); - - return new Client($config); - } - - /** - * Get the account configuration. - * @param string|null $name - * - * @return array - */ - protected function getClientConfig($name): array { - if ($name === null || $name === 'null') { - return ['driver' => 'null']; - } - - return is_array(self::$config["accounts"][$name]) ? self::$config["accounts"][$name] : []; - } - - /** - * Get the name of the default account. - * - * @return string - */ - public function getDefaultAccount(): string { - return self::$config['default']; - } - - /** - * Set the name of the default account. - * @param string $name - * - * @return void - */ - public function setDefaultAccount(string $name) { - self::$config['default'] = $name; - } - - - /** - * Merge the vendor settings with the local config - * - * The default account identifier will be used as default for any missing account parameters. - * If however the default account is missing a parameter the package default account parameter will be used. - * This can be disabled by setting imap.default in your config file to 'false' - * - * @param array|string $config - * - * @return $this - */ - public function setConfig($config): ClientManager { - - if(is_array($config) === false) { - $config = require $config; - } - - $config_key = 'imap'; - $path = __DIR__.'/config/'.$config_key.'.php'; - - $vendor_config = require $path; - $config = $this->array_merge_recursive_distinct($vendor_config, $config); - - if(is_array($config)){ - if(isset($config['default'])){ - if(isset($config['accounts']) && $config['default']){ - - $default_config = $vendor_config['accounts']['default']; - if(isset($config['accounts'][$config['default']])){ - $default_config = array_merge($default_config, $config['accounts'][$config['default']]); - } - - if(is_array($config['accounts'])){ - foreach($config['accounts'] as $account_key => $account){ - $config['accounts'][$account_key] = array_merge($default_config, $account); - } - } - } - } - } - - self::$config = $config; - - return $this; - } - - /** - * Marge arrays recursively and distinct - * - * Merges any number of arrays / parameters recursively, replacing - * entries with string keys with values from latter arrays. - * If the entry or the next value to be assigned is an array, then it - * automatically treats both arguments as an array. - * Numeric entries are appended, not replaced, but only if they are - * unique - * - * @return array|mixed - * - * @link http://www.php.net/manual/en/function.array-merge-recursive.php#96201 - * @author Mark Roduner - */ - private function array_merge_recursive_distinct() { - - $arrays = func_get_args(); - $base = array_shift($arrays); - - // From https://stackoverflow.com/a/173479 - $isAssoc = function(array $arr) { - if (array() === $arr) return false; - return array_keys($arr) !== range(0, count($arr) - 1); - }; - - if(!is_array($base)) $base = empty($base) ? array() : array($base); - - foreach($arrays as $append) { - - if(!is_array($append)) $append = array($append); - - foreach($append as $key => $value) { - - if(!array_key_exists($key, $base) and !is_numeric($key)) { - $base[$key] = $value; - continue; - } - - if( - ( - is_array($value) - && $isAssoc($value) - ) - || ( - is_array($base[$key]) - && $isAssoc($base[$key]) - ) - ) { - // If the arrays are not associates we don't want to array_merge_recursive_distinct - // else merging $baseConfig['dispositions'] = ['attachment', 'inline'] with $customConfig['dispositions'] = ['attachment'] - // results in $resultConfig['dispositions'] = ['attachment', 'inline'] - $base[$key] = $this->array_merge_recursive_distinct($base[$key], $value); - } else if(is_numeric($key)) { - if(!in_array($value, $base)) $base[] = $value; - } else { - $base[$key] = $value; - } - - } - - } - - return $base; - } -} \ No newline at end of file diff --git a/vendor/webklex/php-imap/src/EncodingAliases.php b/vendor/webklex/php-imap/src/EncodingAliases.php deleted file mode 100644 index 9140640e1..000000000 --- a/vendor/webklex/php-imap/src/EncodingAliases.php +++ /dev/null @@ -1,482 +0,0 @@ - "us-ascii", - "us-ascii" => "us-ascii", - "ansi_x3.4-1968" => "us-ascii", - "646" => "us-ascii", - "iso-8859-1" => "ISO-8859-1", - "iso-8859-2" => "ISO-8859-2", - "iso-8859-3" => "ISO-8859-3", - "iso-8859-4" => "ISO-8859-4", - "iso-8859-5" => "ISO-8859-5", - "iso-8859-6" => "ISO-8859-6", - "iso-8859-6-i" => "ISO-8859-6-I", - "iso-8859-6-e" => "ISO-8859-6-E", - "iso-8859-7" => "ISO-8859-7", - "iso-8859-8" => "ISO-8859-8", - "iso-8859-8-i" => "ISO-8859-8-I", - "iso-8859-8-e" => "ISO-8859-8-E", - "iso-8859-9" => "ISO-8859-9", - "iso-8859-10" => "ISO-8859-10", - "iso-8859-11" => "ISO-8859-11", - "iso-8859-13" => "ISO-8859-13", - "iso-8859-14" => "ISO-8859-14", - "iso-8859-15" => "ISO-8859-15", - "iso-8859-16" => "ISO-8859-16", - "iso-ir-111" => "ISO-IR-111", - "iso-2022-cn" => "ISO-2022-CN", - "iso-2022-cn-ext" => "ISO-2022-CN", - "iso-2022-kr" => "ISO-2022-KR", - "iso-2022-jp" => "ISO-2022-JP", - "utf-16be" => "UTF-16BE", - "utf-16le" => "UTF-16LE", - "utf-16" => "UTF-16", - "windows-1250" => "windows-1250", - "windows-1251" => "windows-1251", - "windows-1252" => "windows-1252", - "windows-1253" => "windows-1253", - "windows-1254" => "windows-1254", - "windows-1255" => "windows-1255", - "windows-1256" => "windows-1256", - "windows-1257" => "windows-1257", - "windows-1258" => "windows-1258", - "ibm866" => "IBM866", - "ibm850" => "IBM850", - "ibm852" => "IBM852", - "ibm855" => "IBM855", - "ibm857" => "IBM857", - "ibm862" => "IBM862", - "ibm864" => "IBM864", - "utf-8" => "UTF-8", - "utf-7" => "UTF-7", - "shift_jis" => "Shift_JIS", - "big5" => "Big5", - "euc-jp" => "EUC-JP", - "euc-kr" => "EUC-KR", - "gb2312" => "GB2312", - "gb18030" => "gb18030", - "viscii" => "VISCII", - "koi8-r" => "KOI8-R", - "koi8_r" => "KOI8-R", - "cskoi8r" => "KOI8-R", - "koi" => "KOI8-R", - "koi8" => "KOI8-R", - "koi8-u" => "KOI8-U", - "tis-620" => "TIS-620", - "t.61-8bit" => "T.61-8bit", - "hz-gb-2312" => "HZ-GB-2312", - "big5-hkscs" => "Big5-HKSCS", - "gbk" => "gbk", - "cns11643" => "x-euc-tw", - // - // Aliases for ISO-8859-1 - // - "latin1" => "ISO-8859-1", - "iso_8859-1" => "ISO-8859-1", - "iso8859-1" => "ISO-8859-1", - "iso8859-2" => "ISO-8859-2", - "iso8859-3" => "ISO-8859-3", - "iso8859-4" => "ISO-8859-4", - "iso8859-5" => "ISO-8859-5", - "iso8859-6" => "ISO-8859-6", - "iso8859-7" => "ISO-8859-7", - "iso8859-8" => "ISO-8859-8", - "iso8859-9" => "ISO-8859-9", - "iso8859-10" => "ISO-8859-10", - "iso8859-11" => "ISO-8859-11", - "iso8859-13" => "ISO-8859-13", - "iso8859-14" => "ISO-8859-14", - "iso8859-15" => "ISO-8859-15", - "iso_8859-1:1987" => "ISO-8859-1", - "iso-ir-100" => "ISO-8859-1", - "l1" => "ISO-8859-1", - "ibm819" => "ISO-8859-1", - "cp819" => "ISO-8859-1", - "csisolatin1" => "ISO-8859-1", - // - // Aliases for ISO-8859-2 - // - "latin2" => "ISO-8859-2", - "iso_8859-2" => "ISO-8859-2", - "iso_8859-2:1987" => "ISO-8859-2", - "iso-ir-101" => "ISO-8859-2", - "l2" => "ISO-8859-2", - "csisolatin2" => "ISO-8859-2", - // - // Aliases for ISO-8859-3 - // - "latin3" => "ISO-8859-3", - "iso_8859-3" => "ISO-8859-3", - "iso_8859-3:1988" => "ISO-8859-3", - "iso-ir-109" => "ISO-8859-3", - "l3" => "ISO-8859-3", - "csisolatin3" => "ISO-8859-3", - // - // Aliases for ISO-8859-4 - // - "latin4" => "ISO-8859-4", - "iso_8859-4" => "ISO-8859-4", - "iso_8859-4:1988" => "ISO-8859-4", - "iso-ir-110" => "ISO-8859-4", - "l4" => "ISO-8859-4", - "csisolatin4" => "ISO-8859-4", - // - // Aliases for ISO-8859-5 - // - "cyrillic" => "ISO-8859-5", - "iso_8859-5" => "ISO-8859-5", - "iso_8859-5:1988" => "ISO-8859-5", - "iso-ir-144" => "ISO-8859-5", - "csisolatincyrillic" => "ISO-8859-5", - // - // Aliases for ISO-8859-6 - // - "arabic" => "ISO-8859-6", - "iso_8859-6" => "ISO-8859-6", - "iso_8859-6:1987" => "ISO-8859-6", - "iso-ir-127" => "ISO-8859-6", - "ecma-114" => "ISO-8859-6", - "asmo-708" => "ISO-8859-6", - "csisolatinarabic" => "ISO-8859-6", - // - // Aliases for ISO-8859-6-I - // - "csiso88596i" => "ISO-8859-6-I", - // - // Aliases for ISO-8859-6-E", - // - "csiso88596e" => "ISO-8859-6-E", - // - // Aliases for ISO-8859-7", - // - "greek" => "ISO-8859-7", - "greek8" => "ISO-8859-7", - "sun_eu_greek" => "ISO-8859-7", - "iso_8859-7" => "ISO-8859-7", - "iso_8859-7:1987" => "ISO-8859-7", - "iso-ir-126" => "ISO-8859-7", - "elot_928" => "ISO-8859-7", - "ecma-118" => "ISO-8859-7", - "csisolatingreek" => "ISO-8859-7", - // - // Aliases for ISO-8859-8", - // - "hebrew" => "ISO-8859-8", - "iso_8859-8" => "ISO-8859-8", - "visual" => "ISO-8859-8", - "iso_8859-8:1988" => "ISO-8859-8", - "iso-ir-138" => "ISO-8859-8", - "csisolatinhebrew" => "ISO-8859-8", - // - // Aliases for ISO-8859-8-I", - // - "csiso88598i" => "ISO-8859-8-I", - "iso-8859-8i" => "ISO-8859-8-I", - "logical" => "ISO-8859-8-I", - // - // Aliases for ISO-8859-8-E", - // - "csiso88598e" => "ISO-8859-8-E", - // - // Aliases for ISO-8859-9", - // - "latin5" => "ISO-8859-9", - "iso_8859-9" => "ISO-8859-9", - "iso_8859-9:1989" => "ISO-8859-9", - "iso-ir-148" => "ISO-8859-9", - "l5" => "ISO-8859-9", - "csisolatin5" => "ISO-8859-9", - // - // Aliases for UTF-8", - // - "unicode-1-1-utf-8" => "UTF-8", - // nl_langinfo(CODESET) in HP/UX returns 'utf8' under UTF-8 locales", - "utf8" => "UTF-8", - // - // Aliases for Shift_JIS", - // - "x-sjis" => "Shift_JIS", - "shift-jis" => "Shift_JIS", - "ms_kanji" => "Shift_JIS", - "csshiftjis" => "Shift_JIS", - "windows-31j" => "Shift_JIS", - "cp932" => "Shift_JIS", - "sjis" => "Shift_JIS", - // - // Aliases for EUC_JP", - // - "cseucpkdfmtjapanese" => "EUC-JP", - "x-euc-jp" => "EUC-JP", - // - // Aliases for ISO-2022-JP", - // - "csiso2022jp" => "ISO-2022-JP", - // The following are really not aliases ISO-2022-JP, but sharing the same decoder", - "iso-2022-jp-2" => "ISO-2022-JP", - "csiso2022jp2" => "ISO-2022-JP", - // - // Aliases for Big5", - // - "csbig5" => "Big5", - "cn-big5" => "Big5", - // x-x-big5 is not really a alias for Big5, add it only for MS FrontPage", - "x-x-big5" => "Big5", - // Sun Solaris", - "zh_tw-big5" => "Big5", - // - // Aliases for EUC-KR", - // - "cseuckr" => "EUC-KR", - "ks_c_5601-1987" => "EUC-KR", - "iso-ir-149" => "EUC-KR", - "ks_c_5601-1989" => "EUC-KR", - "ksc_5601" => "EUC-KR", - "ksc5601" => "EUC-KR", - "korean" => "EUC-KR", - "csksc56011987" => "EUC-KR", - "5601" => "EUC-KR", - "windows-949" => "EUC-KR", - // - // Aliases for GB2312", - // - // The following are really not aliases GB2312, add them only for MS FrontPage", - "gb_2312-80" => "GB2312", - "iso-ir-58" => "GB2312", - "chinese" => "GB2312", - "csiso58gb231280" => "GB2312", - "csgb2312" => "GB2312", - "zh_cn.euc" => "GB2312", - // Sun Solaris", - "gb_2312" => "GB2312", - // - // Aliases for windows-125x ", - // - "x-cp1250" => "windows-1250", - "x-cp1251" => "windows-1251", - "x-cp1252" => "windows-1252", - "x-cp1253" => "windows-1253", - "x-cp1254" => "windows-1254", - "x-cp1255" => "windows-1255", - "x-cp1256" => "windows-1256", - "x-cp1257" => "windows-1257", - "x-cp1258" => "windows-1258", - // - // Aliases for windows-874 ", - // - "windows-874" => "windows-874", - "ibm874" => "windows-874", - "dos-874" => "windows-874", - // - // Aliases for macintosh", - // - "macintosh" => "macintosh", - "x-mac-roman" => "macintosh", - "mac" => "macintosh", - "csmacintosh" => "macintosh", - // - // Aliases for IBM866", - // - "cp866" => "IBM866", - "cp-866" => "IBM866", - "866" => "IBM866", - "csibm866" => "IBM866", - // - // Aliases for IBM850", - // - "cp850" => "IBM850", - "850" => "IBM850", - "csibm850" => "IBM850", - // - // Aliases for IBM852", - // - "cp852" => "IBM852", - "852" => "IBM852", - "csibm852" => "IBM852", - // - // Aliases for IBM855", - // - "cp855" => "IBM855", - "855" => "IBM855", - "csibm855" => "IBM855", - // - // Aliases for IBM857", - // - "cp857" => "IBM857", - "857" => "IBM857", - "csibm857" => "IBM857", - // - // Aliases for IBM862", - // - "cp862" => "IBM862", - "862" => "IBM862", - "csibm862" => "IBM862", - // - // Aliases for IBM864", - // - "cp864" => "IBM864", - "864" => "IBM864", - "csibm864" => "IBM864", - "ibm-864" => "IBM864", - // - // Aliases for T.61-8bit", - // - "t.61" => "T.61-8bit", - "iso-ir-103" => "T.61-8bit", - "csiso103t618bit" => "T.61-8bit", - // - // Aliases for UTF-7", - // - "x-unicode-2-0-utf-7" => "UTF-7", - "unicode-2-0-utf-7" => "UTF-7", - "unicode-1-1-utf-7" => "UTF-7", - "csunicode11utf7" => "UTF-7", - // - // Aliases for ISO-10646-UCS-2", - // - "csunicode" => "UTF-16BE", - "csunicode11" => "UTF-16BE", - "iso-10646-ucs-basic" => "UTF-16BE", - "csunicodeascii" => "UTF-16BE", - "iso-10646-unicode-latin1" => "UTF-16BE", - "csunicodelatin1" => "UTF-16BE", - "iso-10646" => "UTF-16BE", - "iso-10646-j-1" => "UTF-16BE", - // - // Aliases for ISO-8859-10", - // - "latin6" => "ISO-8859-10", - "iso-ir-157" => "ISO-8859-10", - "l6" => "ISO-8859-10", - // Currently .properties cannot handle : in key", - //iso_8859-10:1992" => "ISO-8859-10", - "csisolatin6" => "ISO-8859-10", - // - // Aliases for ISO-8859-15", - // - "iso_8859-15" => "ISO-8859-15", - "csisolatin9" => "ISO-8859-15", - "l9" => "ISO-8859-15", - // - // Aliases for ISO-IR-111", - // - "ecma-cyrillic" => "ISO-IR-111", - "csiso111ecmacyrillic" => "ISO-IR-111", - // - // Aliases for ISO-2022-KR", - // - "csiso2022kr" => "ISO-2022-KR", - // - // Aliases for VISCII", - // - "csviscii" => "VISCII", - // - // Aliases for x-euc-tw", - // - "zh_tw-euc" => "x-euc-tw", - // - // Following names appears in unix nl_langinfo(CODESET)", - // They can be compiled as platform specific if necessary", - // DONT put things here if it does not look generic enough (like hp15CN)", - // - "iso88591" => "ISO-8859-1", - "iso88592" => "ISO-8859-2", - "iso88593" => "ISO-8859-3", - "iso88594" => "ISO-8859-4", - "iso88595" => "ISO-8859-5", - "iso88596" => "ISO-8859-6", - "iso88597" => "ISO-8859-7", - "iso88598" => "ISO-8859-8", - "iso88599" => "ISO-8859-9", - "iso885910" => "ISO-8859-10", - "iso885911" => "ISO-8859-11", - "iso885912" => "ISO-8859-12", - "iso885913" => "ISO-8859-13", - "iso885914" => "ISO-8859-14", - "iso885915" => "ISO-8859-15", - "cp1250" => "windows-1250", - "cp1251" => "windows-1251", - "cp1252" => "windows-1252", - "cp1253" => "windows-1253", - "cp1254" => "windows-1254", - "cp1255" => "windows-1255", - "cp1256" => "windows-1256", - "cp1257" => "windows-1257", - "cp1258" => "windows-1258", - "x-gbk" => "gbk", - "windows-936" => "gbk", - "ansi-1251" => "windows-1251", - ]; - - /** - * Returns proper encoding mapping, if exsists. If it doesn't, return unchanged $encoding - * @param string|null $encoding - * @param string|null $fallback - * - * @return string - */ - public static function get($encoding, string $fallback = null): string { - if (isset(self::$aliases[strtolower($encoding ?? '')])) { - return self::$aliases[strtolower($encoding ?? '')]; - } - return $fallback !== null ? $fallback : $encoding; - } - -} diff --git a/vendor/webklex/php-imap/src/Folder.php b/vendor/webklex/php-imap/src/Folder.php deleted file mode 100755 index 01e59cc84..000000000 --- a/vendor/webklex/php-imap/src/Folder.php +++ /dev/null @@ -1,475 +0,0 @@ -client = $client; - - $this->events["message"] = $client->getDefaultEvents("message"); - $this->events["folder"] = $client->getDefaultEvents("folder"); - - $this->setDelimiter($delimiter); - $this->path = $folder_name; - $this->full_name = $this->decodeName($folder_name); - $this->name = $this->getSimpleName($this->delimiter, $this->full_name); - - $this->parseAttributes($attributes); - } - - /** - * Get a new search query instance - * @param string[] $extensions - * - * @return WhereQuery - * @throws Exceptions\ConnectionFailedException - * @throws Exceptions\RuntimeException - */ - public function query(array $extensions = []): WhereQuery { - $this->getClient()->checkConnection(); - $this->getClient()->openFolder($this->path); - $extensions = count($extensions) > 0 ? $extensions : $this->getClient()->extensions; - - return new WhereQuery($this->getClient(), $extensions); - } - - /** - * Get a new search query instance - * @param string[] $extensions - * - * @return WhereQuery - * @throws Exceptions\ConnectionFailedException - * @throws Exceptions\RuntimeException - */ - public function search(array $extensions = []): WhereQuery { - return $this->query($extensions); - } - - /** - * Get a new search query instance - * @param string[] $extensions - * - * @return WhereQuery - * @throws Exceptions\ConnectionFailedException - * @throws Exceptions\RuntimeException - */ - public function messages(array $extensions = []): WhereQuery { - return $this->query($extensions); - } - - /** - * Determine if folder has children. - * - * @return bool - */ - public function hasChildren(): bool { - return $this->has_children; - } - - /** - * Set children. - * @param FolderCollection|array $children - * - * @return self - */ - public function setChildren($children = []): Folder { - $this->children = $children; - - return $this; - } - - /** - * Decode name. - * It converts UTF7-IMAP encoding to UTF-8. - * @param $name - * - * @return array|false|string|string[]|null - */ - protected function decodeName($name) { - return mb_convert_encoding($name, "UTF-8", "UTF7-IMAP"); - } - - /** - * Get simple name (without parent folders). - * @param $delimiter - * @param $full_name - * - * @return mixed - */ - protected function getSimpleName($delimiter, $full_name) { - $arr = explode($delimiter, $full_name); - - return end($arr); - } - - /** - * Parse attributes and set it to object properties. - * @param $attributes - */ - protected function parseAttributes($attributes) { - $this->no_inferiors = in_array('\NoInferiors', $attributes); - $this->no_select = in_array('\NoSelect', $attributes); - $this->marked = in_array('\Marked', $attributes); - $this->referral = in_array('\Referral', $attributes); - $this->has_children = in_array('\HasChildren', $attributes); - } - - /** - * Move or rename the current folder - * @param string $new_name - * @param boolean $expunge - * - * @return bool - * @throws ConnectionFailedException - * @throws Exceptions\EventNotFoundException - * @throws Exceptions\FolderFetchingException - * @throws Exceptions\RuntimeException - */ - public function move(string $new_name, bool $expunge = true): bool { - $this->client->checkConnection(); - $status = $this->client->getConnection()->renameFolder($this->full_name, $new_name); - if($expunge) $this->client->expunge(); - - $folder = $this->client->getFolder($new_name); - $event = $this->getEvent("folder", "moved"); - $event::dispatch($this, $folder); - - return $status; - } - - /** - * Get a message overview - * @param string|null $sequence uid sequence - * - * @return array - * @throws ConnectionFailedException - * @throws Exceptions\InvalidMessageDateException - * @throws Exceptions\MessageNotFoundException - * @throws Exceptions\RuntimeException - */ - public function overview(string $sequence = null): array { - $this->client->openFolder($this->path); - $sequence = $sequence === null ? "1:*" : $sequence; - $uid = ClientManager::get('options.sequence', IMAP::ST_MSGN) == IMAP::ST_UID; - return $this->client->getConnection()->overview($sequence, $uid); - } - - /** - * Append a string message to the current mailbox - * @param string $message - * @param array|null $options - * @param string|null|Carbon $internal_date - * - * @return bool - * @throws Exceptions\ConnectionFailedException - * @throws Exceptions\RuntimeException - */ - public function appendMessage(string $message, array $options = null, $internal_date = null): bool { - /** - * Check if $internal_date is parsed. If it is null it should not be set. Otherwise, the message can't be stored. - * If this parameter is set, it will set the INTERNALDATE on the appended message. The parameter should be a - * date string that conforms to the rfc2060 specifications for a date_time value or be a Carbon object. - */ - - if ($internal_date instanceof Carbon){ - $internal_date = $internal_date->format('d-M-Y H:i:s O'); - } - - return $this->client->getConnection()->appendMessage($this->path, $message, $options, $internal_date); - } - - /** - * Rename the current folder - * @param string $new_name - * @param boolean $expunge - * - * @return bool - * @throws ConnectionFailedException - * @throws Exceptions\EventNotFoundException - * @throws Exceptions\FolderFetchingException - * @throws Exceptions\RuntimeException - */ - public function rename(string $new_name, bool $expunge = true): bool { - return $this->move($new_name, $expunge); - } - - /** - * Delete the current folder - * @param boolean $expunge - * - * @return bool - * @throws Exceptions\ConnectionFailedException - * @throws Exceptions\RuntimeException - * @throws Exceptions\EventNotFoundException - */ - public function delete(bool $expunge = true): bool { - $status = $this->client->getConnection()->deleteFolder($this->path); - if($expunge) $this->client->expunge(); - - $event = $this->getEvent("folder", "deleted"); - $event::dispatch($this); - - return $status; - } - - /** - * Subscribe the current folder - * - * @return bool - * @throws Exceptions\ConnectionFailedException - * @throws Exceptions\RuntimeException - */ - public function subscribe(): bool { - $this->client->openFolder($this->path); - return $this->client->getConnection()->subscribeFolder($this->path); - } - - /** - * Unsubscribe the current folder - * - * @return bool - * @throws Exceptions\ConnectionFailedException - * @throws Exceptions\RuntimeException - */ - public function unsubscribe(): bool { - $this->client->openFolder($this->path); - return $this->client->getConnection()->unsubscribeFolder($this->path); - } - - /** - * Idle the current connection - * @param callable $callback - * @param integer $timeout max 1740 seconds - recommended by rfc2177 ยง3. Should not be lower than the servers "* OK Still here" message interval - * @param boolean $auto_reconnect try to reconnect on connection close (@deprecated is no longer required) - * - * @throws ConnectionFailedException - * @throws Exceptions\InvalidMessageDateException - * @throws Exceptions\MessageContentFetchingException - * @throws Exceptions\MessageHeaderFetchingException - * @throws Exceptions\RuntimeException - * @throws Exceptions\EventNotFoundException - * @throws Exceptions\MessageFlagException - * @throws Exceptions\MessageNotFoundException - * @throws Exceptions\NotSupportedCapabilityException - */ - public function idle(callable $callback, int $timeout = 300, bool $auto_reconnect = false) { - $this->client->setTimeout($timeout); - if (!in_array("IDLE", $this->client->getConnection()->getCapabilities())) { - throw new NotSupportedCapabilityException("IMAP server does not support IDLE"); - } - $this->client->openFolder($this->path, true); - $connection = $this->client->getConnection(); - $connection->idle(); - - $sequence = ClientManager::get('options.sequence', IMAP::ST_MSGN); - - while (true) { - try { - // This polymorphic call is fine - Protocol::idle() will throw an exception beforehand - $line = $connection->nextLine(); - - if (($pos = strpos($line, "EXISTS")) !== false) { - $connection->done(); - $msgn = (int) substr($line, 2, $pos -2); - - $this->client->openFolder($this->path, true); - $message = $this->query()->getMessageByMsgn($msgn); - $message->setSequence($sequence); - $callback($message); - - $event = $this->getEvent("message", "new"); - $event::dispatch($message); - $connection->idle(); - } elseif (strpos($line, "OK") === false) { - $connection->done(); - $connection->idle(); - } - }catch (Exceptions\RuntimeException $e) { - if(strpos($e->getMessage(), "empty response") >= 0 && $connection->connected()) { - $connection->done(); - $connection->idle(); - continue; - } - if(strpos($e->getMessage(), "connection closed") === false) { - throw $e; - } - - $this->client->reconnect(); - $this->client->openFolder($this->path, true); - - $connection = $this->client->getConnection(); - $connection->idle(); - } - } - } - - /** - * Get folder status information - * - * @return array - * @throws Exceptions\ConnectionFailedException - * @throws Exceptions\RuntimeException - */ - public function getStatus(): array { - return $this->examine(); - } - - /** - * @throws RuntimeException - * @throws ConnectionFailedException - */ - public function loadStatus(): Folder - { - $this->status = $this->getStatus(); - return $this; - } - - /** - * Examine the current folder - * - * @return array - * @throws Exceptions\ConnectionFailedException - * @throws Exceptions\RuntimeException - */ - public function examine(): array { - $result = $this->client->getConnection()->examineFolder($this->path); - return is_array($result) ? $result : []; - } - - /** - * Get the current Client instance - * - * @return Client - */ - public function getClient(): Client { - return $this->client; - } - - /** - * Set the delimiter - * @param $delimiter - */ - public function setDelimiter($delimiter){ - if(in_array($delimiter, [null, '', ' ', false]) === true) { - $delimiter = ClientManager::get('options.delimiter', '/'); - } - - $this->delimiter = $delimiter; - } -} diff --git a/vendor/webklex/php-imap/src/Query/WhereQuery.php b/vendor/webklex/php-imap/src/Query/WhereQuery.php deleted file mode 100755 index b6483f6de..000000000 --- a/vendor/webklex/php-imap/src/Query/WhereQuery.php +++ /dev/null @@ -1,546 +0,0 @@ -whereNot(); - $name = substr($name, 3); - } - - if (strpos(strtolower($name), "where") === false) { - $method = 'where' . ucfirst($name); - } else { - $method = lcfirst($name); - } - - if (method_exists($this, $method) === true) { - return call_user_func_array([$that, $method], $arguments); - } - - throw new MethodNotFoundException("Method " . self::class . '::' . $method . '() is not supported'); - } - - /** - * Validate a given criteria - * @param $criteria - * - * @return string - * @throws InvalidWhereQueryCriteriaException - */ - protected function validate_criteria($criteria): string { - $command = strtoupper($criteria); - if (substr($command, 0, 7) === "CUSTOM ") { - return substr($criteria, 7); - } - if (in_array($command, $this->available_criteria) === false) { - throw new InvalidWhereQueryCriteriaException("Invalid imap search criteria: $command"); - } - - return $criteria; - } - - /** - * Register search parameters - * @param mixed $criteria - * @param null $value - * - * @return $this - * @throws InvalidWhereQueryCriteriaException - * - * Examples: - * $query->from("someone@email.tld")->seen(); - * $query->whereFrom("someone@email.tld")->whereSeen(); - * $query->where([["FROM" => "someone@email.tld"], ["SEEN"]]); - * $query->where(["FROM" => "someone@email.tld"])->where(["SEEN"]); - * $query->where(["FROM" => "someone@email.tld", "SEEN"]); - * $query->where("FROM", "someone@email.tld")->where("SEEN"); - */ - public function where($criteria, $value = null): WhereQuery { - if (is_array($criteria)) { - foreach ($criteria as $key => $value) { - if (is_numeric($key)) { - $this->where($value); - }else{ - $this->where($key, $value); - } - } - } else { - $this->push_search_criteria($criteria, $value); - } - - return $this; - } - - /** - * Push a given search criteria and value pair to the search query - * @param $criteria string - * @param $value mixed - * - * @throws InvalidWhereQueryCriteriaException - */ - protected function push_search_criteria(string $criteria, $value){ - $criteria = $this->validate_criteria($criteria); - $value = $this->parse_value($value); - - if ($value === null || $value === '') { - $this->query->push([$criteria]); - } else { - $this->query->push([$criteria, $value]); - } - } - - /** - * @param Closure $closure - * - * @return $this - */ - public function orWhere(Closure $closure = null): WhereQuery { - $this->query->push(['OR']); - if ($closure !== null) $closure($this); - - return $this; - } - - /** - * @param Closure $closure - * - * @return $this - */ - public function andWhere(Closure $closure = null): WhereQuery { - $this->query->push(['AND']); - if ($closure !== null) $closure($this); - - return $this; - } - - /** - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereAll(): WhereQuery { - return $this->where('ALL'); - } - - /** - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereAnswered(): WhereQuery { - return $this->where('ANSWERED'); - } - - /** - * @param string $value - * - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereBcc(string $value): WhereQuery { - return $this->where('BCC', $value); - } - - /** - * @param mixed $value - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - * @throws MessageSearchValidationException - */ - public function whereBefore($value): WhereQuery { - $date = $this->parse_date($value); - return $this->where('BEFORE', $date); - } - - /** - * @param string $value - * - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereBody(string $value): WhereQuery { - return $this->where('BODY', $value); - } - - /** - * @param string $value - * - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereCc(string $value): WhereQuery { - return $this->where('CC', $value); - } - - /** - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereDeleted(): WhereQuery { - return $this->where('DELETED'); - } - - /** - * @param string $value - * - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereFlagged(string $value): WhereQuery { - return $this->where('FLAGGED', $value); - } - - /** - * @param string $value - * - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereFrom(string $value): WhereQuery { - return $this->where('FROM', $value); - } - - /** - * @param string $value - * - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereKeyword(string $value): WhereQuery { - return $this->where('KEYWORD', $value); - } - - /** - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereNew(): WhereQuery { - return $this->where('NEW'); - } - - /** - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereNot(): WhereQuery { - return $this->where('NOT'); - } - - /** - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereOld(): WhereQuery { - return $this->where('OLD'); - } - - /** - * @param mixed $value - * - * @return WhereQuery - * @throws MessageSearchValidationException - * @throws InvalidWhereQueryCriteriaException - */ - public function whereOn($value): WhereQuery { - $date = $this->parse_date($value); - return $this->where('ON', $date); - } - - /** - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereRecent(): WhereQuery { - return $this->where('RECENT'); - } - - /** - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereSeen(): WhereQuery { - return $this->where('SEEN'); - } - - /** - * @param mixed $value - * - * @return WhereQuery - * @throws MessageSearchValidationException - * @throws InvalidWhereQueryCriteriaException - */ - public function whereSince($value): WhereQuery { - $date = $this->parse_date($value); - return $this->where('SINCE', $date); - } - - /** - * @param string $value - * - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereSubject(string $value): WhereQuery { - return $this->where('SUBJECT', $value); - } - - /** - * @param string $value - * - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereText(string $value): WhereQuery { - return $this->where('TEXT', $value); - } - - /** - * @param string $value - * - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereTo(string $value): WhereQuery { - return $this->where('TO', $value); - } - - /** - * @param string $value - * - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereUnkeyword(string $value): WhereQuery { - return $this->where('UNKEYWORD', $value); - } - - /** - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereUnanswered(): WhereQuery { - return $this->where('UNANSWERED'); - } - - /** - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereUndeleted(): WhereQuery { - return $this->where('UNDELETED'); - } - - /** - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereUnflagged(): WhereQuery { - return $this->where('UNFLAGGED'); - } - - /** - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereUnseen(): WhereQuery { - return $this->where('UNSEEN'); - } - - /** - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereNoXSpam(): WhereQuery { - return $this->where("CUSTOM X-Spam-Flag NO"); - } - - /** - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereIsXSpam(): WhereQuery { - return $this->where("CUSTOM X-Spam-Flag YES"); - } - - /** - * Search for a specific header value - * @param $header - * @param $value - * - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereHeader($header, $value): WhereQuery { - return $this->where("CUSTOM HEADER $header $value"); - } - - /** - * Search for a specific message id - * @param $messageId - * - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereMessageId($messageId): WhereQuery { - return $this->whereHeader("Message-ID", $messageId); - } - - /** - * Search for a specific message id - * @param $messageId - * - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereInReplyTo($messageId): WhereQuery { - return $this->whereHeader("In-Reply-To", $messageId); - } - - /** - * @param $country_code - * - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereLanguage($country_code): WhereQuery { - return $this->where("Content-Language $country_code"); - } - - /** - * Get message be it UID. - * - * @param int|string $uid - * - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereUid($uid): WhereQuery { - return $this->where('UID', $uid); - } - - /** - * Get messages by their UIDs. - * - * @param array $uids - * - * @return WhereQuery - * @throws InvalidWhereQueryCriteriaException - */ - public function whereUidIn(array $uids): WhereQuery { - $uids = implode(',', $uids); - return $this->where('UID', $uids); - } - - /** - * Apply the callback if the given "value" is truthy. - * copied from @url https://github.com/laravel/framework/blob/8.x/src/Illuminate/Support/Traits/Conditionable.php - * - * @param mixed $value - * @param callable $callback - * @param callable|null $default - * @return $this|mixed - */ - public function when($value, callable $callback, $default = null) { - if ($value) { - return $callback($this, $value) ?: $this; - } elseif ($default) { - return $default($this, $value) ?: $this; - } - - return $this; - } - - /** - * Apply the callback if the given "value" is falsy. - * copied from @url https://github.com/laravel/framework/blob/8.x/src/Illuminate/Support/Traits/Conditionable.php - * - * @param mixed $value - * @param callable $callback - * @param callable|null $default - * @return $this|mixed - */ - public function unless($value, callable $callback, $default = null) { - if (!$value) { - return $callback($this, $value) ?: $this; - } elseif ($default) { - return $default($this, $value) ?: $this; - } - - return $this; - } -} \ No newline at end of file