Simple Calendar – Google Calendar Plugin - Version 3.1.34

Version Description

  • Dev: Tested up to WordPress 5.6
  • Fix: OR searches will now work as OR, not as AND
  • Fix: Revert Guzzle to < 7.x version to avoid conflicts (temporary)
Download this release

Release Info

Developer sureswiftcapital
Plugin Icon 128x128 Simple Calendar – Google Calendar Plugin
Version 3.1.34
Comparing to
See all releases

Code changes from version 3.1.33 to 3.1.34

Files changed (242) hide show
  1. assets/css/admin-add-calendar.min.css +2 -2
  2. assets/css/admin.min.css +2 -2
  3. assets/css/default-calendar-grid.min.css +2 -2
  4. assets/css/default-calendar-list.min.css +2 -2
  5. assets/js/admin-add-calendar.min.js +2 -2
  6. assets/js/admin.min.js +2 -2
  7. assets/js/default-calendar.min.js +2 -2
  8. google-calendar-events.php +2 -2
  9. includes/calendars/default-calendar.php +269 -269
  10. includes/feeds/google.php +43 -1
  11. readme.txt +7 -2
  12. vendor/composer/ClassLoader.php +3 -3
  13. vendor/composer/InstalledVersions.php +461 -0
  14. vendor/composer/autoload_classmap.php +24 -2
  15. vendor/composer/autoload_files.php +5 -0
  16. vendor/composer/autoload_namespaces.php +0 -1
  17. vendor/composer/autoload_psr4.php +4 -1
  18. vendor/composer/autoload_real.php +3 -1
  19. vendor/composer/autoload_static.php +49 -11
  20. vendor/composer/installed.json +1755 -1535
  21. vendor/composer/installed.php +276 -0
  22. vendor/composer/platform_check.php +26 -0
  23. vendor/google/apiclient-services/src/Google/Service/Calendar.php +134 -134
  24. vendor/google/apiclient-services/src/Google/Service/Calendar/Acl.php +2 -2
  25. vendor/google/apiclient-services/src/Google/Service/Calendar/CalendarList.php +2 -2
  26. vendor/google/apiclient-services/src/Google/Service/Calendar/CalendarListEntry.php +2 -2
  27. vendor/google/apiclient-services/src/Google/Service/Calendar/CalendarListEntryNotificationSettings.php +2 -2
  28. vendor/google/apiclient-services/src/Google/Service/Calendar/Colors.php +4 -4
  29. vendor/google/apiclient-services/src/Google/Service/Calendar/ConferenceData.php +2 -2
  30. vendor/google/apiclient-services/src/Google/Service/Calendar/Event.php +4 -4
  31. vendor/google/apiclient-services/src/Google/Service/Calendar/EventReminders.php +2 -2
  32. vendor/google/apiclient-services/src/Google/Service/Calendar/Events.php +4 -4
  33. vendor/google/apiclient-services/src/Google/Service/Calendar/FreeBusyCalendar.php +4 -4
  34. vendor/google/apiclient-services/src/Google/Service/Calendar/FreeBusyGroup.php +2 -2
  35. vendor/google/apiclient-services/src/Google/Service/Calendar/FreeBusyRequest.php +2 -2
  36. vendor/google/apiclient-services/src/Google/Service/Calendar/FreeBusyResponse.php +4 -4
  37. vendor/google/apiclient-services/src/Google/Service/Calendar/Resource/Acl.php +13 -13
  38. vendor/google/apiclient-services/src/Google/Service/Calendar/Resource/CalendarList.php +10 -10
  39. vendor/google/apiclient-services/src/Google/Service/Calendar/Resource/Events.php +127 -127
  40. vendor/google/apiclient-services/src/Google/Service/Calendar/Resource/Settings.php +8 -8
  41. vendor/google/apiclient-services/src/Google/Service/Calendar/Settings.php +2 -2
  42. vendor/google/apiclient-services/src/Google/Service/Drive.php +1 -1
  43. vendor/google/apiclient-services/src/Google/Service/Drive/About.php +4 -4
  44. vendor/google/apiclient-services/src/Google/Service/Drive/ChangeList.php +2 -2
  45. vendor/google/apiclient-services/src/Google/Service/Drive/Comment.php +2 -2
  46. vendor/google/apiclient-services/src/Google/Service/Drive/CommentList.php +2 -2
  47. vendor/google/apiclient-services/src/Google/Service/Drive/DriveFile.php +6 -6
  48. vendor/google/apiclient-services/src/Google/Service/Drive/DriveList.php +2 -2
  49. vendor/google/apiclient-services/src/Google/Service/Drive/FileList.php +2 -2
  50. vendor/google/apiclient-services/src/Google/Service/Drive/Permission.php +4 -4
  51. vendor/google/apiclient-services/src/Google/Service/Drive/PermissionList.php +2 -2
  52. vendor/google/apiclient-services/src/Google/Service/Drive/ReplyList.php +2 -2
  53. vendor/google/apiclient-services/src/Google/Service/Drive/Resource/Files.php +12 -25
  54. vendor/google/apiclient-services/src/Google/Service/Drive/Resource/Permissions.php +6 -11
  55. vendor/google/apiclient-services/src/Google/Service/Drive/RevisionList.php +2 -2
  56. vendor/google/apiclient-services/src/Google/Service/Drive/TeamDriveList.php +2 -2
  57. vendor/google/apiclient-services/synth.metadata +18 -0
  58. vendor/google/apiclient-services/synth.py +119 -0
  59. vendor/google/apiclient/README.md +11 -11
  60. vendor/google/apiclient/composer.json +8 -5
  61. vendor/google/apiclient/src/{Google/AccessToken → AccessToken}/Revoke.php +6 -3
  62. vendor/google/apiclient/src/{Google/AccessToken → AccessToken}/Verify.php +15 -7
  63. vendor/google/apiclient/src/{Google/AuthHandler → AuthHandler}/AuthHandlerFactory.php +8 -5
  64. vendor/google/apiclient/src/{Google/AuthHandler → AuthHandler}/Guzzle5AuthHandler.php +12 -1
  65. vendor/google/apiclient/src/{Google/AuthHandler → AuthHandler}/Guzzle6AuthHandler.php +13 -2
  66. vendor/google/apiclient/src/{Google/AuthHandler → AuthHandler}/Guzzle7AuthHandler.php +3 -1
  67. vendor/google/apiclient/src/{Google/Client.php → Client.php} +85 -50
  68. vendor/google/apiclient/src/{Google/Collection.php → Collection.php} +4 -2
  69. vendor/google/apiclient/src/{Google/Exception.php → Exception.php} +5 -1
  70. vendor/google/apiclient/src/{Google/Http → Http}/Batch.php +12 -7
  71. vendor/google/apiclient/src/{Google/Http → Http}/MediaFileUpload.php +14 -9
  72. vendor/google/apiclient/src/{Google/Http → Http}/REST.php +17 -12
  73. vendor/google/apiclient/src/{Google/Model.php → Model.php} +12 -5
  74. vendor/google/apiclient/src/{Google/Service.php → Service.php} +22 -7
  75. vendor/google/apiclient/src/{Google/Service → Service}/Exception.php +6 -2
  76. vendor/google/apiclient/src/{Google/Service → Service}/README.md +0 -0
  77. vendor/google/apiclient/src/{Google/Service → Service}/Resource.php +16 -10
  78. vendor/google/apiclient/src/{Google/Task → Task}/Composer.php +8 -5
  79. vendor/google/apiclient/src/{Google/Task → Task}/Exception.php +5 -1
  80. vendor/google/apiclient/src/{Google/Task → Task}/Retryable.php +3 -1
  81. vendor/google/apiclient/src/{Google/Task → Task}/Runner.php +15 -10
  82. vendor/google/apiclient/src/{Google/Utils → Utils}/UriTemplate.php +3 -1
  83. vendor/google/apiclient/src/aliases.php +65 -0
  84. vendor/google/auth/CHANGELOG.md +16 -0
  85. vendor/google/auth/src/ApplicationDefaultCredentials.php +14 -5
  86. vendor/google/auth/src/Credentials/GCECredentials.php +2 -1
  87. vendor/google/auth/src/Credentials/ServiceAccountCredentials.php +24 -4
  88. vendor/google/auth/src/Credentials/ServiceAccountJwtAccessCredentials.php +3 -0
  89. vendor/google/auth/src/CredentialsLoader.php +13 -4
  90. vendor/google/auth/src/FetchAuthTokenCache.php +63 -31
  91. vendor/google/auth/src/OAuth2.php +21 -3
  92. vendor/guzzlehttp/guzzle/CHANGELOG.md +16 -97
  93. vendor/guzzlehttp/guzzle/Dockerfile +18 -0
  94. vendor/guzzlehttp/guzzle/LICENSE +1 -1
  95. vendor/guzzlehttp/guzzle/README.md +31 -20
  96. vendor/guzzlehttp/guzzle/UPGRADING.md +3 -53
  97. vendor/guzzlehttp/guzzle/composer.json +6 -19
  98. vendor/guzzlehttp/guzzle/psalm.baseline.xml +0 -87
  99. vendor/guzzlehttp/guzzle/src/Client.php +117 -89
  100. vendor/guzzlehttp/guzzle/src/ClientInterface.php +13 -10
  101. vendor/guzzlehttp/guzzle/src/ClientTrait.php +0 -241
  102. vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php +66 -63
  103. vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php +11 -9
  104. vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php +18 -28
  105. vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php +15 -20
  106. vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php +84 -91
  107. vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php +9 -21
  108. vendor/guzzlehttp/guzzle/src/Exception/ClientException.php +0 -1
  109. vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php +10 -29
  110. vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php +18 -4
  111. vendor/guzzlehttp/guzzle/src/Exception/RequestException.php +57 -29
  112. vendor/guzzlehttp/guzzle/src/Exception/SeekException.php +27 -0
  113. vendor/guzzlehttp/guzzle/src/Exception/ServerException.php +0 -1
  114. vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php +0 -1
  115. vendor/guzzlehttp/guzzle/src/Exception/TransferException.php +0 -1
  116. vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php +146 -165
  117. vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php +5 -3
  118. vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php +9 -13
  119. vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php +38 -77
  120. vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php +14 -41
  121. vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php +50 -70
  122. vendor/guzzlehttp/guzzle/src/Handler/Proxy.php +10 -14
  123. vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php +118 -151
  124. vendor/guzzlehttp/guzzle/src/HandlerStack.php +72 -66
  125. vendor/guzzlehttp/guzzle/src/MessageFormatter.php +32 -48
  126. vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php +0 -22
  127. vendor/guzzlehttp/guzzle/src/Middleware.php +48 -53
  128. vendor/guzzlehttp/guzzle/src/Pool.php +22 -21
  129. vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php +15 -11
  130. vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php +53 -34
  131. vendor/guzzlehttp/guzzle/src/RequestOptions.php +31 -32
  132. vendor/guzzlehttp/guzzle/src/RetryMiddleware.php +42 -32
  133. vendor/guzzlehttp/guzzle/src/TransferStats.php +21 -30
  134. vendor/guzzlehttp/guzzle/src/UriTemplate.php +237 -0
  135. vendor/guzzlehttp/guzzle/src/Utils.php +31 -333
  136. vendor/guzzlehttp/guzzle/src/functions.php +221 -54
  137. vendor/guzzlehttp/guzzle/src/functions_include.php +1 -1
  138. vendor/guzzlehttp/promises/CHANGELOG.md +16 -0
  139. vendor/guzzlehttp/promises/README.md +35 -7
  140. vendor/guzzlehttp/promises/composer.json +9 -4
  141. vendor/guzzlehttp/promises/phpstan-baseline.neon +7 -0
  142. vendor/guzzlehttp/promises/phpstan.neon.dist +10 -0
  143. vendor/guzzlehttp/{guzzle → promises}/psalm.xml +1 -2
  144. vendor/guzzlehttp/promises/src/AggregateException.php +1 -0
  145. vendor/guzzlehttp/promises/src/CancellationException.php +1 -0
  146. vendor/guzzlehttp/promises/src/Coroutine.php +23 -5
  147. vendor/guzzlehttp/promises/src/Create.php +84 -0
  148. vendor/guzzlehttp/promises/src/Each.php +90 -0
  149. vendor/guzzlehttp/promises/src/EachPromise.php +47 -23
  150. vendor/guzzlehttp/promises/src/FulfilledPromise.php +6 -4
  151. vendor/guzzlehttp/promises/src/Is.php +46 -0
  152. vendor/guzzlehttp/promises/src/Promise.php +33 -35
  153. vendor/guzzlehttp/promises/src/PromiseInterface.php +4 -0
  154. vendor/guzzlehttp/promises/src/PromisorInterface.php +1 -0
  155. vendor/guzzlehttp/promises/src/RejectedPromise.php +9 -5
  156. vendor/guzzlehttp/promises/src/RejectionException.php +2 -1
  157. vendor/guzzlehttp/promises/src/TaskQueue.php +3 -2
  158. vendor/guzzlehttp/promises/src/TaskQueueInterface.php +1 -2
  159. vendor/guzzlehttp/promises/src/Utils.php +274 -0
  160. vendor/guzzlehttp/promises/src/functions.php +80 -174
  161. vendor/guzzlehttp/psr7/CHANGELOG.md +25 -1
  162. vendor/guzzlehttp/psr7/README.md +193 -129
  163. vendor/guzzlehttp/psr7/composer.json +3 -3
  164. vendor/guzzlehttp/psr7/src/AppendStream.php +4 -1
  165. vendor/guzzlehttp/psr7/src/BufferStream.php +3 -0
  166. vendor/guzzlehttp/psr7/src/CachingStream.php +2 -1
  167. vendor/guzzlehttp/psr7/src/DroppingStream.php +1 -0
  168. vendor/guzzlehttp/psr7/src/FnStream.php +2 -0
  169. vendor/guzzlehttp/psr7/src/Header.php +71 -0
  170. vendor/guzzlehttp/psr7/src/InflateStream.php +1 -0
  171. vendor/guzzlehttp/psr7/src/LazyOpenStream.php +2 -1
  172. vendor/guzzlehttp/psr7/src/LimitStream.php +1 -0
  173. vendor/guzzlehttp/psr7/src/Message.php +252 -0
  174. vendor/guzzlehttp/psr7/src/MessageTrait.php +4 -3
  175. vendor/guzzlehttp/psr7/src/MimeType.php +140 -0
  176. vendor/guzzlehttp/psr7/src/MultipartStream.php +6 -5
  177. vendor/guzzlehttp/psr7/src/NoSeekStream.php +1 -0
  178. vendor/guzzlehttp/psr7/src/PumpStream.php +4 -1
  179. vendor/guzzlehttp/psr7/src/Query.php +108 -0
  180. vendor/guzzlehttp/psr7/src/Request.php +2 -1
  181. vendor/guzzlehttp/psr7/src/Response.php +3 -2
  182. vendor/guzzlehttp/psr7/src/ServerRequest.php +3 -1
  183. vendor/guzzlehttp/psr7/src/Stream.php +6 -3
  184. vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php +3 -1
  185. vendor/guzzlehttp/psr7/src/StreamWrapper.php +2 -0
  186. vendor/guzzlehttp/psr7/src/UploadedFile.php +10 -1
  187. vendor/guzzlehttp/psr7/src/Uri.php +1 -0
  188. vendor/guzzlehttp/psr7/src/UriNormalizer.php +1 -0
  189. vendor/guzzlehttp/psr7/src/UriResolver.php +1 -0
  190. vendor/guzzlehttp/psr7/src/Utils.php +398 -0
  191. vendor/guzzlehttp/psr7/src/functions.php +130 -612
  192. vendor/mexitek/phpcolors/README.md +1 -0
  193. vendor/mexitek/phpcolors/src/Mexitek/PHPColors/Color.php +165 -0
  194. vendor/mexitek/phpcolors/tests/colorConvertHex.phpt +170 -0
  195. vendor/monolog/monolog/CHANGELOG.md +19 -0
  196. vendor/monolog/monolog/README.md +5 -1
  197. vendor/monolog/monolog/composer.json +10 -13
  198. vendor/monolog/monolog/phpstan.neon.dist +20 -0
  199. vendor/monolog/monolog/src/Monolog/ErrorHandler.php +5 -6
  200. vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php +10 -5
  201. vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php +1 -0
  202. vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php +0 -2
  203. vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php +0 -3
  204. vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php +3 -3
  205. vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php +19 -8
  206. vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php +2 -2
  207. vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php +12 -1
  208. vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php +12 -3
  209. vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php +1 -1
  210. vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php +6 -4
  211. vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php +2 -0
  212. vendor/monolog/monolog/src/Monolog/Handler/ElasticaHandler.php +1 -1
  213. vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php +13 -3
  214. vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php +14 -3
  215. vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php +1 -2
  216. vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php +4 -1
  217. vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php +3 -1
  218. vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php +6 -5
  219. vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php +12 -7
  220. vendor/monolog/monolog/src/Monolog/Handler/OverflowHandler.php +11 -3
  221. vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php +0 -3
  222. vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php +0 -1
  223. vendor/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php +67 -0
  224. vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php +13 -3
  225. vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php +3 -3
  226. vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php +1 -1
  227. vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php +7 -6
  228. vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php +2 -0
  229. vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php +12 -4
  230. vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php +6 -4
  231. vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php +24 -2
  232. vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php +1 -1
  233. vendor/monolog/monolog/src/Monolog/Logger.php +70 -74
  234. vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php +1 -1
  235. vendor/monolog/monolog/src/Monolog/SignalHandler.php +0 -3
  236. vendor/monolog/monolog/src/Monolog/Test/TestCase.php +0 -3
  237. vendor/monolog/monolog/src/Monolog/Utils.php +8 -11
  238. vendor/nesbot/carbon/composer.json +1 -1
  239. vendor/nesbot/carbon/readme.md +0 -2
  240. vendor/nesbot/carbon/src/Carbon/Carbon.php +1 -1
  241. vendor/nesbot/carbon/src/Carbon/CarbonImmutable.php +1 -1
  242. vendor/nesbot/carbon/src/Carbon/CarbonInterface.php +222 -481
assets/css/admin-add-calendar.min.css CHANGED
@@ -1,6 +1,6 @@
1
- /*! Simple Calendar - 3.1.33
2
  * https://simplecalendar.io
3
- * Copyright (c) Moonstone Media 2020
4
  * Licensed GPLv2+ */
5
 
6
  body #_simcal_attach_calendar_id,body .simcal-calendar-widget-settings select{width:100%}body .select2-container--default .select2-selection--single{border-color:#ccc;border-radius:0}body .select2-container{z-index:1000000}body.post-type-gce_feed #gce-insert-shortcode-button{display:none}.wp-media-buttons a.add_calendar span.wp-media-buttons-icon{background:0 0}.gce-insert-shortcode-panel{max-width:90%;position:relative}.gce-insert-shortcode-panel select{display:block;max-width:470px;width:100%}body .gce-insert-shortcode-modal{height:220px!important;margin-left:-250px!important;width:500px!important}body .gce-insert-shortcode-modal-title{background:#fff!important;border-bottom:none!important;height:0!important}
1
+ /*! Simple Calendar - 3.1.34
2
  * https://simplecalendar.io
3
+ * Copyright (c) Moonstone Media 2021
4
  * Licensed GPLv2+ */
5
 
6
  body #_simcal_attach_calendar_id,body .simcal-calendar-widget-settings select{width:100%}body .select2-container--default .select2-selection--single{border-color:#ccc;border-radius:0}body .select2-container{z-index:1000000}body.post-type-gce_feed #gce-insert-shortcode-button{display:none}.wp-media-buttons a.add_calendar span.wp-media-buttons-icon{background:0 0}.gce-insert-shortcode-panel{max-width:90%;position:relative}.gce-insert-shortcode-panel select{display:block;max-width:470px;width:100%}body .gce-insert-shortcode-modal{height:220px!important;margin-left:-250px!important;width:500px!important}body .gce-insert-shortcode-modal-title{background:#fff!important;border-bottom:none!important;height:0!important}
assets/css/admin.min.css CHANGED
@@ -1,6 +1,6 @@
1
- /*! Simple Calendar - 3.1.33
2
  * https://simplecalendar.io
3
- * Copyright (c) Moonstone Media 2020
4
  * Licensed GPLv2+ */
5
 
6
  @font-face{font-family:simple-calendar;src:url(../fonts/simple-calendar.eot?43976014);src:url(../fonts/simple-calendar.eot?43976014#iefix) format("embedded-opentype"),url(../fonts/simple-calendar.woff?43976014) format("woff"),url(../fonts/simple-calendar.ttf?43976014) format("truetype"),url(../fonts/simple-calendar.svg?43976014#simple-calendar) format("svg");font-weight:400;font-style:normal}[class*=" simcal-icon-"]:before,[class^=simcal-icon-]:before{display:inline-block;font-family:simple-calendar;font-style:normal;font-weight:400;margin-right:.2em;speak:none;text-decoration:inherit;text-align:center;width:1em;font-variant:normal;text-transform:none;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.simcal-icon-spin{-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear;display:inline-block}@-moz-keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-o-keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-ms-keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.simcal-icon-animate:before{transition:all .2s ease-in-out}.simcal-icon-rotate-180:before{transform:rotate(180deg)}.simcal-icon-calendar-empty:before{content:'\e800'}.simcal-icon-calendar:before{content:'\e801'}.simcal-icon-calendar-logo:before{content:'\e802'}.simcal-icon-settings:before{content:'\e804'}.simcal-icon-toggles:before{content:'\e805'}.simcal-icon-list:before{content:'\e806'}.simcal-icon-event:before{content:'\e807'}.simcal-icon-help:before{content:'\e808'}.simcal-icon-panel:before{content:'\e80a'}.simcal-icon-grid:before{content:'\e80b'}.simcal-icon-google:before{content:'\e80c'}.simcal-icon-docs:before{content:'\e80f'}.simcal-icon-hourglass:before{content:'\e811'}.simcal-icon-globe:before{content:'\e812'}.simcal-icon-timezones:before{content:'\e813'}.simcal-icon-warning:before{content:'\e815'}.simcal-icon-wordpress:before{content:'\e814'}.simcal-icon-up:before{content:'\e80e'}.simcal-icon-right:before{content:'\e809'}.simcal-icon-down:before{content:'\e80d'}.simcal-icon-left:before{content:'\e803'}.simcal-icon-spinner:before{content:'\e810'}.simcal-help-tip{color:rgba(0,0,0,.46);cursor:help}#tiptip_holder{display:none;left:0;position:absolute;top:0;z-index:9999999}#tiptip_holder.tip_top{padding-bottom:5px}#tiptip_holder.tip_bottom{padding-top:5px}#tiptip_holder.tip_right{padding-left:5px}#tiptip_holder.tip_left{padding-right:5px}#tiptip_content{background-color:rgba(25,25,25,.92);border:1px solid rgba(255,255,255,.25);border-radius:3px;color:#fff;font-size:11px;padding:4px 8px}#tiptip_arrow,#tiptip_arrow_inner{border-color:transparent;border-style:solid;border-width:6px;height:0;position:absolute;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{border-top-color:rgba(25,25,25,.92);margin-left:-6px;margin-top:-7px}#tiptip_holder.tip_bottom #tiptip_arrow_inner{border-bottom-color:rgba(25,25,25,.92);margin-left:-6px;margin-top:-5px}#tiptip_holder.tip_right #tiptip_arrow_inner{border-right-color:rgba(25,25,25,.92);margin-left:-5px;margin-top:-6px}#tiptip_holder.tip_left #tiptip_arrow_inner{border-left-color:rgba(25,25,25,.92);margin-left:-7px;margin-top:-6px}@media screen and (-webkit-min-device-pixel-ratio:0){#tiptip_content{background-color:rgba(45,45,45,.88);padding:4px 8px 5px 8px}#tiptip_holder.tip_bottom #tiptip_arrow_inner{border-bottom-color:rgba(45,45,45,.88)}#tiptip_holder.tip_top #tiptip_arrow_inner{border-top-color:rgba(20,20,20,.92)}}.simcal-dismiss-notice{color:#ccc;float:right;margin-top:9px;text-decoration:none}.simcal-dismiss-notice:hover{color:#aaa}.simcal-dismiss-notice:active,.simcal-dismiss-notice:focus{outline:0}.wp-admin .simcal-field-inline,.wp-admin .simcal-field-inline>input,.wp-admin .simcal-field-inline>select{display:inline-block;vertical-align:baseline}body .simcal-field-tiny,body .simcal-panel-field .simcal-field-tiny{max-width:60px}body .simcal-field-small,body .simcal-panel-field .simcal-field-small{max-width:100px}body .simcal-field-select-enhanced,body .simcal-field-textarea{max-width:500px;width:100%}.select2-container{z-index:999999}body .simcal-field-textarea{min-height:64px;vertical-align:top}.simcal-field-radios>i{margin-left:5px;vertical-align:middle}.simcal-field-radios-inline{display:inline-block;margin:0}.simcal-field-radios-inline>li{display:inline-block;margin-right:10px}.simcal-field-radios-inline>li:last-child{margin-right:0}.simcal-field-bool>input{line-height:2.4}.simcal-field-date-picker>input[type=text]{max-width:120px}#ui-datepicker-div.simcal-date-picker{background-color:#fff;box-shadow:0 2px 10px rgba(0,0,0,.1);padding:8px 10px}#ui-datepicker-div.simcal-date-picker .ui-datepicker-header>a{display:inline-block;cursor:pointer;margin-top:7px}#ui-datepicker-div.simcal-date-picker .ui-datepicker-header>a:first-of-type{float:left}#ui-datepicker-div.simcal-date-picker .ui-datepicker-header>a:last-of-type{float:right}#ui-datepicker-div.simcal-date-picker .ui-datepicker-header .ui-datepicker-title{margin:0 10% 4px}#ui-datepicker-div.simcal-date-picker .ui-datepicker-header .ui-datepicker-title>select{width:48.5%}#ui-datepicker-div.simcal-date-picker .ui-datepicker-today{background-color:#eee}#ui-datepicker-div.simcal-date-picker>table tr td,#ui-datepicker-div.simcal-date-picker>table tr th{padding:2px 4px;text-align:center}#ui-datepicker-div.simcal-date-picker>table tr td a,#ui-datepicker-div.simcal-date-picker>table tr th a{text-decoration:none}.simcal-field-datetime-format{padding:10px 0 5px}.simcal-field-datetime-format>div{background-color:rgba(0,0,0,.03);border:1px dashed rgba(0,0,0,.18);border-radius:3px;cursor:move;display:inline-block;float:left;margin:0 10px 15px 0;padding:10px}.simcal-field-datetime-format select{display:block}.simcal-field-datetime-format>span{clear:both;display:block}.simcal-field-datetime-format .ui-sortable-helper{box-shadow:-2px 4px 8px rgba(0,0,0,.12);transform:rotate(2deg)}#simcal-settings-page .simcal-wide-text{width:40em}#simcal-settings-page .select2{max-width:500px}#simcal-settings-page .select2-search__field{border:0!important;box-shadow:none!important;margin:0}#simcal-settings-page .select2-search__field:focus{border:0!important;box-shadow:none!important}#simcal-settings-page .select2-selection{border:1px solid #ddd;border-radius:0}#simcal-settings-page .select2-container--open .select2-selection{border-color:#5b9dd9;box-shadow:0 0 2px rgba(30,140,190,.8)}.about-wrap .simcal-badge{position:absolute;top:0;right:0}.simcal-badge{background-image:url(../images/welcome/icon-185x185.png);height:185px;width:185px}#simcal-welcome .whats-new-wrap img{margin:1em 2em 1em 0;border:1px solid #d6d6d6;box-sizing:border-box;vertical-align:top}#simcal-system-status-report textarea{font-family:monospace;min-height:200px;padding:5px 20px;white-space:pre;width:100%}.simcal-system-status-report-panel{margin:20px 0}.simcal-system-status-report-panel thead th{font-weight:700}.simcal-system-status-report-panel tbody td,.simcal-system-status-report-panel thead th{font-size:14px;vertical-align:top}.simcal-system-status-report-panel tbody .tooltip{text-align:center;width:20px}.simcal-system-status-report-panel tbody .label{width:30%}.simcal-system-status-report-panel tbody tr:nth-child(odd) td{background-color:rgba(0,0,0,.02)}.simcal-system-status-report-panel dl{margin:0;padding:0}.simcal-system-status-report-panel dt{float:left;font-style:italic;margin:0 4px 0 0}.simcal-system-status-report-panel dd{margin:0}.simcal-system-status-report-panel mark{background-color:transparent;font-weight:700}.simcal-system-status-report-panel mark.ok{color:green}.simcal-system-status-report-panel mark.error{color:red}#simcal-reset-licenses{color:red}.ui-datepicker{left:-9999px;position:absolute}#simcal-clear-cache{float:right;margin:0 10px 10px}#simcal-get-shortcode .inside{padding:5px 15px 10px;text-align:center}#simcal-get-shortcode input{width:100%}#simcal-newsletter,#simcal-upgrade{background-color:#fcf8e3}#simcal-newsletter input,#simcal-upgrade input{width:100%}#simcal-upgrade .centered{text-align:center}#simcal-upgrade .heading{font-size:16px}#simcal-upgrade .button-large{font-size:16px;line-height:30px;height:32px}#simcal-calendar-settings{display:none}#simcal-calendar-settings .hndle{line-height:2;padding:10px}#simcal-calendar-settings .inside{margin:0;padding:0}#simcal-calendar-settings .select2-container{border-radius:0;max-width:500px}#simcal-calendar-settings .select2-search__field{border:0!important;box-shadow:none!important;margin:0}#simcal-calendar-settings .select2-search__field:focus{border:0!important;box-shadow:none!important}#simcal-calendar-settings .select2-selection{border:1px solid #ddd;border-radius:0}#simcal-calendar-settings .select2-container--open .select2-selection{border-color:#5b9dd9;box-shadow:0 0 2px rgba(30,140,190,.8)}#simcal-calendar-settings .select2-selection__choice{margin-bottom:0}#simcal-calendar-settings .wp-picker-container{vertical-align:inherit}.simcal-box-handle{display:inline-block;line-height:1;margin-left:8px}.simcal-box-handle:before{content:'\2014';display:inline-block;font-weight:400}.simcal-box-handle label{font-size:12px;font-weight:400;margin-right:10px;vertical-align:baseline}.simcal-box-handle select{font-weight:700;margin:-3px 0 0 .5em;vertical-align:middle}.simcal-tabs{background:#fafafa;border-right:1px solid #eee;box-sizing:border-box;float:left;line-height:1em;margin:0;padding:0 0 10px;position:relative;width:20%}.simcal-tabs a{border-bottom:1px solid #eee;display:block;line-height:20px!important;margin:0;padding:10px;text-decoration:none}.simcal-tabs a:focus{box-shadow:none}.simcal-tabs li{display:block;margin:0;padding:0}.simcal-tabs li.active a{background-color:#eee;color:#555;position:relative}.simcal-tabs:after{background-color:#fafafa;border-right:1px solid #eee;bottom:-9999em;content:"";display:block;height:9999em;left:0;position:absolute;width:100%}.simcal-panels-wrap{background:#fff;overflow:hidden}.simcal-panel{margin-left:20%;max-width:80%}.simcal-panel>table{padding-bottom:11px;width:100%}.simcal-panel>table thead th{border-bottom:1px solid #eee;font-size:14px;font-weight:700;padding:12px 0 15px 10px;text-align:left}.simcal-panel>table>tbody tr:first-child td,.simcal-panel>table>tbody tr:first-child th{padding-top:14px}.simcal-panel>table>tbody tr:last-child td,.simcal-panel>table>tbody tr:last-child th{border-bottom:1px solid #eee;padding-bottom:14px}.simcal-panel>table>tbody:last-of-type tr:last-child td,.simcal-panel>table>tbody:last-of-type tr:last-child th{border-bottom:0}.simcal-panel-field>td{width:82%}.simcal-panel-field>th{font-weight:400;min-width:100px;width:15%}.simcal-panel-field>td,.simcal-panel-field>th{padding:9px 3% 9px 10px;text-align:left;vertical-align:text-top}.simcal-panel-field .simcal-field-text{max-width:500px;width:90%}@media screen and (max-width:1023px){.simcal-box-handle{display:block;line-height:2;margin:16px 0 0}.simcal-box-handle:before{display:none}.simcal-box-handle label{display:table;margin-bottom:16px;width:100%}.simcal-box-handle label>span{display:table-cell;width:20%}.simcal-box-handle label>select{display:table-cell;width:80%}.simcal-box-handle .simcal-tabs{width:16%}.simcal-box-handle .simcal-tabs i{font-size:18px;line-height:1}.simcal-box-handle .simcal-tabs span{display:none}.simcal-box-handle .simcal-panel{margin-left:16%;max-width:84%}.simcal-box-handle .simcal-panel-section{display:block;overflow:hidden}.simcal-box-handle .simcal-panel-field th{display:block;width:100%}.simcal-box-handle .simcal-panel-field td{display:inline-block;width:100%}.simcal-box-handle .simcal-panel-field select{max-width:86%}}input.simcal-shortcode{border:dashed 1px rgba(0,0,0,.3);color:rgba(0,0,0,.58);font-family:monospace;font-weight:700;text-align:center}
1
+ /*! Simple Calendar - 3.1.34
2
  * https://simplecalendar.io
3
+ * Copyright (c) Moonstone Media 2021
4
  * Licensed GPLv2+ */
5
 
6
  @font-face{font-family:simple-calendar;src:url(../fonts/simple-calendar.eot?43976014);src:url(../fonts/simple-calendar.eot?43976014#iefix) format("embedded-opentype"),url(../fonts/simple-calendar.woff?43976014) format("woff"),url(../fonts/simple-calendar.ttf?43976014) format("truetype"),url(../fonts/simple-calendar.svg?43976014#simple-calendar) format("svg");font-weight:400;font-style:normal}[class*=" simcal-icon-"]:before,[class^=simcal-icon-]:before{display:inline-block;font-family:simple-calendar;font-style:normal;font-weight:400;margin-right:.2em;speak:none;text-decoration:inherit;text-align:center;width:1em;font-variant:normal;text-transform:none;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.simcal-icon-spin{-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear;display:inline-block}@-moz-keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-o-keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-ms-keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.simcal-icon-animate:before{transition:all .2s ease-in-out}.simcal-icon-rotate-180:before{transform:rotate(180deg)}.simcal-icon-calendar-empty:before{content:'\e800'}.simcal-icon-calendar:before{content:'\e801'}.simcal-icon-calendar-logo:before{content:'\e802'}.simcal-icon-settings:before{content:'\e804'}.simcal-icon-toggles:before{content:'\e805'}.simcal-icon-list:before{content:'\e806'}.simcal-icon-event:before{content:'\e807'}.simcal-icon-help:before{content:'\e808'}.simcal-icon-panel:before{content:'\e80a'}.simcal-icon-grid:before{content:'\e80b'}.simcal-icon-google:before{content:'\e80c'}.simcal-icon-docs:before{content:'\e80f'}.simcal-icon-hourglass:before{content:'\e811'}.simcal-icon-globe:before{content:'\e812'}.simcal-icon-timezones:before{content:'\e813'}.simcal-icon-warning:before{content:'\e815'}.simcal-icon-wordpress:before{content:'\e814'}.simcal-icon-up:before{content:'\e80e'}.simcal-icon-right:before{content:'\e809'}.simcal-icon-down:before{content:'\e80d'}.simcal-icon-left:before{content:'\e803'}.simcal-icon-spinner:before{content:'\e810'}.simcal-help-tip{color:rgba(0,0,0,.46);cursor:help}#tiptip_holder{display:none;left:0;position:absolute;top:0;z-index:9999999}#tiptip_holder.tip_top{padding-bottom:5px}#tiptip_holder.tip_bottom{padding-top:5px}#tiptip_holder.tip_right{padding-left:5px}#tiptip_holder.tip_left{padding-right:5px}#tiptip_content{background-color:rgba(25,25,25,.92);border:1px solid rgba(255,255,255,.25);border-radius:3px;color:#fff;font-size:11px;padding:4px 8px}#tiptip_arrow,#tiptip_arrow_inner{border-color:transparent;border-style:solid;border-width:6px;height:0;position:absolute;width:0}#tiptip_holder.tip_top #tiptip_arrow_inner{border-top-color:rgba(25,25,25,.92);margin-left:-6px;margin-top:-7px}#tiptip_holder.tip_bottom #tiptip_arrow_inner{border-bottom-color:rgba(25,25,25,.92);margin-left:-6px;margin-top:-5px}#tiptip_holder.tip_right #tiptip_arrow_inner{border-right-color:rgba(25,25,25,.92);margin-left:-5px;margin-top:-6px}#tiptip_holder.tip_left #tiptip_arrow_inner{border-left-color:rgba(25,25,25,.92);margin-left:-7px;margin-top:-6px}@media screen and (-webkit-min-device-pixel-ratio:0){#tiptip_content{background-color:rgba(45,45,45,.88);padding:4px 8px 5px 8px}#tiptip_holder.tip_bottom #tiptip_arrow_inner{border-bottom-color:rgba(45,45,45,.88)}#tiptip_holder.tip_top #tiptip_arrow_inner{border-top-color:rgba(20,20,20,.92)}}.simcal-dismiss-notice{color:#ccc;float:right;margin-top:9px;text-decoration:none}.simcal-dismiss-notice:hover{color:#aaa}.simcal-dismiss-notice:active,.simcal-dismiss-notice:focus{outline:0}.wp-admin .simcal-field-inline,.wp-admin .simcal-field-inline>input,.wp-admin .simcal-field-inline>select{display:inline-block;vertical-align:baseline}body .simcal-field-tiny,body .simcal-panel-field .simcal-field-tiny{max-width:60px}body .simcal-field-small,body .simcal-panel-field .simcal-field-small{max-width:100px}body .simcal-field-select-enhanced,body .simcal-field-textarea{max-width:500px;width:100%}.select2-container{z-index:999999}body .simcal-field-textarea{min-height:64px;vertical-align:top}.simcal-field-radios>i{margin-left:5px;vertical-align:middle}.simcal-field-radios-inline{display:inline-block;margin:0}.simcal-field-radios-inline>li{display:inline-block;margin-right:10px}.simcal-field-radios-inline>li:last-child{margin-right:0}.simcal-field-bool>input{line-height:2.4}.simcal-field-date-picker>input[type=text]{max-width:120px}#ui-datepicker-div.simcal-date-picker{background-color:#fff;box-shadow:0 2px 10px rgba(0,0,0,.1);padding:8px 10px}#ui-datepicker-div.simcal-date-picker .ui-datepicker-header>a{display:inline-block;cursor:pointer;margin-top:7px}#ui-datepicker-div.simcal-date-picker .ui-datepicker-header>a:first-of-type{float:left}#ui-datepicker-div.simcal-date-picker .ui-datepicker-header>a:last-of-type{float:right}#ui-datepicker-div.simcal-date-picker .ui-datepicker-header .ui-datepicker-title{margin:0 10% 4px}#ui-datepicker-div.simcal-date-picker .ui-datepicker-header .ui-datepicker-title>select{width:48.5%}#ui-datepicker-div.simcal-date-picker .ui-datepicker-today{background-color:#eee}#ui-datepicker-div.simcal-date-picker>table tr td,#ui-datepicker-div.simcal-date-picker>table tr th{padding:2px 4px;text-align:center}#ui-datepicker-div.simcal-date-picker>table tr td a,#ui-datepicker-div.simcal-date-picker>table tr th a{text-decoration:none}.simcal-field-datetime-format{padding:10px 0 5px}.simcal-field-datetime-format>div{background-color:rgba(0,0,0,.03);border:1px dashed rgba(0,0,0,.18);border-radius:3px;cursor:move;display:inline-block;float:left;margin:0 10px 15px 0;padding:10px}.simcal-field-datetime-format select{display:block}.simcal-field-datetime-format>span{clear:both;display:block}.simcal-field-datetime-format .ui-sortable-helper{box-shadow:-2px 4px 8px rgba(0,0,0,.12);transform:rotate(2deg)}#simcal-settings-page .simcal-wide-text{width:40em}#simcal-settings-page .select2{max-width:500px}#simcal-settings-page .select2-search__field{border:0!important;box-shadow:none!important;margin:0}#simcal-settings-page .select2-search__field:focus{border:0!important;box-shadow:none!important}#simcal-settings-page .select2-selection{border:1px solid #ddd;border-radius:0}#simcal-settings-page .select2-container--open .select2-selection{border-color:#5b9dd9;box-shadow:0 0 2px rgba(30,140,190,.8)}.about-wrap .simcal-badge{position:absolute;top:0;right:0}.simcal-badge{background-image:url(../images/welcome/icon-185x185.png);height:185px;width:185px}#simcal-welcome .whats-new-wrap img{margin:1em 2em 1em 0;border:1px solid #d6d6d6;box-sizing:border-box;vertical-align:top}#simcal-system-status-report textarea{font-family:monospace;min-height:200px;padding:5px 20px;white-space:pre;width:100%}.simcal-system-status-report-panel{margin:20px 0}.simcal-system-status-report-panel thead th{font-weight:700}.simcal-system-status-report-panel tbody td,.simcal-system-status-report-panel thead th{font-size:14px;vertical-align:top}.simcal-system-status-report-panel tbody .tooltip{text-align:center;width:20px}.simcal-system-status-report-panel tbody .label{width:30%}.simcal-system-status-report-panel tbody tr:nth-child(odd) td{background-color:rgba(0,0,0,.02)}.simcal-system-status-report-panel dl{margin:0;padding:0}.simcal-system-status-report-panel dt{float:left;font-style:italic;margin:0 4px 0 0}.simcal-system-status-report-panel dd{margin:0}.simcal-system-status-report-panel mark{background-color:transparent;font-weight:700}.simcal-system-status-report-panel mark.ok{color:green}.simcal-system-status-report-panel mark.error{color:red}#simcal-reset-licenses{color:red}.ui-datepicker{left:-9999px;position:absolute}#simcal-clear-cache{float:right;margin:0 10px 10px}#simcal-get-shortcode .inside{padding:5px 15px 10px;text-align:center}#simcal-get-shortcode input{width:100%}#simcal-newsletter,#simcal-upgrade{background-color:#fcf8e3}#simcal-newsletter input,#simcal-upgrade input{width:100%}#simcal-upgrade .centered{text-align:center}#simcal-upgrade .heading{font-size:16px}#simcal-upgrade .button-large{font-size:16px;line-height:30px;height:32px}#simcal-calendar-settings{display:none}#simcal-calendar-settings .hndle{line-height:2;padding:10px}#simcal-calendar-settings .inside{margin:0;padding:0}#simcal-calendar-settings .select2-container{border-radius:0;max-width:500px}#simcal-calendar-settings .select2-search__field{border:0!important;box-shadow:none!important;margin:0}#simcal-calendar-settings .select2-search__field:focus{border:0!important;box-shadow:none!important}#simcal-calendar-settings .select2-selection{border:1px solid #ddd;border-radius:0}#simcal-calendar-settings .select2-container--open .select2-selection{border-color:#5b9dd9;box-shadow:0 0 2px rgba(30,140,190,.8)}#simcal-calendar-settings .select2-selection__choice{margin-bottom:0}#simcal-calendar-settings .wp-picker-container{vertical-align:inherit}.simcal-box-handle{display:inline-block;line-height:1;margin-left:8px}.simcal-box-handle:before{content:'\2014';display:inline-block;font-weight:400}.simcal-box-handle label{font-size:12px;font-weight:400;margin-right:10px;vertical-align:baseline}.simcal-box-handle select{font-weight:700;margin:-3px 0 0 .5em;vertical-align:middle}.simcal-tabs{background:#fafafa;border-right:1px solid #eee;box-sizing:border-box;float:left;line-height:1em;margin:0;padding:0 0 10px;position:relative;width:20%}.simcal-tabs a{border-bottom:1px solid #eee;display:block;line-height:20px!important;margin:0;padding:10px;text-decoration:none}.simcal-tabs a:focus{box-shadow:none}.simcal-tabs li{display:block;margin:0;padding:0}.simcal-tabs li.active a{background-color:#eee;color:#555;position:relative}.simcal-tabs:after{background-color:#fafafa;border-right:1px solid #eee;bottom:-9999em;content:"";display:block;height:9999em;left:0;position:absolute;width:100%}.simcal-panels-wrap{background:#fff;overflow:hidden}.simcal-panel{margin-left:20%;max-width:80%}.simcal-panel>table{padding-bottom:11px;width:100%}.simcal-panel>table thead th{border-bottom:1px solid #eee;font-size:14px;font-weight:700;padding:12px 0 15px 10px;text-align:left}.simcal-panel>table>tbody tr:first-child td,.simcal-panel>table>tbody tr:first-child th{padding-top:14px}.simcal-panel>table>tbody tr:last-child td,.simcal-panel>table>tbody tr:last-child th{border-bottom:1px solid #eee;padding-bottom:14px}.simcal-panel>table>tbody:last-of-type tr:last-child td,.simcal-panel>table>tbody:last-of-type tr:last-child th{border-bottom:0}.simcal-panel-field>td{width:82%}.simcal-panel-field>th{font-weight:400;min-width:100px;width:15%}.simcal-panel-field>td,.simcal-panel-field>th{padding:9px 3% 9px 10px;text-align:left;vertical-align:text-top}.simcal-panel-field .simcal-field-text{max-width:500px;width:90%}@media screen and (max-width:1023px){.simcal-box-handle{display:block;line-height:2;margin:16px 0 0}.simcal-box-handle:before{display:none}.simcal-box-handle label{display:table;margin-bottom:16px;width:100%}.simcal-box-handle label>span{display:table-cell;width:20%}.simcal-box-handle label>select{display:table-cell;width:80%}.simcal-box-handle .simcal-tabs{width:16%}.simcal-box-handle .simcal-tabs i{font-size:18px;line-height:1}.simcal-box-handle .simcal-tabs span{display:none}.simcal-box-handle .simcal-panel{margin-left:16%;max-width:84%}.simcal-box-handle .simcal-panel-section{display:block;overflow:hidden}.simcal-box-handle .simcal-panel-field th{display:block;width:100%}.simcal-box-handle .simcal-panel-field td{display:inline-block;width:100%}.simcal-box-handle .simcal-panel-field select{max-width:86%}}input.simcal-shortcode{border:dashed 1px rgba(0,0,0,.3);color:rgba(0,0,0,.58);font-family:monospace;font-weight:700;text-align:center}
assets/css/default-calendar-grid.min.css CHANGED
@@ -1,6 +1,6 @@
1
- /*! Simple Calendar - 3.1.33
2
  * https://simplecalendar.io
3
- * Copyright (c) Moonstone Media 2020
4
  * Licensed GPLv2+ */
5
 
6
  @font-face{font-family:simple-calendar;src:url(../fonts/simple-calendar.eot?43976014);src:url(../fonts/simple-calendar.eot?43976014#iefix) format("embedded-opentype"),url(../fonts/simple-calendar.woff?43976014) format("woff"),url(../fonts/simple-calendar.ttf?43976014) format("truetype"),url(../fonts/simple-calendar.svg?43976014#simple-calendar) format("svg");font-weight:400;font-style:normal}[class*=" simcal-icon-"]:before,[class^=simcal-icon-]:before{display:inline-block;font-family:simple-calendar;font-style:normal;font-weight:400;margin-right:.2em;speak:none;text-decoration:inherit;text-align:center;width:1em;font-variant:normal;text-transform:none;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.simcal-icon-spin{-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear;display:inline-block}@-moz-keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-o-keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-ms-keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.simcal-icon-animate:before{transition:all .2s ease-in-out}.simcal-icon-rotate-180:before{transform:rotate(180deg)}.simcal-icon-calendar-empty:before{content:'\e800'}.simcal-icon-calendar:before{content:'\e801'}.simcal-icon-calendar-logo:before{content:'\e802'}.simcal-icon-settings:before{content:'\e804'}.simcal-icon-toggles:before{content:'\e805'}.simcal-icon-list:before{content:'\e806'}.simcal-icon-event:before{content:'\e807'}.simcal-icon-help:before{content:'\e808'}.simcal-icon-panel:before{content:'\e80a'}.simcal-icon-grid:before{content:'\e80b'}.simcal-icon-google:before{content:'\e80c'}.simcal-icon-docs:before{content:'\e80f'}.simcal-icon-hourglass:before{content:'\e811'}.simcal-icon-globe:before{content:'\e812'}.simcal-icon-timezones:before{content:'\e813'}.simcal-icon-warning:before{content:'\e815'}.simcal-icon-wordpress:before{content:'\e814'}.simcal-icon-up:before{content:'\e80e'}.simcal-icon-right:before{content:'\e809'}.simcal-icon-down:before{content:'\e80d'}.simcal-icon-left:before{content:'\e803'}.simcal-icon-spinner:before{content:'\e810'}.simcal-calendar{position:relative}.simcal-powered{display:block;margin:-10px 0 20px}.simcal-align-left{text-align:left}.simcal-align-right{text-align:right}.simcal-default-calendar .simcal-current h3{margin:0;padding:0}.simcal-default-calendar .simcal-nav{vertical-align:middle}.simcal-default-calendar .simcal-nav-button{background:0 0;border:0;box-shadow:none;cursor:pointer;margin:0;outline:0;padding:0;transition:margin .2s ease-out;width:100%}.simcal-default-calendar .simcal-nav-button:focus,.simcal-default-calendar .simcal-nav-button:hover{background:0 0;border:0;box-shadow:none;outline:0}.simcal-default-calendar .simcal-nav-button.simcal-prev:hover{margin-left:-10px}.simcal-default-calendar .simcal-nav-button.simcal-next:hover{margin-right:-10px}.simcal-default-calendar .simcal-nav-button:disabled{cursor:default}.simcal-default-calendar .simcal-nav-button:disabled:hover{margin:0;padding:0}.simcal-default-calendar .simcal-events{list-style:none;margin-left:0}.simcal-default-calendar .simcal-events-toggle{border:0;box-shadow:none;text-align:center;width:100%}.simcal-default-calendar .simcal-events-toggle:active,.simcal-default-calendar .simcal-events-toggle:focus,.simcal-default-calendar .simcal-events-toggle:hover{border:0;box-shadow:none;outline:0}.simcal-default-calendar ul.simcal-attachments,.simcal-default-calendar ul.simcal-attendees{margin:0;padding:0}.simcal-default-calendar li.simcal-attachment,.simcal-default-calendar li.simcal-attendee{list-style:none;margin-bottom:4px}.simcal-default-calendar li.simcal-attachment:last-child,.simcal-default-calendar li.simcal-attendee:last-child{margin-bottom:0}.simcal-default-calendar li.simcal-attachment small,.simcal-default-calendar li.simcal-attendee small{opacity:.9;text-transform:lowercase}.simcal-default-calendar .simcal-organizer a,.simcal-default-calendar li.simcal-attachment a,.simcal-default-calendar li.simcal-attendee a{border-bottom:0;text-decoration:none}.simcal-default-calendar .simcal-organizer img,.simcal-default-calendar li.simcal-attachment img,.simcal-default-calendar li.simcal-attendee img{display:inline-block;margin:0 4px;max-height:24px;max-width:24px}.simcal-default-calendar .simcal-tooltip-content{font-size:1.2em;line-height:1.4;padding:5px}.simcal-default-calendar .simcal-ajax-loader{height:100%;left:0;position:absolute;top:0;width:100%}.simcal-default-calendar .simcal-ajax-loader>i{font-size:48px;left:50%;line-height:1;margin:-36px 0 0 -36px;position:absolute;top:50%}.simcal-default-calendar .simcal-ajax-loader.simcal-spinner-top>i{top:20%}.simcal-default-calendar .simcal-ajax-loader.simcal-spinner-bottom>i{bottom:20%;top:auto}.simcal-default-calendar-light .simcal-nav-button{color:rgba(0,0,0,.6)}.simcal-default-calendar-light .simcal-nav-button:disabled{color:rgba(255,255,255,.9)!important}.simcal-default-calendar-light .simcal-nav-button:disabled:hover{color:rgba(255,255,255,.9)!important}.simcal-default-calendar-light .simcal-nav-button:focus,.simcal-default-calendar-light .simcal-nav-button:hover{color:rgba(0,0,0,.9)}.simcal-default-calendar-light .simcal-events-toggle{color:rgba(0,0,0,.6)}.simcal-default-calendar-light .simcal-events-toggle:hover{background-color:rgba(0,0,0,.1);color:#fff}.simcal-default-calendar-light .simcal-ajax-loader{background-color:rgba(0,0,0,.1)}.simcal-default-calendar-light .simcal-ajax-loader>i{color:rgba(0,0,0,.3)}.simcal-default-calendar-dark .simcal-nav-button{color:rgba(255,255,255,.6)}.simcal-default-calendar-dark .simcal-nav-button:disabled{color:rgba(0,0,0,.9)!important}.simcal-default-calendar-dark .simcal-nav-button:disabled:hover{color:rgba(0,0,0,.9)!important}.simcal-default-calendar-dark .simcal-nav-button:focus,.simcal-default-calendar-dark .simcal-nav-button:hover{color:rgba(255,255,255,.9)}.simcal-default-calendar-dark .simcal-events-toggle{color:rgba(255,255,255,.6)}.simcal-default-calendar-dark .simcal-events-toggle:hover{background-color:rgba(255,255,255,.1);color:#000}.simcal-default-calendar-dark .simcal-ajax-loader{background-color:rgba(255,255,255,.1)}.simcal-default-calendar-dark .simcal-ajax-loader>i{color:rgba(255,255,255,.3)}.simcal-default-calendar-grid>table{table-layout:fixed;width:100%}.simcal-default-calendar-grid>table tbody td,.simcal-default-calendar-grid>table thead th{text-align:center;vertical-align:top}.simcal-default-calendar-grid>table tbody td{padding:0!important}.simcal-default-calendar-grid .simcal-calendar-head .simcal-nav{padding:10px 0;vertical-align:middle}.simcal-default-calendar-grid .simcal-calendar-head .simcal-nav.simcal-current,.simcal-default-calendar-grid .simcal-calendar-head .simcal-nav.simcal-prev-wrapper{border-right:0}.simcal-default-calendar-grid .simcal-day>div{box-sizing:content-box;display:block;height:100%}.simcal-default-calendar-grid .simcal-day-void{border-width:0 0 1px 0;height:100%;min-height:32px}.simcal-default-calendar-grid .simcal-day-void.simcal-day-void-last{border-right-width:1px}.simcal-default-calendar-grid .simcal-day-number{display:block;line-height:1;padding:2px 4px 3px;vertical-align:middle}.simcal-default-calendar-grid .simcal-no-events{display:block;min-height:32px}.simcal-default-calendar-grid.simcal-default-calendar-light .simcal-day:hover{background-color:rgba(0,0,0,.1)}.simcal-default-calendar-grid.simcal-default-calendar-light .simcal-day-void{background-color:rgba(0,0,0,.04)}.simcal-default-calendar-grid.simcal-default-calendar-light .simcal-day-void:hover{background-color:rgba(0,0,0,.04)}.simcal-default-calendar-grid.simcal-default-calendar-light .simcal-day-number{background:rgba(0,0,0,.1)}.simcal-default-calendar-grid.simcal-default-calendar-dark .simcal-day:hover{background-color:rgba(255,255,255,.18)}.simcal-default-calendar-grid.simcal-default-calendar-dark .simcal-day-void{background-color:rgba(255,255,255,.05)}.simcal-default-calendar-grid.simcal-default-calendar-dark .simcal-day-void:hover{background-color:rgba(255,255,255,.05)}.simcal-default-calendar-grid.simcal-default-calendar-dark .simcal-day-number{background:rgba(255,255,255,.1)}.simcal-default-calendar-grid .simcal-events{font-size:.68em;line-height:1.4;list-style:none;margin:0;padding:0;text-align:left}.simcal-default-calendar-grid .simcal-events>.simcal-event{border-bottom-style:solid;border-bottom-width:1px;cursor:pointer;list-style:none;margin:0 0 2px 0;padding:4px}.simcal-default-calendar-grid .simcal-events>.simcal-event:hover{text-decoration:underline}.simcal-default-calendar-grid .simcal-events>.simcal-event:last-child{border-bottom:0;margin-bottom:0}.simcal-default-calendar-grid.simcal-default-calendar-light .simcal-event{border-bottom-color:rgba(0,0,0,.1)}.simcal-default-calendar-grid.simcal-default-calendar-dark .simcal-event{border-bottom-color:rgba(255,255,255,.1)}.simcal-default-calendar-grid .simcal-events-dots{cursor:pointer;display:block;line-height:.7;margin:3px 0;text-align:center}.simcal-default-calendar-grid .simcal-events-toggle{background:0 0;display:block;font-size:10px;padding:2px 0}.simcal-event-bubble{background-color:#fff;border:1px solid rgba(0,0,0,.1);box-shadow:0 1px 2px rgba(0,0,0,.1)}.simcal-event-bubble .simcal-event-details .simcal-event-description,.simcal-event-bubble .simcal-event-details p{margin:0 0 1em}
1
+ /*! Simple Calendar - 3.1.34
2
  * https://simplecalendar.io
3
+ * Copyright (c) Moonstone Media 2021
4
  * Licensed GPLv2+ */
5
 
6
  @font-face{font-family:simple-calendar;src:url(../fonts/simple-calendar.eot?43976014);src:url(../fonts/simple-calendar.eot?43976014#iefix) format("embedded-opentype"),url(../fonts/simple-calendar.woff?43976014) format("woff"),url(../fonts/simple-calendar.ttf?43976014) format("truetype"),url(../fonts/simple-calendar.svg?43976014#simple-calendar) format("svg");font-weight:400;font-style:normal}[class*=" simcal-icon-"]:before,[class^=simcal-icon-]:before{display:inline-block;font-family:simple-calendar;font-style:normal;font-weight:400;margin-right:.2em;speak:none;text-decoration:inherit;text-align:center;width:1em;font-variant:normal;text-transform:none;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.simcal-icon-spin{-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear;display:inline-block}@-moz-keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-o-keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-ms-keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.simcal-icon-animate:before{transition:all .2s ease-in-out}.simcal-icon-rotate-180:before{transform:rotate(180deg)}.simcal-icon-calendar-empty:before{content:'\e800'}.simcal-icon-calendar:before{content:'\e801'}.simcal-icon-calendar-logo:before{content:'\e802'}.simcal-icon-settings:before{content:'\e804'}.simcal-icon-toggles:before{content:'\e805'}.simcal-icon-list:before{content:'\e806'}.simcal-icon-event:before{content:'\e807'}.simcal-icon-help:before{content:'\e808'}.simcal-icon-panel:before{content:'\e80a'}.simcal-icon-grid:before{content:'\e80b'}.simcal-icon-google:before{content:'\e80c'}.simcal-icon-docs:before{content:'\e80f'}.simcal-icon-hourglass:before{content:'\e811'}.simcal-icon-globe:before{content:'\e812'}.simcal-icon-timezones:before{content:'\e813'}.simcal-icon-warning:before{content:'\e815'}.simcal-icon-wordpress:before{content:'\e814'}.simcal-icon-up:before{content:'\e80e'}.simcal-icon-right:before{content:'\e809'}.simcal-icon-down:before{content:'\e80d'}.simcal-icon-left:before{content:'\e803'}.simcal-icon-spinner:before{content:'\e810'}.simcal-calendar{position:relative}.simcal-powered{display:block;margin:-10px 0 20px}.simcal-align-left{text-align:left}.simcal-align-right{text-align:right}.simcal-default-calendar .simcal-current h3{margin:0;padding:0}.simcal-default-calendar .simcal-nav{vertical-align:middle}.simcal-default-calendar .simcal-nav-button{background:0 0;border:0;box-shadow:none;cursor:pointer;margin:0;outline:0;padding:0;transition:margin .2s ease-out;width:100%}.simcal-default-calendar .simcal-nav-button:focus,.simcal-default-calendar .simcal-nav-button:hover{background:0 0;border:0;box-shadow:none;outline:0}.simcal-default-calendar .simcal-nav-button.simcal-prev:hover{margin-left:-10px}.simcal-default-calendar .simcal-nav-button.simcal-next:hover{margin-right:-10px}.simcal-default-calendar .simcal-nav-button:disabled{cursor:default}.simcal-default-calendar .simcal-nav-button:disabled:hover{margin:0;padding:0}.simcal-default-calendar .simcal-events{list-style:none;margin-left:0}.simcal-default-calendar .simcal-events-toggle{border:0;box-shadow:none;text-align:center;width:100%}.simcal-default-calendar .simcal-events-toggle:active,.simcal-default-calendar .simcal-events-toggle:focus,.simcal-default-calendar .simcal-events-toggle:hover{border:0;box-shadow:none;outline:0}.simcal-default-calendar ul.simcal-attachments,.simcal-default-calendar ul.simcal-attendees{margin:0;padding:0}.simcal-default-calendar li.simcal-attachment,.simcal-default-calendar li.simcal-attendee{list-style:none;margin-bottom:4px}.simcal-default-calendar li.simcal-attachment:last-child,.simcal-default-calendar li.simcal-attendee:last-child{margin-bottom:0}.simcal-default-calendar li.simcal-attachment small,.simcal-default-calendar li.simcal-attendee small{opacity:.9;text-transform:lowercase}.simcal-default-calendar .simcal-organizer a,.simcal-default-calendar li.simcal-attachment a,.simcal-default-calendar li.simcal-attendee a{border-bottom:0;text-decoration:none}.simcal-default-calendar .simcal-organizer img,.simcal-default-calendar li.simcal-attachment img,.simcal-default-calendar li.simcal-attendee img{display:inline-block;margin:0 4px;max-height:24px;max-width:24px}.simcal-default-calendar .simcal-tooltip-content{font-size:1.2em;line-height:1.4;padding:5px}.simcal-default-calendar .simcal-ajax-loader{height:100%;left:0;position:absolute;top:0;width:100%}.simcal-default-calendar .simcal-ajax-loader>i{font-size:48px;left:50%;line-height:1;margin:-36px 0 0 -36px;position:absolute;top:50%}.simcal-default-calendar .simcal-ajax-loader.simcal-spinner-top>i{top:20%}.simcal-default-calendar .simcal-ajax-loader.simcal-spinner-bottom>i{bottom:20%;top:auto}.simcal-default-calendar-light .simcal-nav-button{color:rgba(0,0,0,.6)}.simcal-default-calendar-light .simcal-nav-button:disabled{color:rgba(255,255,255,.9)!important}.simcal-default-calendar-light .simcal-nav-button:disabled:hover{color:rgba(255,255,255,.9)!important}.simcal-default-calendar-light .simcal-nav-button:focus,.simcal-default-calendar-light .simcal-nav-button:hover{color:rgba(0,0,0,.9)}.simcal-default-calendar-light .simcal-events-toggle{color:rgba(0,0,0,.6)}.simcal-default-calendar-light .simcal-events-toggle:hover{background-color:rgba(0,0,0,.1);color:#fff}.simcal-default-calendar-light .simcal-ajax-loader{background-color:rgba(0,0,0,.1)}.simcal-default-calendar-light .simcal-ajax-loader>i{color:rgba(0,0,0,.3)}.simcal-default-calendar-dark .simcal-nav-button{color:rgba(255,255,255,.6)}.simcal-default-calendar-dark .simcal-nav-button:disabled{color:rgba(0,0,0,.9)!important}.simcal-default-calendar-dark .simcal-nav-button:disabled:hover{color:rgba(0,0,0,.9)!important}.simcal-default-calendar-dark .simcal-nav-button:focus,.simcal-default-calendar-dark .simcal-nav-button:hover{color:rgba(255,255,255,.9)}.simcal-default-calendar-dark .simcal-events-toggle{color:rgba(255,255,255,.6)}.simcal-default-calendar-dark .simcal-events-toggle:hover{background-color:rgba(255,255,255,.1);color:#000}.simcal-default-calendar-dark .simcal-ajax-loader{background-color:rgba(255,255,255,.1)}.simcal-default-calendar-dark .simcal-ajax-loader>i{color:rgba(255,255,255,.3)}.simcal-default-calendar-grid>table{table-layout:fixed;width:100%}.simcal-default-calendar-grid>table tbody td,.simcal-default-calendar-grid>table thead th{text-align:center;vertical-align:top}.simcal-default-calendar-grid>table tbody td{padding:0!important}.simcal-default-calendar-grid .simcal-calendar-head .simcal-nav{padding:10px 0;vertical-align:middle}.simcal-default-calendar-grid .simcal-calendar-head .simcal-nav.simcal-current,.simcal-default-calendar-grid .simcal-calendar-head .simcal-nav.simcal-prev-wrapper{border-right:0}.simcal-default-calendar-grid .simcal-day>div{box-sizing:content-box;display:block;height:100%}.simcal-default-calendar-grid .simcal-day-void{border-width:0 0 1px 0;height:100%;min-height:32px}.simcal-default-calendar-grid .simcal-day-void.simcal-day-void-last{border-right-width:1px}.simcal-default-calendar-grid .simcal-day-number{display:block;line-height:1;padding:2px 4px 3px;vertical-align:middle}.simcal-default-calendar-grid .simcal-no-events{display:block;min-height:32px}.simcal-default-calendar-grid.simcal-default-calendar-light .simcal-day:hover{background-color:rgba(0,0,0,.1)}.simcal-default-calendar-grid.simcal-default-calendar-light .simcal-day-void{background-color:rgba(0,0,0,.04)}.simcal-default-calendar-grid.simcal-default-calendar-light .simcal-day-void:hover{background-color:rgba(0,0,0,.04)}.simcal-default-calendar-grid.simcal-default-calendar-light .simcal-day-number{background:rgba(0,0,0,.1)}.simcal-default-calendar-grid.simcal-default-calendar-dark .simcal-day:hover{background-color:rgba(255,255,255,.18)}.simcal-default-calendar-grid.simcal-default-calendar-dark .simcal-day-void{background-color:rgba(255,255,255,.05)}.simcal-default-calendar-grid.simcal-default-calendar-dark .simcal-day-void:hover{background-color:rgba(255,255,255,.05)}.simcal-default-calendar-grid.simcal-default-calendar-dark .simcal-day-number{background:rgba(255,255,255,.1)}.simcal-default-calendar-grid .simcal-events{font-size:.68em;line-height:1.4;list-style:none;margin:0;padding:0;text-align:left}.simcal-default-calendar-grid .simcal-events>.simcal-event{border-bottom-style:solid;border-bottom-width:1px;cursor:pointer;list-style:none;margin:0 0 2px 0;padding:4px}.simcal-default-calendar-grid .simcal-events>.simcal-event:hover{text-decoration:underline}.simcal-default-calendar-grid .simcal-events>.simcal-event:last-child{border-bottom:0;margin-bottom:0}.simcal-default-calendar-grid.simcal-default-calendar-light .simcal-event{border-bottom-color:rgba(0,0,0,.1)}.simcal-default-calendar-grid.simcal-default-calendar-dark .simcal-event{border-bottom-color:rgba(255,255,255,.1)}.simcal-default-calendar-grid .simcal-events-dots{cursor:pointer;display:block;line-height:.7;margin:3px 0;text-align:center}.simcal-default-calendar-grid .simcal-events-toggle{background:0 0;display:block;font-size:10px;padding:2px 0}.simcal-event-bubble{background-color:#fff;border:1px solid rgba(0,0,0,.1);box-shadow:0 1px 2px rgba(0,0,0,.1)}.simcal-event-bubble .simcal-event-details .simcal-event-description,.simcal-event-bubble .simcal-event-details p{margin:0 0 1em}
assets/css/default-calendar-list.min.css CHANGED
@@ -1,6 +1,6 @@
1
- /*! Simple Calendar - 3.1.33
2
  * https://simplecalendar.io
3
- * Copyright (c) Moonstone Media 2020
4
  * Licensed GPLv2+ */
5
 
6
  @font-face{font-family:simple-calendar;src:url(../fonts/simple-calendar.eot?43976014);src:url(../fonts/simple-calendar.eot?43976014#iefix) format("embedded-opentype"),url(../fonts/simple-calendar.woff?43976014) format("woff"),url(../fonts/simple-calendar.ttf?43976014) format("truetype"),url(../fonts/simple-calendar.svg?43976014#simple-calendar) format("svg");font-weight:400;font-style:normal}[class*=" simcal-icon-"]:before,[class^=simcal-icon-]:before{display:inline-block;font-family:simple-calendar;font-style:normal;font-weight:400;margin-right:.2em;speak:none;text-decoration:inherit;text-align:center;width:1em;font-variant:normal;text-transform:none;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.simcal-icon-spin{-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear;display:inline-block}@-moz-keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-o-keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-ms-keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.simcal-icon-animate:before{transition:all .2s ease-in-out}.simcal-icon-rotate-180:before{transform:rotate(180deg)}.simcal-icon-calendar-empty:before{content:'\e800'}.simcal-icon-calendar:before{content:'\e801'}.simcal-icon-calendar-logo:before{content:'\e802'}.simcal-icon-settings:before{content:'\e804'}.simcal-icon-toggles:before{content:'\e805'}.simcal-icon-list:before{content:'\e806'}.simcal-icon-event:before{content:'\e807'}.simcal-icon-help:before{content:'\e808'}.simcal-icon-panel:before{content:'\e80a'}.simcal-icon-grid:before{content:'\e80b'}.simcal-icon-google:before{content:'\e80c'}.simcal-icon-docs:before{content:'\e80f'}.simcal-icon-hourglass:before{content:'\e811'}.simcal-icon-globe:before{content:'\e812'}.simcal-icon-timezones:before{content:'\e813'}.simcal-icon-warning:before{content:'\e815'}.simcal-icon-wordpress:before{content:'\e814'}.simcal-icon-up:before{content:'\e80e'}.simcal-icon-right:before{content:'\e809'}.simcal-icon-down:before{content:'\e80d'}.simcal-icon-left:before{content:'\e803'}.simcal-icon-spinner:before{content:'\e810'}.simcal-calendar{position:relative}.simcal-powered{display:block;margin:-10px 0 20px}.simcal-align-left{text-align:left}.simcal-align-right{text-align:right}.simcal-default-calendar .simcal-current h3{margin:0;padding:0}.simcal-default-calendar .simcal-nav{vertical-align:middle}.simcal-default-calendar .simcal-nav-button{background:0 0;border:0;box-shadow:none;cursor:pointer;margin:0;outline:0;padding:0;transition:margin .2s ease-out;width:100%}.simcal-default-calendar .simcal-nav-button:focus,.simcal-default-calendar .simcal-nav-button:hover{background:0 0;border:0;box-shadow:none;outline:0}.simcal-default-calendar .simcal-nav-button.simcal-prev:hover{margin-left:-10px}.simcal-default-calendar .simcal-nav-button.simcal-next:hover{margin-right:-10px}.simcal-default-calendar .simcal-nav-button:disabled{cursor:default}.simcal-default-calendar .simcal-nav-button:disabled:hover{margin:0;padding:0}.simcal-default-calendar .simcal-events{list-style:none;margin-left:0}.simcal-default-calendar .simcal-events-toggle{border:0;box-shadow:none;text-align:center;width:100%}.simcal-default-calendar .simcal-events-toggle:active,.simcal-default-calendar .simcal-events-toggle:focus,.simcal-default-calendar .simcal-events-toggle:hover{border:0;box-shadow:none;outline:0}.simcal-default-calendar ul.simcal-attachments,.simcal-default-calendar ul.simcal-attendees{margin:0;padding:0}.simcal-default-calendar li.simcal-attachment,.simcal-default-calendar li.simcal-attendee{list-style:none;margin-bottom:4px}.simcal-default-calendar li.simcal-attachment:last-child,.simcal-default-calendar li.simcal-attendee:last-child{margin-bottom:0}.simcal-default-calendar li.simcal-attachment small,.simcal-default-calendar li.simcal-attendee small{opacity:.9;text-transform:lowercase}.simcal-default-calendar .simcal-organizer a,.simcal-default-calendar li.simcal-attachment a,.simcal-default-calendar li.simcal-attendee a{border-bottom:0;text-decoration:none}.simcal-default-calendar .simcal-organizer img,.simcal-default-calendar li.simcal-attachment img,.simcal-default-calendar li.simcal-attendee img{display:inline-block;margin:0 4px;max-height:24px;max-width:24px}.simcal-default-calendar .simcal-tooltip-content{font-size:1.2em;line-height:1.4;padding:5px}.simcal-default-calendar .simcal-ajax-loader{height:100%;left:0;position:absolute;top:0;width:100%}.simcal-default-calendar .simcal-ajax-loader>i{font-size:48px;left:50%;line-height:1;margin:-36px 0 0 -36px;position:absolute;top:50%}.simcal-default-calendar .simcal-ajax-loader.simcal-spinner-top>i{top:20%}.simcal-default-calendar .simcal-ajax-loader.simcal-spinner-bottom>i{bottom:20%;top:auto}.simcal-default-calendar-light .simcal-nav-button{color:rgba(0,0,0,.6)}.simcal-default-calendar-light .simcal-nav-button:disabled{color:rgba(255,255,255,.9)!important}.simcal-default-calendar-light .simcal-nav-button:disabled:hover{color:rgba(255,255,255,.9)!important}.simcal-default-calendar-light .simcal-nav-button:focus,.simcal-default-calendar-light .simcal-nav-button:hover{color:rgba(0,0,0,.9)}.simcal-default-calendar-light .simcal-events-toggle{color:rgba(0,0,0,.6)}.simcal-default-calendar-light .simcal-events-toggle:hover{background-color:rgba(0,0,0,.1);color:#fff}.simcal-default-calendar-light .simcal-ajax-loader{background-color:rgba(0,0,0,.1)}.simcal-default-calendar-light .simcal-ajax-loader>i{color:rgba(0,0,0,.3)}.simcal-default-calendar-dark .simcal-nav-button{color:rgba(255,255,255,.6)}.simcal-default-calendar-dark .simcal-nav-button:disabled{color:rgba(0,0,0,.9)!important}.simcal-default-calendar-dark .simcal-nav-button:disabled:hover{color:rgba(0,0,0,.9)!important}.simcal-default-calendar-dark .simcal-nav-button:focus,.simcal-default-calendar-dark .simcal-nav-button:hover{color:rgba(255,255,255,.9)}.simcal-default-calendar-dark .simcal-events-toggle{color:rgba(255,255,255,.6)}.simcal-default-calendar-dark .simcal-events-toggle:hover{background-color:rgba(255,255,255,.1);color:#000}.simcal-default-calendar-dark .simcal-ajax-loader{background-color:rgba(255,255,255,.1)}.simcal-default-calendar-dark .simcal-ajax-loader>i{color:rgba(255,255,255,.3)}.simcal-default-calendar-list{min-height:100px;padding:10px 0;text-align:left}.simcal-default-calendar-list .simcal-calendar-head{display:table;padding-bottom:10px;width:100%}.simcal-default-calendar-list .simcal-calendar-head .simcal-nav{display:table-cell;text-align:center;vertical-align:middle;width:20%}.simcal-default-calendar-list .simcal-calendar-head .simcal-nav:nth-child(2){width:60%}.simcal-default-calendar-list .simcal-calendar-head .simcal-current span{display:inline-block}.simcal-default-calendar-list .simcal-calendar-head .simcal-hide-header{visibility:hidden}.simcal-default-calendar-list dl.simcal-month{margin-bottom:10px;padding:0 10px 10px}.simcal-default-calendar-list dd.simcal-day{list-style:none;margin:0}.simcal-default-calendar-list dt.simcal-day-label{font-size:.9em;list-style:none;margin:20px 0 10px}.simcal-default-calendar-list dt.simcal-day-label>span{display:inline-block;padding:4px 8px}.simcal-default-calendar-list ul.simcal-events{margin:10px 14px 0}.simcal-default-calendar-list ul.simcal-events li.simcal-event{list-style-type:none;margin-bottom:10px;word-wrap:break-word}.simcal-default-calendar-list .simcal-event-details{font-size:.84em;line-height:1.5;overflow:hidden}.simcal-default-calendar-list .simcal-event-details .simcal-event-description,.simcal-default-calendar-list .simcal-event-details p{margin:0 0 1em}.simcal-default-calendar-list .simcal-events-toggle{display:inline-block;padding:0}.simcal-default-calendar-list.simcal-default-calendar-light .simcal-events-toggle{background-color:rgba(0,0,0,.1)}.simcal-default-calendar-list.simcal-default-calendar-dark .simcal-events-toggle{background-color:rgba(255,255,255,.1)}.simcal-default-calendar-list .simcal-calendar-list-compact .simcal-calendar-head .simcal-nav h3{font-size:1em}
1
+ /*! Simple Calendar - 3.1.34
2
  * https://simplecalendar.io
3
+ * Copyright (c) Moonstone Media 2021
4
  * Licensed GPLv2+ */
5
 
6
  @font-face{font-family:simple-calendar;src:url(../fonts/simple-calendar.eot?43976014);src:url(../fonts/simple-calendar.eot?43976014#iefix) format("embedded-opentype"),url(../fonts/simple-calendar.woff?43976014) format("woff"),url(../fonts/simple-calendar.ttf?43976014) format("truetype"),url(../fonts/simple-calendar.svg?43976014#simple-calendar) format("svg");font-weight:400;font-style:normal}[class*=" simcal-icon-"]:before,[class^=simcal-icon-]:before{display:inline-block;font-family:simple-calendar;font-style:normal;font-weight:400;margin-right:.2em;speak:none;text-decoration:inherit;text-align:center;width:1em;font-variant:normal;text-transform:none;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.simcal-icon-spin{-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear;display:inline-block}@-moz-keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-o-keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-ms-keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spin{0%{-moz-transform:rotate(0);-o-transform:rotate(0);-webkit-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.simcal-icon-animate:before{transition:all .2s ease-in-out}.simcal-icon-rotate-180:before{transform:rotate(180deg)}.simcal-icon-calendar-empty:before{content:'\e800'}.simcal-icon-calendar:before{content:'\e801'}.simcal-icon-calendar-logo:before{content:'\e802'}.simcal-icon-settings:before{content:'\e804'}.simcal-icon-toggles:before{content:'\e805'}.simcal-icon-list:before{content:'\e806'}.simcal-icon-event:before{content:'\e807'}.simcal-icon-help:before{content:'\e808'}.simcal-icon-panel:before{content:'\e80a'}.simcal-icon-grid:before{content:'\e80b'}.simcal-icon-google:before{content:'\e80c'}.simcal-icon-docs:before{content:'\e80f'}.simcal-icon-hourglass:before{content:'\e811'}.simcal-icon-globe:before{content:'\e812'}.simcal-icon-timezones:before{content:'\e813'}.simcal-icon-warning:before{content:'\e815'}.simcal-icon-wordpress:before{content:'\e814'}.simcal-icon-up:before{content:'\e80e'}.simcal-icon-right:before{content:'\e809'}.simcal-icon-down:before{content:'\e80d'}.simcal-icon-left:before{content:'\e803'}.simcal-icon-spinner:before{content:'\e810'}.simcal-calendar{position:relative}.simcal-powered{display:block;margin:-10px 0 20px}.simcal-align-left{text-align:left}.simcal-align-right{text-align:right}.simcal-default-calendar .simcal-current h3{margin:0;padding:0}.simcal-default-calendar .simcal-nav{vertical-align:middle}.simcal-default-calendar .simcal-nav-button{background:0 0;border:0;box-shadow:none;cursor:pointer;margin:0;outline:0;padding:0;transition:margin .2s ease-out;width:100%}.simcal-default-calendar .simcal-nav-button:focus,.simcal-default-calendar .simcal-nav-button:hover{background:0 0;border:0;box-shadow:none;outline:0}.simcal-default-calendar .simcal-nav-button.simcal-prev:hover{margin-left:-10px}.simcal-default-calendar .simcal-nav-button.simcal-next:hover{margin-right:-10px}.simcal-default-calendar .simcal-nav-button:disabled{cursor:default}.simcal-default-calendar .simcal-nav-button:disabled:hover{margin:0;padding:0}.simcal-default-calendar .simcal-events{list-style:none;margin-left:0}.simcal-default-calendar .simcal-events-toggle{border:0;box-shadow:none;text-align:center;width:100%}.simcal-default-calendar .simcal-events-toggle:active,.simcal-default-calendar .simcal-events-toggle:focus,.simcal-default-calendar .simcal-events-toggle:hover{border:0;box-shadow:none;outline:0}.simcal-default-calendar ul.simcal-attachments,.simcal-default-calendar ul.simcal-attendees{margin:0;padding:0}.simcal-default-calendar li.simcal-attachment,.simcal-default-calendar li.simcal-attendee{list-style:none;margin-bottom:4px}.simcal-default-calendar li.simcal-attachment:last-child,.simcal-default-calendar li.simcal-attendee:last-child{margin-bottom:0}.simcal-default-calendar li.simcal-attachment small,.simcal-default-calendar li.simcal-attendee small{opacity:.9;text-transform:lowercase}.simcal-default-calendar .simcal-organizer a,.simcal-default-calendar li.simcal-attachment a,.simcal-default-calendar li.simcal-attendee a{border-bottom:0;text-decoration:none}.simcal-default-calendar .simcal-organizer img,.simcal-default-calendar li.simcal-attachment img,.simcal-default-calendar li.simcal-attendee img{display:inline-block;margin:0 4px;max-height:24px;max-width:24px}.simcal-default-calendar .simcal-tooltip-content{font-size:1.2em;line-height:1.4;padding:5px}.simcal-default-calendar .simcal-ajax-loader{height:100%;left:0;position:absolute;top:0;width:100%}.simcal-default-calendar .simcal-ajax-loader>i{font-size:48px;left:50%;line-height:1;margin:-36px 0 0 -36px;position:absolute;top:50%}.simcal-default-calendar .simcal-ajax-loader.simcal-spinner-top>i{top:20%}.simcal-default-calendar .simcal-ajax-loader.simcal-spinner-bottom>i{bottom:20%;top:auto}.simcal-default-calendar-light .simcal-nav-button{color:rgba(0,0,0,.6)}.simcal-default-calendar-light .simcal-nav-button:disabled{color:rgba(255,255,255,.9)!important}.simcal-default-calendar-light .simcal-nav-button:disabled:hover{color:rgba(255,255,255,.9)!important}.simcal-default-calendar-light .simcal-nav-button:focus,.simcal-default-calendar-light .simcal-nav-button:hover{color:rgba(0,0,0,.9)}.simcal-default-calendar-light .simcal-events-toggle{color:rgba(0,0,0,.6)}.simcal-default-calendar-light .simcal-events-toggle:hover{background-color:rgba(0,0,0,.1);color:#fff}.simcal-default-calendar-light .simcal-ajax-loader{background-color:rgba(0,0,0,.1)}.simcal-default-calendar-light .simcal-ajax-loader>i{color:rgba(0,0,0,.3)}.simcal-default-calendar-dark .simcal-nav-button{color:rgba(255,255,255,.6)}.simcal-default-calendar-dark .simcal-nav-button:disabled{color:rgba(0,0,0,.9)!important}.simcal-default-calendar-dark .simcal-nav-button:disabled:hover{color:rgba(0,0,0,.9)!important}.simcal-default-calendar-dark .simcal-nav-button:focus,.simcal-default-calendar-dark .simcal-nav-button:hover{color:rgba(255,255,255,.9)}.simcal-default-calendar-dark .simcal-events-toggle{color:rgba(255,255,255,.6)}.simcal-default-calendar-dark .simcal-events-toggle:hover{background-color:rgba(255,255,255,.1);color:#000}.simcal-default-calendar-dark .simcal-ajax-loader{background-color:rgba(255,255,255,.1)}.simcal-default-calendar-dark .simcal-ajax-loader>i{color:rgba(255,255,255,.3)}.simcal-default-calendar-list{min-height:100px;padding:10px 0;text-align:left}.simcal-default-calendar-list .simcal-calendar-head{display:table;padding-bottom:10px;width:100%}.simcal-default-calendar-list .simcal-calendar-head .simcal-nav{display:table-cell;text-align:center;vertical-align:middle;width:20%}.simcal-default-calendar-list .simcal-calendar-head .simcal-nav:nth-child(2){width:60%}.simcal-default-calendar-list .simcal-calendar-head .simcal-current span{display:inline-block}.simcal-default-calendar-list .simcal-calendar-head .simcal-hide-header{visibility:hidden}.simcal-default-calendar-list dl.simcal-month{margin-bottom:10px;padding:0 10px 10px}.simcal-default-calendar-list dd.simcal-day{list-style:none;margin:0}.simcal-default-calendar-list dt.simcal-day-label{font-size:.9em;list-style:none;margin:20px 0 10px}.simcal-default-calendar-list dt.simcal-day-label>span{display:inline-block;padding:4px 8px}.simcal-default-calendar-list ul.simcal-events{margin:10px 14px 0}.simcal-default-calendar-list ul.simcal-events li.simcal-event{list-style-type:none;margin-bottom:10px;word-wrap:break-word}.simcal-default-calendar-list .simcal-event-details{font-size:.84em;line-height:1.5;overflow:hidden}.simcal-default-calendar-list .simcal-event-details .simcal-event-description,.simcal-default-calendar-list .simcal-event-details p{margin:0 0 1em}.simcal-default-calendar-list .simcal-events-toggle{display:inline-block;padding:0}.simcal-default-calendar-list.simcal-default-calendar-light .simcal-events-toggle{background-color:rgba(0,0,0,.1)}.simcal-default-calendar-list.simcal-default-calendar-dark .simcal-events-toggle{background-color:rgba(255,255,255,.1)}.simcal-default-calendar-list .simcal-calendar-list-compact .simcal-calendar-head .simcal-nav h3{font-size:1em}
assets/js/admin-add-calendar.min.js CHANGED
@@ -1,6 +1,6 @@
1
- /*! Simple Calendar - 3.1.33
2
  * https://simplecalendar.io
3
- * Copyright (c) Moonstone Media 2020
4
  * Licensed GPLv2+ */
5
 
6
  !function(a,b){"use strict";jQuery(function(a){function b(){a(".simcal-field-select-enhanced").each(function(b,c){var d=a(c),e=d.data("noresults"),f=d.data("allowclear");d.select2({allowClear:"undefined"!=f&&f,placeholder:{id:"",placeholder:""},dir:"undefined"!=simcal_admin.text_dir?simcal_admin.text_dir:"ltr",tokenSeparators:[","],width:"100%",language:{noResults:function(){return"undefined"!=e?e:""}}})})}var c=!1;a("#widgets-left").length&&(a(document).ajaxComplete(function(b,c,d){var e,f,g,h={},i=d.data.split("&");for(e in i)f=i[e].split("="),h[decodeURIComponent(f[0])]=decodeURIComponent(f[1]);h.action&&"save-widget"===h.action&&(g=a('input.widget-id[value="'+h["widget-id"]+'"]').parents(".widget"),c.responseText?a(document).trigger("saved_widget",g):wpWidgets.save(g,0,1,0))}),a(document).bind("saved_widget",function(a,d){c=!0,b()})),c||b(),a("#simcal-insert-shortcode-button").on("click",function(){setTimeout(function(){var a=document.getElementById("TB_window");"undefined"!=a&&a.classList.add("simcal-insert-shortcode-modal");var b=document.getElementById("TB_title");"undefined"!=b&&b.classList.add("simcal-insert-shortcode-modal-title")},120)}),a("#simcal-insert-shortcode").on("click",function(b){b.preventDefault();var c=a("#simcal-choose-calendar").val();wp.media.editor.insert('[calendar id="'+c+'"] '),tb_remove()})})}();
1
+ /*! Simple Calendar - 3.1.34
2
  * https://simplecalendar.io
3
+ * Copyright (c) Moonstone Media 2021
4
  * Licensed GPLv2+ */
5
 
6
  !function(a,b){"use strict";jQuery(function(a){function b(){a(".simcal-field-select-enhanced").each(function(b,c){var d=a(c),e=d.data("noresults"),f=d.data("allowclear");d.select2({allowClear:"undefined"!=f&&f,placeholder:{id:"",placeholder:""},dir:"undefined"!=simcal_admin.text_dir?simcal_admin.text_dir:"ltr",tokenSeparators:[","],width:"100%",language:{noResults:function(){return"undefined"!=e?e:""}}})})}var c=!1;a("#widgets-left").length&&(a(document).ajaxComplete(function(b,c,d){var e,f,g,h={},i=d.data.split("&");for(e in i)f=i[e].split("="),h[decodeURIComponent(f[0])]=decodeURIComponent(f[1]);h.action&&"save-widget"===h.action&&(g=a('input.widget-id[value="'+h["widget-id"]+'"]').parents(".widget"),c.responseText?a(document).trigger("saved_widget",g):wpWidgets.save(g,0,1,0))}),a(document).bind("saved_widget",function(a,d){c=!0,b()})),c||b(),a("#simcal-insert-shortcode-button").on("click",function(){setTimeout(function(){var a=document.getElementById("TB_window");"undefined"!=a&&a.classList.add("simcal-insert-shortcode-modal");var b=document.getElementById("TB_title");"undefined"!=b&&b.classList.add("simcal-insert-shortcode-modal-title")},120)}),a("#simcal-insert-shortcode").on("click",function(b){b.preventDefault();var c=a("#simcal-choose-calendar").val();wp.media.editor.insert('[calendar id="'+c+'"] '),tb_remove()})})}();
assets/js/admin.min.js CHANGED
@@ -1,6 +1,6 @@
1
- /*! Simple Calendar - 3.1.33
2
  * https://simplecalendar.io
3
- * Copyright (c) Moonstone Media 2020
4
  * Licensed GPLv2+ */
5
 
6
  !function(a,b){"use strict";jQuery(function(a){function b(b){var c=a(b).find("input"),d=a(b).find("> div select"),e=a(b).find("code"),f="",g="";d.each(function(b,c){var d=a(c).val(),e=a(c).find("> option:selected");d.length&&(e.data("trim")?(f=f.trim()+a(c).val(),g=g.trim()+e.data("preview")):(f+=a(c).val()+" ",g+=e.data("preview")+" "))}),c.val(f),e.text(g)}a(".simcal-help-tip").tipTip({attribute:"data-tip",delay:200,fadeIn:50,fadeOut:50}),a(".simcal-shortcode-tip").tipTip({activation:"click",defaultPosition:"top",delay:200,fadeIn:50,fadeOut:50});var c=a("#simcal-calendar-settings"),d=c.find(".simcal-box-handle"),e=c.find(".hndle");a(d).appendTo(e),a(function(){a(e).unbind("click.postboxes"),c.on("click","h3.hndle",function(b){a(b.target).filter("input, option, label, select").length||c.toggleClass("closed")})}),a(document.body).on("simcal-init-tabbed-panels",function(){a(".simcal-tabs").show(),a(".simcal-tabs a").click(function(){var b=a(this).closest("div.simcal-panels-wrap");return a("ul.simcal-tabs li",b).removeClass("active"),a(this).parent().addClass("active"),a("div.simcal-panel",b).hide(),a(a(this).attr("href")).show(),!1}),a("div.simcal-panels-wrap").each(function(){a(this).find("ul.simcal-tabs > li").eq(0).find("a").click()})}).trigger("simcal-init-tabbed-panels"),a("#_feed_type").on("change",function(){var b=a(this).find("option:selected"),c=b.val(),d=a(".simcal-tabs"),e=d.find("> .simcal-feed-type"),f=d.find("> .simcal-feed-type-"+c),g=d.find("> li:first-child > a");e.each(function(){a(this).hide()}),f.show(),g.trigger("click")}).trigger("change"),c.show();var f=a("#_calendar_view_default-calendar"),g=a("#default-calendar-settings"),h=g.find(".simcal-default-calendar-grid"),i=g.find(".simcal-default-calendar-list"),j=g.find(".simcal-default-calendar-list-grouped");f.on("change",function(){var b=a(this).val();"grid"==b?(i.hide(),j.hide(),h.show()):"list"==b?(h.hide(),j.hide(),i.show()):"list-grouped"==b&&(h.hide(),i.hide(),j.show())}).trigger("change"),a("#_calendar_type").on("change",function(){a('label[for*="_calendar_view_"]').hide(),a('#calendar-settings-panel table[id*="-settings"]').hide(),a('label[for="_calendar_view_'+a(this).val()+'"]').show(),a('#calendar-settings-panel table[id="'+a(this).val()+'-settings"]').show()}).trigger("change"),a(".simcal-field-color-picker").wpColorPicker(),a(".simcal-field-select-enhanced").each(function(b,c){var d=a(c),e=d.data("noresults"),f=d.data("allowclear");d.select2({allowClear:"undefined"!=f&&f,placeholder:{id:"",placeholder:""},dir:"undefined"!=simcal_admin.text_dir?simcal_admin.text_dir:"ltr",tokenSeparators:[","],width:"100%",language:{noResults:function(){return"undefined"!=e?e:""}}})}),a(".simcal-field-date-picker").each(function(b,c){var d=a(c).find("input"),e={autoSize:!0,changeMonth:!0,changeYear:!0,dateFormat:"yy-mm-dd",firstDay:1,prevText:'<i class="simcal-icon-left"></i>',nextText:'<i class="simcal-icon-right"></i>',yearRange:"1900:2050",beforeShow:function(b,c){a("#ui-datepicker-div").addClass("simcal-date-picker")}};a(d).datepicker(e),a(d).datepicker("option",a.datepicker.regional[simcal_admin.locale])});var k=a(".simcal-field-datetime-format");k.sortable({items:"> div",stop:function(){b(a(this))}}),k.each(function(c,d){a(d).find("> div select").each(function(c,d){a(d).on("change",function(){b(a(this).closest("div.simcal-field-datetime-format"))})}),b(d)}),a(".simcal-field-datetime-format-php").each(function(b,c){var d=a(c).find("input"),e=a(c).find("code");a(d).on("keyup",function(){var b={action:"simcal_date_i18n_input_preview",value:d.val()};a.post(simcal_admin.ajax_url,b,function(b){a(e).text(b.data)})})}),a('input[type="number"].simcal-field').each(function(b,c){var d=a(c),e=d.attr("min"),f=d.attr("max");d.on("change",function(){var b=parseInt(a(this).val());e&&b<e&&a(this).val(e),f&&b>f&&a(this).val(f)})}),a(".simcal-field-switch-other").on("change",function(){a(this).find("option").each(function(b,c){var d=a(c).data("show-field"),e=a(c).data("show-fields"),f=a(c).data("hide-field"),g=a(c).data("hide-fields"),h=d?a("#"+d):"",i=f?a("#"+f):"";if(a(c).is(":selected")){if(h&&h.show(),i&&i.hide(),e){var j=g.split(",");a(j).each(function(b,c){a("#"+c).hide()})}if(g){var k=g.split(",");a(k).each(function(b,c){a("#"+c).hide()})}}})}).trigger("change"),a(".simcal-field-show-other").on("change",function(){a(this).find("option").each(function(b,c){var d=a(c).data("show-field"),e=void 0!==d&&d.length?a("#"+d):"",f=void 0!==d&&d.length?e.next():"";e.length&&(a(c).is(":selected")?(e.show(),f.hasClass("select2")&&f.show()):(e.hide(),f.hasClass("select2")&&f.hide()))})}).trigger("change"),a(".simcal-field-show-next").on("change",function(){var b,c,d,e;a(this).is(":checkbox")?(d=a(this).parent().next(),a(this).is(":checked")?d.show():d.hide()):(b=a(this).val(),c=a(this).data("show-next-if-value"),d=a(this).nextUntil().not("i"),e=d.length?d.next():"",b==c?(d.show(),e.hasClass("select2")&&e.show()):(d.hide(),e.hasClass("select2")&&e.hide()))}).trigger("change"),a("#simcal-clear-cache").on("click",function(b){b.preventDefault();var c=a(this).find("i");a.ajax({url:simcal_admin.ajax_url,method:"POST",data:{action:"simcal_clear_cache",id:a(this).data("id")},beforeSend:function(){c.fadeToggle()},success:function(){c.fadeToggle()},error:function(a){console.log(a)}})}),a("#simcal-drip-signup").on("click",function(b){b.preventDefault();var c=a("#simcal-drip"),d=c.find(".signup"),e=c.find(".thank-you"),f=a("#simcal-drip-form"),g=c.find("#simcal-drip-field-first_name"),h=f.find("#simcal-drip-real-field-first_name"),i=c.find("#simcal-drip-field-email"),j=f.find("#simcal-drip-real-field-email");h.val(g.val()),j.val(i.val()),d.hide(),e.show(),f.submit()}),a("#_feed_type").on("change",function(b){if("grouped-calendars"===a(this).val())a("#use_calendar").remove();else if(!a("#use_calendar").length){a("#_feed_timezone_setting").append('<option id="use_calendar" value="use_calendar" data-show-field="_use_calendar_warning">Event source default</option>')}}),a(".simcal-addon-manage-license").on("click",function(b){b.preventDefault();var c="",d=a(this),e=d.closest(".simcal-addon-manage-license-buttons"),f=d.closest(".simcal-addon-manage-license-field").find("> input"),g=e.find(".error"),h=d.find("i");if(a(this).hasClass("activate"))c="activate_license";else{if(!a(this).hasClass("deactivate"))return;c="deactivate_license"}a.ajax({url:simcal_admin.ajax_url,method:"POST",data:{action:"simcal_manage_add_on_license",add_on:a(this).data("add-on"),license_key:f.val(),license_action:c,nonce:a("#simcal_license_manager").val()},beforeSend:function(){h.fadeToggle()},success:function(b){h.fadeToggle(),"activate_license"==c?"valid"==b.data?(d.hide(),f.attr("disabled","disabled"),a(e).find(".label").show(),a(e).find(".deactivate").show(),g.hide()):g.show().text(b.data):"deactivated"==b.data?(d.hide(),f.removeAttr("disabled"),a(e).find(".label").hide(),a(e).find(".activate").show(),g.hide()):g.show().text(b.data)},error:function(a){console.log(a),h.fadeToggle()}})}),a("#simcal-reset-licenses").on("click",function(b){b.preventDefault();var c=a(this).find("i"),d=a(this).data("dialog");!0===confirm(d)&&a.ajax({url:simcal_admin.ajax_url,method:"POST",data:{action:"simcal_reset_add_ons_licenses",nonce:a("#simcal_license_manager").val()},beforeSend:function(){c.toggle()},success:function(a){"success"==a.data?location.reload():console.log(a)},error:function(a){console.log(a)}})})})}();
1
+ /*! Simple Calendar - 3.1.34
2
  * https://simplecalendar.io
3
+ * Copyright (c) Moonstone Media 2021
4
  * Licensed GPLv2+ */
5
 
6
  !function(a,b){"use strict";jQuery(function(a){function b(b){var c=a(b).find("input"),d=a(b).find("> div select"),e=a(b).find("code"),f="",g="";d.each(function(b,c){var d=a(c).val(),e=a(c).find("> option:selected");d.length&&(e.data("trim")?(f=f.trim()+a(c).val(),g=g.trim()+e.data("preview")):(f+=a(c).val()+" ",g+=e.data("preview")+" "))}),c.val(f),e.text(g)}a(".simcal-help-tip").tipTip({attribute:"data-tip",delay:200,fadeIn:50,fadeOut:50}),a(".simcal-shortcode-tip").tipTip({activation:"click",defaultPosition:"top",delay:200,fadeIn:50,fadeOut:50});var c=a("#simcal-calendar-settings"),d=c.find(".simcal-box-handle"),e=c.find(".hndle");a(d).appendTo(e),a(function(){a(e).unbind("click.postboxes"),c.on("click","h3.hndle",function(b){a(b.target).filter("input, option, label, select").length||c.toggleClass("closed")})}),a(document.body).on("simcal-init-tabbed-panels",function(){a(".simcal-tabs").show(),a(".simcal-tabs a").click(function(){var b=a(this).closest("div.simcal-panels-wrap");return a("ul.simcal-tabs li",b).removeClass("active"),a(this).parent().addClass("active"),a("div.simcal-panel",b).hide(),a(a(this).attr("href")).show(),!1}),a("div.simcal-panels-wrap").each(function(){a(this).find("ul.simcal-tabs > li").eq(0).find("a").click()})}).trigger("simcal-init-tabbed-panels"),a("#_feed_type").on("change",function(){var b=a(this).find("option:selected"),c=b.val(),d=a(".simcal-tabs"),e=d.find("> .simcal-feed-type"),f=d.find("> .simcal-feed-type-"+c),g=d.find("> li:first-child > a");e.each(function(){a(this).hide()}),f.show(),g.trigger("click")}).trigger("change"),c.show();var f=a("#_calendar_view_default-calendar"),g=a("#default-calendar-settings"),h=g.find(".simcal-default-calendar-grid"),i=g.find(".simcal-default-calendar-list"),j=g.find(".simcal-default-calendar-list-grouped");f.on("change",function(){var b=a(this).val();"grid"==b?(i.hide(),j.hide(),h.show()):"list"==b?(h.hide(),j.hide(),i.show()):"list-grouped"==b&&(h.hide(),i.hide(),j.show())}).trigger("change"),a("#_calendar_type").on("change",function(){a('label[for*="_calendar_view_"]').hide(),a('#calendar-settings-panel table[id*="-settings"]').hide(),a('label[for="_calendar_view_'+a(this).val()+'"]').show(),a('#calendar-settings-panel table[id="'+a(this).val()+'-settings"]').show()}).trigger("change"),a(".simcal-field-color-picker").wpColorPicker(),a(".simcal-field-select-enhanced").each(function(b,c){var d=a(c),e=d.data("noresults"),f=d.data("allowclear");d.select2({allowClear:"undefined"!=f&&f,placeholder:{id:"",placeholder:""},dir:"undefined"!=simcal_admin.text_dir?simcal_admin.text_dir:"ltr",tokenSeparators:[","],width:"100%",language:{noResults:function(){return"undefined"!=e?e:""}}})}),a(".simcal-field-date-picker").each(function(b,c){var d=a(c).find("input"),e={autoSize:!0,changeMonth:!0,changeYear:!0,dateFormat:"yy-mm-dd",firstDay:1,prevText:'<i class="simcal-icon-left"></i>',nextText:'<i class="simcal-icon-right"></i>',yearRange:"1900:2050",beforeShow:function(b,c){a("#ui-datepicker-div").addClass("simcal-date-picker")}};a(d).datepicker(e),a(d).datepicker("option",a.datepicker.regional[simcal_admin.locale])});var k=a(".simcal-field-datetime-format");k.sortable({items:"> div",stop:function(){b(a(this))}}),k.each(function(c,d){a(d).find("> div select").each(function(c,d){a(d).on("change",function(){b(a(this).closest("div.simcal-field-datetime-format"))})}),b(d)}),a(".simcal-field-datetime-format-php").each(function(b,c){var d=a(c).find("input"),e=a(c).find("code");a(d).on("keyup",function(){var b={action:"simcal_date_i18n_input_preview",value:d.val()};a.post(simcal_admin.ajax_url,b,function(b){a(e).text(b.data)})})}),a('input[type="number"].simcal-field').each(function(b,c){var d=a(c),e=d.attr("min"),f=d.attr("max");d.on("change",function(){var b=parseInt(a(this).val());e&&b<e&&a(this).val(e),f&&b>f&&a(this).val(f)})}),a(".simcal-field-switch-other").on("change",function(){a(this).find("option").each(function(b,c){var d=a(c).data("show-field"),e=a(c).data("show-fields"),f=a(c).data("hide-field"),g=a(c).data("hide-fields"),h=d?a("#"+d):"",i=f?a("#"+f):"";if(a(c).is(":selected")){if(h&&h.show(),i&&i.hide(),e){var j=g.split(",");a(j).each(function(b,c){a("#"+c).hide()})}if(g){var k=g.split(",");a(k).each(function(b,c){a("#"+c).hide()})}}})}).trigger("change"),a(".simcal-field-show-other").on("change",function(){a(this).find("option").each(function(b,c){var d=a(c).data("show-field"),e=void 0!==d&&d.length?a("#"+d):"",f=void 0!==d&&d.length?e.next():"";e.length&&(a(c).is(":selected")?(e.show(),f.hasClass("select2")&&f.show()):(e.hide(),f.hasClass("select2")&&f.hide()))})}).trigger("change"),a(".simcal-field-show-next").on("change",function(){var b,c,d,e;a(this).is(":checkbox")?(d=a(this).parent().next(),a(this).is(":checked")?d.show():d.hide()):(b=a(this).val(),c=a(this).data("show-next-if-value"),d=a(this).nextUntil().not("i"),e=d.length?d.next():"",b==c?(d.show(),e.hasClass("select2")&&e.show()):(d.hide(),e.hasClass("select2")&&e.hide()))}).trigger("change"),a("#simcal-clear-cache").on("click",function(b){b.preventDefault();var c=a(this).find("i");a.ajax({url:simcal_admin.ajax_url,method:"POST",data:{action:"simcal_clear_cache",id:a(this).data("id")},beforeSend:function(){c.fadeToggle()},success:function(){c.fadeToggle()},error:function(a){console.log(a)}})}),a("#simcal-drip-signup").on("click",function(b){b.preventDefault();var c=a("#simcal-drip"),d=c.find(".signup"),e=c.find(".thank-you"),f=a("#simcal-drip-form"),g=c.find("#simcal-drip-field-first_name"),h=f.find("#simcal-drip-real-field-first_name"),i=c.find("#simcal-drip-field-email"),j=f.find("#simcal-drip-real-field-email");h.val(g.val()),j.val(i.val()),d.hide(),e.show(),f.submit()}),a("#_feed_type").on("change",function(b){if("grouped-calendars"===a(this).val())a("#use_calendar").remove();else if(!a("#use_calendar").length){a("#_feed_timezone_setting").append('<option id="use_calendar" value="use_calendar" data-show-field="_use_calendar_warning">Event source default</option>')}}),a(".simcal-addon-manage-license").on("click",function(b){b.preventDefault();var c="",d=a(this),e=d.closest(".simcal-addon-manage-license-buttons"),f=d.closest(".simcal-addon-manage-license-field").find("> input"),g=e.find(".error"),h=d.find("i");if(a(this).hasClass("activate"))c="activate_license";else{if(!a(this).hasClass("deactivate"))return;c="deactivate_license"}a.ajax({url:simcal_admin.ajax_url,method:"POST",data:{action:"simcal_manage_add_on_license",add_on:a(this).data("add-on"),license_key:f.val(),license_action:c,nonce:a("#simcal_license_manager").val()},beforeSend:function(){h.fadeToggle()},success:function(b){h.fadeToggle(),"activate_license"==c?"valid"==b.data?(d.hide(),f.attr("disabled","disabled"),a(e).find(".label").show(),a(e).find(".deactivate").show(),g.hide()):g.show().text(b.data):"deactivated"==b.data?(d.hide(),f.removeAttr("disabled"),a(e).find(".label").hide(),a(e).find(".activate").show(),g.hide()):g.show().text(b.data)},error:function(a){console.log(a),h.fadeToggle()}})}),a("#simcal-reset-licenses").on("click",function(b){b.preventDefault();var c=a(this).find("i"),d=a(this).data("dialog");!0===confirm(d)&&a.ajax({url:simcal_admin.ajax_url,method:"POST",data:{action:"simcal_reset_add_ons_licenses",nonce:a("#simcal_license_manager").val()},beforeSend:function(){c.toggle()},success:function(a){"success"==a.data?location.reload():console.log(a)},error:function(a){console.log(a)}})})})}();
assets/js/default-calendar.min.js CHANGED
@@ -1,6 +1,6 @@
1
- /*! Simple Calendar - 3.1.33
2
  * https://simplecalendar.io
3
- * Copyright (c) Moonstone Media 2020
4
  * Licensed GPLv2+ */
5
 
6
  !function(a,b,c){"use strict";jQuery(function(c){function d(a,b,d,e){a.each(function(a,f){var g=c(f),h=new Date(1e3*b);g.hasClass("simcal-prev")?(h=new Date(h.setMonth(h.getMonth(),1)),h.setDate(0),h.getTime()/1e3<=d?g.attr("disabled","disabled"):g.removeAttr("disabled")):(h=new Date(h.setMonth(h.getMonth()+1,1)),h.setDate(0),h.setHours(23),h.setMinutes(59),h.setSeconds(59),h.getTime()/1e3>=e?g.attr("disabled","disabled"):g.removeAttr("disabled"))})}function e(a,b,d,e,f,g){var h=b.find(".simcal-events-list-container"),i=h.data("prev"),j=h.data("next"),k=h.find("li.simcal-event:last").data("start");a.each(function(a,b){var h=c(b);f?h.hasClass("simcal-prev")?"prev"==f?i<=d&&g<=d&&h.attr("disabled","disabled"):h.removeAttr("disabled"):h.hasClass("simcal-next")&&("next"==f?(j>=e&&g>=e||k>=e)&&h.attr("disabled","disabled"):h.removeAttr("disabled")):h.hasClass("simcal-prev")?i<=d&&g<=d&&h.attr("disabled","disabled"):h.hasClass("simcal-next")&&(j>=e&&g>=e||k>=e)&&h.attr("disabled","disabled")})}function f(a){var b=c(a).find(".simcal-current"),d=c(a).find(".simcal-events-list-container"),e=d.data("heading-small"),f=d.data("heading-large"),g=c("<h3 />");a.width()<400?g.text(e):g.text(f),b.html(g)}function g(b){var d=c(b).find("> table"),e=d.find("thead"),f=e.find("th.simcal-week-day"),g=d.find("td.simcal-day > div"),h=d.find("ul.simcal-events"),i=h.find("> li > .simcal-event-title"),j=d.find(".simcal-events-toggle"),k=d.find("span.simcal-events-dots"),l=d.find(".simcal-tooltip-content"),m=d.find(".simcal-event-toggled"),n=d.data("event-bubble-trigger"),o=g.first().width();if(o<60){f.each(function(a,b){c(b).text(c(b).data("screen-small"))}),h.hide(),i.hide(),"undefined"!=j&&(j.hide(),"undefined"!=m&&m.show()),k.show(),n="click";var p=o-10+"px";g.css("min-height",p),d.find("span.simcal-events-dots:not(:empty)").css("min-height",p)}else o<=240?f.each(function(a,b){c(b).text(c(b).data("screen-medium"))}):f.each(function(a,b){c(b).text(c(b).data("screen-large"))}),h.show(),i.show(),"undefined"!=j&&(j.show(),"undefined"!=m&&m.hide()),k.hide(),g.css("min-height",o+"px");g.each(function(b,d){var e,f,g=c(d).find("span.simcal-events-dots"),h=c(d).find(".simcal-tooltip");o<60?(l.show(),e=g):(l.hide(),e=h),e.each(function(b,e){c(e).qtip({content:o<60?c(d).find("ul.simcal-events"):c(e).find("> .simcal-tooltip-content"),position:{my:"top center",at:"bottom center",target:c(e),viewport:!(o<60)||c(a),adjust:{method:"shift",scroll:!1}},style:{def:!1,classes:"simcal-default-calendar simcal-event-bubble"},show:{solo:!0,effect:!1,event:"hover"==n?"mouseenter":"click"},hide:{fixed:!0,effect:!1,event:"click"==n?"unfocus":"mouseleave",delay:100},events:{show:function(a,b){f&&f.id&&f.id!=b.id&&f.hide(),f=b}},overwrite:!1})})})}function h(){c(".simcal-events-toggle").each(function(a,b){var d=c(b).prev(".simcal-events"),e=d.find(".simcal-event-toggled"),f=c(b).find("i");c(b).on("click",function(){f.toggleClass("simcal-icon-rotate-180"),e.slideToggle()})})}c(".simcal-default-calendar").each(function(a,i){var j,k,l=c(i),m=l.data("calendar-id"),n=l.data("offset"),o=l.data("events-first"),p=l.data("calendar-end"),q=l.find(".simcal-calendar-head"),r=q.find(".simcal-nav-button"),s=l.find(".simcal-ajax-loader"),t=q.find(".simcal-current"),u=t.data("calendar-current"),v=t.find("span.simcal-current-month"),w=t.find("span.simcal-current-year"),x=b.tz(1e3*u,l.data("timezone"));l.hasClass("simcal-default-calendar-grid")?(k="simcal_default_calendar_draw_grid",j=new Date(x.year(),x.month()),d(r,j.getTime()/1e3,o,p)):(k="simcal_default_calendar_draw_list",e(r,l,o,p,!1,u),f(l)),r.on("click",function(){var a=c(this).hasClass("simcal-next")?"next":"prev";if("simcal_default_calendar_draw_grid"==k){var b,i,q,u=l.find(".simcal-month");"prev"==a?b=new Date(j.setMonth(j.getMonth()-1,1)):(b=new Date(j.setMonth(j.getMonth()+2,1)),b.setDate(0),b.setHours(23),b.setMinutes(59),b.setSeconds(59)),i=b.getMonth(),q=b.getFullYear(),c.ajax({url:simcal_default_calendar.ajax_url,type:"POST",dataType:"json",cache:!1,data:{action:k,month:i+1,year:q,id:m},beforeSend:function(){s.fadeToggle()},success:function(a){v.text(simcal_default_calendar.months.full[i]),w.text(q),t.attr("data-calendar-current",b.getTime()/1e3+n+1),d(r,b.getTime()/1e3,o,p),s.fadeToggle(),j=b,u.replaceWith(a.data),g(l),h()},error:function(a){console.log(a)}})}else{var x=l.find(".simcal-events-list-container"),y=x.data("prev"),z=x.data("next"),A="prev"==a?y:z;c.ajax({url:simcal_default_calendar.ajax_url,type:"POST",dataType:"json",cache:!1,data:{action:k,ts:A,id:m},beforeSend:function(){s.fadeToggle()},success:function(b){x.replaceWith(b.data),t.attr("data-calendar-current",A),f(l),e(r,l,o,p,a,A),s.fadeToggle(),h()},error:function(a){console.log(a)}})}})});var i=c(".simcal-default-calendar-grid");i.each(function(a,b){g(b),c(b).on("change",function(){g(this)})}),a.onresize=function(){i.each(function(a,b){g(b)})},h()})}(this,moment);
1
+ /*! Simple Calendar - 3.1.34
2
  * https://simplecalendar.io
3
+ * Copyright (c) Moonstone Media 2021
4
  * Licensed GPLv2+ */
5
 
6
  !function(a,b,c){"use strict";jQuery(function(c){function d(a,b,d,e){a.each(function(a,f){var g=c(f),h=new Date(1e3*b);g.hasClass("simcal-prev")?(h=new Date(h.setMonth(h.getMonth(),1)),h.setDate(0),h.getTime()/1e3<=d?g.attr("disabled","disabled"):g.removeAttr("disabled")):(h=new Date(h.setMonth(h.getMonth()+1,1)),h.setDate(0),h.setHours(23),h.setMinutes(59),h.setSeconds(59),h.getTime()/1e3>=e?g.attr("disabled","disabled"):g.removeAttr("disabled"))})}function e(a,b,d,e,f,g){var h=b.find(".simcal-events-list-container"),i=h.data("prev"),j=h.data("next"),k=h.find("li.simcal-event:last").data("start");a.each(function(a,b){var h=c(b);f?h.hasClass("simcal-prev")?"prev"==f?i<=d&&g<=d&&h.attr("disabled","disabled"):h.removeAttr("disabled"):h.hasClass("simcal-next")&&("next"==f?(j>=e&&g>=e||k>=e)&&h.attr("disabled","disabled"):h.removeAttr("disabled")):h.hasClass("simcal-prev")?i<=d&&g<=d&&h.attr("disabled","disabled"):h.hasClass("simcal-next")&&(j>=e&&g>=e||k>=e)&&h.attr("disabled","disabled")})}function f(a){var b=c(a).find(".simcal-current"),d=c(a).find(".simcal-events-list-container"),e=d.data("heading-small"),f=d.data("heading-large"),g=c("<h3 />");a.width()<400?g.text(e):g.text(f),b.html(g)}function g(b){var d=c(b).find("> table"),e=d.find("thead"),f=e.find("th.simcal-week-day"),g=d.find("td.simcal-day > div"),h=d.find("ul.simcal-events"),i=h.find("> li > .simcal-event-title"),j=d.find(".simcal-events-toggle"),k=d.find("span.simcal-events-dots"),l=d.find(".simcal-tooltip-content"),m=d.find(".simcal-event-toggled"),n=d.data("event-bubble-trigger"),o=g.first().width();if(o<60){f.each(function(a,b){c(b).text(c(b).data("screen-small"))}),h.hide(),i.hide(),"undefined"!=j&&(j.hide(),"undefined"!=m&&m.show()),k.show(),n="click";var p=o-10+"px";g.css("min-height",p),d.find("span.simcal-events-dots:not(:empty)").css("min-height",p)}else o<=240?f.each(function(a,b){c(b).text(c(b).data("screen-medium"))}):f.each(function(a,b){c(b).text(c(b).data("screen-large"))}),h.show(),i.show(),"undefined"!=j&&(j.show(),"undefined"!=m&&m.hide()),k.hide(),g.css("min-height",o+"px");g.each(function(b,d){var e,f,g=c(d).find("span.simcal-events-dots"),h=c(d).find(".simcal-tooltip");o<60?(l.show(),e=g):(l.hide(),e=h),e.each(function(b,e){c(e).qtip({content:o<60?c(d).find("ul.simcal-events"):c(e).find("> .simcal-tooltip-content"),position:{my:"top center",at:"bottom center",target:c(e),viewport:!(o<60)||c(a),adjust:{method:"shift",scroll:!1}},style:{def:!1,classes:"simcal-default-calendar simcal-event-bubble"},show:{solo:!0,effect:!1,event:"hover"==n?"mouseenter":"click"},hide:{fixed:!0,effect:!1,event:"click"==n?"unfocus":"mouseleave",delay:100},events:{show:function(a,b){f&&f.id&&f.id!=b.id&&f.hide(),f=b}},overwrite:!1})})})}function h(){c(".simcal-events-toggle").each(function(a,b){var d=c(b).prev(".simcal-events"),e=d.find(".simcal-event-toggled"),f=c(b).find("i");c(b).on("click",function(){f.toggleClass("simcal-icon-rotate-180"),e.slideToggle()})})}c(".simcal-default-calendar").each(function(a,i){var j,k,l=c(i),m=l.data("calendar-id"),n=l.data("offset"),o=l.data("events-first"),p=l.data("calendar-end"),q=l.find(".simcal-calendar-head"),r=q.find(".simcal-nav-button"),s=l.find(".simcal-ajax-loader"),t=q.find(".simcal-current"),u=t.data("calendar-current"),v=t.find("span.simcal-current-month"),w=t.find("span.simcal-current-year"),x=b.tz(1e3*u,l.data("timezone"));l.hasClass("simcal-default-calendar-grid")?(k="simcal_default_calendar_draw_grid",j=new Date(x.year(),x.month()),d(r,j.getTime()/1e3,o,p)):(k="simcal_default_calendar_draw_list",e(r,l,o,p,!1,u),f(l)),r.on("click",function(){var a=c(this).hasClass("simcal-next")?"next":"prev";if("simcal_default_calendar_draw_grid"==k){var b,i,q,u=l.find(".simcal-month");"prev"==a?b=new Date(j.setMonth(j.getMonth()-1,1)):(b=new Date(j.setMonth(j.getMonth()+2,1)),b.setDate(0),b.setHours(23),b.setMinutes(59),b.setSeconds(59)),i=b.getMonth(),q=b.getFullYear(),c.ajax({url:simcal_default_calendar.ajax_url,type:"POST",dataType:"json",cache:!1,data:{action:k,month:i+1,year:q,id:m},beforeSend:function(){s.fadeToggle()},success:function(a){v.text(simcal_default_calendar.months.full[i]),w.text(q),t.attr("data-calendar-current",b.getTime()/1e3+n+1),d(r,b.getTime()/1e3,o,p),s.fadeToggle(),j=b,u.replaceWith(a.data),g(l),h()},error:function(a){console.log(a)}})}else{var x=l.find(".simcal-events-list-container"),y=x.data("prev"),z=x.data("next"),A="prev"==a?y:z;c.ajax({url:simcal_default_calendar.ajax_url,type:"POST",dataType:"json",cache:!1,data:{action:k,ts:A,id:m},beforeSend:function(){s.fadeToggle()},success:function(b){x.replaceWith(b.data),t.attr("data-calendar-current",A),f(l),e(r,l,o,p,a,A),s.fadeToggle(),h()},error:function(a){console.log(a)}})}})});var i=c(".simcal-default-calendar-grid");i.each(function(a,b){g(b),c(b).on("change",function(){g(this)})}),a.onresize=function(){i.each(function(a,b){g(b)})},h()})}(this,moment);
google-calendar-events.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Add Google Calendar events to your WordPress site in minutes. Beautiful calendar displays. Fully responsive.
6
  * Author: Simple Calendar
7
  * Author URI: https://simplecalendar.io
8
- * Version: 3.1.33
9
  * Text Domain: google-calendar-events
10
  * Domain Path: /i18n
11
  *
@@ -21,7 +21,7 @@ if ( ! defined( 'ABSPATH' ) ) {
21
  $this_plugin_path = trailingslashit( dirname( __FILE__ ) );
22
  $this_plugin_dir = plugin_dir_url( __FILE__ );
23
  $this_plugin_constants = array(
24
- 'SIMPLE_CALENDAR_VERSION' => '3.1.33',
25
  'SIMPLE_CALENDAR_MAIN_FILE' => __FILE__,
26
  'SIMPLE_CALENDAR_URL' => $this_plugin_dir,
27
  'SIMPLE_CALENDAR_ASSETS' => $this_plugin_dir . 'assets/',
5
  * Description: Add Google Calendar events to your WordPress site in minutes. Beautiful calendar displays. Fully responsive.
6
  * Author: Simple Calendar
7
  * Author URI: https://simplecalendar.io
8
+ * Version: 3.1.34
9
  * Text Domain: google-calendar-events
10
  * Domain Path: /i18n
11
  *
21
  $this_plugin_path = trailingslashit( dirname( __FILE__ ) );
22
  $this_plugin_dir = plugin_dir_url( __FILE__ );
23
  $this_plugin_constants = array(
24
+ 'SIMPLE_CALENDAR_VERSION' => '3.1.34',
25
  'SIMPLE_CALENDAR_MAIN_FILE' => __FILE__,
26
  'SIMPLE_CALENDAR_URL' => $this_plugin_dir,
27
  'SIMPLE_CALENDAR_ASSETS' => $this_plugin_dir . 'assets/',
includes/calendars/default-calendar.php CHANGED
@@ -1,269 +1,269 @@
1
- <?php
2
- /**
3
- * Default Calendar
4
- *
5
- * @package SimpleCalendar\Calendars
6
- */
7
- namespace SimpleCalendar\Calendars;
8
-
9
- use Carbon\Carbon;
10
- use SimpleCalendar\Abstracts\Calendar;
11
- use SimpleCalendar\Abstracts\Calendar_View;
12
- use SimpleCalendar\Calendars\Admin\Default_Calendar_Admin;
13
- use SimpleCalendar\Calendars\Views;
14
- use SimpleCalendar\Events\Event;
15
-
16
- if ( ! defined( 'ABSPATH' ) ) {
17
- exit;
18
- }
19
-
20
- /**
21
- * Default Calendar.
22
- *
23
- * The default calendar view bundled with the plugin.
24
- *
25
- * @since 3.0.0
26
- */
27
- class Default_Calendar extends Calendar {
28
-
29
- /**
30
- * Limit visibility of daily events.
31
- *
32
- * @access public
33
- * @var int
34
- */
35
- public $events_limit = -1;
36
-
37
- /**
38
- * Trim characters event titles in grid.
39
- *
40
- * @access public
41
- * @var int
42
- */
43
- public $trim_titles = -1;
44
-
45
- /**
46
- * Event bubbles action trigger.
47
- *
48
- * @access public
49
- * @var string
50
- */
51
- public $event_bubble_trigger = 'click';
52
-
53
- /**
54
- * Hide navigation buttons.
55
- *
56
- * @access public
57
- * @var bool
58
- */
59
- public $compact_list = false;
60
-
61
- /**
62
- * Grouped list type.
63
- *
64
- * @access public
65
- * @var string
66
- */
67
- public $group_type = '';
68
-
69
- /**
70
- * Grouped list span.
71
- *
72
- * @access public
73
- * @var int
74
- */
75
- public $group_span = 1;
76
-
77
- /**
78
- * Skin theme.
79
- *
80
- * @access public
81
- * @var string
82
- */
83
- public $theme = 'light';
84
-
85
- /**
86
- * Today color.
87
- *
88
- * @access public
89
- * @var string
90
- */
91
- public $today_color = '#FF0000';
92
-
93
- /**
94
- * Days with events color.
95
- *
96
- * @access public
97
- * @var string
98
- */
99
- public $days_events_color = '#000000';
100
-
101
- /**
102
- * Constructor.
103
- *
104
- * @since 3.0.0
105
- *
106
- * @param int|object|\WP_Post|Calendar $calendar
107
- */
108
- public function __construct( $calendar ) {
109
-
110
- $this->type = 'default-calendar';
111
- $this->name = __( 'Default', 'google-calendar-events' );
112
- $this->views = apply_filters( 'simcal_default_calendar_views', array(
113
- 'grid' => __( 'Grid', 'google-calendar-events' ),
114
- 'list' => __( 'List', 'google-calendar-events' ),
115
- ) );
116
-
117
- parent::__construct( $calendar );
118
-
119
- if ( ! is_null( $this->post ) ) {
120
-
121
- $this->set_properties( $this->view->get_type() );
122
-
123
- $id = $this->id;
124
- $theme = $this->theme;
125
-
126
- add_filter( 'simcal_calendar_class', function ( $class, $post_id ) use ( $theme, $id ) {
127
- if ( in_array( 'default-calendar', $class ) && $post_id === $id ) {
128
- array_push( $class, 'default-calendar-' . $theme );
129
- }
130
-
131
- return $class;
132
- }, 10, 2 );
133
-
134
- }
135
-
136
- // Calendar settings handling.
137
- if ( is_admin() && ! defined( 'DOING_AJAX' ) ) {
138
- $admin = new Default_Calendar_Admin();
139
- $this->settings = $admin->settings_fields();
140
- }
141
- }
142
-
143
- /**
144
- * Set properties.
145
- *
146
- * @since 3.0.0
147
- * @access private
148
- *
149
- * @param $view
150
- */
151
- private function set_properties( $view ) {
152
-
153
- // Set styles.
154
- if ( 'dark' == get_post_meta( $this->id, '_default_calendar_style_theme', true ) ) {
155
- $this->theme = 'dark';
156
- }
157
- if ( $today_color = get_post_meta( $this->id, '_default_calendar_style_today', true ) ) {
158
- $this->today_color = esc_attr( $today_color );
159
- }
160
- if ( $day_events_color = get_post_meta( $this->id, '_default_calendar_style_days_events', true ) ) {
161
- $this->days_events_color = esc_attr( $day_events_color );
162
- }
163
-
164
- // Hide too many events.
165
- if ( 'yes' == get_post_meta( $this->id, '_default_calendar_limit_visible_events', true ) ) {
166
- $this->events_limit = absint( get_post_meta( $this->id, '_default_calendar_visible_events', true ) );
167
- }
168
-
169
- // Expand multiple day events.
170
- if ( 'yes' == get_post_meta( $this->id, '_default_calendar_expand_multi_day_events', true ) || ( 'list' == $view && 'current_day_only' == get_post_meta( $this->id, '_default_calendar_expand_multi_day_events', true ) ) ) {
171
- $this->events = $this->expand_multiple_days_events();
172
- }
173
-
174
- if ( 'grid' == $view ) {
175
-
176
- // Use hover to open event bubbles.
177
- if ( 'hover' == get_post_meta( $this->id, '_default_calendar_event_bubble_trigger', true ) ) {
178
- $this->event_bubble_trigger = 'hover';
179
- }
180
-
181
- // Trim long event titles.
182
- if ( 'yes' == get_post_meta( $this->id, '_default_calendar_trim_titles', true ) ) {
183
- $this->trim_titles = max( absint( get_post_meta( $this->id, '_default_calendar_trim_titles_chars', true ) ), 1 );
184
- }
185
-
186
- } else {
187
-
188
- // List range.
189
- $this->group_type = esc_attr( get_post_meta( $this->id, '_default_calendar_list_range_type', true ) );
190
- $this->group_span = max( absint( get_post_meta( $this->id, '_default_calendar_list_range_span', true ) ), 1 );
191
-
192
- // Make the list look more compact.
193
- if ( 'yes' == get_post_meta( $this->id, '_default_calendar_compact_list', true ) ) {
194
- $this->compact_list = true;
195
- }
196
-
197
- }
198
-
199
- }
200
-
201
- /**
202
- * Expand multiple day events.
203
- *
204
- * @since 3.0.0
205
- * @access private
206
- *
207
- * @return array
208
- */
209
- private function expand_multiple_days_events() {
210
-
211
- $old_events = $this->events;
212
- $new_events = array();
213
-
214
- if ( ! empty( $old_events ) ) {
215
-
216
- foreach ( $old_events as $events ) {
217
- foreach ( $events as $event ) {
218
- if ( $event instanceof Event ) {
219
- if ( false !== $event->multiple_days ) {
220
- $days = $event->multiple_days;
221
-
222
- if ( $days > 0 ) {
223
-
224
- for ( $d = 1; $d <= $days; $d++ ) {
225
- $current_day_ts = $event->start + ( $d * DAY_IN_SECONDS - 1 );
226
- $new_events[ intval( $current_day_ts ) ][] = $event;
227
- }
228
- }
229
- }
230
- }
231
- }
232
-
233
- }
234
-
235
- }
236
-
237
- $events = $old_events + $new_events;
238
- ksort( $events, SORT_NUMERIC );
239
-
240
- return $events;
241
- }
242
-
243
- /**
244
- * Get a view.
245
- *
246
- * Returns one of this calendar's views.
247
- *
248
- * @since 3.0.0
249
- *
250
- * @param string $view
251
- *
252
- * @return null|Calendar_View
253
- */
254
- public function get_view( $view = '' ) {
255
-
256
- $view = ! empty( $view ) ? $view : 'grid';
257
-
258
- do_action( 'simcal_calendar_get_view', $this->type, $view );
259
-
260
- if ( 'grid' == $view ) {
261
- return new Views\Default_Calendar_Grid( $this );
262
- } elseif ( 'list' == $view ) {
263
- return new Views\Default_Calendar_List( $this );
264
- }
265
-
266
- return null;
267
- }
268
-
269
- }
1
+ <?php
2
+ /**
3
+ * Default Calendar
4
+ *
5
+ * @package SimpleCalendar\Calendars
6
+ */
7
+ namespace SimpleCalendar\Calendars;
8
+
9
+ use Carbon\Carbon;
10
+ use SimpleCalendar\Abstracts\Calendar;
11
+ use SimpleCalendar\Abstracts\Calendar_View;
12
+ use SimpleCalendar\Calendars\Admin\Default_Calendar_Admin;
13
+ use SimpleCalendar\Calendars\Views;
14
+ use SimpleCalendar\Events\Event;
15
+
16
+ if ( ! defined( 'ABSPATH' ) ) {
17
+ exit;
18
+ }
19
+
20
+ /**
21
+ * Default Calendar.
22
+ *
23
+ * The default calendar view bundled with the plugin.
24
+ *
25
+ * @since 3.0.0
26
+ */
27
+ class Default_Calendar extends Calendar {
28
+
29
+ /**
30
+ * Limit visibility of daily events.
31
+ *
32
+ * @access public
33
+ * @var int
34
+ */
35
+ public $events_limit = -1;
36
+
37
+ /**
38
+ * Trim characters event titles in grid.
39
+ *
40
+ * @access public
41
+ * @var int
42
+ */
43
+ public $trim_titles = -1;
44
+
45
+ /**
46
+ * Event bubbles action trigger.
47
+ *
48
+ * @access public
49
+ * @var string
50
+ */
51
+ public $event_bubble_trigger = 'click';
52
+
53
+ /**
54
+ * Hide navigation buttons.
55
+ *
56
+ * @access public
57
+ * @var bool
58
+ */
59
+ public $compact_list = false;
60
+
61
+ /**
62
+ * Grouped list type.
63
+ *
64
+ * @access public
65
+ * @var string
66
+ */
67
+ public $group_type = '';
68
+
69
+ /**
70
+ * Grouped list span.
71
+ *
72
+ * @access public
73
+ * @var int
74
+ */
75
+ public $group_span = 1;
76
+
77
+ /**
78
+ * Skin theme.
79
+ *
80
+ * @access public
81
+ * @var string
82
+ */
83
+ public $theme = 'light';
84
+
85
+ /**
86
+ * Today color.
87
+ *
88
+ * @access public
89
+ * @var string
90
+ */
91
+ public $today_color = '#FF0000';
92
+
93
+ /**
94
+ * Days with events color.
95
+ *
96
+ * @access public
97
+ * @var string
98
+ */
99
+ public $days_events_color = '#000000';
100
+
101
+ /**
102
+ * Constructor.
103
+ *
104
+ * @since 3.0.0
105
+ *
106
+ * @param int|object|\WP_Post|Calendar $calendar
107
+ */
108
+ public function __construct( $calendar ) {
109
+
110
+ $this->type = 'default-calendar';
111
+ $this->name = __( 'Default', 'google-calendar-events' );
112
+ $this->views = apply_filters( 'simcal_default_calendar_views', array(
113
+ 'grid' => __( 'Grid', 'google-calendar-events' ),
114
+ 'list' => __( 'List', 'google-calendar-events' ),
115
+ ) );
116
+
117
+ parent::__construct( $calendar );
118
+
119
+ if ( ! is_null( $this->post ) ) {
120
+
121
+ $this->set_properties( $this->view->get_type() );
122
+
123
+ $id = $this->id;
124
+ $theme = $this->theme;
125
+
126
+ add_filter( 'simcal_calendar_class', function ( $class, $post_id ) use ( $theme, $id ) {
127
+ if ( in_array( 'default-calendar', $class ) && $post_id === $id ) {
128
+ array_push( $class, 'default-calendar-' . $theme );
129
+ }
130
+
131
+ return $class;
132
+ }, 10, 2 );
133
+
134
+ }
135
+
136
+ // Calendar settings handling.
137
+ if ( is_admin() && ! defined( 'DOING_AJAX' ) ) {
138
+ $admin = new Default_Calendar_Admin();
139
+ $this->settings = $admin->settings_fields();
140
+ }
141
+ }
142
+
143
+ /**
144
+ * Set properties.
145
+ *
146
+ * @since 3.0.0
147
+ * @access private
148
+ *
149
+ * @param $view
150
+ */
151
+ private function set_properties( $view ) {
152
+
153
+ // Set styles.
154
+ if ( 'dark' == get_post_meta( $this->id, '_default_calendar_style_theme', true ) ) {
155
+ $this->theme = 'dark';
156
+ }
157
+ if ( $today_color = get_post_meta( $this->id, '_default_calendar_style_today', true ) ) {
158
+ $this->today_color = esc_attr( $today_color );
159
+ }
160
+ if ( $day_events_color = get_post_meta( $this->id, '_default_calendar_style_days_events', true ) ) {
161
+ $this->days_events_color = esc_attr( $day_events_color );
162
+ }
163
+
164
+ // Hide too many events.
165
+ if ( 'yes' == get_post_meta( $this->id, '_default_calendar_limit_visible_events', true ) ) {
166
+ $this->events_limit = absint( get_post_meta( $this->id, '_default_calendar_visible_events', true ) );
167
+ }
168
+
169
+ // Expand multiple day events.
170
+ if ( 'yes' == get_post_meta( $this->id, '_default_calendar_expand_multi_day_events', true ) || ( 'list' == $view && 'current_day_only' == get_post_meta( $this->id, '_default_calendar_expand_multi_day_events', true ) ) ) {
171
+ $this->events = $this->expand_multiple_days_events();
172
+ }
173
+
174
+ if ( 'grid' == $view ) {
175
+
176
+ // Use hover to open event bubbles.
177
+ if ( 'hover' == get_post_meta( $this->id, '_default_calendar_event_bubble_trigger', true ) ) {
178
+ $this->event_bubble_trigger = 'hover';
179
+ }
180
+
181
+ // Trim long event titles.
182
+ if ( 'yes' == get_post_meta( $this->id, '_default_calendar_trim_titles', true ) ) {
183
+ $this->trim_titles = max( absint( get_post_meta( $this->id, '_default_calendar_trim_titles_chars', true ) ), 1 );
184
+ }
185
+
186
+ } else {
187
+
188
+ // List range.
189
+ $this->group_type = esc_attr( get_post_meta( $this->id, '_default_calendar_list_range_type', true ) );
190
+ $this->group_span = max( absint( get_post_meta( $this->id, '_default_calendar_list_range_span', true ) ), 1 );
191
+
192
+ // Make the list look more compact.
193
+ if ( 'yes' == get_post_meta( $this->id, '_default_calendar_compact_list', true ) ) {
194
+ $this->compact_list = true;
195
+ }
196
+
197
+ }
198
+
199
+ }
200
+
201
+ /**
202
+ * Expand multiple day events.
203
+ *
204
+ * @since 3.0.0
205
+ * @access private
206
+ *
207
+ * @return array
208
+ */
209
+ private function expand_multiple_days_events() {
210
+
211
+ $old_events = $this->events;
212
+ $new_events = array();
213
+
214
+ if ( ! empty( $old_events ) ) {
215
+
216
+ foreach ( $old_events as $events ) {
217
+ foreach ( $events as $event ) {
218
+ if ( $event instanceof Event ) {
219
+ if ( false !== $event->multiple_days ) {
220
+ $days = $event->multiple_days;
221
+
222
+ if ( $days > 0 ) {
223
+
224
+ for ( $d = 1; $d <= $days; $d++ ) {
225
+ $current_day_ts = $event->start + ( $d * DAY_IN_SECONDS - 1 );
226
+ $new_events[ intval( $current_day_ts ) ][] = $event;
227
+ }
228
+ }
229
+ }
230
+ }
231
+ }
232
+
233
+ }
234
+
235
+ }
236
+
237
+ $events = $old_events + $new_events;
238
+ ksort( $events, SORT_NUMERIC );
239
+
240
+ return $events;
241
+ }
242
+
243
+ /**
244
+ * Get a view.
245
+ *
246
+ * Returns one of this calendar's views.
247
+ *
248
+ * @since 3.0.0
249
+ *
250
+ * @param string $view
251
+ *
252
+ * @return null|Calendar_View
253
+ */
254
+ public function get_view( $view = '' ) {
255
+
256
+ $view = ! empty( $view ) ? $view : 'grid';
257
+
258
+ do_action( 'simcal_calendar_get_view', $this->type, $view );
259
+
260
+ if ( 'grid' == $view ) {
261
+ return new Views\Default_Calendar_Grid( $this );
262
+ } elseif ( 'list' == $view ) {
263
+ return new Views\Default_Calendar_List( $this );
264
+ }
265
+
266
+ return null;
267
+ }
268
+
269
+ }
includes/feeds/google.php CHANGED
@@ -10,6 +10,7 @@ use Carbon\Carbon;
10
  use SimpleCalendar\Abstracts\Calendar;
11
  use SimpleCalendar\Abstracts\Feed;
12
  use SimpleCalendar\Feeds\Admin\Google_Admin as Admin;
 
13
 
14
  if ( ! defined( 'ABSPATH' ) ) {
15
  exit;
@@ -366,6 +367,37 @@ class Google extends Feed {
366
  $this->timezone = $calendar['timezone'];
367
  }
368
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
369
  return isset( $calendar['events'] ) ? $calendar['events'] : array();
370
  }
371
 
@@ -398,7 +430,7 @@ class Google extends Feed {
398
  }
399
 
400
  // Query events using search terms.
401
- if ( ! empty( $this->google_search_query ) ) {
402
  $args['q'] = rawurlencode( $this->google_search_query );
403
  }
404
 
@@ -474,6 +506,16 @@ class Google extends Feed {
474
  $client->setDeveloperKey( $this->google_api_key );
475
  $client->setAccessType( 'online' );
476
 
 
 
 
 
 
 
 
 
 
 
477
  return $client;
478
  }
479
 
10
  use SimpleCalendar\Abstracts\Calendar;
11
  use SimpleCalendar\Abstracts\Feed;
12
  use SimpleCalendar\Feeds\Admin\Google_Admin as Admin;
13
+ use GuzzleHttp\Client;
14
 
15
  if ( ! defined( 'ABSPATH' ) ) {
16
  exit;
367
  $this->timezone = $calendar['timezone'];
368
  }
369
 
370
+ // Custom OR search since Google API doesn't support the OR search for calendar events
371
+ if ( isset( $calendar['events'] ) ) {
372
+
373
+ $events = array();
374
+ $search_query = explode( strtolower( ' OR ' ), strtolower( $this->google_search_query ) );
375
+
376
+ foreach ( $calendar['events'] as $k => $v ) {
377
+
378
+ foreach( $v as $k2 ) {
379
+
380
+ $search_found = false;
381
+
382
+ for( $i = 0; $i < count( $search_query ); $i++ ) {
383
+ if ( strpos( strtolower( $k2['title'] ), $search_query[ $i ] ) !== false ||
384
+ strpos( strtolower( $k2['description'] ), $search_query[ $i ] ) !== false ) {
385
+ $search_found = true;
386
+ }
387
+ }
388
+
389
+ if ( $search_found ) {
390
+ $events[ $k ] = $v;
391
+ }
392
+ }
393
+
394
+ }
395
+
396
+ if ( ! empty( $events ) ) {
397
+ $calendar['events'] = $events;
398
+ }
399
+ }
400
+
401
  return isset( $calendar['events'] ) ? $calendar['events'] : array();
402
  }
403
 
430
  }
431
 
432
  // Query events using search terms.
433
+ if ( ! empty( $this->google_search_query ) && strpos( $this->google_search_query, 'OR' ) === false ) {
434
  $args['q'] = rawurlencode( $this->google_search_query );
435
  }
436
 
506
  $client->setDeveloperKey( $this->google_api_key );
507
  $client->setAccessType( 'online' );
508
 
509
+ $curl_options = apply_filters( 'simcal_google_client_curl_options', array() );
510
+
511
+ if ( ! empty( $curl_options ) ) {
512
+ $guzzle = new Client( array(
513
+ 'curl.options' => $curl_options,
514
+ ) );
515
+
516
+ $client->setHttpClient( $guzzle );
517
+ }
518
+
519
  return $client;
520
  }
521
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: simplecalendar, sureswiftcapital, pderksen, nickyoung87, nekojira,
3
  Tags: google calendar, calendar, calendars, google, event calendar, custom calendar, custom calendars, event, events
4
  Requires at least: 4.2
5
  Requires PHP: 7.3
6
- Tested up to: 5.5.1
7
- Stable tag: 3.1.33
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -97,6 +97,11 @@ We'd love your help! Here's a few things you can do:
97
 
98
  == Changelog ==
99
 
 
 
 
 
 
100
  = 3.1.33 =
101
  * Fix: Trimmed overall size of the plugin to reduce errors from installation failing.
102
  * Dev: Updated minimum PHP requirement to 7.3
3
  Tags: google calendar, calendar, calendars, google, event calendar, custom calendar, custom calendars, event, events
4
  Requires at least: 4.2
5
  Requires PHP: 7.3
6
+ Tested up to: 5.6
7
+ Stable tag: 3.1.34
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
97
 
98
  == Changelog ==
99
 
100
+ = 3.1.34 =
101
+ * Dev: Tested up to WordPress 5.6
102
+ * Fix: OR searches will now work as OR, not as AND
103
+ * Fix: Revert Guzzle to < 7.x version to avoid conflicts (temporary)
104
+
105
  = 3.1.33 =
106
  * Fix: Trimmed overall size of the plugin to reduce errors from installation failing.
107
  * Dev: Updated minimum PHP requirement to 7.3
vendor/composer/ClassLoader.php CHANGED
@@ -37,8 +37,8 @@ namespace Composer\Autoload;
37
  *
38
  * @author Fabien Potencier <fabien@symfony.com>
39
  * @author Jordi Boggiano <j.boggiano@seld.be>
40
- * @see http://www.php-fig.org/psr/psr-0/
41
- * @see http://www.php-fig.org/psr/psr-4/
42
  */
43
  class ClassLoader
44
  {
@@ -60,7 +60,7 @@ class ClassLoader
60
  public function getPrefixes()
61
  {
62
  if (!empty($this->prefixesPsr0)) {
63
- return call_user_func_array('array_merge', $this->prefixesPsr0);
64
  }
65
 
66
  return array();
37
  *
38
  * @author Fabien Potencier <fabien@symfony.com>
39
  * @author Jordi Boggiano <j.boggiano@seld.be>
40
+ * @see https://www.php-fig.org/psr/psr-0/
41
+ * @see https://www.php-fig.org/psr/psr-4/
42
  */
43
  class ClassLoader
44
  {
60
  public function getPrefixes()
61
  {
62
  if (!empty($this->prefixesPsr0)) {
63
+ return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
64
  }
65
 
66
  return array();
vendor/composer/InstalledVersions.php ADDED
@@ -0,0 +1,461 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Composer;
4
+
5
+ use Composer\Semver\VersionParser;
6
+
7
+
8
+
9
+
10
+
11
+
12
+ class InstalledVersions
13
+ {
14
+ private static $installed = array (
15
+ 'root' =>
16
+ array (
17
+ 'pretty_version' => 'dev-master',
18
+ 'version' => 'dev-master',
19
+ 'aliases' =>
20
+ array (
21
+ ),
22
+ 'reference' => 'f463c1667aa5486af368886f2f4f39a985c75b5b',
23
+ 'name' => 'moonstonemedia/simple-calendar',
24
+ ),
25
+ 'versions' =>
26
+ array (
27
+ 'composer/installers' =>
28
+ array (
29
+ 'pretty_version' => 'v1.9.0',
30
+ 'version' => '1.9.0.0',
31
+ 'aliases' =>
32
+ array (
33
+ ),
34
+ 'reference' => 'b93bcf0fa1fccb0b7d176b0967d969691cd74cca',
35
+ ),
36
+ 'erusev/parsedown' =>
37
+ array (
38
+ 'pretty_version' => '1.7.4',
39
+ 'version' => '1.7.4.0',
40
+ 'aliases' =>
41
+ array (
42
+ ),
43
+ 'reference' => 'cb17b6477dfff935958ba01325f2e8a2bfa6dab3',
44
+ ),
45
+ 'firebase/php-jwt' =>
46
+ array (
47
+ 'pretty_version' => 'v5.2.0',
48
+ 'version' => '5.2.0.0',
49
+ 'aliases' =>
50
+ array (
51
+ ),
52
+ 'reference' => 'feb0e820b8436873675fd3aca04f3728eb2185cb',
53
+ ),
54
+ 'google/apiclient' =>
55
+ array (
56
+ 'pretty_version' => 'v2.8.3',
57
+ 'version' => '2.8.3.0',
58
+ 'aliases' =>
59
+ array (
60
+ ),
61
+ 'reference' => '81696e6206322e38c643cfcc96c4494ccfef8a32',
62
+ ),
63
+ 'google/apiclient-services' =>
64
+ array (
65
+ 'pretty_version' => 'v0.156',
66
+ 'version' => '0.156.0.0',
67
+ 'aliases' =>
68
+ array (
69
+ ),
70
+ 'reference' => '2f5e54fdef034f856208328126bddd8376dae4b3',
71
+ ),
72
+ 'google/auth' =>
73
+ array (
74
+ 'pretty_version' => 'v1.14.3',
75
+ 'version' => '1.14.3.0',
76
+ 'aliases' =>
77
+ array (
78
+ ),
79
+ 'reference' => 'c1503299c779af0cbc99b43788f75930988852cf',
80
+ ),
81
+ 'guzzlehttp/guzzle' =>
82
+ array (
83
+ 'pretty_version' => '6.5.5',
84
+ 'version' => '6.5.5.0',
85
+ 'aliases' =>
86
+ array (
87
+ ),
88
+ 'reference' => '9d4290de1cfd701f38099ef7e183b64b4b7b0c5e',
89
+ ),
90
+ 'guzzlehttp/promises' =>
91
+ array (
92
+ 'pretty_version' => '1.4.0',
93
+ 'version' => '1.4.0.0',
94
+ 'aliases' =>
95
+ array (
96
+ ),
97
+ 'reference' => '60d379c243457e073cff02bc323a2a86cb355631',
98
+ ),
99
+ 'guzzlehttp/psr7' =>
100
+ array (
101
+ 'pretty_version' => '1.7.0',
102
+ 'version' => '1.7.0.0',
103
+ 'aliases' =>
104
+ array (
105
+ ),
106
+ 'reference' => '53330f47520498c0ae1f61f7e2c90f55690c06a3',
107
+ ),
108
+ 'mexitek/phpcolors' =>
109
+ array (
110
+ 'pretty_version' => 'dev-master',
111
+ 'version' => 'dev-master',
112
+ 'aliases' =>
113
+ array (
114
+ 0 => '9999999-dev',
115
+ ),
116
+ 'reference' => '4b1ccc920b5fc3749a575c171d2f12fca0ecfded',
117
+ ),
118
+ 'monolog/monolog' =>
119
+ array (
120
+ 'pretty_version' => '2.2.0',
121
+ 'version' => '2.2.0.0',
122
+ 'aliases' =>
123
+ array (
124
+ ),
125
+ 'reference' => '1cb1cde8e8dd0f70cc0fe51354a59acad9302084',
126
+ ),
127
+ 'moonstonemedia/simple-calendar' =>
128
+ array (
129
+ 'pretty_version' => 'dev-master',
130
+ 'version' => 'dev-master',
131
+ 'aliases' =>
132
+ array (
133
+ ),
134
+ 'reference' => 'f463c1667aa5486af368886f2f4f39a985c75b5b',
135
+ ),
136
+ 'nesbot/carbon' =>
137
+ array (
138
+ 'pretty_version' => '2.42.0',
139
+ 'version' => '2.42.0.0',
140
+ 'aliases' =>
141
+ array (
142
+ ),
143
+ 'reference' => 'd0463779663437392fe42ff339ebc0213bd55498',
144
+ ),
145
+ 'phpseclib/phpseclib' =>
146
+ array (
147
+ 'pretty_version' => '2.0.30',
148
+ 'version' => '2.0.30.0',
149
+ 'aliases' =>
150
+ array (
151
+ ),
152
+ 'reference' => '136b9ca7eebef78be14abf90d65c5e57b6bc5d36',
153
+ ),
154
+ 'psr/cache' =>
155
+ array (
156
+ 'pretty_version' => '1.0.1',
157
+ 'version' => '1.0.1.0',
158
+ 'aliases' =>
159
+ array (
160
+ ),
161
+ 'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8',
162
+ ),
163
+ 'psr/http-message' =>
164
+ array (
165
+ 'pretty_version' => '1.0.1',
166
+ 'version' => '1.0.1.0',
167
+ 'aliases' =>
168
+ array (
169
+ ),
170
+ 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363',
171
+ ),
172
+ 'psr/http-message-implementation' =>
173
+ array (
174
+ 'provided' =>
175
+ array (
176
+ 0 => '1.0',
177
+ ),
178
+ ),
179
+ 'psr/log' =>
180
+ array (
181
+ 'pretty_version' => '1.1.3',
182
+ 'version' => '1.1.3.0',
183
+ 'aliases' =>
184
+ array (
185
+ ),
186
+ 'reference' => '0f73288fd15629204f9d42b7055f72dacbe811fc',
187
+ ),
188
+ 'psr/log-implementation' =>
189
+ array (
190
+ 'provided' =>
191
+ array (
192
+ 0 => '1.0.0',
193
+ ),
194
+ ),
195
+ 'ralouphie/getallheaders' =>
196
+ array (
197
+ 'pretty_version' => '3.0.3',
198
+ 'version' => '3.0.3.0',
199
+ 'aliases' =>
200
+ array (
201
+ ),
202
+ 'reference' => '120b605dfeb996808c31b6477290a714d356e822',
203
+ ),
204
+ 'roundcube/plugin-installer' =>
205
+ array (
206
+ 'replaced' =>
207
+ array (
208
+ 0 => '*',
209
+ ),
210
+ ),
211
+ 'shama/baton' =>
212
+ array (
213
+ 'replaced' =>
214
+ array (
215
+ 0 => '*',
216
+ ),
217
+ ),
218
+ 'symfony/polyfill-intl-idn' =>
219
+ array (
220
+ 'pretty_version' => 'v1.20.0',
221
+ 'version' => '1.20.0.0',
222
+ 'aliases' =>
223
+ array (
224
+ ),
225
+ 'reference' => '3b75acd829741c768bc8b1f84eb33265e7cc5117',
226
+ ),
227
+ 'symfony/polyfill-intl-normalizer' =>
228
+ array (
229
+ 'pretty_version' => 'v1.20.0',
230
+ 'version' => '1.20.0.0',
231
+ 'aliases' =>
232
+ array (
233
+ ),
234
+ 'reference' => '727d1096295d807c309fb01a851577302394c897',
235
+ ),
236
+ 'symfony/polyfill-mbstring' =>
237
+ array (
238
+ 'pretty_version' => 'v1.20.0',
239
+ 'version' => '1.20.0.0',
240
+ 'aliases' =>
241
+ array (
242
+ ),
243
+ 'reference' => '39d483bdf39be819deabf04ec872eb0b2410b531',
244
+ ),
245
+ 'symfony/polyfill-php72' =>
246
+ array (
247
+ 'pretty_version' => 'v1.20.0',
248
+ 'version' => '1.20.0.0',
249
+ 'aliases' =>
250
+ array (
251
+ ),
252
+ 'reference' => 'cede45fcdfabdd6043b3592e83678e42ec69e930',
253
+ ),
254
+ 'symfony/polyfill-php80' =>
255
+ array (
256
+ 'pretty_version' => 'v1.20.0',
257
+ 'version' => '1.20.0.0',
258
+ 'aliases' =>
259
+ array (
260
+ ),
261
+ 'reference' => 'e70aa8b064c5b72d3df2abd5ab1e90464ad009de',
262
+ ),
263
+ 'symfony/translation' =>
264
+ array (
265
+ 'pretty_version' => 'v5.2.1',
266
+ 'version' => '5.2.1.0',
267
+ 'aliases' =>
268
+ array (
269
+ ),
270
+ 'reference' => 'a04209ba0d1391c828e5b2373181dac63c52ee70',
271
+ ),
272
+ 'symfony/translation-contracts' =>
273
+ array (
274
+ 'pretty_version' => 'v2.3.0',
275
+ 'version' => '2.3.0.0',
276
+ 'aliases' =>
277
+ array (
278
+ ),
279
+ 'reference' => 'e2eaa60b558f26a4b0354e1bbb25636efaaad105',
280
+ ),
281
+ 'symfony/translation-implementation' =>
282
+ array (
283
+ 'provided' =>
284
+ array (
285
+ 0 => '2.0',
286
+ ),
287
+ ),
288
+ ),
289
+ );
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+ public static function getInstalledPackages()
298
+ {
299
+ return array_keys(self::$installed['versions']);
300
+ }
301
+
302
+
303
+
304
+
305
+
306
+
307
+
308
+
309
+
310
+ public static function isInstalled($packageName)
311
+ {
312
+ return isset(self::$installed['versions'][$packageName]);
313
+ }
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+
327
+
328
+ public static function satisfies(VersionParser $parser, $packageName, $constraint)
329
+ {
330
+ $constraint = $parser->parseConstraints($constraint);
331
+ $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
332
+
333
+ return $provided->matches($constraint);
334
+ }
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+ public static function getVersionRanges($packageName)
346
+ {
347
+ if (!isset(self::$installed['versions'][$packageName])) {
348
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
349
+ }
350
+
351
+ $ranges = array();
352
+ if (isset(self::$installed['versions'][$packageName]['pretty_version'])) {
353
+ $ranges[] = self::$installed['versions'][$packageName]['pretty_version'];
354
+ }
355
+ if (array_key_exists('aliases', self::$installed['versions'][$packageName])) {
356
+ $ranges = array_merge($ranges, self::$installed['versions'][$packageName]['aliases']);
357
+ }
358
+ if (array_key_exists('replaced', self::$installed['versions'][$packageName])) {
359
+ $ranges = array_merge($ranges, self::$installed['versions'][$packageName]['replaced']);
360
+ }
361
+ if (array_key_exists('provided', self::$installed['versions'][$packageName])) {
362
+ $ranges = array_merge($ranges, self::$installed['versions'][$packageName]['provided']);
363
+ }
364
+
365
+ return implode(' || ', $ranges);
366
+ }
367
+
368
+
369
+
370
+
371
+
372
+ public static function getVersion($packageName)
373
+ {
374
+ if (!isset(self::$installed['versions'][$packageName])) {
375
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
376
+ }
377
+
378
+ if (!isset(self::$installed['versions'][$packageName]['version'])) {
379
+ return null;
380
+ }
381
+
382
+ return self::$installed['versions'][$packageName]['version'];
383
+ }
384
+
385
+
386
+
387
+
388
+
389
+ public static function getPrettyVersion($packageName)
390
+ {
391
+ if (!isset(self::$installed['versions'][$packageName])) {
392
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
393
+ }
394
+
395
+ if (!isset(self::$installed['versions'][$packageName]['pretty_version'])) {
396
+ return null;
397
+ }
398
+
399
+ return self::$installed['versions'][$packageName]['pretty_version'];
400
+ }
401
+
402
+
403
+
404
+
405
+
406
+ public static function getReference($packageName)
407
+ {
408
+ if (!isset(self::$installed['versions'][$packageName])) {
409
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
410
+ }
411
+
412
+ if (!isset(self::$installed['versions'][$packageName]['reference'])) {
413
+ return null;
414
+ }
415
+
416
+ return self::$installed['versions'][$packageName]['reference'];
417
+ }
418
+
419
+
420
+
421
+
422
+
423
+ public static function getRootPackage()
424
+ {
425
+ return self::$installed['root'];
426
+ }
427
+
428
+
429
+
430
+
431
+
432
+
433
+
434
+ public static function getRawData()
435
+ {
436
+ return self::$installed;
437
+ }
438
+
439
+
440
+
441
+
442
+
443
+
444
+
445
+
446
+
447
+
448
+
449
+
450
+
451
+
452
+
453
+
454
+
455
+
456
+
457
+ public static function reload($data)
458
+ {
459
+ self::$installed = $data;
460
+ }
461
+ }
vendor/composer/autoload_classmap.php CHANGED
@@ -6,9 +6,31 @@ $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
9
- 'Google_Service_Exception' => $vendorDir . '/google/apiclient/src/Google/Service/Exception.php',
10
- 'Google_Service_Resource' => $vendorDir . '/google/apiclient/src/Google/Service/Resource.php',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  'Mexitek\\PHPColors\\Color' => $vendorDir . '/mexitek/phpcolors/src/Mexitek/PHPColors/Color.php',
 
12
  'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
13
  'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
14
  'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
9
+ 'Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
10
+ 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
11
+ 'Google_AccessToken_Revoke' => $vendorDir . '/google/apiclient/src/aliases.php',
12
+ 'Google_AccessToken_Verify' => $vendorDir . '/google/apiclient/src/aliases.php',
13
+ 'Google_AuthHandler_AuthHandlerFactory' => $vendorDir . '/google/apiclient/src/aliases.php',
14
+ 'Google_AuthHandler_Guzzle5AuthHandler' => $vendorDir . '/google/apiclient/src/aliases.php',
15
+ 'Google_AuthHandler_Guzzle6AuthHandler' => $vendorDir . '/google/apiclient/src/aliases.php',
16
+ 'Google_AuthHandler_Guzzle7AuthHandler' => $vendorDir . '/google/apiclient/src/aliases.php',
17
+ 'Google_Client' => $vendorDir . '/google/apiclient/src/aliases.php',
18
+ 'Google_Collection' => $vendorDir . '/google/apiclient/src/aliases.php',
19
+ 'Google_Exception' => $vendorDir . '/google/apiclient/src/aliases.php',
20
+ 'Google_Http_Batch' => $vendorDir . '/google/apiclient/src/aliases.php',
21
+ 'Google_Http_MediaFileUpload' => $vendorDir . '/google/apiclient/src/aliases.php',
22
+ 'Google_Http_REST' => $vendorDir . '/google/apiclient/src/aliases.php',
23
+ 'Google_Model' => $vendorDir . '/google/apiclient/src/aliases.php',
24
+ 'Google_Service' => $vendorDir . '/google/apiclient/src/aliases.php',
25
+ 'Google_Service_Exception' => $vendorDir . '/google/apiclient/src/aliases.php',
26
+ 'Google_Service_Resource' => $vendorDir . '/google/apiclient/src/aliases.php',
27
+ 'Google_Task_Composer' => $vendorDir . '/google/apiclient/src/aliases.php',
28
+ 'Google_Task_Exception' => $vendorDir . '/google/apiclient/src/aliases.php',
29
+ 'Google_Task_Retryable' => $vendorDir . '/google/apiclient/src/aliases.php',
30
+ 'Google_Task_Runner' => $vendorDir . '/google/apiclient/src/aliases.php',
31
+ 'Google_Utils_UriTemplate' => $vendorDir . '/google/apiclient/src/aliases.php',
32
  'Mexitek\\PHPColors\\Color' => $vendorDir . '/mexitek/phpcolors/src/Mexitek/PHPColors/Color.php',
33
+ 'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
34
  'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
35
  'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
36
  'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
vendor/composer/autoload_files.php CHANGED
@@ -9,8 +9,13 @@ return array(
9
  '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
10
  'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
11
  'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
 
 
 
12
  '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
13
  'decc78cc4436b1292c6c0d151b19445c' => $vendorDir . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
14
  '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
15
  'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
 
 
16
  );
9
  '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
10
  'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
11
  'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
12
+ 'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
13
+ '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
14
+ 'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php',
15
  '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
16
  'decc78cc4436b1292c6c0d151b19445c' => $vendorDir . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
17
  '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
18
  'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
19
+ 'a1105708a18b76903365ca1c4aa61b02' => $vendorDir . '/symfony/translation/Resources/functions.php',
20
+ 'a8d3953fd9959404dd22d3dfcd0a79f0' => $vendorDir . '/google/apiclient/src/aliases.php',
21
  );
vendor/composer/autoload_namespaces.php CHANGED
@@ -8,5 +8,4 @@ $baseDir = dirname($vendorDir);
8
  return array(
9
  'Parsedown' => array($vendorDir . '/erusev/parsedown'),
10
  'Google_Service_' => array($vendorDir . '/google/apiclient-services/src'),
11
- 'Google_' => array($vendorDir . '/google/apiclient/src'),
12
  );
8
  return array(
9
  'Parsedown' => array($vendorDir . '/erusev/parsedown'),
10
  'Google_Service_' => array($vendorDir . '/google/apiclient-services/src'),
 
11
  );
vendor/composer/autoload_psr4.php CHANGED
@@ -8,18 +8,21 @@ $baseDir = dirname($vendorDir);
8
  return array(
9
  'phpseclib\\' => array($vendorDir . '/phpseclib/phpseclib/phpseclib'),
10
  'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'),
 
11
  'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
 
 
12
  'Symfony\\Contracts\\Translation\\' => array($vendorDir . '/symfony/translation-contracts'),
13
  'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'),
14
  'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
15
  'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
16
- 'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'),
17
  'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
18
  'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'),
19
  'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
20
  'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
21
  'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
22
  'Google\\Auth\\' => array($vendorDir . '/google/auth/src'),
 
23
  'Firebase\\JWT\\' => array($vendorDir . '/firebase/php-jwt/src'),
24
  'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'),
25
  'Carbon\\' => array($vendorDir . '/nesbot/carbon/src/Carbon'),
8
  return array(
9
  'phpseclib\\' => array($vendorDir . '/phpseclib/phpseclib/phpseclib'),
10
  'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'),
11
+ 'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'),
12
  'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
13
+ 'Symfony\\Polyfill\\Intl\\Normalizer\\' => array($vendorDir . '/symfony/polyfill-intl-normalizer'),
14
+ 'Symfony\\Polyfill\\Intl\\Idn\\' => array($vendorDir . '/symfony/polyfill-intl-idn'),
15
  'Symfony\\Contracts\\Translation\\' => array($vendorDir . '/symfony/translation-contracts'),
16
  'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'),
17
  'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
18
  'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
 
19
  'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
20
  'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'),
21
  'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
22
  'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
23
  'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
24
  'Google\\Auth\\' => array($vendorDir . '/google/auth/src'),
25
+ 'Google\\' => array($vendorDir . '/google/apiclient/src'),
26
  'Firebase\\JWT\\' => array($vendorDir . '/firebase/php-jwt/src'),
27
  'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'),
28
  'Carbon\\' => array($vendorDir . '/nesbot/carbon/src/Carbon'),
vendor/composer/autoload_real.php CHANGED
@@ -22,13 +22,15 @@ class ComposerAutoloaderInitbda17c8d5de6827116ab2866064b2793
22
  return self::$loader;
23
  }
24
 
 
 
25
  spl_autoload_register(array('ComposerAutoloaderInitbda17c8d5de6827116ab2866064b2793', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
  spl_autoload_unregister(array('ComposerAutoloaderInitbda17c8d5de6827116ab2866064b2793', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
- require_once __DIR__ . '/autoload_static.php';
32
 
33
  call_user_func(\Composer\Autoload\ComposerStaticInitbda17c8d5de6827116ab2866064b2793::getInitializer($loader));
34
  } else {
22
  return self::$loader;
23
  }
24
 
25
+ require __DIR__ . '/platform_check.php';
26
+
27
  spl_autoload_register(array('ComposerAutoloaderInitbda17c8d5de6827116ab2866064b2793', 'loadClassLoader'), true, true);
28
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
29
  spl_autoload_unregister(array('ComposerAutoloaderInitbda17c8d5de6827116ab2866064b2793', 'loadClassLoader'));
30
 
31
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
32
  if ($useStaticLoader) {
33
+ require __DIR__ . '/autoload_static.php';
34
 
35
  call_user_func(\Composer\Autoload\ComposerStaticInitbda17c8d5de6827116ab2866064b2793::getInitializer($loader));
36
  } else {
vendor/composer/autoload_static.php CHANGED
@@ -10,10 +10,15 @@ class ComposerStaticInitbda17c8d5de6827116ab2866064b2793
10
  '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
11
  'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
12
  'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
 
 
 
13
  '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
14
  'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
15
  '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
16
  'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
 
 
17
  );
18
 
19
  public static $prefixLengthsPsr4 = array (
@@ -24,7 +29,10 @@ class ComposerStaticInitbda17c8d5de6827116ab2866064b2793
24
  'S' =>
25
  array (
26
  'Symfony\\Polyfill\\Php80\\' => 23,
 
27
  'Symfony\\Polyfill\\Mbstring\\' => 26,
 
 
28
  'Symfony\\Contracts\\Translation\\' => 30,
29
  'Symfony\\Component\\Translation\\' => 30,
30
  ),
@@ -32,7 +40,6 @@ class ComposerStaticInitbda17c8d5de6827116ab2866064b2793
32
  array (
33
  'Psr\\Log\\' => 8,
34
  'Psr\\Http\\Message\\' => 17,
35
- 'Psr\\Http\\Client\\' => 16,
36
  'Psr\\Cache\\' => 10,
37
  ),
38
  'M' =>
@@ -45,6 +52,7 @@ class ComposerStaticInitbda17c8d5de6827116ab2866064b2793
45
  'GuzzleHttp\\Promise\\' => 19,
46
  'GuzzleHttp\\' => 11,
47
  'Google\\Auth\\' => 12,
 
48
  ),
49
  'F' =>
50
  array (
@@ -66,10 +74,22 @@ class ComposerStaticInitbda17c8d5de6827116ab2866064b2793
66
  array (
67
  0 => __DIR__ . '/..' . '/symfony/polyfill-php80',
68
  ),
 
 
 
 
69
  'Symfony\\Polyfill\\Mbstring\\' =>
70
  array (
71
  0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
72
  ),
 
 
 
 
 
 
 
 
73
  'Symfony\\Contracts\\Translation\\' =>
74
  array (
75
  0 => __DIR__ . '/..' . '/symfony/translation-contracts',
@@ -86,10 +106,6 @@ class ComposerStaticInitbda17c8d5de6827116ab2866064b2793
86
  array (
87
  0 => __DIR__ . '/..' . '/psr/http-message/src',
88
  ),
89
- 'Psr\\Http\\Client\\' =>
90
- array (
91
- 0 => __DIR__ . '/..' . '/psr/http-client/src',
92
- ),
93
  'Psr\\Cache\\' =>
94
  array (
95
  0 => __DIR__ . '/..' . '/psr/cache/src',
@@ -114,6 +130,10 @@ class ComposerStaticInitbda17c8d5de6827116ab2866064b2793
114
  array (
115
  0 => __DIR__ . '/..' . '/google/auth/src',
116
  ),
 
 
 
 
117
  'Firebase\\JWT\\' =>
118
  array (
119
  0 => __DIR__ . '/..' . '/firebase/php-jwt/src',
@@ -142,17 +162,35 @@ class ComposerStaticInitbda17c8d5de6827116ab2866064b2793
142
  array (
143
  0 => __DIR__ . '/..' . '/google/apiclient-services/src',
144
  ),
145
- 'Google_' =>
146
- array (
147
- 0 => __DIR__ . '/..' . '/google/apiclient/src',
148
- ),
149
  ),
150
  );
151
 
152
  public static $classMap = array (
153
- 'Google_Service_Exception' => __DIR__ . '/..' . '/google/apiclient/src/Google/Service/Exception.php',
154
- 'Google_Service_Resource' => __DIR__ . '/..' . '/google/apiclient/src/Google/Service/Resource.php',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
  'Mexitek\\PHPColors\\Color' => __DIR__ . '/..' . '/mexitek/phpcolors/src/Mexitek/PHPColors/Color.php',
 
156
  'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
157
  'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
158
  'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
10
  '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
11
  'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
12
  'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
13
+ 'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
14
+ '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
15
+ 'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php',
16
  '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
17
  'decc78cc4436b1292c6c0d151b19445c' => __DIR__ . '/..' . '/phpseclib/phpseclib/phpseclib/bootstrap.php',
18
  '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
19
  'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
20
+ 'a1105708a18b76903365ca1c4aa61b02' => __DIR__ . '/..' . '/symfony/translation/Resources/functions.php',
21
+ 'a8d3953fd9959404dd22d3dfcd0a79f0' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php',
22
  );
23
 
24
  public static $prefixLengthsPsr4 = array (
29
  'S' =>
30
  array (
31
  'Symfony\\Polyfill\\Php80\\' => 23,
32
+ 'Symfony\\Polyfill\\Php72\\' => 23,
33
  'Symfony\\Polyfill\\Mbstring\\' => 26,
34
+ 'Symfony\\Polyfill\\Intl\\Normalizer\\' => 33,
35
+ 'Symfony\\Polyfill\\Intl\\Idn\\' => 26,
36
  'Symfony\\Contracts\\Translation\\' => 30,
37
  'Symfony\\Component\\Translation\\' => 30,
38
  ),
40
  array (
41
  'Psr\\Log\\' => 8,
42
  'Psr\\Http\\Message\\' => 17,
 
43
  'Psr\\Cache\\' => 10,
44
  ),
45
  'M' =>
52
  'GuzzleHttp\\Promise\\' => 19,
53
  'GuzzleHttp\\' => 11,
54
  'Google\\Auth\\' => 12,
55
+ 'Google\\' => 7,
56
  ),
57
  'F' =>
58
  array (
74
  array (
75
  0 => __DIR__ . '/..' . '/symfony/polyfill-php80',
76
  ),
77
+ 'Symfony\\Polyfill\\Php72\\' =>
78
+ array (
79
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-php72',
80
+ ),
81
  'Symfony\\Polyfill\\Mbstring\\' =>
82
  array (
83
  0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
84
  ),
85
+ 'Symfony\\Polyfill\\Intl\\Normalizer\\' =>
86
+ array (
87
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer',
88
+ ),
89
+ 'Symfony\\Polyfill\\Intl\\Idn\\' =>
90
+ array (
91
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-idn',
92
+ ),
93
  'Symfony\\Contracts\\Translation\\' =>
94
  array (
95
  0 => __DIR__ . '/..' . '/symfony/translation-contracts',
106
  array (
107
  0 => __DIR__ . '/..' . '/psr/http-message/src',
108
  ),
 
 
 
 
109
  'Psr\\Cache\\' =>
110
  array (
111
  0 => __DIR__ . '/..' . '/psr/cache/src',
130
  array (
131
  0 => __DIR__ . '/..' . '/google/auth/src',
132
  ),
133
+ 'Google\\' =>
134
+ array (
135
+ 0 => __DIR__ . '/..' . '/google/apiclient/src',
136
+ ),
137
  'Firebase\\JWT\\' =>
138
  array (
139
  0 => __DIR__ . '/..' . '/firebase/php-jwt/src',
162
  array (
163
  0 => __DIR__ . '/..' . '/google/apiclient-services/src',
164
  ),
 
 
 
 
165
  ),
166
  );
167
 
168
  public static $classMap = array (
169
+ 'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
170
+ 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
171
+ 'Google_AccessToken_Revoke' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php',
172
+ 'Google_AccessToken_Verify' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php',
173
+ 'Google_AuthHandler_AuthHandlerFactory' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php',
174
+ 'Google_AuthHandler_Guzzle5AuthHandler' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php',
175
+ 'Google_AuthHandler_Guzzle6AuthHandler' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php',
176
+ 'Google_AuthHandler_Guzzle7AuthHandler' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php',
177
+ 'Google_Client' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php',
178
+ 'Google_Collection' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php',
179
+ 'Google_Exception' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php',
180
+ 'Google_Http_Batch' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php',
181
+ 'Google_Http_MediaFileUpload' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php',
182
+ 'Google_Http_REST' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php',
183
+ 'Google_Model' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php',
184
+ 'Google_Service' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php',
185
+ 'Google_Service_Exception' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php',
186
+ 'Google_Service_Resource' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php',
187
+ 'Google_Task_Composer' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php',
188
+ 'Google_Task_Exception' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php',
189
+ 'Google_Task_Retryable' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php',
190
+ 'Google_Task_Runner' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php',
191
+ 'Google_Utils_UriTemplate' => __DIR__ . '/..' . '/google/apiclient/src/aliases.php',
192
  'Mexitek\\PHPColors\\Color' => __DIR__ . '/..' . '/mexitek/phpcolors/src/Mexitek/PHPColors/Color.php',
193
+ 'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
194
  'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
195
  'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
196
  'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
vendor/composer/installed.json CHANGED
@@ -1,1540 +1,1760 @@
1
- [
2
- {
3
- "name": "composer/installers",
4
- "version": "v1.9.0",
5
- "version_normalized": "1.9.0.0",
6
- "source": {
7
- "type": "git",
8
- "url": "https://github.com/composer/installers.git",
9
- "reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca"
10
- },
11
- "dist": {
12
- "type": "zip",
13
- "url": "https://api.github.com/repos/composer/installers/zipball/b93bcf0fa1fccb0b7d176b0967d969691cd74cca",
14
- "reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca",
15
- "shasum": ""
16
- },
17
- "require": {
18
- "composer-plugin-api": "^1.0 || ^2.0"
19
- },
20
- "replace": {
21
- "roundcube/plugin-installer": "*",
22
- "shama/baton": "*"
23
- },
24
- "require-dev": {
25
- "composer/composer": "1.6.* || 2.0.*@dev",
26
- "composer/semver": "1.0.* || 2.0.*@dev",
27
- "phpunit/phpunit": "^4.8.36",
28
- "sebastian/comparator": "^1.2.4",
29
- "symfony/process": "^2.3"
30
- },
31
- "time": "2020-04-07T06:57:05+00:00",
32
- "type": "composer-plugin",
33
- "extra": {
34
- "class": "Composer\\Installers\\Plugin",
35
- "branch-alias": {
36
- "dev-master": "1.0-dev"
37
- }
38
- },
39
- "installation-source": "dist",
40
- "autoload": {
41
- "psr-4": {
42
- "Composer\\Installers\\": "src/Composer/Installers"
43
- }
44
- },
45
- "notification-url": "https://packagist.org/downloads/",
46
- "license": [
47
- "MIT"
48
- ],
49
- "authors": [
50
- {
51
- "name": "Kyle Robinson Young",
52
- "email": "kyle@dontkry.com",
53
- "homepage": "https://github.com/shama"
54
- }
55
- ],
56
- "description": "A multi-framework Composer library installer",
57
- "homepage": "https://composer.github.io/installers/",
58
- "keywords": [
59
- "Craft",
60
- "Dolibarr",
61
- "Eliasis",
62
- "Hurad",
63
- "ImageCMS",
64
- "Kanboard",
65
- "Lan Management System",
66
- "MODX Evo",
67
- "MantisBT",
68
- "Mautic",
69
- "Maya",
70
- "OXID",
71
- "Plentymarkets",
72
- "Porto",
73
- "RadPHP",
74
- "SMF",
75
- "Thelia",
76
- "Whmcs",
77
- "WolfCMS",
78
- "agl",
79
- "aimeos",
80
- "annotatecms",
81
- "attogram",
82
- "bitrix",
83
- "cakephp",
84
- "chef",
85
- "cockpit",
86
- "codeigniter",
87
- "concrete5",
88
- "croogo",
89
- "dokuwiki",
90
- "drupal",
91
- "eZ Platform",
92
- "elgg",
93
- "expressionengine",
94
- "fuelphp",
95
- "grav",
96
- "installer",
97
- "itop",
98
- "joomla",
99
- "known",
100
- "kohana",
101
- "laravel",
102
- "lavalite",
103
- "lithium",
104
- "magento",
105
- "majima",
106
- "mako",
107
- "mediawiki",
108
- "modulework",
109
- "modx",
110
- "moodle",
111
- "osclass",
112
- "phpbb",
113
- "piwik",
114
- "ppi",
115
- "puppet",
116
- "pxcms",
117
- "reindex",
118
- "roundcube",
119
- "shopware",
120
- "silverstripe",
121
- "sydes",
122
- "sylius",
123
- "symfony",
124
- "typo3",
125
- "wordpress",
126
- "yawik",
127
- "zend",
128
- "zikula"
129
- ],
130
- "funding": [
131
- {
132
- "url": "https://packagist.com",
133
- "type": "custom"
134
- },
135
- {
136
- "url": "https://tidelift.com/funding/github/packagist/composer/composer",
137
- "type": "tidelift"
138
- }
139
- ]
140
- },
141
- {
142
- "name": "erusev/parsedown",
143
- "version": "1.7.4",
144
- "version_normalized": "1.7.4.0",
145
- "source": {
146
- "type": "git",
147
- "url": "https://github.com/erusev/parsedown.git",
148
- "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3"
149
- },
150
- "dist": {
151
- "type": "zip",
152
- "url": "https://api.github.com/repos/erusev/parsedown/zipball/cb17b6477dfff935958ba01325f2e8a2bfa6dab3",
153
- "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3",
154
- "shasum": ""
155
- },
156
- "require": {
157
- "ext-mbstring": "*",
158
- "php": ">=5.3.0"
159
- },
160
- "require-dev": {
161
- "phpunit/phpunit": "^4.8.35"
162
- },
163
- "time": "2019-12-30T22:54:17+00:00",
164
- "type": "library",
165
- "installation-source": "dist",
166
- "autoload": {
167
- "psr-0": {
168
- "Parsedown": ""
169
- }
170
- },
171
- "notification-url": "https://packagist.org/downloads/",
172
- "license": [
173
- "MIT"
174
- ],
175
- "authors": [
176
- {
177
- "name": "Emanuil Rusev",
178
- "email": "hello@erusev.com",
179
- "homepage": "http://erusev.com"
180
- }
181
- ],
182
- "description": "Parser for Markdown.",
183
- "homepage": "http://parsedown.org",
184
- "keywords": [
185
- "markdown",
186
- "parser"
187
- ]
188
- },
189
- {
190
- "name": "firebase/php-jwt",
191
- "version": "v5.2.0",
192
- "version_normalized": "5.2.0.0",
193
- "source": {
194
- "type": "git",
195
- "url": "https://github.com/firebase/php-jwt.git",
196
- "reference": "feb0e820b8436873675fd3aca04f3728eb2185cb"
197
- },
198
- "dist": {
199
- "type": "zip",
200
- "url": "https://api.github.com/repos/firebase/php-jwt/zipball/feb0e820b8436873675fd3aca04f3728eb2185cb",
201
- "reference": "feb0e820b8436873675fd3aca04f3728eb2185cb",
202
- "shasum": ""
203
- },
204
- "require": {
205
- "php": ">=5.3.0"
206
- },
207
- "require-dev": {
208
- "phpunit/phpunit": ">=4.8 <=9"
209
- },
210
- "time": "2020-03-25T18:49:23+00:00",
211
- "type": "library",
212
- "installation-source": "dist",
213
- "autoload": {
214
- "psr-4": {
215
- "Firebase\\JWT\\": "src"
216
- }
217
- },
218
- "notification-url": "https://packagist.org/downloads/",
219
- "license": [
220
- "BSD-3-Clause"
221
- ],
222
- "authors": [
223
- {
224
- "name": "Neuman Vong",
225
- "email": "neuman+pear@twilio.com",
226
- "role": "Developer"
227
- },
228
- {
229
- "name": "Anant Narayanan",
230
- "email": "anant@php.net",
231
- "role": "Developer"
232
- }
233
- ],
234
- "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.",
235
- "homepage": "https://github.com/firebase/php-jwt",
236
- "keywords": [
237
- "jwt",
238
- "php"
239
- ]
240
- },
241
- {
242
- "name": "google/apiclient",
243
- "version": "v2.7.2",
244
- "version_normalized": "2.7.2.0",
245
- "source": {
246
- "type": "git",
247
- "url": "https://github.com/googleapis/google-api-php-client.git",
248
- "reference": "9df720d72c59456b5466e3f66e1e78cfe422a5ba"
249
- },
250
- "dist": {
251
- "type": "zip",
252
- "url": "https://api.github.com/repos/googleapis/google-api-php-client/zipball/9df720d72c59456b5466e3f66e1e78cfe422a5ba",
253
- "reference": "9df720d72c59456b5466e3f66e1e78cfe422a5ba",
254
- "shasum": ""
255
- },
256
- "require": {
257
- "firebase/php-jwt": "~2.0||~3.0||~4.0||~5.0",
258
- "google/apiclient-services": "~0.13",
259
- "google/auth": "^1.10",
260
- "guzzlehttp/guzzle": "~5.3.1||~6.0||~7.0",
261
- "guzzlehttp/psr7": "^1.2",
262
- "monolog/monolog": "^1.17|^2.0",
263
- "php": ">=5.4",
264
- "phpseclib/phpseclib": "~0.3.10||~2.0"
265
- },
266
- "require-dev": {
267
- "cache/filesystem-adapter": "^0.3.2",
268
- "composer/composer": "^1.10",
269
- "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
270
- "phpcompatibility/php-compatibility": "^9.2",
271
- "phpunit/phpunit": "^4.8.36|^5.0",
272
- "squizlabs/php_codesniffer": "~2.3",
273
- "symfony/css-selector": "~2.1",
274
- "symfony/dom-crawler": "~2.1"
275
- },
276
- "suggest": {
277
- "cache/filesystem-adapter": "For caching certs and tokens (using Google_Client::setCache)"
278
- },
279
- "time": "2020-09-18T20:02:04+00:00",
280
- "type": "library",
281
- "extra": {
282
- "branch-alias": {
283
- "dev-master": "2.x-dev"
284
- }
285
- },
286
- "installation-source": "dist",
287
- "autoload": {
288
- "psr-0": {
289
- "Google_": "src/"
290
- },
291
- "classmap": [
292
- "src/Google/Service/"
293
- ]
294
- },
295
- "notification-url": "https://packagist.org/downloads/",
296
- "license": [
297
- "Apache-2.0"
298
- ],
299
- "description": "Client library for Google APIs",
300
- "homepage": "http://developers.google.com/api-client-library/php",
301
- "keywords": [
302
- "google"
303
- ]
304
- },
305
- {
306
- "name": "google/apiclient-services",
307
- "version": "v0.148",
308
- "version_normalized": "0.148.0.0",
309
- "source": {
310
- "type": "git",
311
- "url": "https://github.com/googleapis/google-api-php-client-services.git",
312
- "reference": "692a8d4c6a89458570e0d804624c50120cdd6388"
313
- },
314
- "dist": {
315
- "type": "zip",
316
- "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/692a8d4c6a89458570e0d804624c50120cdd6388",
317
- "reference": "692a8d4c6a89458570e0d804624c50120cdd6388",
318
- "shasum": ""
319
- },
320
- "require": {
321
- "php": ">=5.4"
322
- },
323
- "require-dev": {
324
- "phpunit/phpunit": "^4.8|^5"
325
- },
326
- "time": "2020-09-26T00:26:16+00:00",
327
- "type": "library",
328
- "installation-source": "dist",
329
- "autoload": {
330
- "psr-0": {
331
- "Google_Service_": "src"
332
- }
333
- },
334
- "notification-url": "https://packagist.org/downloads/",
335
- "license": [
336
- "Apache-2.0"
337
- ],
338
- "description": "Client library for Google APIs",
339
- "homepage": "http://developers.google.com/api-client-library/php",
340
- "keywords": [
341
- "google"
342
- ]
343
- },
344
- {
345
- "name": "google/auth",
346
- "version": "v1.13.0",
347
- "version_normalized": "1.13.0.0",
348
- "source": {
349
- "type": "git",
350
- "url": "https://github.com/googleapis/google-auth-library-php.git",
351
- "reference": "173191f5defd1d9ae8bdfc28da31b63eb73dd34e"
352
- },
353
- "dist": {
354
- "type": "zip",
355
- "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/173191f5defd1d9ae8bdfc28da31b63eb73dd34e",
356
- "reference": "173191f5defd1d9ae8bdfc28da31b63eb73dd34e",
357
- "shasum": ""
358
- },
359
- "require": {
360
- "firebase/php-jwt": "~2.0|~3.0|~4.0|~5.0",
361
- "guzzlehttp/guzzle": "^5.3.1|^6.2.1|^7.0",
362
- "guzzlehttp/psr7": "^1.2",
363
- "php": ">=5.4",
364
- "psr/cache": "^1.0",
365
- "psr/http-message": "^1.0"
366
- },
367
- "require-dev": {
368
- "guzzlehttp/promises": "0.1.1|^1.3",
369
- "kelvinmo/simplejwt": "^0.2.5",
370
- "phpseclib/phpseclib": "^2",
371
- "phpunit/phpunit": "^4.8.36|^5.7",
372
- "sebastian/comparator": ">=1.2.3",
373
- "squizlabs/php_codesniffer": "^3.5"
374
- },
375
- "suggest": {
376
- "phpseclib/phpseclib": "May be used in place of OpenSSL for signing strings or for token management. Please require version ^2."
377
- },
378
- "time": "2020-09-18T20:03:05+00:00",
379
- "type": "library",
380
- "installation-source": "dist",
381
- "autoload": {
382
- "psr-4": {
383
- "Google\\Auth\\": "src"
384
- }
385
- },
386
- "notification-url": "https://packagist.org/downloads/",
387
- "license": [
388
- "Apache-2.0"
389
- ],
390
- "description": "Google Auth Library for PHP",
391
- "homepage": "http://github.com/google/google-auth-library-php",
392
- "keywords": [
393
- "Authentication",
394
- "google",
395
- "oauth2"
396
- ]
397
- },
398
- {
399
- "name": "guzzlehttp/guzzle",
400
- "version": "7.1.0",
401
- "version_normalized": "7.1.0.0",
402
- "source": {
403
- "type": "git",
404
- "url": "https://github.com/guzzle/guzzle.git",
405
- "reference": "7edeaa528fbb57123028bd5a76b9ce9540194e26"
406
- },
407
- "dist": {
408
- "type": "zip",
409
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7edeaa528fbb57123028bd5a76b9ce9540194e26",
410
- "reference": "7edeaa528fbb57123028bd5a76b9ce9540194e26",
411
- "shasum": ""
412
- },
413
- "require": {
414
- "ext-json": "*",
415
- "guzzlehttp/promises": "^1.0",
416
- "guzzlehttp/psr7": "^1.6.1",
417
- "php": "^7.2.5",
418
- "psr/http-client": "^1.0"
419
- },
420
- "provide": {
421
- "psr/http-client-implementation": "1.0"
422
- },
423
- "require-dev": {
424
- "ext-curl": "*",
425
- "php-http/client-integration-tests": "dev-phpunit8",
426
- "phpunit/phpunit": "^8.5.5",
427
- "psr/log": "^1.1"
428
- },
429
- "suggest": {
430
- "ext-curl": "Required for CURL handler support",
431
- "ext-intl": "Required for Internationalized Domain Name (IDN) support",
432
- "psr/log": "Required for using the Log middleware"
433
- },
434
- "time": "2020-09-22T09:10:04+00:00",
435
- "type": "library",
436
- "extra": {
437
- "branch-alias": {
438
- "dev-master": "7.1-dev"
439
- }
440
- },
441
- "installation-source": "dist",
442
- "autoload": {
443
- "psr-4": {
444
- "GuzzleHttp\\": "src/"
445
- },
446
- "files": [
447
- "src/functions_include.php"
448
- ]
449
- },
450
- "notification-url": "https://packagist.org/downloads/",
451
- "license": [
452
- "MIT"
453
- ],
454
- "authors": [
455
- {
456
- "name": "Michael Dowling",
457
- "email": "mtdowling@gmail.com",
458
- "homepage": "https://github.com/mtdowling"
459
- },
460
- {
461
- "name": "Márk Sági-Kazár",
462
- "email": "mark.sagikazar@gmail.com",
463
- "homepage": "https://sagikazarmark.hu"
464
- }
465
- ],
466
- "description": "Guzzle is a PHP HTTP client library",
467
- "homepage": "http://guzzlephp.org/",
468
- "keywords": [
469
- "client",
470
- "curl",
471
- "framework",
472
- "http",
473
- "http client",
474
- "psr-18",
475
- "psr-7",
476
- "rest",
477
- "web service"
478
- ],
479
- "funding": [
480
- {
481
- "url": "https://github.com/GrahamCampbell",
482
- "type": "github"
483
- },
484
- {
485
- "url": "https://github.com/Nyholm",
486
- "type": "github"
487
- },
488
- {
489
- "url": "https://github.com/alexeyshockov",
490
- "type": "github"
491
- },
492
- {
493
- "url": "https://github.com/gmponos",
494
- "type": "github"
495
- }
496
- ]
497
- },
498
- {
499
- "name": "guzzlehttp/promises",
500
- "version": "v1.3.1",
501
- "version_normalized": "1.3.1.0",
502
- "source": {
503
- "type": "git",
504
- "url": "https://github.com/guzzle/promises.git",
505
- "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
506
- },
507
- "dist": {
508
- "type": "zip",
509
- "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
510
- "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
511
- "shasum": ""
512
- },
513
- "require": {
514
- "php": ">=5.5.0"
515
- },
516
- "require-dev": {
517
- "phpunit/phpunit": "^4.0"
518
- },
519
- "time": "2016-12-20T10:07:11+00:00",
520
- "type": "library",
521
- "extra": {
522
- "branch-alias": {
523
- "dev-master": "1.4-dev"
524
- }
525
- },
526
- "installation-source": "dist",
527
- "autoload": {
528
- "psr-4": {
529
- "GuzzleHttp\\Promise\\": "src/"
530
- },
531
- "files": [
532
- "src/functions_include.php"
533
- ]
534
- },
535
- "notification-url": "https://packagist.org/downloads/",
536
- "license": [
537
- "MIT"
538
- ],
539
- "authors": [
540
- {
541
- "name": "Michael Dowling",
542
- "email": "mtdowling@gmail.com",
543
- "homepage": "https://github.com/mtdowling"
544
- }
545
- ],
546
- "description": "Guzzle promises library",
547
- "keywords": [
548
- "promise"
549
- ]
550
- },
551
- {
552
- "name": "guzzlehttp/psr7",
553
- "version": "1.6.1",
554
- "version_normalized": "1.6.1.0",
555
- "source": {
556
- "type": "git",
557
- "url": "https://github.com/guzzle/psr7.git",
558
- "reference": "239400de7a173fe9901b9ac7c06497751f00727a"
559
- },
560
- "dist": {
561
- "type": "zip",
562
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
563
- "reference": "239400de7a173fe9901b9ac7c06497751f00727a",
564
- "shasum": ""
565
- },
566
- "require": {
567
- "php": ">=5.4.0",
568
- "psr/http-message": "~1.0",
569
- "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
570
- },
571
- "provide": {
572
- "psr/http-message-implementation": "1.0"
573
- },
574
- "require-dev": {
575
- "ext-zlib": "*",
576
- "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
577
- },
578
- "suggest": {
579
- "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
580
- },
581
- "time": "2019-07-01T23:21:34+00:00",
582
- "type": "library",
583
- "extra": {
584
- "branch-alias": {
585
- "dev-master": "1.6-dev"
586
- }
587
- },
588
- "installation-source": "dist",
589
- "autoload": {
590
- "psr-4": {
591
- "GuzzleHttp\\Psr7\\": "src/"
592
- },
593
- "files": [
594
- "src/functions_include.php"
595
- ]
596
- },
597
- "notification-url": "https://packagist.org/downloads/",
598
- "license": [
599
- "MIT"
600
- ],
601
- "authors": [
602
- {
603
- "name": "Michael Dowling",
604
- "email": "mtdowling@gmail.com",
605
- "homepage": "https://github.com/mtdowling"
606
- },
607
- {
608
- "name": "Tobias Schultze",
609
- "homepage": "https://github.com/Tobion"
610
- }
611
- ],
612
- "description": "PSR-7 message implementation that also provides common utility methods",
613
- "keywords": [
614
- "http",
615
- "message",
616
- "psr-7",
617
- "request",
618
- "response",
619
- "stream",
620
- "uri",
621
- "url"
622
- ]
623
- },
624
- {
625
- "name": "mexitek/phpcolors",
626
- "version": "dev-master",
627
- "version_normalized": "9999999-dev",
628
- "source": {
629
- "type": "git",
630
- "url": "https://github.com/mexitek/phpColors.git",
631
- "reference": "37a374e21649c25e348c838d70c7d3c76584d47e"
632
- },
633
- "dist": {
634
- "type": "zip",
635
- "url": "https://api.github.com/repos/mexitek/phpColors/zipball/37a374e21649c25e348c838d70c7d3c76584d47e",
636
- "reference": "37a374e21649c25e348c838d70c7d3c76584d47e",
637
- "shasum": ""
638
- },
639
- "require": {
640
- "php": "^7.2"
641
- },
642
- "require-dev": {
643
- "nette/tester": "^2.3",
644
- "squizlabs/php_codesniffer": "^3.5"
645
- },
646
- "time": "2020-08-06T05:32:50+00:00",
647
- "type": "library",
648
- "installation-source": "source",
649
- "autoload": {
650
- "classmap": [
651
- "src"
652
- ]
653
- },
654
- "notification-url": "https://packagist.org/downloads/",
655
- "license": [
656
- "MIT"
657
- ],
658
- "authors": [
659
- {
660
- "name": "Arlo Carreon",
661
- "homepage": "http://arlocarreon.com",
662
- "role": "creator"
663
- }
664
- ],
665
- "description": "A series of methods that let you manipulate colors. Just incase you ever need different shades of one color on the fly.",
666
- "homepage": "http://mexitek.github.com/phpColors/",
667
- "keywords": [
668
- "color",
669
- "css",
670
- "design",
671
- "frontend",
672
- "ui"
673
- ]
674
- },
675
- {
676
- "name": "monolog/monolog",
677
- "version": "2.1.1",
678
- "version_normalized": "2.1.1.0",
679
- "source": {
680
- "type": "git",
681
- "url": "https://github.com/Seldaek/monolog.git",
682
- "reference": "f9eee5cec93dfb313a38b6b288741e84e53f02d5"
683
- },
684
- "dist": {
685
- "type": "zip",
686
- "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f9eee5cec93dfb313a38b6b288741e84e53f02d5",
687
- "reference": "f9eee5cec93dfb313a38b6b288741e84e53f02d5",
688
- "shasum": ""
689
- },
690
- "require": {
691
- "php": ">=7.2",
692
- "psr/log": "^1.0.1"
693
- },
694
- "provide": {
695
- "psr/log-implementation": "1.0.0"
696
- },
697
- "require-dev": {
698
- "aws/aws-sdk-php": "^2.4.9 || ^3.0",
699
- "doctrine/couchdb": "~1.0@dev",
700
- "elasticsearch/elasticsearch": "^6.0",
701
- "graylog2/gelf-php": "^1.4.2",
702
- "php-amqplib/php-amqplib": "~2.4",
703
- "php-console/php-console": "^3.1.3",
704
- "php-parallel-lint/php-parallel-lint": "^1.0",
705
- "phpspec/prophecy": "^1.6.1",
706
- "phpunit/phpunit": "^8.5",
707
- "predis/predis": "^1.1",
708
- "rollbar/rollbar": "^1.3",
709
- "ruflin/elastica": ">=0.90 <3.0",
710
- "swiftmailer/swiftmailer": "^5.3|^6.0"
711
- },
712
- "suggest": {
713
- "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
714
- "doctrine/couchdb": "Allow sending log messages to a CouchDB server",
715
- "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client",
716
- "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
717
- "ext-mbstring": "Allow to work properly with unicode symbols",
718
- "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)",
719
- "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
720
- "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)",
721
- "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
722
- "php-console/php-console": "Allow sending log messages to Google Chrome",
723
- "rollbar/rollbar": "Allow sending log messages to Rollbar",
724
- "ruflin/elastica": "Allow sending log messages to an Elastic Search server"
725
- },
726
- "time": "2020-07-23T08:41:23+00:00",
727
- "type": "library",
728
- "extra": {
729
- "branch-alias": {
730
- "dev-master": "2.x-dev"
731
- }
732
- },
733
- "installation-source": "dist",
734
- "autoload": {
735
- "psr-4": {
736
- "Monolog\\": "src/Monolog"
737
- }
738
- },
739
- "notification-url": "https://packagist.org/downloads/",
740
- "license": [
741
- "MIT"
742
- ],
743
- "authors": [
744
- {
745
- "name": "Jordi Boggiano",
746
- "email": "j.boggiano@seld.be",
747
- "homepage": "http://seld.be"
748
- }
749
- ],
750
- "description": "Sends your logs to files, sockets, inboxes, databases and various web services",
751
- "homepage": "http://github.com/Seldaek/monolog",
752
- "keywords": [
753
- "log",
754
- "logging",
755
- "psr-3"
756
- ],
757
- "funding": [
758
- {
759
- "url": "https://github.com/Seldaek",
760
- "type": "github"
761
- },
762
- {
763
- "url": "https://tidelift.com/funding/github/packagist/monolog/monolog",
764
- "type": "tidelift"
765
- }
766
- ]
767
- },
768
- {
769
- "name": "nesbot/carbon",
770
- "version": "2.40.1",
771
- "version_normalized": "2.40.1.0",
772
- "source": {
773
- "type": "git",
774
- "url": "https://github.com/briannesbitt/Carbon.git",
775
- "reference": "d9a76d8b7eb0f97cf3a82529393245212f40ba3b"
776
- },
777
- "dist": {
778
- "type": "zip",
779
- "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/d9a76d8b7eb0f97cf3a82529393245212f40ba3b",
780
- "reference": "d9a76d8b7eb0f97cf3a82529393245212f40ba3b",
781
- "shasum": ""
782
- },
783
- "require": {
784
- "ext-json": "*",
785
- "php": "^7.1.8 || ^8.0",
786
- "symfony/polyfill-mbstring": "^1.0",
787
- "symfony/translation": "^3.4 || ^4.0 || ^5.0"
788
- },
789
- "require-dev": {
790
- "doctrine/orm": "^2.7",
791
- "friendsofphp/php-cs-fixer": "^2.14 || ^3.0",
792
- "kylekatarnls/multi-tester": "^2.0",
793
- "phpmd/phpmd": "^2.9",
794
- "phpstan/extension-installer": "^1.0",
795
- "phpstan/phpstan": "^0.12.35",
796
- "phpunit/phpunit": "^7.5 || ^8.0",
797
- "squizlabs/php_codesniffer": "^3.4"
798
- },
799
- "time": "2020-09-23T08:17:37+00:00",
800
- "bin": [
801
- "bin/carbon"
802
- ],
803
- "type": "library",
804
- "extra": {
805
- "branch-alias": {
806
- "dev-master": "2.x-dev",
807
- "dev-3.x": "3.x-dev"
808
- },
809
- "laravel": {
810
- "providers": [
811
- "Carbon\\Laravel\\ServiceProvider"
812
  ]
813
  },
814
- "phpstan": {
815
- "includes": [
816
- "extension.neon"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
817
  ]
818
- }
819
- },
820
- "installation-source": "dist",
821
- "autoload": {
822
- "psr-4": {
823
- "Carbon\\": "src/Carbon/"
824
- }
825
- },
826
- "notification-url": "https://packagist.org/downloads/",
827
- "license": [
828
- "MIT"
829
- ],
830
- "authors": [
831
- {
832
- "name": "Brian Nesbitt",
833
- "email": "brian@nesbot.com",
834
- "homepage": "http://nesbot.com"
835
- },
836
- {
837
- "name": "kylekatarnls",
838
- "homepage": "http://github.com/kylekatarnls"
839
- }
840
- ],
841
- "description": "An API extension for DateTime that supports 281 different languages.",
842
- "homepage": "http://carbon.nesbot.com",
843
- "keywords": [
844
- "date",
845
- "datetime",
846
- "time"
847
- ],
848
- "funding": [
849
- {
850
- "url": "https://opencollective.com/Carbon",
851
- "type": "open_collective"
852
- },
853
- {
854
- "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon",
855
- "type": "tidelift"
856
- }
857
- ]
858
- },
859
- {
860
- "name": "phpseclib/phpseclib",
861
- "version": "2.0.29",
862
- "version_normalized": "2.0.29.0",
863
- "source": {
864
- "type": "git",
865
- "url": "https://github.com/phpseclib/phpseclib.git",
866
- "reference": "497856a8d997f640b4a516062f84228a772a48a8"
867
- },
868
- "dist": {
869
- "type": "zip",
870
- "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/497856a8d997f640b4a516062f84228a772a48a8",
871
- "reference": "497856a8d997f640b4a516062f84228a772a48a8",
872
- "shasum": ""
873
- },
874
- "require": {
875
- "php": ">=5.3.3"
876
- },
877
- "require-dev": {
878
- "phing/phing": "~2.7",
879
- "phpunit/phpunit": "^4.8.35|^5.7|^6.0",
880
- "squizlabs/php_codesniffer": "~2.0"
881
- },
882
- "suggest": {
883
- "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.",
884
- "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.",
885
- "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.",
886
- "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations."
887
- },
888
- "time": "2020-09-08T04:24:43+00:00",
889
- "type": "library",
890
- "installation-source": "dist",
891
- "autoload": {
892
- "files": [
893
- "phpseclib/bootstrap.php"
894
- ],
895
- "psr-4": {
896
- "phpseclib\\": "phpseclib/"
897
- }
898
- },
899
- "notification-url": "https://packagist.org/downloads/",
900
- "license": [
901
- "MIT"
902
- ],
903
- "authors": [
904
- {
905
- "name": "Jim Wigginton",
906
- "email": "terrafrost@php.net",
907
- "role": "Lead Developer"
908
- },
909
- {
910
- "name": "Patrick Monnerat",
911
- "email": "pm@datasphere.ch",
912
- "role": "Developer"
913
- },
914
- {
915
- "name": "Andreas Fischer",
916
- "email": "bantu@phpbb.com",
917
- "role": "Developer"
918
- },
919
- {
920
- "name": "Hans-Jürgen Petrich",
921
- "email": "petrich@tronic-media.com",
922
- "role": "Developer"
923
- },
924
- {
925
- "name": "Graham Campbell",
926
- "email": "graham@alt-three.com",
927
- "role": "Developer"
928
- }
929
- ],
930
- "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.",
931
- "homepage": "http://phpseclib.sourceforge.net",
932
- "keywords": [
933
- "BigInteger",
934
- "aes",
935
- "asn.1",
936
- "asn1",
937
- "blowfish",
938
- "crypto",
939
- "cryptography",
940
- "encryption",
941
- "rsa",
942
- "security",
943
- "sftp",
944
- "signature",
945
- "signing",
946
- "ssh",
947
- "twofish",
948
- "x.509",
949
- "x509"
950
- ],
951
- "funding": [
952
- {
953
- "url": "https://github.com/terrafrost",
954
- "type": "github"
955
- },
956
- {
957
- "url": "https://www.patreon.com/phpseclib",
958
- "type": "patreon"
959
- },
960
- {
961
- "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib",
962
- "type": "tidelift"
963
- }
964
- ]
965
- },
966
- {
967
- "name": "psr/cache",
968
- "version": "1.0.1",
969
- "version_normalized": "1.0.1.0",
970
- "source": {
971
- "type": "git",
972
- "url": "https://github.com/php-fig/cache.git",
973
- "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8"
974
- },
975
- "dist": {
976
- "type": "zip",
977
- "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8",
978
- "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8",
979
- "shasum": ""
980
- },
981
- "require": {
982
- "php": ">=5.3.0"
983
- },
984
- "time": "2016-08-06T20:24:11+00:00",
985
- "type": "library",
986
- "extra": {
987
- "branch-alias": {
988
- "dev-master": "1.0.x-dev"
989
- }
990
- },
991
- "installation-source": "dist",
992
- "autoload": {
993
- "psr-4": {
994
- "Psr\\Cache\\": "src/"
995
- }
996
- },
997
- "notification-url": "https://packagist.org/downloads/",
998
- "license": [
999
- "MIT"
1000
- ],
1001
- "authors": [
1002
- {
1003
- "name": "PHP-FIG",
1004
- "homepage": "http://www.php-fig.org/"
1005
- }
1006
- ],
1007
- "description": "Common interface for caching libraries",
1008
- "keywords": [
1009
- "cache",
1010
- "psr",
1011
- "psr-6"
1012
- ]
1013
- },
1014
- {
1015
- "name": "psr/http-client",
1016
- "version": "1.0.1",
1017
- "version_normalized": "1.0.1.0",
1018
- "source": {
1019
- "type": "git",
1020
- "url": "https://github.com/php-fig/http-client.git",
1021
- "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621"
1022
- },
1023
- "dist": {
1024
- "type": "zip",
1025
- "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
1026
- "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
1027
- "shasum": ""
1028
- },
1029
- "require": {
1030
- "php": "^7.0 || ^8.0",
1031
- "psr/http-message": "^1.0"
1032
- },
1033
- "time": "2020-06-29T06:28:15+00:00",
1034
- "type": "library",
1035
- "extra": {
1036
- "branch-alias": {
1037
- "dev-master": "1.0.x-dev"
1038
- }
1039
- },
1040
- "installation-source": "dist",
1041
- "autoload": {
1042
- "psr-4": {
1043
- "Psr\\Http\\Client\\": "src/"
1044
- }
1045
- },
1046
- "notification-url": "https://packagist.org/downloads/",
1047
- "license": [
1048
- "MIT"
1049
- ],
1050
- "authors": [
1051
- {
1052
- "name": "PHP-FIG",
1053
- "homepage": "http://www.php-fig.org/"
1054
- }
1055
- ],
1056
- "description": "Common interface for HTTP clients",
1057
- "homepage": "https://github.com/php-fig/http-client",
1058
- "keywords": [
1059
- "http",
1060
- "http-client",
1061
- "psr",
1062
- "psr-18"
1063
- ]
1064
- },
1065
- {
1066
- "name": "psr/http-message",
1067
- "version": "1.0.1",
1068
- "version_normalized": "1.0.1.0",
1069
- "source": {
1070
- "type": "git",
1071
- "url": "https://github.com/php-fig/http-message.git",
1072
- "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
1073
- },
1074
- "dist": {
1075
- "type": "zip",
1076
- "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
1077
- "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
1078
- "shasum": ""
1079
- },
1080
- "require": {
1081
- "php": ">=5.3.0"
1082
- },
1083
- "time": "2016-08-06T14:39:51+00:00",
1084
- "type": "library",
1085
- "extra": {
1086
- "branch-alias": {
1087
- "dev-master": "1.0.x-dev"
1088
- }
1089
- },
1090
- "installation-source": "dist",
1091
- "autoload": {
1092
- "psr-4": {
1093
- "Psr\\Http\\Message\\": "src/"
1094
- }
1095
- },
1096
- "notification-url": "https://packagist.org/downloads/",
1097
- "license": [
1098
- "MIT"
1099
- ],
1100
- "authors": [
1101
- {
1102
- "name": "PHP-FIG",
1103
- "homepage": "http://www.php-fig.org/"
1104
- }
1105
- ],
1106
- "description": "Common interface for HTTP messages",
1107
- "homepage": "https://github.com/php-fig/http-message",
1108
- "keywords": [
1109
- "http",
1110
- "http-message",
1111
- "psr",
1112
- "psr-7",
1113
- "request",
1114
- "response"
1115
- ]
1116
- },
1117
- {
1118
- "name": "psr/log",
1119
- "version": "1.1.3",
1120
- "version_normalized": "1.1.3.0",
1121
- "source": {
1122
- "type": "git",
1123
- "url": "https://github.com/php-fig/log.git",
1124
- "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
1125
- },
1126
- "dist": {
1127
- "type": "zip",
1128
- "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
1129
- "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
1130
- "shasum": ""
1131
- },
1132
- "require": {
1133
- "php": ">=5.3.0"
1134
- },
1135
- "time": "2020-03-23T09:12:05+00:00",
1136
- "type": "library",
1137
- "extra": {
1138
- "branch-alias": {
1139
- "dev-master": "1.1.x-dev"
1140
- }
1141
- },
1142
- "installation-source": "dist",
1143
- "autoload": {
1144
- "psr-4": {
1145
- "Psr\\Log\\": "Psr/Log/"
1146
- }
1147
- },
1148
- "notification-url": "https://packagist.org/downloads/",
1149
- "license": [
1150
- "MIT"
1151
- ],
1152
- "authors": [
1153
- {
1154
- "name": "PHP-FIG",
1155
- "homepage": "http://www.php-fig.org/"
1156
- }
1157
- ],
1158
- "description": "Common interface for logging libraries",
1159
- "homepage": "https://github.com/php-fig/log",
1160
- "keywords": [
1161
- "log",
1162
- "psr",
1163
- "psr-3"
1164
- ]
1165
- },
1166
- {
1167
- "name": "ralouphie/getallheaders",
1168
- "version": "3.0.3",
1169
- "version_normalized": "3.0.3.0",
1170
- "source": {
1171
- "type": "git",
1172
- "url": "https://github.com/ralouphie/getallheaders.git",
1173
- "reference": "120b605dfeb996808c31b6477290a714d356e822"
1174
- },
1175
- "dist": {
1176
- "type": "zip",
1177
- "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
1178
- "reference": "120b605dfeb996808c31b6477290a714d356e822",
1179
- "shasum": ""
1180
- },
1181
- "require": {
1182
- "php": ">=5.6"
1183
- },
1184
- "require-dev": {
1185
- "php-coveralls/php-coveralls": "^2.1",
1186
- "phpunit/phpunit": "^5 || ^6.5"
1187
- },
1188
- "time": "2019-03-08T08:55:37+00:00",
1189
- "type": "library",
1190
- "installation-source": "dist",
1191
- "autoload": {
1192
- "files": [
1193
- "src/getallheaders.php"
1194
- ]
1195
- },
1196
- "notification-url": "https://packagist.org/downloads/",
1197
- "license": [
1198
- "MIT"
1199
- ],
1200
- "authors": [
1201
- {
1202
- "name": "Ralph Khattar",
1203
- "email": "ralph.khattar@gmail.com"
1204
- }
1205
- ],
1206
- "description": "A polyfill for getallheaders."
1207
- },
1208
- {
1209
- "name": "symfony/polyfill-mbstring",
1210
- "version": "v1.18.1",
1211
- "version_normalized": "1.18.1.0",
1212
- "source": {
1213
- "type": "git",
1214
- "url": "https://github.com/symfony/polyfill-mbstring.git",
1215
- "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a"
1216
- },
1217
- "dist": {
1218
- "type": "zip",
1219
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a",
1220
- "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a",
1221
- "shasum": ""
1222
- },
1223
- "require": {
1224
- "php": ">=5.3.3"
1225
- },
1226
- "suggest": {
1227
- "ext-mbstring": "For best performance"
1228
- },
1229
- "time": "2020-07-14T12:35:20+00:00",
1230
- "type": "library",
1231
- "extra": {
1232
- "branch-alias": {
1233
- "dev-master": "1.18-dev"
1234
- },
1235
- "thanks": {
1236
- "name": "symfony/polyfill",
1237
- "url": "https://github.com/symfony/polyfill"
1238
- }
1239
- },
1240
- "installation-source": "dist",
1241
- "autoload": {
1242
- "psr-4": {
1243
- "Symfony\\Polyfill\\Mbstring\\": ""
1244
- },
1245
- "files": [
1246
- "bootstrap.php"
1247
- ]
1248
- },
1249
- "notification-url": "https://packagist.org/downloads/",
1250
- "license": [
1251
- "MIT"
1252
- ],
1253
- "authors": [
1254
- {
1255
- "name": "Nicolas Grekas",
1256
- "email": "p@tchwork.com"
1257
- },
1258
- {
1259
- "name": "Symfony Community",
1260
- "homepage": "https://symfony.com/contributors"
1261
- }
1262
- ],
1263
- "description": "Symfony polyfill for the Mbstring extension",
1264
- "homepage": "https://symfony.com",
1265
- "keywords": [
1266
- "compatibility",
1267
- "mbstring",
1268
- "polyfill",
1269
- "portable",
1270
- "shim"
1271
- ],
1272
- "funding": [
1273
- {
1274
- "url": "https://symfony.com/sponsor",
1275
- "type": "custom"
1276
- },
1277
- {
1278
- "url": "https://github.com/fabpot",
1279
- "type": "github"
1280
- },
1281
- {
1282
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
1283
- "type": "tidelift"
1284
- }
1285
- ]
1286
- },
1287
- {
1288
- "name": "symfony/polyfill-php80",
1289
- "version": "v1.18.1",
1290
- "version_normalized": "1.18.1.0",
1291
- "source": {
1292
- "type": "git",
1293
- "url": "https://github.com/symfony/polyfill-php80.git",
1294
- "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981"
1295
- },
1296
- "dist": {
1297
- "type": "zip",
1298
- "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981",
1299
- "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981",
1300
- "shasum": ""
1301
- },
1302
- "require": {
1303
- "php": ">=7.0.8"
1304
- },
1305
- "time": "2020-07-14T12:35:20+00:00",
1306
- "type": "library",
1307
- "extra": {
1308
- "branch-alias": {
1309
- "dev-master": "1.18-dev"
1310
- },
1311
- "thanks": {
1312
- "name": "symfony/polyfill",
1313
- "url": "https://github.com/symfony/polyfill"
1314
- }
1315
- },
1316
- "installation-source": "dist",
1317
- "autoload": {
1318
- "psr-4": {
1319
- "Symfony\\Polyfill\\Php80\\": ""
1320
  },
1321
- "files": [
1322
- "bootstrap.php"
 
1323
  ],
1324
- "classmap": [
1325
- "Resources/stubs"
1326
- ]
1327
- },
1328
- "notification-url": "https://packagist.org/downloads/",
1329
- "license": [
1330
- "MIT"
1331
- ],
1332
- "authors": [
1333
- {
1334
- "name": "Ion Bazan",
1335
- "email": "ion.bazan@gmail.com"
1336
- },
1337
- {
1338
- "name": "Nicolas Grekas",
1339
- "email": "p@tchwork.com"
1340
- },
1341
- {
1342
- "name": "Symfony Community",
1343
- "homepage": "https://symfony.com/contributors"
1344
- }
1345
- ],
1346
- "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
1347
- "homepage": "https://symfony.com",
1348
- "keywords": [
1349
- "compatibility",
1350
- "polyfill",
1351
- "portable",
1352
- "shim"
1353
- ],
1354
- "funding": [
1355
- {
1356
- "url": "https://symfony.com/sponsor",
1357
- "type": "custom"
1358
- },
1359
- {
1360
- "url": "https://github.com/fabpot",
1361
- "type": "github"
1362
- },
1363
- {
1364
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
1365
- "type": "tidelift"
1366
- }
1367
- ]
1368
- },
1369
- {
1370
- "name": "symfony/translation",
1371
- "version": "v5.1.6",
1372
- "version_normalized": "5.1.6.0",
1373
- "source": {
1374
- "type": "git",
1375
- "url": "https://github.com/symfony/translation.git",
1376
- "reference": "e3cdd5119b1b5bf0698c351b8ee20fb5a4ea248b"
1377
- },
1378
- "dist": {
1379
- "type": "zip",
1380
- "url": "https://api.github.com/repos/symfony/translation/zipball/e3cdd5119b1b5bf0698c351b8ee20fb5a4ea248b",
1381
- "reference": "e3cdd5119b1b5bf0698c351b8ee20fb5a4ea248b",
1382
- "shasum": ""
1383
- },
1384
- "require": {
1385
- "php": ">=7.2.5",
1386
- "symfony/polyfill-mbstring": "~1.0",
1387
- "symfony/polyfill-php80": "^1.15",
1388
- "symfony/translation-contracts": "^2"
1389
- },
1390
- "conflict": {
1391
- "symfony/config": "<4.4",
1392
- "symfony/dependency-injection": "<5.0",
1393
- "symfony/http-kernel": "<5.0",
1394
- "symfony/twig-bundle": "<5.0",
1395
- "symfony/yaml": "<4.4"
1396
- },
1397
- "provide": {
1398
- "symfony/translation-implementation": "2.0"
1399
- },
1400
- "require-dev": {
1401
- "psr/log": "~1.0",
1402
- "symfony/config": "^4.4|^5.0",
1403
- "symfony/console": "^4.4|^5.0",
1404
- "symfony/dependency-injection": "^5.0",
1405
- "symfony/finder": "^4.4|^5.0",
1406
- "symfony/http-kernel": "^5.0",
1407
- "symfony/intl": "^4.4|^5.0",
1408
- "symfony/service-contracts": "^1.1.2|^2",
1409
- "symfony/yaml": "^4.4|^5.0"
1410
- },
1411
- "suggest": {
1412
- "psr/log-implementation": "To use logging capability in translator",
1413
- "symfony/config": "",
1414
- "symfony/yaml": ""
1415
- },
1416
- "time": "2020-09-27T03:44:28+00:00",
1417
- "type": "library",
1418
- "extra": {
1419
- "branch-alias": {
1420
- "dev-master": "5.1-dev"
1421
- }
1422
- },
1423
- "installation-source": "dist",
1424
- "autoload": {
1425
- "psr-4": {
1426
- "Symfony\\Component\\Translation\\": ""
1427
- },
1428
- "exclude-from-classmap": [
1429
- "/Tests/"
1430
- ]
1431
- },
1432
- "notification-url": "https://packagist.org/downloads/",
1433
- "license": [
1434
- "MIT"
1435
- ],
1436
- "authors": [
1437
- {
1438
- "name": "Fabien Potencier",
1439
- "email": "fabien@symfony.com"
1440
- },
1441
- {
1442
- "name": "Symfony Community",
1443
- "homepage": "https://symfony.com/contributors"
1444
- }
1445
- ],
1446
- "description": "Symfony Translation Component",
1447
- "homepage": "https://symfony.com",
1448
- "funding": [
1449
- {
1450
- "url": "https://symfony.com/sponsor",
1451
- "type": "custom"
1452
- },
1453
- {
1454
- "url": "https://github.com/fabpot",
1455
- "type": "github"
1456
- },
1457
- {
1458
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
1459
- "type": "tidelift"
1460
- }
1461
- ]
1462
- },
1463
- {
1464
- "name": "symfony/translation-contracts",
1465
- "version": "v2.2.0",
1466
- "version_normalized": "2.2.0.0",
1467
- "source": {
1468
- "type": "git",
1469
- "url": "https://github.com/symfony/translation-contracts.git",
1470
- "reference": "77ce1c3627c9f39643acd9af086631f842c50c4d"
1471
- },
1472
- "dist": {
1473
- "type": "zip",
1474
- "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/77ce1c3627c9f39643acd9af086631f842c50c4d",
1475
- "reference": "77ce1c3627c9f39643acd9af086631f842c50c4d",
1476
- "shasum": ""
1477
- },
1478
- "require": {
1479
- "php": ">=7.2.5"
1480
- },
1481
- "suggest": {
1482
- "symfony/translation-implementation": ""
1483
- },
1484
- "time": "2020-09-07T11:33:47+00:00",
1485
- "type": "library",
1486
- "extra": {
1487
- "branch-alias": {
1488
- "dev-master": "2.2-dev"
1489
- },
1490
- "thanks": {
1491
- "name": "symfony/contracts",
1492
- "url": "https://github.com/symfony/contracts"
1493
- }
1494
- },
1495
- "installation-source": "dist",
1496
- "autoload": {
1497
- "psr-4": {
1498
- "Symfony\\Contracts\\Translation\\": ""
1499
- }
1500
- },
1501
- "notification-url": "https://packagist.org/downloads/",
1502
- "license": [
1503
- "MIT"
1504
- ],
1505
- "authors": [
1506
- {
1507
- "name": "Nicolas Grekas",
1508
- "email": "p@tchwork.com"
1509
- },
1510
- {
1511
- "name": "Symfony Community",
1512
- "homepage": "https://symfony.com/contributors"
1513
- }
1514
- ],
1515
- "description": "Generic abstractions related to translation",
1516
- "homepage": "https://symfony.com",
1517
- "keywords": [
1518
- "abstractions",
1519
- "contracts",
1520
- "decoupling",
1521
- "interfaces",
1522
- "interoperability",
1523
- "standards"
1524
- ],
1525
- "funding": [
1526
- {
1527
- "url": "https://symfony.com/sponsor",
1528
- "type": "custom"
1529
- },
1530
- {
1531
- "url": "https://github.com/fabpot",
1532
- "type": "github"
1533
- },
1534
- {
1535
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
1536
- "type": "tidelift"
1537
- }
1538
- ]
1539
- }
1540
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "packages": [
3
+ {
4
+ "name": "composer/installers",
5
+ "version": "v1.9.0",
6
+ "version_normalized": "1.9.0.0",
7
+ "source": {
8
+ "type": "git",
9
+ "url": "https://github.com/composer/installers.git",
10
+ "reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca"
11
+ },
12
+ "dist": {
13
+ "type": "zip",
14
+ "url": "https://api.github.com/repos/composer/installers/zipball/b93bcf0fa1fccb0b7d176b0967d969691cd74cca",
15
+ "reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca",
16
+ "shasum": ""
17
+ },
18
+ "require": {
19
+ "composer-plugin-api": "^1.0 || ^2.0"
20
+ },
21
+ "replace": {
22
+ "roundcube/plugin-installer": "*",
23
+ "shama/baton": "*"
24
+ },
25
+ "require-dev": {
26
+ "composer/composer": "1.6.* || 2.0.*@dev",
27
+ "composer/semver": "1.0.* || 2.0.*@dev",
28
+ "phpunit/phpunit": "^4.8.36",
29
+ "sebastian/comparator": "^1.2.4",
30
+ "symfony/process": "^2.3"
31
+ },
32
+ "time": "2020-04-07T06:57:05+00:00",
33
+ "type": "composer-plugin",
34
+ "extra": {
35
+ "class": "Composer\\Installers\\Plugin",
36
+ "branch-alias": {
37
+ "dev-master": "1.0-dev"
38
+ }
39
+ },
40
+ "installation-source": "dist",
41
+ "autoload": {
42
+ "psr-4": {
43
+ "Composer\\Installers\\": "src/Composer/Installers"
44
+ }
45
+ },
46
+ "notification-url": "https://packagist.org/downloads/",
47
+ "license": [
48
+ "MIT"
49
+ ],
50
+ "authors": [
51
+ {
52
+ "name": "Kyle Robinson Young",
53
+ "email": "kyle@dontkry.com",
54
+ "homepage": "https://github.com/shama"
55
+ }
56
+ ],
57
+ "description": "A multi-framework Composer library installer",
58
+ "homepage": "https://composer.github.io/installers/",
59
+ "keywords": [
60
+ "Craft",
61
+ "Dolibarr",
62
+ "Eliasis",
63
+ "Hurad",
64
+ "ImageCMS",
65
+ "Kanboard",
66
+ "Lan Management System",
67
+ "MODX Evo",
68
+ "MantisBT",
69
+ "Mautic",
70
+ "Maya",
71
+ "OXID",
72
+ "Plentymarkets",
73
+ "Porto",
74
+ "RadPHP",
75
+ "SMF",
76
+ "Thelia",
77
+ "Whmcs",
78
+ "WolfCMS",
79
+ "agl",
80
+ "aimeos",
81
+ "annotatecms",
82
+ "attogram",
83
+ "bitrix",
84
+ "cakephp",
85
+ "chef",
86
+ "cockpit",
87
+ "codeigniter",
88
+ "concrete5",
89
+ "croogo",
90
+ "dokuwiki",
91
+ "drupal",
92
+ "eZ Platform",
93
+ "elgg",
94
+ "expressionengine",
95
+ "fuelphp",
96
+ "grav",
97
+ "installer",
98
+ "itop",
99
+ "joomla",
100
+ "known",
101
+ "kohana",
102
+ "laravel",
103
+ "lavalite",
104
+ "lithium",
105
+ "magento",
106
+ "majima",
107
+ "mako",
108
+ "mediawiki",
109
+ "modulework",
110
+ "modx",
111
+ "moodle",
112
+ "osclass",
113
+ "phpbb",
114
+ "piwik",
115
+ "ppi",
116
+ "puppet",
117
+ "pxcms",
118
+ "reindex",
119
+ "roundcube",
120
+ "shopware",
121
+ "silverstripe",
122
+ "sydes",
123
+ "sylius",
124
+ "symfony",
125
+ "typo3",
126
+ "wordpress",
127
+ "yawik",
128
+ "zend",
129
+ "zikula"
130
+ ],
131
+ "funding": [
132
+ {
133
+ "url": "https://packagist.com",
134
+ "type": "custom"
135
+ },
136
+ {
137
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
138
+ "type": "tidelift"
139
+ }
140
+ ],
141
+ "install-path": "./installers"
142
+ },
143
+ {
144
+ "name": "erusev/parsedown",
145
+ "version": "1.7.4",
146
+ "version_normalized": "1.7.4.0",
147
+ "source": {
148
+ "type": "git",
149
+ "url": "https://github.com/erusev/parsedown.git",
150
+ "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3"
151
+ },
152
+ "dist": {
153
+ "type": "zip",
154
+ "url": "https://api.github.com/repos/erusev/parsedown/zipball/cb17b6477dfff935958ba01325f2e8a2bfa6dab3",
155
+ "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3",
156
+ "shasum": ""
157
+ },
158
+ "require": {
159
+ "ext-mbstring": "*",
160
+ "php": ">=5.3.0"
161
+ },
162
+ "require-dev": {
163
+ "phpunit/phpunit": "^4.8.35"
164
+ },
165
+ "time": "2019-12-30T22:54:17+00:00",
166
+ "type": "library",
167
+ "installation-source": "dist",
168
+ "autoload": {
169
+ "psr-0": {
170
+ "Parsedown": ""
171
+ }
172
+ },
173
+ "notification-url": "https://packagist.org/downloads/",
174
+ "license": [
175
+ "MIT"
176
+ ],
177
+ "authors": [
178
+ {
179
+ "name": "Emanuil Rusev",
180
+ "email": "hello@erusev.com",
181
+ "homepage": "http://erusev.com"
182
+ }
183
+ ],
184
+ "description": "Parser for Markdown.",
185
+ "homepage": "http://parsedown.org",
186
+ "keywords": [
187
+ "markdown",
188
+ "parser"
189
+ ],
190
+ "install-path": "../erusev/parsedown"
191
+ },
192
+ {
193
+ "name": "firebase/php-jwt",
194
+ "version": "v5.2.0",
195
+ "version_normalized": "5.2.0.0",
196
+ "source": {
197
+ "type": "git",
198
+ "url": "https://github.com/firebase/php-jwt.git",
199
+ "reference": "feb0e820b8436873675fd3aca04f3728eb2185cb"
200
+ },
201
+ "dist": {
202
+ "type": "zip",
203
+ "url": "https://api.github.com/repos/firebase/php-jwt/zipball/feb0e820b8436873675fd3aca04f3728eb2185cb",
204
+ "reference": "feb0e820b8436873675fd3aca04f3728eb2185cb",
205
+ "shasum": ""
206
+ },
207
+ "require": {
208
+ "php": ">=5.3.0"
209
+ },
210
+ "require-dev": {
211
+ "phpunit/phpunit": ">=4.8 <=9"
212
+ },
213
+ "time": "2020-03-25T18:49:23+00:00",
214
+ "type": "library",
215
+ "installation-source": "dist",
216
+ "autoload": {
217
+ "psr-4": {
218
+ "Firebase\\JWT\\": "src"
219
+ }
220
+ },
221
+ "notification-url": "https://packagist.org/downloads/",
222
+ "license": [
223
+ "BSD-3-Clause"
224
+ ],
225
+ "authors": [
226
+ {
227
+ "name": "Neuman Vong",
228
+ "email": "neuman+pear@twilio.com",
229
+ "role": "Developer"
230
+ },
231
+ {
232
+ "name": "Anant Narayanan",
233
+ "email": "anant@php.net",
234
+ "role": "Developer"
235
+ }
236
+ ],
237
+ "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.",
238
+ "homepage": "https://github.com/firebase/php-jwt",
239
+ "keywords": [
240
+ "jwt",
241
+ "php"
242
+ ],
243
+ "install-path": "../firebase/php-jwt"
244
+ },
245
+ {
246
+ "name": "google/apiclient",
247
+ "version": "v2.8.3",
248
+ "version_normalized": "2.8.3.0",
249
+ "source": {
250
+ "type": "git",
251
+ "url": "https://github.com/googleapis/google-api-php-client.git",
252
+ "reference": "81696e6206322e38c643cfcc96c4494ccfef8a32"
253
+ },
254
+ "dist": {
255
+ "type": "zip",
256
+ "url": "https://api.github.com/repos/googleapis/google-api-php-client/zipball/81696e6206322e38c643cfcc96c4494ccfef8a32",
257
+ "reference": "81696e6206322e38c643cfcc96c4494ccfef8a32",
258
+ "shasum": ""
259
+ },
260
+ "require": {
261
+ "firebase/php-jwt": "~2.0||~3.0||~4.0||~5.0",
262
+ "google/apiclient-services": "~0.13",
263
+ "google/auth": "^1.10",
264
+ "guzzlehttp/guzzle": "~5.3.1||~6.0||~7.0",
265
+ "guzzlehttp/psr7": "^1.2",
266
+ "monolog/monolog": "^1.17|^2.0",
267
+ "php": ">=5.4",
268
+ "phpseclib/phpseclib": "~0.3.10||~2.0"
269
+ },
270
+ "require-dev": {
271
+ "cache/filesystem-adapter": "^0.3.2",
272
+ "composer/composer": "^1.10",
273
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.7",
274
+ "phpcompatibility/php-compatibility": "^9.2",
275
+ "phpunit/phpunit": "^4.8.36|^5.0",
276
+ "squizlabs/php_codesniffer": "~2.3",
277
+ "symfony/css-selector": "~2.1",
278
+ "symfony/dom-crawler": "~2.1"
279
+ },
280
+ "suggest": {
281
+ "cache/filesystem-adapter": "For caching certs and tokens (using Google\\Client::setCache)"
282
+ },
283
+ "time": "2020-11-17T17:33:35+00:00",
284
+ "type": "library",
285
+ "extra": {
286
+ "branch-alias": {
287
+ "dev-master": "2.x-dev"
288
+ }
289
+ },
290
+ "installation-source": "dist",
291
+ "autoload": {
292
+ "psr-4": {
293
+ "Google\\": "src/"
294
+ },
295
+ "files": [
296
+ "src/aliases.php"
297
+ ],
298
+ "classmap": [
299
+ "src/aliases.php"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
300
  ]
301
  },
302
+ "notification-url": "https://packagist.org/downloads/",
303
+ "license": [
304
+ "Apache-2.0"
305
+ ],
306
+ "description": "Client library for Google APIs",
307
+ "homepage": "http://developers.google.com/api-client-library/php",
308
+ "keywords": [
309
+ "google"
310
+ ],
311
+ "install-path": "../google/apiclient"
312
+ },
313
+ {
314
+ "name": "google/apiclient-services",
315
+ "version": "v0.156",
316
+ "version_normalized": "0.156.0.0",
317
+ "source": {
318
+ "type": "git",
319
+ "url": "https://github.com/googleapis/google-api-php-client-services.git",
320
+ "reference": "2f5e54fdef034f856208328126bddd8376dae4b3"
321
+ },
322
+ "dist": {
323
+ "type": "zip",
324
+ "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/2f5e54fdef034f856208328126bddd8376dae4b3",
325
+ "reference": "2f5e54fdef034f856208328126bddd8376dae4b3",
326
+ "shasum": ""
327
+ },
328
+ "require": {
329
+ "php": ">=5.4"
330
+ },
331
+ "require-dev": {
332
+ "phpunit/phpunit": "^4.8|^5"
333
+ },
334
+ "time": "2020-11-30T20:03:55+00:00",
335
+ "type": "library",
336
+ "installation-source": "dist",
337
+ "autoload": {
338
+ "psr-0": {
339
+ "Google_Service_": "src"
340
+ }
341
+ },
342
+ "notification-url": "https://packagist.org/downloads/",
343
+ "license": [
344
+ "Apache-2.0"
345
+ ],
346
+ "description": "Client library for Google APIs",
347
+ "homepage": "http://developers.google.com/api-client-library/php",
348
+ "keywords": [
349
+ "google"
350
+ ],
351
+ "support": {
352
+ "issues": "https://github.com/googleapis/google-api-php-client-services/issues",
353
+ "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.156"
354
+ },
355
+ "install-path": "../google/apiclient-services"
356
+ },
357
+ {
358
+ "name": "google/auth",
359
+ "version": "v1.14.3",
360
+ "version_normalized": "1.14.3.0",
361
+ "source": {
362
+ "type": "git",
363
+ "url": "https://github.com/googleapis/google-auth-library-php.git",
364
+ "reference": "c1503299c779af0cbc99b43788f75930988852cf"
365
+ },
366
+ "dist": {
367
+ "type": "zip",
368
+ "url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/c1503299c779af0cbc99b43788f75930988852cf",
369
+ "reference": "c1503299c779af0cbc99b43788f75930988852cf",
370
+ "shasum": ""
371
+ },
372
+ "require": {
373
+ "firebase/php-jwt": "~2.0|~3.0|~4.0|~5.0",
374
+ "guzzlehttp/guzzle": "^5.3.1|^6.2.1|^7.0",
375
+ "guzzlehttp/psr7": "^1.2",
376
+ "php": ">=5.4",
377
+ "psr/cache": "^1.0",
378
+ "psr/http-message": "^1.0"
379
+ },
380
+ "require-dev": {
381
+ "guzzlehttp/promises": "0.1.1|^1.3",
382
+ "kelvinmo/simplejwt": "^0.2.5",
383
+ "phpseclib/phpseclib": "^2",
384
+ "phpunit/phpunit": "^4.8.36|^5.7",
385
+ "sebastian/comparator": ">=1.2.3",
386
+ "squizlabs/php_codesniffer": "^3.5"
387
+ },
388
+ "suggest": {
389
+ "phpseclib/phpseclib": "May be used in place of OpenSSL for signing strings or for token management. Please require version ^2."
390
+ },
391
+ "time": "2020-10-16T21:33:48+00:00",
392
+ "type": "library",
393
+ "installation-source": "dist",
394
+ "autoload": {
395
+ "psr-4": {
396
+ "Google\\Auth\\": "src"
397
+ }
398
+ },
399
+ "notification-url": "https://packagist.org/downloads/",
400
+ "license": [
401
+ "Apache-2.0"
402
+ ],
403
+ "description": "Google Auth Library for PHP",
404
+ "homepage": "http://github.com/google/google-auth-library-php",
405
+ "keywords": [
406
+ "Authentication",
407
+ "google",
408
+ "oauth2"
409
+ ],
410
+ "install-path": "../google/auth"
411
+ },
412
+ {
413
+ "name": "guzzlehttp/guzzle",
414
+ "version": "6.5.5",
415
+ "version_normalized": "6.5.5.0",
416
+ "source": {
417
+ "type": "git",
418
+ "url": "https://github.com/guzzle/guzzle.git",
419
+ "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e"
420
+ },
421
+ "dist": {
422
+ "type": "zip",
423
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
424
+ "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
425
+ "shasum": ""
426
+ },
427
+ "require": {
428
+ "ext-json": "*",
429
+ "guzzlehttp/promises": "^1.0",
430
+ "guzzlehttp/psr7": "^1.6.1",
431
+ "php": ">=5.5",
432
+ "symfony/polyfill-intl-idn": "^1.17.0"
433
+ },
434
+ "require-dev": {
435
+ "ext-curl": "*",
436
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
437
+ "psr/log": "^1.1"
438
+ },
439
+ "suggest": {
440
+ "psr/log": "Required for using the Log middleware"
441
+ },
442
+ "time": "2020-06-16T21:01:06+00:00",
443
+ "type": "library",
444
+ "extra": {
445
+ "branch-alias": {
446
+ "dev-master": "6.5-dev"
447
+ }
448
+ },
449
+ "installation-source": "dist",
450
+ "autoload": {
451
+ "psr-4": {
452
+ "GuzzleHttp\\": "src/"
453
+ },
454
+ "files": [
455
+ "src/functions_include.php"
456
  ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
457
  },
458
+ "notification-url": "https://packagist.org/downloads/",
459
+ "license": [
460
+ "MIT"
461
  ],
462
+ "authors": [
463
+ {
464
+ "name": "Michael Dowling",
465
+ "email": "mtdowling@gmail.com",
466
+ "homepage": "https://github.com/mtdowling"
467
+ }
468
+ ],
469
+ "description": "Guzzle is a PHP HTTP client library",
470
+ "homepage": "http://guzzlephp.org/",
471
+ "keywords": [
472
+ "client",
473
+ "curl",
474
+ "framework",
475
+ "http",
476
+ "http client",
477
+ "rest",
478
+ "web service"
479
+ ],
480
+ "support": {
481
+ "issues": "https://github.com/guzzle/guzzle/issues",
482
+ "source": "https://github.com/guzzle/guzzle/tree/6.5"
483
+ },
484
+ "install-path": "../guzzlehttp/guzzle"
485
+ },
486
+ {
487
+ "name": "guzzlehttp/promises",
488
+ "version": "1.4.0",
489
+ "version_normalized": "1.4.0.0",
490
+ "source": {
491
+ "type": "git",
492
+ "url": "https://github.com/guzzle/promises.git",
493
+ "reference": "60d379c243457e073cff02bc323a2a86cb355631"
494
+ },
495
+ "dist": {
496
+ "type": "zip",
497
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/60d379c243457e073cff02bc323a2a86cb355631",
498
+ "reference": "60d379c243457e073cff02bc323a2a86cb355631",
499
+ "shasum": ""
500
+ },
501
+ "require": {
502
+ "php": ">=5.5"
503
+ },
504
+ "require-dev": {
505
+ "symfony/phpunit-bridge": "^4.4 || ^5.1"
506
+ },
507
+ "time": "2020-09-30T07:37:28+00:00",
508
+ "type": "library",
509
+ "extra": {
510
+ "branch-alias": {
511
+ "dev-master": "1.4-dev"
512
+ }
513
+ },
514
+ "installation-source": "dist",
515
+ "autoload": {
516
+ "psr-4": {
517
+ "GuzzleHttp\\Promise\\": "src/"
518
+ },
519
+ "files": [
520
+ "src/functions_include.php"
521
+ ]
522
+ },
523
+ "notification-url": "https://packagist.org/downloads/",
524
+ "license": [
525
+ "MIT"
526
+ ],
527
+ "authors": [
528
+ {
529
+ "name": "Michael Dowling",
530
+ "email": "mtdowling@gmail.com",
531
+ "homepage": "https://github.com/mtdowling"
532
+ }
533
+ ],
534
+ "description": "Guzzle promises library",
535
+ "keywords": [
536
+ "promise"
537
+ ],
538
+ "install-path": "../guzzlehttp/promises"
539
+ },
540
+ {
541
+ "name": "guzzlehttp/psr7",
542
+ "version": "1.7.0",
543
+ "version_normalized": "1.7.0.0",
544
+ "source": {
545
+ "type": "git",
546
+ "url": "https://github.com/guzzle/psr7.git",
547
+ "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3"
548
+ },
549
+ "dist": {
550
+ "type": "zip",
551
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3",
552
+ "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3",
553
+ "shasum": ""
554
+ },
555
+ "require": {
556
+ "php": ">=5.4.0",
557
+ "psr/http-message": "~1.0",
558
+ "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
559
+ },
560
+ "provide": {
561
+ "psr/http-message-implementation": "1.0"
562
+ },
563
+ "require-dev": {
564
+ "ext-zlib": "*",
565
+ "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10"
566
+ },
567
+ "suggest": {
568
+ "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
569
+ },
570
+ "time": "2020-09-30T07:37:11+00:00",
571
+ "type": "library",
572
+ "extra": {
573
+ "branch-alias": {
574
+ "dev-master": "1.7-dev"
575
+ }
576
+ },
577
+ "installation-source": "dist",
578
+ "autoload": {
579
+ "psr-4": {
580
+ "GuzzleHttp\\Psr7\\": "src/"
581
+ },
582
+ "files": [
583
+ "src/functions_include.php"
584
+ ]
585
+ },
586
+ "notification-url": "https://packagist.org/downloads/",
587
+ "license": [
588
+ "MIT"
589
+ ],
590
+ "authors": [
591
+ {
592
+ "name": "Michael Dowling",
593
+ "email": "mtdowling@gmail.com",
594
+ "homepage": "https://github.com/mtdowling"
595
+ },
596
+ {
597
+ "name": "Tobias Schultze",
598
+ "homepage": "https://github.com/Tobion"
599
+ }
600
+ ],
601
+ "description": "PSR-7 message implementation that also provides common utility methods",
602
+ "keywords": [
603
+ "http",
604
+ "message",
605
+ "psr-7",
606
+ "request",
607
+ "response",
608
+ "stream",
609
+ "uri",
610
+ "url"
611
+ ],
612
+ "install-path": "../guzzlehttp/psr7"
613
+ },
614
+ {
615
+ "name": "mexitek/phpcolors",
616
+ "version": "dev-master",
617
+ "version_normalized": "dev-master",
618
+ "source": {
619
+ "type": "git",
620
+ "url": "https://github.com/mexitek/phpColors.git",
621
+ "reference": "4b1ccc920b5fc3749a575c171d2f12fca0ecfded"
622
+ },
623
+ "dist": {
624
+ "type": "zip",
625
+ "url": "https://api.github.com/repos/mexitek/phpColors/zipball/4b1ccc920b5fc3749a575c171d2f12fca0ecfded",
626
+ "reference": "4b1ccc920b5fc3749a575c171d2f12fca0ecfded",
627
+ "shasum": ""
628
+ },
629
+ "require": {
630
+ "php": "^7.2"
631
+ },
632
+ "require-dev": {
633
+ "nette/tester": "^2.3",
634
+ "squizlabs/php_codesniffer": "^3.5"
635
+ },
636
+ "time": "2020-11-05T06:04:47+00:00",
637
+ "type": "library",
638
+ "installation-source": "source",
639
+ "autoload": {
640
+ "classmap": [
641
+ "src"
642
+ ]
643
+ },
644
+ "notification-url": "https://packagist.org/downloads/",
645
+ "license": [
646
+ "MIT"
647
+ ],
648
+ "authors": [
649
+ {
650
+ "name": "Arlo Carreon",
651
+ "homepage": "http://arlocarreon.com",
652
+ "role": "creator"
653
+ }
654
+ ],
655
+ "description": "A series of methods that let you manipulate colors. Just incase you ever need different shades of one color on the fly.",
656
+ "homepage": "http://mexitek.github.com/phpColors/",
657
+ "keywords": [
658
+ "color",
659
+ "css",
660
+ "design",
661
+ "frontend",
662
+ "ui"
663
+ ],
664
+ "install-path": "../mexitek/phpcolors"
665
+ },
666
+ {
667
+ "name": "monolog/monolog",
668
+ "version": "2.2.0",
669
+ "version_normalized": "2.2.0.0",
670
+ "source": {
671
+ "type": "git",
672
+ "url": "https://github.com/Seldaek/monolog.git",
673
+ "reference": "1cb1cde8e8dd0f70cc0fe51354a59acad9302084"
674
+ },
675
+ "dist": {
676
+ "type": "zip",
677
+ "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1cb1cde8e8dd0f70cc0fe51354a59acad9302084",
678
+ "reference": "1cb1cde8e8dd0f70cc0fe51354a59acad9302084",
679
+ "shasum": ""
680
+ },
681
+ "require": {
682
+ "php": ">=7.2",
683
+ "psr/log": "^1.0.1"
684
+ },
685
+ "provide": {
686
+ "psr/log-implementation": "1.0.0"
687
+ },
688
+ "require-dev": {
689
+ "aws/aws-sdk-php": "^2.4.9 || ^3.0",
690
+ "doctrine/couchdb": "~1.0@dev",
691
+ "elasticsearch/elasticsearch": "^7",
692
+ "graylog2/gelf-php": "^1.4.2",
693
+ "mongodb/mongodb": "^1.8",
694
+ "php-amqplib/php-amqplib": "~2.4",
695
+ "php-console/php-console": "^3.1.3",
696
+ "phpspec/prophecy": "^1.6.1",
697
+ "phpstan/phpstan": "^0.12.59",
698
+ "phpunit/phpunit": "^8.5",
699
+ "predis/predis": "^1.1",
700
+ "rollbar/rollbar": "^1.3",
701
+ "ruflin/elastica": ">=0.90 <7.0.1",
702
+ "swiftmailer/swiftmailer": "^5.3|^6.0"
703
+ },
704
+ "suggest": {
705
+ "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
706
+ "doctrine/couchdb": "Allow sending log messages to a CouchDB server",
707
+ "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client",
708
+ "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
709
+ "ext-mbstring": "Allow to work properly with unicode symbols",
710
+ "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)",
711
+ "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
712
+ "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)",
713
+ "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
714
+ "php-console/php-console": "Allow sending log messages to Google Chrome",
715
+ "rollbar/rollbar": "Allow sending log messages to Rollbar",
716
+ "ruflin/elastica": "Allow sending log messages to an Elastic Search server"
717
+ },
718
+ "time": "2020-12-14T13:15:25+00:00",
719
+ "type": "library",
720
+ "extra": {
721
+ "branch-alias": {
722
+ "dev-main": "2.x-dev"
723
+ }
724
+ },
725
+ "installation-source": "dist",
726
+ "autoload": {
727
+ "psr-4": {
728
+ "Monolog\\": "src/Monolog"
729
+ }
730
+ },
731
+ "notification-url": "https://packagist.org/downloads/",
732
+ "license": [
733
+ "MIT"
734
+ ],
735
+ "authors": [
736
+ {
737
+ "name": "Jordi Boggiano",
738
+ "email": "j.boggiano@seld.be",
739
+ "homepage": "https://seld.be"
740
+ }
741
+ ],
742
+ "description": "Sends your logs to files, sockets, inboxes, databases and various web services",
743
+ "homepage": "https://github.com/Seldaek/monolog",
744
+ "keywords": [
745
+ "log",
746
+ "logging",
747
+ "psr-3"
748
+ ],
749
+ "support": {
750
+ "issues": "https://github.com/Seldaek/monolog/issues",
751
+ "source": "https://github.com/Seldaek/monolog/tree/2.2.0"
752
+ },
753
+ "funding": [
754
+ {
755
+ "url": "https://github.com/Seldaek",
756
+ "type": "github"
757
+ },
758
+ {
759
+ "url": "https://tidelift.com/funding/github/packagist/monolog/monolog",
760
+ "type": "tidelift"
761
+ }
762
+ ],
763
+ "install-path": "../monolog/monolog"
764
+ },
765
+ {
766
+ "name": "nesbot/carbon",
767
+ "version": "2.42.0",
768
+ "version_normalized": "2.42.0.0",
769
+ "source": {
770
+ "type": "git",
771
+ "url": "https://github.com/briannesbitt/Carbon.git",
772
+ "reference": "d0463779663437392fe42ff339ebc0213bd55498"
773
+ },
774
+ "dist": {
775
+ "type": "zip",
776
+ "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/d0463779663437392fe42ff339ebc0213bd55498",
777
+ "reference": "d0463779663437392fe42ff339ebc0213bd55498",
778
+ "shasum": ""
779
+ },
780
+ "require": {
781
+ "ext-json": "*",
782
+ "php": "^7.1.8 || ^8.0",
783
+ "symfony/polyfill-mbstring": "^1.0",
784
+ "symfony/translation": "^3.4 || ^4.0 || ^5.0"
785
+ },
786
+ "require-dev": {
787
+ "doctrine/orm": "^2.7",
788
+ "friendsofphp/php-cs-fixer": "^2.14 || ^3.0",
789
+ "kylekatarnls/multi-tester": "^2.0",
790
+ "phpmd/phpmd": "^2.9",
791
+ "phpstan/extension-installer": "^1.0",
792
+ "phpstan/phpstan": "^0.12.54",
793
+ "phpunit/phpunit": "^7.5 || ^8.0",
794
+ "squizlabs/php_codesniffer": "^3.4"
795
+ },
796
+ "time": "2020-11-28T14:25:28+00:00",
797
+ "bin": [
798
+ "bin/carbon"
799
+ ],
800
+ "type": "library",
801
+ "extra": {
802
+ "branch-alias": {
803
+ "dev-master": "2.x-dev",
804
+ "dev-3.x": "3.x-dev"
805
+ },
806
+ "laravel": {
807
+ "providers": [
808
+ "Carbon\\Laravel\\ServiceProvider"
809
+ ]
810
+ },
811
+ "phpstan": {
812
+ "includes": [
813
+ "extension.neon"
814
+ ]
815
+ }
816
+ },
817
+ "installation-source": "dist",
818
+ "autoload": {
819
+ "psr-4": {
820
+ "Carbon\\": "src/Carbon/"
821
+ }
822
+ },
823
+ "notification-url": "https://packagist.org/downloads/",
824
+ "license": [
825
+ "MIT"
826
+ ],
827
+ "authors": [
828
+ {
829
+ "name": "Brian Nesbitt",
830
+ "email": "brian@nesbot.com",
831
+ "homepage": "http://nesbot.com"
832
+ },
833
+ {
834
+ "name": "kylekatarnls",
835
+ "homepage": "http://github.com/kylekatarnls"
836
+ }
837
+ ],
838
+ "description": "An API extension for DateTime that supports 281 different languages.",
839
+ "homepage": "http://carbon.nesbot.com",
840
+ "keywords": [
841
+ "date",
842
+ "datetime",
843
+ "time"
844
+ ],
845
+ "funding": [
846
+ {
847
+ "url": "https://opencollective.com/Carbon",
848
+ "type": "open_collective"
849
+ },
850
+ {
851
+ "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon",
852
+ "type": "tidelift"
853
+ }
854
+ ],
855
+ "install-path": "../nesbot/carbon"
856
+ },
857
+ {
858
+ "name": "phpseclib/phpseclib",
859
+ "version": "2.0.30",
860
+ "version_normalized": "2.0.30.0",
861
+ "source": {
862
+ "type": "git",
863
+ "url": "https://github.com/phpseclib/phpseclib.git",
864
+ "reference": "136b9ca7eebef78be14abf90d65c5e57b6bc5d36"
865
+ },
866
+ "dist": {
867
+ "type": "zip",
868
+ "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/136b9ca7eebef78be14abf90d65c5e57b6bc5d36",
869
+ "reference": "136b9ca7eebef78be14abf90d65c5e57b6bc5d36",
870
+ "shasum": ""
871
+ },
872
+ "require": {
873
+ "php": ">=5.3.3"
874
+ },
875
+ "require-dev": {
876
+ "phing/phing": "~2.7",
877
+ "phpunit/phpunit": "^4.8.35|^5.7|^6.0|^9.4",
878
+ "squizlabs/php_codesniffer": "~2.0"
879
+ },
880
+ "suggest": {
881
+ "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.",
882
+ "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.",
883
+ "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.",
884
+ "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations."
885
+ },
886
+ "time": "2020-12-17T05:42:04+00:00",
887
+ "type": "library",
888
+ "installation-source": "dist",
889
+ "autoload": {
890
+ "files": [
891
+ "phpseclib/bootstrap.php"
892
+ ],
893
+ "psr-4": {
894
+ "phpseclib\\": "phpseclib/"
895
+ }
896
+ },
897
+ "notification-url": "https://packagist.org/downloads/",
898
+ "license": [
899
+ "MIT"
900
+ ],
901
+ "authors": [
902
+ {
903
+ "name": "Jim Wigginton",
904
+ "email": "terrafrost@php.net",
905
+ "role": "Lead Developer"
906
+ },
907
+ {
908
+ "name": "Patrick Monnerat",
909
+ "email": "pm@datasphere.ch",
910
+ "role": "Developer"
911
+ },
912
+ {
913
+ "name": "Andreas Fischer",
914
+ "email": "bantu@phpbb.com",
915
+ "role": "Developer"
916
+ },
917
+ {
918
+ "name": "Hans-Jürgen Petrich",
919
+ "email": "petrich@tronic-media.com",
920
+ "role": "Developer"
921
+ },
922
+ {
923
+ "name": "Graham Campbell",
924
+ "email": "graham@alt-three.com",
925
+ "role": "Developer"
926
+ }
927
+ ],
928
+ "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.",
929
+ "homepage": "http://phpseclib.sourceforge.net",
930
+ "keywords": [
931
+ "BigInteger",
932
+ "aes",
933
+ "asn.1",
934
+ "asn1",
935
+ "blowfish",
936
+ "crypto",
937
+ "cryptography",
938
+ "encryption",
939
+ "rsa",
940
+ "security",
941
+ "sftp",
942
+ "signature",
943
+ "signing",
944
+ "ssh",
945
+ "twofish",
946
+ "x.509",
947
+ "x509"
948
+ ],
949
+ "support": {
950
+ "issues": "https://github.com/phpseclib/phpseclib/issues",
951
+ "source": "https://github.com/phpseclib/phpseclib/tree/2.0.30"
952
+ },
953
+ "funding": [
954
+ {
955
+ "url": "https://github.com/terrafrost",
956
+ "type": "github"
957
+ },
958
+ {
959
+ "url": "https://www.patreon.com/phpseclib",
960
+ "type": "patreon"
961
+ },
962
+ {
963
+ "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib",
964
+ "type": "tidelift"
965
+ }
966
+ ],
967
+ "install-path": "../phpseclib/phpseclib"
968
+ },
969
+ {
970
+ "name": "psr/cache",
971
+ "version": "1.0.1",
972
+ "version_normalized": "1.0.1.0",
973
+ "source": {
974
+ "type": "git",
975
+ "url": "https://github.com/php-fig/cache.git",
976
+ "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8"
977
+ },
978
+ "dist": {
979
+ "type": "zip",
980
+ "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8",
981
+ "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8",
982
+ "shasum": ""
983
+ },
984
+ "require": {
985
+ "php": ">=5.3.0"
986
+ },
987
+ "time": "2016-08-06T20:24:11+00:00",
988
+ "type": "library",
989
+ "extra": {
990
+ "branch-alias": {
991
+ "dev-master": "1.0.x-dev"
992
+ }
993
+ },
994
+ "installation-source": "dist",
995
+ "autoload": {
996
+ "psr-4": {
997
+ "Psr\\Cache\\": "src/"
998
+ }
999
+ },
1000
+ "notification-url": "https://packagist.org/downloads/",
1001
+ "license": [
1002
+ "MIT"
1003
+ ],
1004
+ "authors": [
1005
+ {
1006
+ "name": "PHP-FIG",
1007
+ "homepage": "http://www.php-fig.org/"
1008
+ }
1009
+ ],
1010
+ "description": "Common interface for caching libraries",
1011
+ "keywords": [
1012
+ "cache",
1013
+ "psr",
1014
+ "psr-6"
1015
+ ],
1016
+ "install-path": "../psr/cache"
1017
+ },
1018
+ {
1019
+ "name": "psr/http-message",
1020
+ "version": "1.0.1",
1021
+ "version_normalized": "1.0.1.0",
1022
+ "source": {
1023
+ "type": "git",
1024
+ "url": "https://github.com/php-fig/http-message.git",
1025
+ "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
1026
+ },
1027
+ "dist": {
1028
+ "type": "zip",
1029
+ "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
1030
+ "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
1031
+ "shasum": ""
1032
+ },
1033
+ "require": {
1034
+ "php": ">=5.3.0"
1035
+ },
1036
+ "time": "2016-08-06T14:39:51+00:00",
1037
+ "type": "library",
1038
+ "extra": {
1039
+ "branch-alias": {
1040
+ "dev-master": "1.0.x-dev"
1041
+ }
1042
+ },
1043
+ "installation-source": "dist",
1044
+ "autoload": {
1045
+ "psr-4": {
1046
+ "Psr\\Http\\Message\\": "src/"
1047
+ }
1048
+ },
1049
+ "notification-url": "https://packagist.org/downloads/",
1050
+ "license": [
1051
+ "MIT"
1052
+ ],
1053
+ "authors": [
1054
+ {
1055
+ "name": "PHP-FIG",
1056
+ "homepage": "http://www.php-fig.org/"
1057
+ }
1058
+ ],
1059
+ "description": "Common interface for HTTP messages",
1060
+ "homepage": "https://github.com/php-fig/http-message",
1061
+ "keywords": [
1062
+ "http",
1063
+ "http-message",
1064
+ "psr",
1065
+ "psr-7",
1066
+ "request",
1067
+ "response"
1068
+ ],
1069
+ "install-path": "../psr/http-message"
1070
+ },
1071
+ {
1072
+ "name": "psr/log",
1073
+ "version": "1.1.3",
1074
+ "version_normalized": "1.1.3.0",
1075
+ "source": {
1076
+ "type": "git",
1077
+ "url": "https://github.com/php-fig/log.git",
1078
+ "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
1079
+ },
1080
+ "dist": {
1081
+ "type": "zip",
1082
+ "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
1083
+ "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
1084
+ "shasum": ""
1085
+ },
1086
+ "require": {
1087
+ "php": ">=5.3.0"
1088
+ },
1089
+ "time": "2020-03-23T09:12:05+00:00",
1090
+ "type": "library",
1091
+ "extra": {
1092
+ "branch-alias": {
1093
+ "dev-master": "1.1.x-dev"
1094
+ }
1095
+ },
1096
+ "installation-source": "dist",
1097
+ "autoload": {
1098
+ "psr-4": {
1099
+ "Psr\\Log\\": "Psr/Log/"
1100
+ }
1101
+ },
1102
+ "notification-url": "https://packagist.org/downloads/",
1103
+ "license": [
1104
+ "MIT"
1105
+ ],
1106
+ "authors": [
1107
+ {
1108
+ "name": "PHP-FIG",
1109
+ "homepage": "http://www.php-fig.org/"
1110
+ }
1111
+ ],
1112
+ "description": "Common interface for logging libraries",
1113
+ "homepage": "https://github.com/php-fig/log",
1114
+ "keywords": [
1115
+ "log",
1116
+ "psr",
1117
+ "psr-3"
1118
+ ],
1119
+ "install-path": "../psr/log"
1120
+ },
1121
+ {
1122
+ "name": "ralouphie/getallheaders",
1123
+ "version": "3.0.3",
1124
+ "version_normalized": "3.0.3.0",
1125
+ "source": {
1126
+ "type": "git",
1127
+ "url": "https://github.com/ralouphie/getallheaders.git",
1128
+ "reference": "120b605dfeb996808c31b6477290a714d356e822"
1129
+ },
1130
+ "dist": {
1131
+ "type": "zip",
1132
+ "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
1133
+ "reference": "120b605dfeb996808c31b6477290a714d356e822",
1134
+ "shasum": ""
1135
+ },
1136
+ "require": {
1137
+ "php": ">=5.6"
1138
+ },
1139
+ "require-dev": {
1140
+ "php-coveralls/php-coveralls": "^2.1",
1141
+ "phpunit/phpunit": "^5 || ^6.5"
1142
+ },
1143
+ "time": "2019-03-08T08:55:37+00:00",
1144
+ "type": "library",
1145
+ "installation-source": "dist",
1146
+ "autoload": {
1147
+ "files": [
1148
+ "src/getallheaders.php"
1149
+ ]
1150
+ },
1151
+ "notification-url": "https://packagist.org/downloads/",
1152
+ "license": [
1153
+ "MIT"
1154
+ ],
1155
+ "authors": [
1156
+ {
1157
+ "name": "Ralph Khattar",
1158
+ "email": "ralph.khattar@gmail.com"
1159
+ }
1160
+ ],
1161
+ "description": "A polyfill for getallheaders.",
1162
+ "install-path": "../ralouphie/getallheaders"
1163
+ },
1164
+ {
1165
+ "name": "symfony/polyfill-intl-idn",
1166
+ "version": "v1.20.0",
1167
+ "version_normalized": "1.20.0.0",
1168
+ "source": {
1169
+ "type": "git",
1170
+ "url": "https://github.com/symfony/polyfill-intl-idn.git",
1171
+ "reference": "3b75acd829741c768bc8b1f84eb33265e7cc5117"
1172
+ },
1173
+ "dist": {
1174
+ "type": "zip",
1175
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/3b75acd829741c768bc8b1f84eb33265e7cc5117",
1176
+ "reference": "3b75acd829741c768bc8b1f84eb33265e7cc5117",
1177
+ "shasum": ""
1178
+ },
1179
+ "require": {
1180
+ "php": ">=7.1",
1181
+ "symfony/polyfill-intl-normalizer": "^1.10",
1182
+ "symfony/polyfill-php72": "^1.10"
1183
+ },
1184
+ "suggest": {
1185
+ "ext-intl": "For best performance"
1186
+ },
1187
+ "time": "2020-10-23T14:02:19+00:00",
1188
+ "type": "library",
1189
+ "extra": {
1190
+ "branch-alias": {
1191
+ "dev-main": "1.20-dev"
1192
+ },
1193
+ "thanks": {
1194
+ "name": "symfony/polyfill",
1195
+ "url": "https://github.com/symfony/polyfill"
1196
+ }
1197
+ },
1198
+ "installation-source": "dist",
1199
+ "autoload": {
1200
+ "psr-4": {
1201
+ "Symfony\\Polyfill\\Intl\\Idn\\": ""
1202
+ },
1203
+ "files": [
1204
+ "bootstrap.php"
1205
+ ]
1206
+ },
1207
+ "notification-url": "https://packagist.org/downloads/",
1208
+ "license": [
1209
+ "MIT"
1210
+ ],
1211
+ "authors": [
1212
+ {
1213
+ "name": "Laurent Bassin",
1214
+ "email": "laurent@bassin.info"
1215
+ },
1216
+ {
1217
+ "name": "Trevor Rowbotham",
1218
+ "email": "trevor.rowbotham@pm.me"
1219
+ },
1220
+ {
1221
+ "name": "Symfony Community",
1222
+ "homepage": "https://symfony.com/contributors"
1223
+ }
1224
+ ],
1225
+ "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions",
1226
+ "homepage": "https://symfony.com",
1227
+ "keywords": [
1228
+ "compatibility",
1229
+ "idn",
1230
+ "intl",
1231
+ "polyfill",
1232
+ "portable",
1233
+ "shim"
1234
+ ],
1235
+ "support": {
1236
+ "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.20.0"
1237
+ },
1238
+ "funding": [
1239
+ {
1240
+ "url": "https://symfony.com/sponsor",
1241
+ "type": "custom"
1242
+ },
1243
+ {
1244
+ "url": "https://github.com/fabpot",
1245
+ "type": "github"
1246
+ },
1247
+ {
1248
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
1249
+ "type": "tidelift"
1250
+ }
1251
+ ],
1252
+ "install-path": "../symfony/polyfill-intl-idn"
1253
+ },
1254
+ {
1255
+ "name": "symfony/polyfill-intl-normalizer",
1256
+ "version": "v1.20.0",
1257
+ "version_normalized": "1.20.0.0",
1258
+ "source": {
1259
+ "type": "git",
1260
+ "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
1261
+ "reference": "727d1096295d807c309fb01a851577302394c897"
1262
+ },
1263
+ "dist": {
1264
+ "type": "zip",
1265
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/727d1096295d807c309fb01a851577302394c897",
1266
+ "reference": "727d1096295d807c309fb01a851577302394c897",
1267
+ "shasum": ""
1268
+ },
1269
+ "require": {
1270
+ "php": ">=7.1"
1271
+ },
1272
+ "suggest": {
1273
+ "ext-intl": "For best performance"
1274
+ },
1275
+ "time": "2020-10-23T14:02:19+00:00",
1276
+ "type": "library",
1277
+ "extra": {
1278
+ "branch-alias": {
1279
+ "dev-main": "1.20-dev"
1280
+ },
1281
+ "thanks": {
1282
+ "name": "symfony/polyfill",
1283
+ "url": "https://github.com/symfony/polyfill"
1284
+ }
1285
+ },
1286
+ "installation-source": "dist",
1287
+ "autoload": {
1288
+ "psr-4": {
1289
+ "Symfony\\Polyfill\\Intl\\Normalizer\\": ""
1290
+ },
1291
+ "files": [
1292
+ "bootstrap.php"
1293
+ ],
1294
+ "classmap": [
1295
+ "Resources/stubs"
1296
+ ]
1297
+ },
1298
+ "notification-url": "https://packagist.org/downloads/",
1299
+ "license": [
1300
+ "MIT"
1301
+ ],
1302
+ "authors": [
1303
+ {
1304
+ "name": "Nicolas Grekas",
1305
+ "email": "p@tchwork.com"
1306
+ },
1307
+ {
1308
+ "name": "Symfony Community",
1309
+ "homepage": "https://symfony.com/contributors"
1310
+ }
1311
+ ],
1312
+ "description": "Symfony polyfill for intl's Normalizer class and related functions",
1313
+ "homepage": "https://symfony.com",
1314
+ "keywords": [
1315
+ "compatibility",
1316
+ "intl",
1317
+ "normalizer",
1318
+ "polyfill",
1319
+ "portable",
1320
+ "shim"
1321
+ ],
1322
+ "support": {
1323
+ "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.20.0"
1324
+ },
1325
+ "funding": [
1326
+ {
1327
+ "url": "https://symfony.com/sponsor",
1328
+ "type": "custom"
1329
+ },
1330
+ {
1331
+ "url": "https://github.com/fabpot",
1332
+ "type": "github"
1333
+ },
1334
+ {
1335
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
1336
+ "type": "tidelift"
1337
+ }
1338
+ ],
1339
+ "install-path": "../symfony/polyfill-intl-normalizer"
1340
+ },
1341
+ {
1342
+ "name": "symfony/polyfill-mbstring",
1343
+ "version": "v1.20.0",
1344
+ "version_normalized": "1.20.0.0",
1345
+ "source": {
1346
+ "type": "git",
1347
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
1348
+ "reference": "39d483bdf39be819deabf04ec872eb0b2410b531"
1349
+ },
1350
+ "dist": {
1351
+ "type": "zip",
1352
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531",
1353
+ "reference": "39d483bdf39be819deabf04ec872eb0b2410b531",
1354
+ "shasum": ""
1355
+ },
1356
+ "require": {
1357
+ "php": ">=7.1"
1358
+ },
1359
+ "suggest": {
1360
+ "ext-mbstring": "For best performance"
1361
+ },
1362
+ "time": "2020-10-23T14:02:19+00:00",
1363
+ "type": "library",
1364
+ "extra": {
1365
+ "branch-alias": {
1366
+ "dev-main": "1.20-dev"
1367
+ },
1368
+ "thanks": {
1369
+ "name": "symfony/polyfill",
1370
+ "url": "https://github.com/symfony/polyfill"
1371
+ }
1372
+ },
1373
+ "installation-source": "dist",
1374
+ "autoload": {
1375
+ "psr-4": {
1376
+ "Symfony\\Polyfill\\Mbstring\\": ""
1377
+ },
1378
+ "files": [
1379
+ "bootstrap.php"
1380
+ ]
1381
+ },
1382
+ "notification-url": "https://packagist.org/downloads/",
1383
+ "license": [
1384
+ "MIT"
1385
+ ],
1386
+ "authors": [
1387
+ {
1388
+ "name": "Nicolas Grekas",
1389
+ "email": "p@tchwork.com"
1390
+ },
1391
+ {
1392
+ "name": "Symfony Community",
1393
+ "homepage": "https://symfony.com/contributors"
1394
+ }
1395
+ ],
1396
+ "description": "Symfony polyfill for the Mbstring extension",
1397
+ "homepage": "https://symfony.com",
1398
+ "keywords": [
1399
+ "compatibility",
1400
+ "mbstring",
1401
+ "polyfill",
1402
+ "portable",
1403
+ "shim"
1404
+ ],
1405
+ "funding": [
1406
+ {
1407
+ "url": "https://symfony.com/sponsor",
1408
+ "type": "custom"
1409
+ },
1410
+ {
1411
+ "url": "https://github.com/fabpot",
1412
+ "type": "github"
1413
+ },
1414
+ {
1415
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
1416
+ "type": "tidelift"
1417
+ }
1418
+ ],
1419
+ "install-path": "../symfony/polyfill-mbstring"
1420
+ },
1421
+ {
1422
+ "name": "symfony/polyfill-php72",
1423
+ "version": "v1.20.0",
1424
+ "version_normalized": "1.20.0.0",
1425
+ "source": {
1426
+ "type": "git",
1427
+ "url": "https://github.com/symfony/polyfill-php72.git",
1428
+ "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930"
1429
+ },
1430
+ "dist": {
1431
+ "type": "zip",
1432
+ "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cede45fcdfabdd6043b3592e83678e42ec69e930",
1433
+ "reference": "cede45fcdfabdd6043b3592e83678e42ec69e930",
1434
+ "shasum": ""
1435
+ },
1436
+ "require": {
1437
+ "php": ">=7.1"
1438
+ },
1439
+ "time": "2020-10-23T14:02:19+00:00",
1440
+ "type": "library",
1441
+ "extra": {
1442
+ "branch-alias": {
1443
+ "dev-main": "1.20-dev"
1444
+ },
1445
+ "thanks": {
1446
+ "name": "symfony/polyfill",
1447
+ "url": "https://github.com/symfony/polyfill"
1448
+ }
1449
+ },
1450
+ "installation-source": "dist",
1451
+ "autoload": {
1452
+ "psr-4": {
1453
+ "Symfony\\Polyfill\\Php72\\": ""
1454
+ },
1455
+ "files": [
1456
+ "bootstrap.php"
1457
+ ]
1458
+ },
1459
+ "notification-url": "https://packagist.org/downloads/",
1460
+ "license": [
1461
+ "MIT"
1462
+ ],
1463
+ "authors": [
1464
+ {
1465
+ "name": "Nicolas Grekas",
1466
+ "email": "p@tchwork.com"
1467
+ },
1468
+ {
1469
+ "name": "Symfony Community",
1470
+ "homepage": "https://symfony.com/contributors"
1471
+ }
1472
+ ],
1473
+ "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
1474
+ "homepage": "https://symfony.com",
1475
+ "keywords": [
1476
+ "compatibility",
1477
+ "polyfill",
1478
+ "portable",
1479
+ "shim"
1480
+ ],
1481
+ "support": {
1482
+ "source": "https://github.com/symfony/polyfill-php72/tree/v1.20.0"
1483
+ },
1484
+ "funding": [
1485
+ {
1486
+ "url": "https://symfony.com/sponsor",
1487
+ "type": "custom"
1488
+ },
1489
+ {
1490
+ "url": "https://github.com/fabpot",
1491
+ "type": "github"
1492
+ },
1493
+ {
1494
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
1495
+ "type": "tidelift"
1496
+ }
1497
+ ],
1498
+ "install-path": "../symfony/polyfill-php72"
1499
+ },
1500
+ {
1501
+ "name": "symfony/polyfill-php80",
1502
+ "version": "v1.20.0",
1503
+ "version_normalized": "1.20.0.0",
1504
+ "source": {
1505
+ "type": "git",
1506
+ "url": "https://github.com/symfony/polyfill-php80.git",
1507
+ "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de"
1508
+ },
1509
+ "dist": {
1510
+ "type": "zip",
1511
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/e70aa8b064c5b72d3df2abd5ab1e90464ad009de",
1512
+ "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de",
1513
+ "shasum": ""
1514
+ },
1515
+ "require": {
1516
+ "php": ">=7.1"
1517
+ },
1518
+ "time": "2020-10-23T14:02:19+00:00",
1519
+ "type": "library",
1520
+ "extra": {
1521
+ "branch-alias": {
1522
+ "dev-main": "1.20-dev"
1523
+ },
1524
+ "thanks": {
1525
+ "name": "symfony/polyfill",
1526
+ "url": "https://github.com/symfony/polyfill"
1527
+ }
1528
+ },
1529
+ "installation-source": "dist",
1530
+ "autoload": {
1531
+ "psr-4": {
1532
+ "Symfony\\Polyfill\\Php80\\": ""
1533
+ },
1534
+ "files": [
1535
+ "bootstrap.php"
1536
+ ],
1537
+ "classmap": [
1538
+ "Resources/stubs"
1539
+ ]
1540
+ },
1541
+ "notification-url": "https://packagist.org/downloads/",
1542
+ "license": [
1543
+ "MIT"
1544
+ ],
1545
+ "authors": [
1546
+ {
1547
+ "name": "Ion Bazan",
1548
+ "email": "ion.bazan@gmail.com"
1549
+ },
1550
+ {
1551
+ "name": "Nicolas Grekas",
1552
+ "email": "p@tchwork.com"
1553
+ },
1554
+ {
1555
+ "name": "Symfony Community",
1556
+ "homepage": "https://symfony.com/contributors"
1557
+ }
1558
+ ],
1559
+ "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
1560
+ "homepage": "https://symfony.com",
1561
+ "keywords": [
1562
+ "compatibility",
1563
+ "polyfill",
1564
+ "portable",
1565
+ "shim"
1566
+ ],
1567
+ "funding": [
1568
+ {
1569
+ "url": "https://symfony.com/sponsor",
1570
+ "type": "custom"
1571
+ },
1572
+ {
1573
+ "url": "https://github.com/fabpot",
1574
+ "type": "github"
1575
+ },
1576
+ {
1577
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
1578
+ "type": "tidelift"
1579
+ }
1580
+ ],
1581
+ "install-path": "../symfony/polyfill-php80"
1582
+ },
1583
+ {
1584
+ "name": "symfony/translation",
1585
+ "version": "v5.2.1",
1586
+ "version_normalized": "5.2.1.0",
1587
+ "source": {
1588
+ "type": "git",
1589
+ "url": "https://github.com/symfony/translation.git",
1590
+ "reference": "a04209ba0d1391c828e5b2373181dac63c52ee70"
1591
+ },
1592
+ "dist": {
1593
+ "type": "zip",
1594
+ "url": "https://api.github.com/repos/symfony/translation/zipball/a04209ba0d1391c828e5b2373181dac63c52ee70",
1595
+ "reference": "a04209ba0d1391c828e5b2373181dac63c52ee70",
1596
+ "shasum": ""
1597
+ },
1598
+ "require": {
1599
+ "php": ">=7.2.5",
1600
+ "symfony/polyfill-mbstring": "~1.0",
1601
+ "symfony/polyfill-php80": "^1.15",
1602
+ "symfony/translation-contracts": "^2.3"
1603
+ },
1604
+ "conflict": {
1605
+ "symfony/config": "<4.4",
1606
+ "symfony/dependency-injection": "<5.0",
1607
+ "symfony/http-kernel": "<5.0",
1608
+ "symfony/twig-bundle": "<5.0",
1609
+ "symfony/yaml": "<4.4"
1610
+ },
1611
+ "provide": {
1612
+ "symfony/translation-implementation": "2.0"
1613
+ },
1614
+ "require-dev": {
1615
+ "psr/log": "~1.0",
1616
+ "symfony/config": "^4.4|^5.0",
1617
+ "symfony/console": "^4.4|^5.0",
1618
+ "symfony/dependency-injection": "^5.0",
1619
+ "symfony/finder": "^4.4|^5.0",
1620
+ "symfony/http-kernel": "^5.0",
1621
+ "symfony/intl": "^4.4|^5.0",
1622
+ "symfony/service-contracts": "^1.1.2|^2",
1623
+ "symfony/yaml": "^4.4|^5.0"
1624
+ },
1625
+ "suggest": {
1626
+ "psr/log-implementation": "To use logging capability in translator",
1627
+ "symfony/config": "",
1628
+ "symfony/yaml": ""
1629
+ },
1630
+ "time": "2020-12-08T17:03:37+00:00",
1631
+ "type": "library",
1632
+ "installation-source": "dist",
1633
+ "autoload": {
1634
+ "files": [
1635
+ "Resources/functions.php"
1636
+ ],
1637
+ "psr-4": {
1638
+ "Symfony\\Component\\Translation\\": ""
1639
+ },
1640
+ "exclude-from-classmap": [
1641
+ "/Tests/"
1642
+ ]
1643
+ },
1644
+ "notification-url": "https://packagist.org/downloads/",
1645
+ "license": [
1646
+ "MIT"
1647
+ ],
1648
+ "authors": [
1649
+ {
1650
+ "name": "Fabien Potencier",
1651
+ "email": "fabien@symfony.com"
1652
+ },
1653
+ {
1654
+ "name": "Symfony Community",
1655
+ "homepage": "https://symfony.com/contributors"
1656
+ }
1657
+ ],
1658
+ "description": "Symfony Translation Component",
1659
+ "homepage": "https://symfony.com",
1660
+ "support": {
1661
+ "source": "https://github.com/symfony/translation/tree/v5.2.1"
1662
+ },
1663
+ "funding": [
1664
+ {
1665
+ "url": "https://symfony.com/sponsor",
1666
+ "type": "custom"
1667
+ },
1668
+ {
1669
+ "url": "https://github.com/fabpot",
1670
+ "type": "github"
1671
+ },
1672
+ {
1673
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
1674
+ "type": "tidelift"
1675
+ }
1676
+ ],
1677
+ "install-path": "../symfony/translation"
1678
+ },
1679
+ {
1680
+ "name": "symfony/translation-contracts",
1681
+ "version": "v2.3.0",
1682
+ "version_normalized": "2.3.0.0",
1683
+ "source": {
1684
+ "type": "git",
1685
+ "url": "https://github.com/symfony/translation-contracts.git",
1686
+ "reference": "e2eaa60b558f26a4b0354e1bbb25636efaaad105"
1687
+ },
1688
+ "dist": {
1689
+ "type": "zip",
1690
+ "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/e2eaa60b558f26a4b0354e1bbb25636efaaad105",
1691
+ "reference": "e2eaa60b558f26a4b0354e1bbb25636efaaad105",
1692
+ "shasum": ""
1693
+ },
1694
+ "require": {
1695
+ "php": ">=7.2.5"
1696
+ },
1697
+ "suggest": {
1698
+ "symfony/translation-implementation": ""
1699
+ },
1700
+ "time": "2020-09-28T13:05:58+00:00",
1701
+ "type": "library",
1702
+ "extra": {
1703
+ "branch-alias": {
1704
+ "dev-master": "2.3-dev"
1705
+ },
1706
+ "thanks": {
1707
+ "name": "symfony/contracts",
1708
+ "url": "https://github.com/symfony/contracts"
1709
+ }
1710
+ },
1711
+ "installation-source": "dist",
1712
+ "autoload": {
1713
+ "psr-4": {
1714
+ "Symfony\\Contracts\\Translation\\": ""
1715
+ }
1716
+ },
1717
+ "notification-url": "https://packagist.org/downloads/",
1718
+ "license": [
1719
+ "MIT"
1720
+ ],
1721
+ "authors": [
1722
+ {
1723
+ "name": "Nicolas Grekas",
1724
+ "email": "p@tchwork.com"
1725
+ },
1726
+ {
1727
+ "name": "Symfony Community",
1728
+ "homepage": "https://symfony.com/contributors"
1729
+ }
1730
+ ],
1731
+ "description": "Generic abstractions related to translation",
1732
+ "homepage": "https://symfony.com",
1733
+ "keywords": [
1734
+ "abstractions",
1735
+ "contracts",
1736
+ "decoupling",
1737
+ "interfaces",
1738
+ "interoperability",
1739
+ "standards"
1740
+ ],
1741
+ "funding": [
1742
+ {
1743
+ "url": "https://symfony.com/sponsor",
1744
+ "type": "custom"
1745
+ },
1746
+ {
1747
+ "url": "https://github.com/fabpot",
1748
+ "type": "github"
1749
+ },
1750
+ {
1751
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
1752
+ "type": "tidelift"
1753
+ }
1754
+ ],
1755
+ "install-path": "../symfony/translation-contracts"
1756
+ }
1757
+ ],
1758
+ "dev": true,
1759
+ "dev-package-names": []
1760
+ }
vendor/composer/installed.php ADDED
@@ -0,0 +1,276 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php return array (
2
+ 'root' =>
3
+ array (
4
+ 'pretty_version' => 'dev-master',
5
+ 'version' => 'dev-master',
6
+ 'aliases' =>
7
+ array (
8
+ ),
9
+ 'reference' => 'f463c1667aa5486af368886f2f4f39a985c75b5b',
10
+ 'name' => 'moonstonemedia/simple-calendar',
11
+ ),
12
+ 'versions' =>
13
+ array (
14
+ 'composer/installers' =>
15
+ array (
16
+ 'pretty_version' => 'v1.9.0',
17
+ 'version' => '1.9.0.0',
18
+ 'aliases' =>
19
+ array (
20
+ ),
21
+ 'reference' => 'b93bcf0fa1fccb0b7d176b0967d969691cd74cca',
22
+ ),
23
+ 'erusev/parsedown' =>
24
+ array (
25
+ 'pretty_version' => '1.7.4',
26
+ 'version' => '1.7.4.0',
27
+ 'aliases' =>
28
+ array (
29
+ ),
30
+ 'reference' => 'cb17b6477dfff935958ba01325f2e8a2bfa6dab3',
31
+ ),
32
+ 'firebase/php-jwt' =>
33
+ array (
34
+ 'pretty_version' => 'v5.2.0',
35
+ 'version' => '5.2.0.0',
36
+ 'aliases' =>
37
+ array (
38
+ ),
39
+ 'reference' => 'feb0e820b8436873675fd3aca04f3728eb2185cb',
40
+ ),
41
+ 'google/apiclient' =>
42
+ array (
43
+ 'pretty_version' => 'v2.8.3',
44
+ 'version' => '2.8.3.0',
45
+ 'aliases' =>
46
+ array (
47
+ ),
48
+ 'reference' => '81696e6206322e38c643cfcc96c4494ccfef8a32',
49
+ ),
50
+ 'google/apiclient-services' =>
51
+ array (
52
+ 'pretty_version' => 'v0.156',
53
+ 'version' => '0.156.0.0',
54
+ 'aliases' =>
55
+ array (
56
+ ),
57
+ 'reference' => '2f5e54fdef034f856208328126bddd8376dae4b3',
58
+ ),
59
+ 'google/auth' =>
60
+ array (
61
+ 'pretty_version' => 'v1.14.3',
62
+ 'version' => '1.14.3.0',
63
+ 'aliases' =>
64
+ array (
65
+ ),
66
+ 'reference' => 'c1503299c779af0cbc99b43788f75930988852cf',
67
+ ),
68
+ 'guzzlehttp/guzzle' =>
69
+ array (
70
+ 'pretty_version' => '6.5.5',
71
+ 'version' => '6.5.5.0',
72
+ 'aliases' =>
73
+ array (
74
+ ),
75
+ 'reference' => '9d4290de1cfd701f38099ef7e183b64b4b7b0c5e',
76
+ ),
77
+ 'guzzlehttp/promises' =>
78
+ array (
79
+ 'pretty_version' => '1.4.0',
80
+ 'version' => '1.4.0.0',
81
+ 'aliases' =>
82
+ array (
83
+ ),
84
+ 'reference' => '60d379c243457e073cff02bc323a2a86cb355631',
85
+ ),
86
+ 'guzzlehttp/psr7' =>
87
+ array (
88
+ 'pretty_version' => '1.7.0',
89
+ 'version' => '1.7.0.0',
90
+ 'aliases' =>
91
+ array (
92
+ ),
93
+ 'reference' => '53330f47520498c0ae1f61f7e2c90f55690c06a3',
94
+ ),
95
+ 'mexitek/phpcolors' =>
96
+ array (
97
+ 'pretty_version' => 'dev-master',
98
+ 'version' => 'dev-master',
99
+ 'aliases' =>
100
+ array (
101
+ 0 => '9999999-dev',
102
+ ),
103
+ 'reference' => '4b1ccc920b5fc3749a575c171d2f12fca0ecfded',
104
+ ),
105
+ 'monolog/monolog' =>
106
+ array (
107
+ 'pretty_version' => '2.2.0',
108
+ 'version' => '2.2.0.0',
109
+ 'aliases' =>
110
+ array (
111
+ ),
112
+ 'reference' => '1cb1cde8e8dd0f70cc0fe51354a59acad9302084',
113
+ ),
114
+ 'moonstonemedia/simple-calendar' =>
115
+ array (
116
+ 'pretty_version' => 'dev-master',
117
+ 'version' => 'dev-master',
118
+ 'aliases' =>
119
+ array (
120
+ ),
121
+ 'reference' => 'f463c1667aa5486af368886f2f4f39a985c75b5b',
122
+ ),
123
+ 'nesbot/carbon' =>
124
+ array (
125
+ 'pretty_version' => '2.42.0',
126
+ 'version' => '2.42.0.0',
127
+ 'aliases' =>
128
+ array (
129
+ ),
130
+ 'reference' => 'd0463779663437392fe42ff339ebc0213bd55498',
131
+ ),
132
+ 'phpseclib/phpseclib' =>
133
+ array (
134
+ 'pretty_version' => '2.0.30',
135
+ 'version' => '2.0.30.0',
136
+ 'aliases' =>
137
+ array (
138
+ ),
139
+ 'reference' => '136b9ca7eebef78be14abf90d65c5e57b6bc5d36',
140
+ ),
141
+ 'psr/cache' =>
142
+ array (
143
+ 'pretty_version' => '1.0.1',
144
+ 'version' => '1.0.1.0',
145
+ 'aliases' =>
146
+ array (
147
+ ),
148
+ 'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8',
149
+ ),
150
+ 'psr/http-message' =>
151
+ array (
152
+ 'pretty_version' => '1.0.1',
153
+ 'version' => '1.0.1.0',
154
+ 'aliases' =>
155
+ array (
156
+ ),
157
+ 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363',
158
+ ),
159
+ 'psr/http-message-implementation' =>
160
+ array (
161
+ 'provided' =>
162
+ array (
163
+ 0 => '1.0',
164
+ ),
165
+ ),
166
+ 'psr/log' =>
167
+ array (
168
+ 'pretty_version' => '1.1.3',
169
+ 'version' => '1.1.3.0',
170
+ 'aliases' =>
171
+ array (
172
+ ),
173
+ 'reference' => '0f73288fd15629204f9d42b7055f72dacbe811fc',
174
+ ),
175
+ 'psr/log-implementation' =>
176
+ array (
177
+ 'provided' =>
178
+ array (
179
+ 0 => '1.0.0',
180
+ ),
181
+ ),
182
+ 'ralouphie/getallheaders' =>
183
+ array (
184
+ 'pretty_version' => '3.0.3',
185
+ 'version' => '3.0.3.0',
186
+ 'aliases' =>
187
+ array (
188
+ ),
189
+ 'reference' => '120b605dfeb996808c31b6477290a714d356e822',
190
+ ),
191
+ 'roundcube/plugin-installer' =>
192
+ array (
193
+ 'replaced' =>
194
+ array (
195
+ 0 => '*',
196
+ ),
197
+ ),
198
+ 'shama/baton' =>
199
+ array (
200
+ 'replaced' =>
201
+ array (
202
+ 0 => '*',
203
+ ),
204
+ ),
205
+ 'symfony/polyfill-intl-idn' =>
206
+ array (
207
+ 'pretty_version' => 'v1.20.0',
208
+ 'version' => '1.20.0.0',
209
+ 'aliases' =>
210
+ array (
211
+ ),
212
+ 'reference' => '3b75acd829741c768bc8b1f84eb33265e7cc5117',
213
+ ),
214
+ 'symfony/polyfill-intl-normalizer' =>
215
+ array (
216
+ 'pretty_version' => 'v1.20.0',
217
+ 'version' => '1.20.0.0',
218
+ 'aliases' =>
219
+ array (
220
+ ),
221
+ 'reference' => '727d1096295d807c309fb01a851577302394c897',
222
+ ),
223
+ 'symfony/polyfill-mbstring' =>
224
+ array (
225
+ 'pretty_version' => 'v1.20.0',
226
+ 'version' => '1.20.0.0',
227
+ 'aliases' =>
228
+ array (
229
+ ),
230
+ 'reference' => '39d483bdf39be819deabf04ec872eb0b2410b531',
231
+ ),
232
+ 'symfony/polyfill-php72' =>
233
+ array (
234
+ 'pretty_version' => 'v1.20.0',
235
+ 'version' => '1.20.0.0',
236
+ 'aliases' =>
237
+ array (
238
+ ),
239
+ 'reference' => 'cede45fcdfabdd6043b3592e83678e42ec69e930',
240
+ ),
241
+ 'symfony/polyfill-php80' =>
242
+ array (
243
+ 'pretty_version' => 'v1.20.0',
244
+ 'version' => '1.20.0.0',
245
+ 'aliases' =>
246
+ array (
247
+ ),
248
+ 'reference' => 'e70aa8b064c5b72d3df2abd5ab1e90464ad009de',
249
+ ),
250
+ 'symfony/translation' =>
251
+ array (
252
+ 'pretty_version' => 'v5.2.1',
253
+ 'version' => '5.2.1.0',
254
+ 'aliases' =>
255
+ array (
256
+ ),
257
+ 'reference' => 'a04209ba0d1391c828e5b2373181dac63c52ee70',
258
+ ),
259
+ 'symfony/translation-contracts' =>
260
+ array (
261
+ 'pretty_version' => 'v2.3.0',
262
+ 'version' => '2.3.0.0',
263
+ 'aliases' =>
264
+ array (
265
+ ),
266
+ 'reference' => 'e2eaa60b558f26a4b0354e1bbb25636efaaad105',
267
+ ),
268
+ 'symfony/translation-implementation' =>
269
+ array (
270
+ 'provided' =>
271
+ array (
272
+ 0 => '2.0',
273
+ ),
274
+ ),
275
+ ),
276
+ );
vendor/composer/platform_check.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // platform_check.php @generated by Composer
4
+
5
+ $issues = array();
6
+
7
+ if (!(PHP_VERSION_ID >= 70300)) {
8
+ $issues[] = 'Your Composer dependencies require a PHP version ">= 7.3.0". You are running ' . PHP_VERSION . '.';
9
+ }
10
+
11
+ if ($issues) {
12
+ if (!headers_sent()) {
13
+ header('HTTP/1.1 500 Internal Server Error');
14
+ }
15
+ if (!ini_get('display_errors')) {
16
+ if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
17
+ fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
18
+ } elseif (!headers_sent()) {
19
+ echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
20
+ }
21
+ }
22
+ trigger_error(
23
+ 'Composer detected issues in your platform: ' . implode(' ', $issues),
24
+ E_USER_ERROR
25
+ );
26
+ }
vendor/google/apiclient-services/src/Google/Service/Calendar.php CHANGED
@@ -54,7 +54,7 @@ class Google_Service_Calendar extends Google_Service
54
  public $events;
55
  public $freebusy;
56
  public $settings;
57
-
58
  /**
59
  * Constructs the internal representation of the Calendar service.
60
  *
@@ -129,19 +129,19 @@ class Google_Service_Calendar extends Google_Service
129
  'type' => 'string',
130
  'required' => true,
131
  ),
132
- 'syncToken' => array(
133
- 'location' => 'query',
134
- 'type' => 'string',
135
- ),
136
  'maxResults' => array(
137
  'location' => 'query',
138
  'type' => 'integer',
139
  ),
 
 
 
 
140
  'showDeleted' => array(
141
  'location' => 'query',
142
  'type' => 'boolean',
143
  ),
144
- 'pageToken' => array(
145
  'location' => 'query',
146
  'type' => 'string',
147
  ),
@@ -193,21 +193,21 @@ class Google_Service_Calendar extends Google_Service
193
  'type' => 'string',
194
  'required' => true,
195
  ),
196
- 'showDeleted' => array(
197
  'location' => 'query',
198
- 'type' => 'boolean',
199
  ),
200
- 'syncToken' => array(
201
  'location' => 'query',
202
  'type' => 'string',
203
  ),
204
- 'pageToken' => array(
205
  'location' => 'query',
206
- 'type' => 'string',
207
  ),
208
- 'maxResults' => array(
209
  'location' => 'query',
210
- 'type' => 'integer',
211
  ),
212
  ),
213
  ),
@@ -253,30 +253,30 @@ class Google_Service_Calendar extends Google_Service
253
  'path' => 'users/me/calendarList',
254
  'httpMethod' => 'GET',
255
  'parameters' => array(
256
- 'showHidden' => array(
257
  'location' => 'query',
258
- 'type' => 'boolean',
259
  ),
260
  'minAccessRole' => array(
261
  'location' => 'query',
262
  'type' => 'string',
263
  ),
264
- 'maxResults' => array(
265
- 'location' => 'query',
266
- 'type' => 'integer',
267
- ),
268
  'pageToken' => array(
269
  'location' => 'query',
270
  'type' => 'string',
271
  ),
272
- 'syncToken' => array(
273
  'location' => 'query',
274
- 'type' => 'string',
275
  ),
276
- 'showDeleted' => array(
277
  'location' => 'query',
278
  'type' => 'boolean',
279
  ),
 
 
 
 
280
  ),
281
  ),'patch' => array(
282
  'path' => 'users/me/calendarList/{calendarId}',
@@ -310,10 +310,6 @@ class Google_Service_Calendar extends Google_Service
310
  'path' => 'users/me/calendarList/watch',
311
  'httpMethod' => 'POST',
312
  'parameters' => array(
313
- 'pageToken' => array(
314
- 'location' => 'query',
315
- 'type' => 'string',
316
- ),
317
  'maxResults' => array(
318
  'location' => 'query',
319
  'type' => 'integer',
@@ -322,18 +318,22 @@ class Google_Service_Calendar extends Google_Service
322
  'location' => 'query',
323
  'type' => 'string',
324
  ),
325
- 'showDeleted' => array(
326
  'location' => 'query',
327
- 'type' => 'boolean',
328
  ),
329
- 'syncToken' => array(
330
  'location' => 'query',
331
- 'type' => 'string',
332
  ),
333
  'showHidden' => array(
334
  'location' => 'query',
335
  'type' => 'boolean',
336
  ),
 
 
 
 
337
  ),
338
  ),
339
  )
@@ -451,14 +451,14 @@ class Google_Service_Calendar extends Google_Service
451
  'type' => 'string',
452
  'required' => true,
453
  ),
454
- 'sendUpdates' => array(
455
- 'location' => 'query',
456
- 'type' => 'string',
457
- ),
458
  'sendNotifications' => array(
459
  'location' => 'query',
460
  'type' => 'boolean',
461
  ),
 
 
 
 
462
  ),
463
  ),'get' => array(
464
  'path' => 'calendars/{calendarId}/events/{eventId}',
@@ -478,14 +478,14 @@ class Google_Service_Calendar extends Google_Service
478
  'location' => 'query',
479
  'type' => 'boolean',
480
  ),
481
- 'timeZone' => array(
482
- 'location' => 'query',
483
- 'type' => 'string',
484
- ),
485
  'maxAttendees' => array(
486
  'location' => 'query',
487
  'type' => 'integer',
488
  ),
 
 
 
 
489
  ),
490
  ),'import' => array(
491
  'path' => 'calendars/{calendarId}/events/import',
@@ -496,14 +496,14 @@ class Google_Service_Calendar extends Google_Service
496
  'type' => 'string',
497
  'required' => true,
498
  ),
499
- 'supportsAttachments' => array(
500
- 'location' => 'query',
501
- 'type' => 'boolean',
502
- ),
503
  'conferenceDataVersion' => array(
504
  'location' => 'query',
505
  'type' => 'integer',
506
  ),
 
 
 
 
507
  ),
508
  ),'insert' => array(
509
  'path' => 'calendars/{calendarId}/events',
@@ -514,23 +514,23 @@ class Google_Service_Calendar extends Google_Service
514
  'type' => 'string',
515
  'required' => true,
516
  ),
517
- 'supportsAttachments' => array(
518
  'location' => 'query',
519
- 'type' => 'boolean',
520
  ),
521
  'maxAttendees' => array(
522
  'location' => 'query',
523
  'type' => 'integer',
524
  ),
525
- 'conferenceDataVersion' => array(
526
  'location' => 'query',
527
- 'type' => 'integer',
528
  ),
529
  'sendUpdates' => array(
530
  'location' => 'query',
531
  'type' => 'string',
532
  ),
533
- 'sendNotifications' => array(
534
  'location' => 'query',
535
  'type' => 'boolean',
536
  ),
@@ -549,15 +549,19 @@ class Google_Service_Calendar extends Google_Service
549
  'type' => 'string',
550
  'required' => true,
551
  ),
552
- 'maxResults' => array(
 
 
 
 
553
  'location' => 'query',
554
  'type' => 'integer',
555
  ),
556
- 'alwaysIncludeEmail' => array(
557
  'location' => 'query',
558
- 'type' => 'boolean',
559
  ),
560
- 'timeMin' => array(
561
  'location' => 'query',
562
  'type' => 'string',
563
  ),
@@ -565,23 +569,19 @@ class Google_Service_Calendar extends Google_Service
565
  'location' => 'query',
566
  'type' => 'string',
567
  ),
568
- 'timeZone' => array(
569
  'location' => 'query',
570
- 'type' => 'string',
571
  ),
572
  'timeMax' => array(
573
  'location' => 'query',
574
  'type' => 'string',
575
  ),
576
- 'maxAttendees' => array(
577
- 'location' => 'query',
578
- 'type' => 'integer',
579
- ),
580
- 'showDeleted' => array(
581
  'location' => 'query',
582
- 'type' => 'boolean',
583
  ),
584
- 'originalStart' => array(
585
  'location' => 'query',
586
  'type' => 'string',
587
  ),
@@ -595,73 +595,73 @@ class Google_Service_Calendar extends Google_Service
595
  'type' => 'string',
596
  'required' => true,
597
  ),
598
- 'timeMin' => array(
599
  'location' => 'query',
600
- 'type' => 'string',
601
  ),
602
- 'privateExtendedProperty' => array(
603
  'location' => 'query',
604
  'type' => 'string',
605
- 'repeated' => true,
606
  ),
607
- 'timeZone' => array(
608
  'location' => 'query',
609
- 'type' => 'string',
610
  ),
611
  'maxResults' => array(
612
  'location' => 'query',
613
  'type' => 'integer',
614
  ),
615
- 'alwaysIncludeEmail' => array(
616
  'location' => 'query',
617
- 'type' => 'boolean',
618
  ),
619
- 'showDeleted' => array(
620
  'location' => 'query',
621
- 'type' => 'boolean',
622
  ),
623
- 'q' => array(
624
  'location' => 'query',
625
  'type' => 'string',
 
626
  ),
627
- 'syncToken' => array(
628
  'location' => 'query',
629
  'type' => 'string',
630
  ),
631
- 'updatedMin' => array(
632
  'location' => 'query',
633
  'type' => 'string',
 
634
  ),
635
- 'pageToken' => array(
636
  'location' => 'query',
637
- 'type' => 'string',
638
  ),
639
- 'iCalUID' => array(
640
  'location' => 'query',
641
- 'type' => 'string',
642
  ),
643
- 'maxAttendees' => array(
644
  'location' => 'query',
645
- 'type' => 'integer',
646
  ),
647
- 'orderBy' => array(
648
  'location' => 'query',
649
  'type' => 'string',
650
  ),
651
- 'sharedExtendedProperty' => array(
652
  'location' => 'query',
653
  'type' => 'string',
654
- 'repeated' => true,
655
  ),
656
- 'singleEvents' => array(
657
  'location' => 'query',
658
- 'type' => 'boolean',
659
  ),
660
- 'showHiddenInvitations' => array(
661
  'location' => 'query',
662
- 'type' => 'boolean',
663
  ),
664
- 'timeMax' => array(
665
  'location' => 'query',
666
  'type' => 'string',
667
  ),
@@ -708,10 +708,6 @@ class Google_Service_Calendar extends Google_Service
708
  'type' => 'string',
709
  'required' => true,
710
  ),
711
- 'supportsAttachments' => array(
712
- 'location' => 'query',
713
- 'type' => 'boolean',
714
- ),
715
  'alwaysIncludeEmail' => array(
716
  'location' => 'query',
717
  'type' => 'boolean',
@@ -720,18 +716,22 @@ class Google_Service_Calendar extends Google_Service
720
  'location' => 'query',
721
  'type' => 'integer',
722
  ),
723
- 'sendNotifications' => array(
724
- 'location' => 'query',
725
- 'type' => 'boolean',
726
- ),
727
  'maxAttendees' => array(
728
  'location' => 'query',
729
  'type' => 'integer',
730
  ),
 
 
 
 
731
  'sendUpdates' => array(
732
  'location' => 'query',
733
  'type' => 'string',
734
  ),
 
 
 
 
735
  ),
736
  ),'quickAdd' => array(
737
  'path' => 'calendars/{calendarId}/events/quickAdd',
@@ -770,11 +770,7 @@ class Google_Service_Calendar extends Google_Service
770
  'type' => 'string',
771
  'required' => true,
772
  ),
773
- 'sendUpdates' => array(
774
- 'location' => 'query',
775
- 'type' => 'string',
776
- ),
777
- 'supportsAttachments' => array(
778
  'location' => 'query',
779
  'type' => 'boolean',
780
  ),
@@ -782,17 +778,21 @@ class Google_Service_Calendar extends Google_Service
782
  'location' => 'query',
783
  'type' => 'integer',
784
  ),
785
- 'alwaysIncludeEmail' => array(
786
  'location' => 'query',
787
- 'type' => 'boolean',
788
  ),
789
  'sendNotifications' => array(
790
  'location' => 'query',
791
  'type' => 'boolean',
792
  ),
793
- 'maxAttendees' => array(
794
  'location' => 'query',
795
- 'type' => 'integer',
 
 
 
 
796
  ),
797
  ),
798
  ),'watch' => array(
@@ -804,24 +804,19 @@ class Google_Service_Calendar extends Google_Service
804
  'type' => 'string',
805
  'required' => true,
806
  ),
807
- 'pageToken' => array(
808
- 'location' => 'query',
809
- 'type' => 'string',
810
- ),
811
- 'sharedExtendedProperty' => array(
812
  'location' => 'query',
813
- 'type' => 'string',
814
- 'repeated' => true,
815
  ),
816
- 'timeZone' => array(
817
  'location' => 'query',
818
  'type' => 'string',
819
  ),
820
- 'maxResults' => array(
821
  'location' => 'query',
822
  'type' => 'integer',
823
  ),
824
- 'maxAttendees' => array(
825
  'location' => 'query',
826
  'type' => 'integer',
827
  ),
@@ -829,23 +824,29 @@ class Google_Service_Calendar extends Google_Service
829
  'location' => 'query',
830
  'type' => 'string',
831
  ),
832
- 'iCalUID' => array(
833
  'location' => 'query',
834
  'type' => 'string',
835
  ),
836
- 'updatedMin' => array(
837
  'location' => 'query',
838
  'type' => 'string',
 
839
  ),
840
  'q' => array(
841
  'location' => 'query',
842
  'type' => 'string',
843
  ),
844
- 'syncToken' => array(
845
  'location' => 'query',
846
  'type' => 'string',
 
847
  ),
848
- 'alwaysIncludeEmail' => array(
 
 
 
 
849
  'location' => 'query',
850
  'type' => 'boolean',
851
  ),
@@ -853,26 +854,25 @@ class Google_Service_Calendar extends Google_Service
853
  'location' => 'query',
854
  'type' => 'boolean',
855
  ),
856
- 'privateExtendedProperty' => array(
857
  'location' => 'query',
858
  'type' => 'string',
859
- 'repeated' => true,
860
  ),
861
- 'timeMin' => array(
862
  'location' => 'query',
863
  'type' => 'string',
864
  ),
865
- 'timeMax' => array(
866
  'location' => 'query',
867
  'type' => 'string',
868
  ),
869
- 'showDeleted' => array(
870
  'location' => 'query',
871
- 'type' => 'boolean',
872
  ),
873
- 'showHiddenInvitations' => array(
874
  'location' => 'query',
875
- 'type' => 'boolean',
876
  ),
877
  ),
878
  ),
@@ -913,6 +913,10 @@ class Google_Service_Calendar extends Google_Service
913
  'path' => 'users/me/settings',
914
  'httpMethod' => 'GET',
915
  'parameters' => array(
 
 
 
 
916
  'pageToken' => array(
917
  'location' => 'query',
918
  'type' => 'string',
@@ -921,19 +925,11 @@ class Google_Service_Calendar extends Google_Service
921
  'location' => 'query',
922
  'type' => 'string',
923
  ),
924
- 'maxResults' => array(
925
- 'location' => 'query',
926
- 'type' => 'integer',
927
- ),
928
  ),
929
  ),'watch' => array(
930
  'path' => 'users/me/settings/watch',
931
  'httpMethod' => 'POST',
932
  'parameters' => array(
933
- 'syncToken' => array(
934
- 'location' => 'query',
935
- 'type' => 'string',
936
- ),
937
  'maxResults' => array(
938
  'location' => 'query',
939
  'type' => 'integer',
@@ -942,6 +938,10 @@ class Google_Service_Calendar extends Google_Service
942
  'location' => 'query',
943
  'type' => 'string',
944
  ),
 
 
 
 
945
  ),
946
  ),
947
  )
54
  public $events;
55
  public $freebusy;
56
  public $settings;
57
+
58
  /**
59
  * Constructs the internal representation of the Calendar service.
60
  *
129
  'type' => 'string',
130
  'required' => true,
131
  ),
 
 
 
 
132
  'maxResults' => array(
133
  'location' => 'query',
134
  'type' => 'integer',
135
  ),
136
+ 'pageToken' => array(
137
+ 'location' => 'query',
138
+ 'type' => 'string',
139
+ ),
140
  'showDeleted' => array(
141
  'location' => 'query',
142
  'type' => 'boolean',
143
  ),
144
+ 'syncToken' => array(
145
  'location' => 'query',
146
  'type' => 'string',
147
  ),
193
  'type' => 'string',
194
  'required' => true,
195
  ),
196
+ 'maxResults' => array(
197
  'location' => 'query',
198
+ 'type' => 'integer',
199
  ),
200
+ 'pageToken' => array(
201
  'location' => 'query',
202
  'type' => 'string',
203
  ),
204
+ 'showDeleted' => array(
205
  'location' => 'query',
206
+ 'type' => 'boolean',
207
  ),
208
+ 'syncToken' => array(
209
  'location' => 'query',
210
+ 'type' => 'string',
211
  ),
212
  ),
213
  ),
253
  'path' => 'users/me/calendarList',
254
  'httpMethod' => 'GET',
255
  'parameters' => array(
256
+ 'maxResults' => array(
257
  'location' => 'query',
258
+ 'type' => 'integer',
259
  ),
260
  'minAccessRole' => array(
261
  'location' => 'query',
262
  'type' => 'string',
263
  ),
 
 
 
 
264
  'pageToken' => array(
265
  'location' => 'query',
266
  'type' => 'string',
267
  ),
268
+ 'showDeleted' => array(
269
  'location' => 'query',
270
+ 'type' => 'boolean',
271
  ),
272
+ 'showHidden' => array(
273
  'location' => 'query',
274
  'type' => 'boolean',
275
  ),
276
+ 'syncToken' => array(
277
+ 'location' => 'query',
278
+ 'type' => 'string',
279
+ ),
280
  ),
281
  ),'patch' => array(
282
  'path' => 'users/me/calendarList/{calendarId}',
310
  'path' => 'users/me/calendarList/watch',
311
  'httpMethod' => 'POST',
312
  'parameters' => array(
 
 
 
 
313
  'maxResults' => array(
314
  'location' => 'query',
315
  'type' => 'integer',
318
  'location' => 'query',
319
  'type' => 'string',
320
  ),
321
+ 'pageToken' => array(
322
  'location' => 'query',
323
+ 'type' => 'string',
324
  ),
325
+ 'showDeleted' => array(
326
  'location' => 'query',
327
+ 'type' => 'boolean',
328
  ),
329
  'showHidden' => array(
330
  'location' => 'query',
331
  'type' => 'boolean',
332
  ),
333
+ 'syncToken' => array(
334
+ 'location' => 'query',
335
+ 'type' => 'string',
336
+ ),
337
  ),
338
  ),
339
  )
451
  'type' => 'string',
452
  'required' => true,
453
  ),
 
 
 
 
454
  'sendNotifications' => array(
455
  'location' => 'query',
456
  'type' => 'boolean',
457
  ),
458
+ 'sendUpdates' => array(
459
+ 'location' => 'query',
460
+ 'type' => 'string',
461
+ ),
462
  ),
463
  ),'get' => array(
464
  'path' => 'calendars/{calendarId}/events/{eventId}',
478
  'location' => 'query',
479
  'type' => 'boolean',
480
  ),
 
 
 
 
481
  'maxAttendees' => array(
482
  'location' => 'query',
483
  'type' => 'integer',
484
  ),
485
+ 'timeZone' => array(
486
+ 'location' => 'query',
487
+ 'type' => 'string',
488
+ ),
489
  ),
490
  ),'import' => array(
491
  'path' => 'calendars/{calendarId}/events/import',
496
  'type' => 'string',
497
  'required' => true,
498
  ),
 
 
 
 
499
  'conferenceDataVersion' => array(
500
  'location' => 'query',
501
  'type' => 'integer',
502
  ),
503
+ 'supportsAttachments' => array(
504
+ 'location' => 'query',
505
+ 'type' => 'boolean',
506
+ ),
507
  ),
508
  ),'insert' => array(
509
  'path' => 'calendars/{calendarId}/events',
514
  'type' => 'string',
515
  'required' => true,
516
  ),
517
+ 'conferenceDataVersion' => array(
518
  'location' => 'query',
519
+ 'type' => 'integer',
520
  ),
521
  'maxAttendees' => array(
522
  'location' => 'query',
523
  'type' => 'integer',
524
  ),
525
+ 'sendNotifications' => array(
526
  'location' => 'query',
527
+ 'type' => 'boolean',
528
  ),
529
  'sendUpdates' => array(
530
  'location' => 'query',
531
  'type' => 'string',
532
  ),
533
+ 'supportsAttachments' => array(
534
  'location' => 'query',
535
  'type' => 'boolean',
536
  ),
549
  'type' => 'string',
550
  'required' => true,
551
  ),
552
+ 'alwaysIncludeEmail' => array(
553
+ 'location' => 'query',
554
+ 'type' => 'boolean',
555
+ ),
556
+ 'maxAttendees' => array(
557
  'location' => 'query',
558
  'type' => 'integer',
559
  ),
560
+ 'maxResults' => array(
561
  'location' => 'query',
562
+ 'type' => 'integer',
563
  ),
564
+ 'originalStart' => array(
565
  'location' => 'query',
566
  'type' => 'string',
567
  ),
569
  'location' => 'query',
570
  'type' => 'string',
571
  ),
572
+ 'showDeleted' => array(
573
  'location' => 'query',
574
+ 'type' => 'boolean',
575
  ),
576
  'timeMax' => array(
577
  'location' => 'query',
578
  'type' => 'string',
579
  ),
580
+ 'timeMin' => array(
 
 
 
 
581
  'location' => 'query',
582
+ 'type' => 'string',
583
  ),
584
+ 'timeZone' => array(
585
  'location' => 'query',
586
  'type' => 'string',
587
  ),
595
  'type' => 'string',
596
  'required' => true,
597
  ),
598
+ 'alwaysIncludeEmail' => array(
599
  'location' => 'query',
600
+ 'type' => 'boolean',
601
  ),
602
+ 'iCalUID' => array(
603
  'location' => 'query',
604
  'type' => 'string',
 
605
  ),
606
+ 'maxAttendees' => array(
607
  'location' => 'query',
608
+ 'type' => 'integer',
609
  ),
610
  'maxResults' => array(
611
  'location' => 'query',
612
  'type' => 'integer',
613
  ),
614
+ 'orderBy' => array(
615
  'location' => 'query',
616
+ 'type' => 'string',
617
  ),
618
+ 'pageToken' => array(
619
  'location' => 'query',
620
+ 'type' => 'string',
621
  ),
622
+ 'privateExtendedProperty' => array(
623
  'location' => 'query',
624
  'type' => 'string',
625
+ 'repeated' => true,
626
  ),
627
+ 'q' => array(
628
  'location' => 'query',
629
  'type' => 'string',
630
  ),
631
+ 'sharedExtendedProperty' => array(
632
  'location' => 'query',
633
  'type' => 'string',
634
+ 'repeated' => true,
635
  ),
636
+ 'showDeleted' => array(
637
  'location' => 'query',
638
+ 'type' => 'boolean',
639
  ),
640
+ 'showHiddenInvitations' => array(
641
  'location' => 'query',
642
+ 'type' => 'boolean',
643
  ),
644
+ 'singleEvents' => array(
645
  'location' => 'query',
646
+ 'type' => 'boolean',
647
  ),
648
+ 'syncToken' => array(
649
  'location' => 'query',
650
  'type' => 'string',
651
  ),
652
+ 'timeMax' => array(
653
  'location' => 'query',
654
  'type' => 'string',
 
655
  ),
656
+ 'timeMin' => array(
657
  'location' => 'query',
658
+ 'type' => 'string',
659
  ),
660
+ 'timeZone' => array(
661
  'location' => 'query',
662
+ 'type' => 'string',
663
  ),
664
+ 'updatedMin' => array(
665
  'location' => 'query',
666
  'type' => 'string',
667
  ),
708
  'type' => 'string',
709
  'required' => true,
710
  ),
 
 
 
 
711
  'alwaysIncludeEmail' => array(
712
  'location' => 'query',
713
  'type' => 'boolean',
716
  'location' => 'query',
717
  'type' => 'integer',
718
  ),
 
 
 
 
719
  'maxAttendees' => array(
720
  'location' => 'query',
721
  'type' => 'integer',
722
  ),
723
+ 'sendNotifications' => array(
724
+ 'location' => 'query',
725
+ 'type' => 'boolean',
726
+ ),
727
  'sendUpdates' => array(
728
  'location' => 'query',
729
  'type' => 'string',
730
  ),
731
+ 'supportsAttachments' => array(
732
+ 'location' => 'query',
733
+ 'type' => 'boolean',
734
+ ),
735
  ),
736
  ),'quickAdd' => array(
737
  'path' => 'calendars/{calendarId}/events/quickAdd',
770
  'type' => 'string',
771
  'required' => true,
772
  ),
773
+ 'alwaysIncludeEmail' => array(
 
 
 
 
774
  'location' => 'query',
775
  'type' => 'boolean',
776
  ),
778
  'location' => 'query',
779
  'type' => 'integer',
780
  ),
781
+ 'maxAttendees' => array(
782
  'location' => 'query',
783
+ 'type' => 'integer',
784
  ),
785
  'sendNotifications' => array(
786
  'location' => 'query',
787
  'type' => 'boolean',
788
  ),
789
+ 'sendUpdates' => array(
790
  'location' => 'query',
791
+ 'type' => 'string',
792
+ ),
793
+ 'supportsAttachments' => array(
794
+ 'location' => 'query',
795
+ 'type' => 'boolean',
796
  ),
797
  ),
798
  ),'watch' => array(
804
  'type' => 'string',
805
  'required' => true,
806
  ),
807
+ 'alwaysIncludeEmail' => array(
 
 
 
 
808
  'location' => 'query',
809
+ 'type' => 'boolean',
 
810
  ),
811
+ 'iCalUID' => array(
812
  'location' => 'query',
813
  'type' => 'string',
814
  ),
815
+ 'maxAttendees' => array(
816
  'location' => 'query',
817
  'type' => 'integer',
818
  ),
819
+ 'maxResults' => array(
820
  'location' => 'query',
821
  'type' => 'integer',
822
  ),
824
  'location' => 'query',
825
  'type' => 'string',
826
  ),
827
+ 'pageToken' => array(
828
  'location' => 'query',
829
  'type' => 'string',
830
  ),
831
+ 'privateExtendedProperty' => array(
832
  'location' => 'query',
833
  'type' => 'string',
834
+ 'repeated' => true,
835
  ),
836
  'q' => array(
837
  'location' => 'query',
838
  'type' => 'string',
839
  ),
840
+ 'sharedExtendedProperty' => array(
841
  'location' => 'query',
842
  'type' => 'string',
843
+ 'repeated' => true,
844
  ),
845
+ 'showDeleted' => array(
846
+ 'location' => 'query',
847
+ 'type' => 'boolean',
848
+ ),
849
+ 'showHiddenInvitations' => array(
850
  'location' => 'query',
851
  'type' => 'boolean',
852
  ),
854
  'location' => 'query',
855
  'type' => 'boolean',
856
  ),
857
+ 'syncToken' => array(
858
  'location' => 'query',
859
  'type' => 'string',
 
860
  ),
861
+ 'timeMax' => array(
862
  'location' => 'query',
863
  'type' => 'string',
864
  ),
865
+ 'timeMin' => array(
866
  'location' => 'query',
867
  'type' => 'string',
868
  ),
869
+ 'timeZone' => array(
870
  'location' => 'query',
871
+ 'type' => 'string',
872
  ),
873
+ 'updatedMin' => array(
874
  'location' => 'query',
875
+ 'type' => 'string',
876
  ),
877
  ),
878
  ),
913
  'path' => 'users/me/settings',
914
  'httpMethod' => 'GET',
915
  'parameters' => array(
916
+ 'maxResults' => array(
917
+ 'location' => 'query',
918
+ 'type' => 'integer',
919
+ ),
920
  'pageToken' => array(
921
  'location' => 'query',
922
  'type' => 'string',
925
  'location' => 'query',
926
  'type' => 'string',
927
  ),
 
 
 
 
928
  ),
929
  ),'watch' => array(
930
  'path' => 'users/me/settings/watch',
931
  'httpMethod' => 'POST',
932
  'parameters' => array(
 
 
 
 
933
  'maxResults' => array(
934
  'location' => 'query',
935
  'type' => 'integer',
938
  'location' => 'query',
939
  'type' => 'string',
940
  ),
941
+ 'syncToken' => array(
942
+ 'location' => 'query',
943
+ 'type' => 'string',
944
+ ),
945
  ),
946
  ),
947
  )
vendor/google/apiclient-services/src/Google/Service/Calendar/Acl.php CHANGED
@@ -34,14 +34,14 @@ class Google_Service_Calendar_Acl extends Google_Collection
34
  return $this->etag;
35
  }
36
  /**
37
- * @param Google_Service_Calendar_AclRule
38
  */
39
  public function setItems($items)
40
  {
41
  $this->items = $items;
42
  }
43
  /**
44
- * @return Google_Service_Calendar_AclRule
45
  */
46
  public function getItems()
47
  {
34
  return $this->etag;
35
  }
36
  /**
37
+ * @param Google_Service_Calendar_AclRule[]
38
  */
39
  public function setItems($items)
40
  {
41
  $this->items = $items;
42
  }
43
  /**
44
+ * @return Google_Service_Calendar_AclRule[]
45
  */
46
  public function getItems()
47
  {
vendor/google/apiclient-services/src/Google/Service/Calendar/CalendarList.php CHANGED
@@ -34,14 +34,14 @@ class Google_Service_Calendar_CalendarList extends Google_Collection
34
  return $this->etag;
35
  }
36
  /**
37
- * @param Google_Service_Calendar_CalendarListEntry
38
  */
39
  public function setItems($items)
40
  {
41
  $this->items = $items;
42
  }
43
  /**
44
- * @return Google_Service_Calendar_CalendarListEntry
45
  */
46
  public function getItems()
47
  {
34
  return $this->etag;
35
  }
36
  /**
37
+ * @param Google_Service_Calendar_CalendarListEntry[]
38
  */
39
  public function setItems($items)
40
  {
41
  $this->items = $items;
42
  }
43
  /**
44
+ * @return Google_Service_Calendar_CalendarListEntry[]
45
  */
46
  public function getItems()
47
  {
vendor/google/apiclient-services/src/Google/Service/Calendar/CalendarListEntry.php CHANGED
@@ -80,14 +80,14 @@ class Google_Service_Calendar_CalendarListEntry extends Google_Collection
80
  return $this->conferenceProperties;
81
  }
82
  /**
83
- * @param Google_Service_Calendar_EventReminder
84
  */
85
  public function setDefaultReminders($defaultReminders)
86
  {
87
  $this->defaultReminders = $defaultReminders;
88
  }
89
  /**
90
- * @return Google_Service_Calendar_EventReminder
91
  */
92
  public function getDefaultReminders()
93
  {
80
  return $this->conferenceProperties;
81
  }
82
  /**
83
+ * @param Google_Service_Calendar_EventReminder[]
84
  */
85
  public function setDefaultReminders($defaultReminders)
86
  {
87
  $this->defaultReminders = $defaultReminders;
88
  }
89
  /**
90
+ * @return Google_Service_Calendar_EventReminder[]
91
  */
92
  public function getDefaultReminders()
93
  {
vendor/google/apiclient-services/src/Google/Service/Calendar/CalendarListEntryNotificationSettings.php CHANGED
@@ -22,14 +22,14 @@ class Google_Service_Calendar_CalendarListEntryNotificationSettings extends Goog
22
  protected $notificationsDataType = 'array';
23
 
24
  /**
25
- * @param Google_Service_Calendar_CalendarNotification
26
  */
27
  public function setNotifications($notifications)
28
  {
29
  $this->notifications = $notifications;
30
  }
31
  /**
32
- * @return Google_Service_Calendar_CalendarNotification
33
  */
34
  public function getNotifications()
35
  {
22
  protected $notificationsDataType = 'array';
23
 
24
  /**
25
+ * @param Google_Service_Calendar_CalendarNotification[]
26
  */
27
  public function setNotifications($notifications)
28
  {
29
  $this->notifications = $notifications;
30
  }
31
  /**
32
+ * @return Google_Service_Calendar_CalendarNotification[]
33
  */
34
  public function getNotifications()
35
  {
vendor/google/apiclient-services/src/Google/Service/Calendar/Colors.php CHANGED
@@ -25,28 +25,28 @@ class Google_Service_Calendar_Colors extends Google_Model
25
  public $updated;
26
 
27
  /**
28
- * @param Google_Service_Calendar_ColorDefinition
29
  */
30
  public function setCalendar($calendar)
31
  {
32
  $this->calendar = $calendar;
33
  }
34
  /**
35
- * @return Google_Service_Calendar_ColorDefinition
36
  */
37
  public function getCalendar()
38
  {
39
  return $this->calendar;
40
  }
41
  /**
42
- * @param Google_Service_Calendar_ColorDefinition
43
  */
44
  public function setEvent($event)
45
  {
46
  $this->event = $event;
47
  }
48
  /**
49
- * @return Google_Service_Calendar_ColorDefinition
50
  */
51
  public function getEvent()
52
  {
25
  public $updated;
26
 
27
  /**
28
+ * @param Google_Service_Calendar_ColorDefinition[]
29
  */
30
  public function setCalendar($calendar)
31
  {
32
  $this->calendar = $calendar;
33
  }
34
  /**
35
+ * @return Google_Service_Calendar_ColorDefinition[]
36
  */
37
  public function getCalendar()
38
  {
39
  return $this->calendar;
40
  }
41
  /**
42
+ * @param Google_Service_Calendar_ColorDefinition[]
43
  */
44
  public function setEvent($event)
45
  {
46
  $this->event = $event;
47
  }
48
  /**
49
+ * @return Google_Service_Calendar_ColorDefinition[]
50
  */
51
  public function getEvent()
52
  {
vendor/google/apiclient-services/src/Google/Service/Calendar/ConferenceData.php CHANGED
@@ -67,14 +67,14 @@ class Google_Service_Calendar_ConferenceData extends Google_Collection
67
  return $this->createRequest;
68
  }
69
  /**
70
- * @param Google_Service_Calendar_EntryPoint
71
  */
72
  public function setEntryPoints($entryPoints)
73
  {
74
  $this->entryPoints = $entryPoints;
75
  }
76
  /**
77
- * @return Google_Service_Calendar_EntryPoint
78
  */
79
  public function getEntryPoints()
80
  {
67
  return $this->createRequest;
68
  }
69
  /**
70
+ * @param Google_Service_Calendar_EntryPoint[]
71
  */
72
  public function setEntryPoints($entryPoints)
73
  {
74
  $this->entryPoints = $entryPoints;
75
  }
76
  /**
77
+ * @return Google_Service_Calendar_EntryPoint[]
78
  */
79
  public function getEntryPoints()
80
  {
vendor/google/apiclient-services/src/Google/Service/Calendar/Event.php CHANGED
@@ -78,28 +78,28 @@ class Google_Service_Calendar_Event extends Google_Collection
78
  return $this->anyoneCanAddSelf;
79
  }
80
  /**
81
- * @param Google_Service_Calendar_EventAttachment
82
  */
83
  public function setAttachments($attachments)
84
  {
85
  $this->attachments = $attachments;
86
  }
87
  /**
88
- * @return Google_Service_Calendar_EventAttachment
89
  */
90
  public function getAttachments()
91
  {
92
  return $this->attachments;
93
  }
94
  /**
95
- * @param Google_Service_Calendar_EventAttendee
96
  */
97
  public function setAttendees($attendees)
98
  {
99
  $this->attendees = $attendees;
100
  }
101
  /**
102
- * @return Google_Service_Calendar_EventAttendee
103
  */
104
  public function getAttendees()
105
  {
78
  return $this->anyoneCanAddSelf;
79
  }
80
  /**
81
+ * @param Google_Service_Calendar_EventAttachment[]
82
  */
83
  public function setAttachments($attachments)
84
  {
85
  $this->attachments = $attachments;
86
  }
87
  /**
88
+ * @return Google_Service_Calendar_EventAttachment[]
89
  */
90
  public function getAttachments()
91
  {
92
  return $this->attachments;
93
  }
94
  /**
95
+ * @param Google_Service_Calendar_EventAttendee[]
96
  */
97
  public function setAttendees($attendees)
98
  {
99
  $this->attendees = $attendees;
100
  }
101
  /**
102
+ * @return Google_Service_Calendar_EventAttendee[]
103
  */
104
  public function getAttendees()
105
  {
vendor/google/apiclient-services/src/Google/Service/Calendar/EventReminders.php CHANGED
@@ -23,14 +23,14 @@ class Google_Service_Calendar_EventReminders extends Google_Collection
23
  public $useDefault;
24
 
25
  /**
26
- * @param Google_Service_Calendar_EventReminder
27
  */
28
  public function setOverrides($overrides)
29
  {
30
  $this->overrides = $overrides;
31
  }
32
  /**
33
- * @return Google_Service_Calendar_EventReminder
34
  */
35
  public function getOverrides()
36
  {
23
  public $useDefault;
24
 
25
  /**
26
+ * @param Google_Service_Calendar_EventReminder[]
27
  */
28
  public function setOverrides($overrides)
29
  {
30
  $this->overrides = $overrides;
31
  }
32
  /**
33
+ * @return Google_Service_Calendar_EventReminder[]
34
  */
35
  public function getOverrides()
36
  {
vendor/google/apiclient-services/src/Google/Service/Calendar/Events.php CHANGED
@@ -41,14 +41,14 @@ class Google_Service_Calendar_Events extends Google_Collection
41
  return $this->accessRole;
42
  }
43
  /**
44
- * @param Google_Service_Calendar_EventReminder
45
  */
46
  public function setDefaultReminders($defaultReminders)
47
  {
48
  $this->defaultReminders = $defaultReminders;
49
  }
50
  /**
51
- * @return Google_Service_Calendar_EventReminder
52
  */
53
  public function getDefaultReminders()
54
  {
@@ -71,14 +71,14 @@ class Google_Service_Calendar_Events extends Google_Collection
71
  return $this->etag;
72
  }
73
  /**
74
- * @param Google_Service_Calendar_Event
75
  */
76
  public function setItems($items)
77
  {
78
  $this->items = $items;
79
  }
80
  /**
81
- * @return Google_Service_Calendar_Event
82
  */
83
  public function getItems()
84
  {
41
  return $this->accessRole;
42
  }
43
  /**
44
+ * @param Google_Service_Calendar_EventReminder[]
45
  */
46
  public function setDefaultReminders($defaultReminders)
47
  {
48
  $this->defaultReminders = $defaultReminders;
49
  }
50
  /**
51
+ * @return Google_Service_Calendar_EventReminder[]
52
  */
53
  public function getDefaultReminders()
54
  {
71
  return $this->etag;
72
  }
73
  /**
74
+ * @param Google_Service_Calendar_Event[]
75
  */
76
  public function setItems($items)
77
  {
78
  $this->items = $items;
79
  }
80
  /**
81
+ * @return Google_Service_Calendar_Event[]
82
  */
83
  public function getItems()
84
  {
vendor/google/apiclient-services/src/Google/Service/Calendar/FreeBusyCalendar.php CHANGED
@@ -24,28 +24,28 @@ class Google_Service_Calendar_FreeBusyCalendar extends Google_Collection
24
  protected $errorsDataType = 'array';
25
 
26
  /**
27
- * @param Google_Service_Calendar_TimePeriod
28
  */
29
  public function setBusy($busy)
30
  {
31
  $this->busy = $busy;
32
  }
33
  /**
34
- * @return Google_Service_Calendar_TimePeriod
35
  */
36
  public function getBusy()
37
  {
38
  return $this->busy;
39
  }
40
  /**
41
- * @param Google_Service_Calendar_Error
42
  */
43
  public function setErrors($errors)
44
  {
45
  $this->errors = $errors;
46
  }
47
  /**
48
- * @return Google_Service_Calendar_Error
49
  */
50
  public function getErrors()
51
  {
24
  protected $errorsDataType = 'array';
25
 
26
  /**
27
+ * @param Google_Service_Calendar_TimePeriod[]
28
  */
29
  public function setBusy($busy)
30
  {
31
  $this->busy = $busy;
32
  }
33
  /**
34
+ * @return Google_Service_Calendar_TimePeriod[]
35
  */
36
  public function getBusy()
37
  {
38
  return $this->busy;
39
  }
40
  /**
41
+ * @param Google_Service_Calendar_Error[]
42
  */
43
  public function setErrors($errors)
44
  {
45
  $this->errors = $errors;
46
  }
47
  /**
48
+ * @return Google_Service_Calendar_Error[]
49
  */
50
  public function getErrors()
51
  {
vendor/google/apiclient-services/src/Google/Service/Calendar/FreeBusyGroup.php CHANGED
@@ -31,14 +31,14 @@ class Google_Service_Calendar_FreeBusyGroup extends Google_Collection
31
  return $this->calendars;
32
  }
33
  /**
34
- * @param Google_Service_Calendar_Error
35
  */
36
  public function setErrors($errors)
37
  {
38
  $this->errors = $errors;
39
  }
40
  /**
41
- * @return Google_Service_Calendar_Error
42
  */
43
  public function getErrors()
44
  {
31
  return $this->calendars;
32
  }
33
  /**
34
+ * @param Google_Service_Calendar_Error[]
35
  */
36
  public function setErrors($errors)
37
  {
38
  $this->errors = $errors;
39
  }
40
  /**
41
+ * @return Google_Service_Calendar_Error[]
42
  */
43
  public function getErrors()
44
  {
vendor/google/apiclient-services/src/Google/Service/Calendar/FreeBusyRequest.php CHANGED
@@ -43,14 +43,14 @@ class Google_Service_Calendar_FreeBusyRequest extends Google_Collection
43
  return $this->groupExpansionMax;
44
  }
45
  /**
46
- * @param Google_Service_Calendar_FreeBusyRequestItem
47
  */
48
  public function setItems($items)
49
  {
50
  $this->items = $items;
51
  }
52
  /**
53
- * @return Google_Service_Calendar_FreeBusyRequestItem
54
  */
55
  public function getItems()
56
  {
43
  return $this->groupExpansionMax;
44
  }
45
  /**
46
+ * @param Google_Service_Calendar_FreeBusyRequestItem[]
47
  */
48
  public function setItems($items)
49
  {
50
  $this->items = $items;
51
  }
52
  /**
53
+ * @return Google_Service_Calendar_FreeBusyRequestItem[]
54
  */
55
  public function getItems()
56
  {
vendor/google/apiclient-services/src/Google/Service/Calendar/FreeBusyResponse.php CHANGED
@@ -26,28 +26,28 @@ class Google_Service_Calendar_FreeBusyResponse extends Google_Model
26
  public $timeMin;
27
 
28
  /**
29
- * @param Google_Service_Calendar_FreeBusyCalendar
30
  */
31
  public function setCalendars($calendars)
32
  {
33
  $this->calendars = $calendars;
34
  }
35
  /**
36
- * @return Google_Service_Calendar_FreeBusyCalendar
37
  */
38
  public function getCalendars()
39
  {
40
  return $this->calendars;
41
  }
42
  /**
43
- * @param Google_Service_Calendar_FreeBusyGroup
44
  */
45
  public function setGroups($groups)
46
  {
47
  $this->groups = $groups;
48
  }
49
  /**
50
- * @return Google_Service_Calendar_FreeBusyGroup
51
  */
52
  public function getGroups()
53
  {
26
  public $timeMin;
27
 
28
  /**
29
+ * @param Google_Service_Calendar_FreeBusyCalendar[]
30
  */
31
  public function setCalendars($calendars)
32
  {
33
  $this->calendars = $calendars;
34
  }
35
  /**
36
+ * @return Google_Service_Calendar_FreeBusyCalendar[]
37
  */
38
  public function getCalendars()
39
  {
40
  return $this->calendars;
41
  }
42
  /**
43
+ * @param Google_Service_Calendar_FreeBusyGroup[]
44
  */
45
  public function setGroups($groups)
46
  {
47
  $this->groups = $groups;
48
  }
49
  /**
50
+ * @return Google_Service_Calendar_FreeBusyGroup[]
51
  */
52
  public function getGroups()
53
  {
vendor/google/apiclient-services/src/Google/Service/Calendar/Resource/Acl.php CHANGED
@@ -83,6 +83,14 @@ class Google_Service_Calendar_Resource_Acl extends Google_Service_Resource
83
  * the currently logged in user, use the "primary" keyword.
84
  * @param array $optParams Optional parameters.
85
  *
 
 
 
 
 
 
 
 
86
  * @opt_param string syncToken Token obtained from the nextSyncToken field
87
  * returned on the last page of results from the previous list request. It makes
88
  * the result of this list request contain only entries that have changed since
@@ -92,14 +100,6 @@ class Google_Service_Calendar_Resource_Acl extends Google_Service_Resource
92
  * the client should clear its storage and perform a full synchronization
93
  * without any syncToken. Learn more about incremental synchronization.
94
  * Optional. The default is to return all entries.
95
- * @opt_param int maxResults Maximum number of entries returned on one result
96
- * page. By default the value is 100 entries. The page size can never be larger
97
- * than 250 entries. Optional.
98
- * @opt_param bool showDeleted Whether to include deleted ACLs in the result.
99
- * Deleted ACLs are represented by role equal to "none". Deleted ACLs will
100
- * always be included if syncToken is provided. Optional. The default is False.
101
- * @opt_param string pageToken Token specifying which result page to return.
102
- * Optional.
103
  * @return Google_Service_Calendar_Acl
104
  */
105
  public function listAcl($calendarId, $optParams = array())
@@ -160,6 +160,11 @@ class Google_Service_Calendar_Resource_Acl extends Google_Service_Resource
160
  * @param Google_Service_Calendar_Channel $postBody
161
  * @param array $optParams Optional parameters.
162
  *
 
 
 
 
 
163
  * @opt_param bool showDeleted Whether to include deleted ACLs in the result.
164
  * Deleted ACLs are represented by role equal to "none". Deleted ACLs will
165
  * always be included if syncToken is provided. Optional. The default is False.
@@ -172,11 +177,6 @@ class Google_Service_Calendar_Resource_Acl extends Google_Service_Resource
172
  * the client should clear its storage and perform a full synchronization
173
  * without any syncToken. Learn more about incremental synchronization.
174
  * Optional. The default is to return all entries.
175
- * @opt_param string pageToken Token specifying which result page to return.
176
- * Optional.
177
- * @opt_param int maxResults Maximum number of entries returned on one result
178
- * page. By default the value is 100 entries. The page size can never be larger
179
- * than 250 entries. Optional.
180
  * @return Google_Service_Calendar_Channel
181
  */
182
  public function watch($calendarId, Google_Service_Calendar_Channel $postBody, $optParams = array())
83
  * the currently logged in user, use the "primary" keyword.
84
  * @param array $optParams Optional parameters.
85
  *
86
+ * @opt_param int maxResults Maximum number of entries returned on one result
87
+ * page. By default the value is 100 entries. The page size can never be larger
88
+ * than 250 entries. Optional.
89
+ * @opt_param string pageToken Token specifying which result page to return.
90
+ * Optional.
91
+ * @opt_param bool showDeleted Whether to include deleted ACLs in the result.
92
+ * Deleted ACLs are represented by role equal to "none". Deleted ACLs will
93
+ * always be included if syncToken is provided. Optional. The default is False.
94
  * @opt_param string syncToken Token obtained from the nextSyncToken field
95
  * returned on the last page of results from the previous list request. It makes
96
  * the result of this list request contain only entries that have changed since
100
  * the client should clear its storage and perform a full synchronization
101
  * without any syncToken. Learn more about incremental synchronization.
102
  * Optional. The default is to return all entries.
 
 
 
 
 
 
 
 
103
  * @return Google_Service_Calendar_Acl
104
  */
105
  public function listAcl($calendarId, $optParams = array())
160
  * @param Google_Service_Calendar_Channel $postBody
161
  * @param array $optParams Optional parameters.
162
  *
163
+ * @opt_param int maxResults Maximum number of entries returned on one result
164
+ * page. By default the value is 100 entries. The page size can never be larger
165
+ * than 250 entries. Optional.
166
+ * @opt_param string pageToken Token specifying which result page to return.
167
+ * Optional.
168
  * @opt_param bool showDeleted Whether to include deleted ACLs in the result.
169
  * Deleted ACLs are represented by role equal to "none". Deleted ACLs will
170
  * always be included if syncToken is provided. Optional. The default is False.
177
  * the client should clear its storage and perform a full synchronization
178
  * without any syncToken. Learn more about incremental synchronization.
179
  * Optional. The default is to return all entries.
 
 
 
 
 
180
  * @return Google_Service_Calendar_Channel
181
  */
182
  public function watch($calendarId, Google_Service_Calendar_Channel $postBody, $optParams = array())
vendor/google/apiclient-services/src/Google/Service/Calendar/Resource/CalendarList.php CHANGED
@@ -79,15 +79,17 @@ class Google_Service_Calendar_Resource_CalendarList extends Google_Service_Resou
79
  *
80
  * @param array $optParams Optional parameters.
81
  *
82
- * @opt_param bool showHidden Whether to show hidden entries. Optional. The
83
- * default is False.
84
- * @opt_param string minAccessRole The minimum access role for the user in the
85
- * returned entries. Optional. The default is no restriction.
86
  * @opt_param int maxResults Maximum number of entries returned on one result
87
  * page. By default the value is 100 entries. The page size can never be larger
88
  * than 250 entries. Optional.
 
 
89
  * @opt_param string pageToken Token specifying which result page to return.
90
  * Optional.
 
 
 
 
91
  * @opt_param string syncToken Token obtained from the nextSyncToken field
92
  * returned on the last page of results from the previous list request. It makes
93
  * the result of this list request contain only entries that have changed since
@@ -100,8 +102,6 @@ class Google_Service_Calendar_Resource_CalendarList extends Google_Service_Resou
100
  * 410 GONE response code and the client should clear its storage and perform a
101
  * full synchronization without any syncToken. Learn more about incremental
102
  * synchronization. Optional. The default is to return all entries.
103
- * @opt_param bool showDeleted Whether to include deleted calendar list entries
104
- * in the result. Optional. The default is False.
105
  * @return Google_Service_Calendar_CalendarList
106
  */
107
  public function listCalendarList($optParams = array())
@@ -160,15 +160,17 @@ class Google_Service_Calendar_Resource_CalendarList extends Google_Service_Resou
160
  * @param Google_Service_Calendar_Channel $postBody
161
  * @param array $optParams Optional parameters.
162
  *
163
- * @opt_param string pageToken Token specifying which result page to return.
164
- * Optional.
165
  * @opt_param int maxResults Maximum number of entries returned on one result
166
  * page. By default the value is 100 entries. The page size can never be larger
167
  * than 250 entries. Optional.
168
  * @opt_param string minAccessRole The minimum access role for the user in the
169
  * returned entries. Optional. The default is no restriction.
 
 
170
  * @opt_param bool showDeleted Whether to include deleted calendar list entries
171
  * in the result. Optional. The default is False.
 
 
172
  * @opt_param string syncToken Token obtained from the nextSyncToken field
173
  * returned on the last page of results from the previous list request. It makes
174
  * the result of this list request contain only entries that have changed since
@@ -181,8 +183,6 @@ class Google_Service_Calendar_Resource_CalendarList extends Google_Service_Resou
181
  * 410 GONE response code and the client should clear its storage and perform a
182
  * full synchronization without any syncToken. Learn more about incremental
183
  * synchronization. Optional. The default is to return all entries.
184
- * @opt_param bool showHidden Whether to show hidden entries. Optional. The
185
- * default is False.
186
  * @return Google_Service_Calendar_Channel
187
  */
188
  public function watch(Google_Service_Calendar_Channel $postBody, $optParams = array())
79
  *
80
  * @param array $optParams Optional parameters.
81
  *
 
 
 
 
82
  * @opt_param int maxResults Maximum number of entries returned on one result
83
  * page. By default the value is 100 entries. The page size can never be larger
84
  * than 250 entries. Optional.
85
+ * @opt_param string minAccessRole The minimum access role for the user in the
86
+ * returned entries. Optional. The default is no restriction.
87
  * @opt_param string pageToken Token specifying which result page to return.
88
  * Optional.
89
+ * @opt_param bool showDeleted Whether to include deleted calendar list entries
90
+ * in the result. Optional. The default is False.
91
+ * @opt_param bool showHidden Whether to show hidden entries. Optional. The
92
+ * default is False.
93
  * @opt_param string syncToken Token obtained from the nextSyncToken field
94
  * returned on the last page of results from the previous list request. It makes
95
  * the result of this list request contain only entries that have changed since
102
  * 410 GONE response code and the client should clear its storage and perform a
103
  * full synchronization without any syncToken. Learn more about incremental
104
  * synchronization. Optional. The default is to return all entries.
 
 
105
  * @return Google_Service_Calendar_CalendarList
106
  */
107
  public function listCalendarList($optParams = array())
160
  * @param Google_Service_Calendar_Channel $postBody
161
  * @param array $optParams Optional parameters.
162
  *
 
 
163
  * @opt_param int maxResults Maximum number of entries returned on one result
164
  * page. By default the value is 100 entries. The page size can never be larger
165
  * than 250 entries. Optional.
166
  * @opt_param string minAccessRole The minimum access role for the user in the
167
  * returned entries. Optional. The default is no restriction.
168
+ * @opt_param string pageToken Token specifying which result page to return.
169
+ * Optional.
170
  * @opt_param bool showDeleted Whether to include deleted calendar list entries
171
  * in the result. Optional. The default is False.
172
+ * @opt_param bool showHidden Whether to show hidden entries. Optional. The
173
+ * default is False.
174
  * @opt_param string syncToken Token obtained from the nextSyncToken field
175
  * returned on the last page of results from the previous list request. It makes
176
  * the result of this list request contain only entries that have changed since
183
  * 410 GONE response code and the client should clear its storage and perform a
184
  * full synchronization without any syncToken. Learn more about incremental
185
  * synchronization. Optional. The default is to return all entries.
 
 
186
  * @return Google_Service_Calendar_Channel
187
  */
188
  public function watch(Google_Service_Calendar_Channel $postBody, $optParams = array())
vendor/google/apiclient-services/src/Google/Service/Calendar/Resource/Events.php CHANGED
@@ -34,13 +34,13 @@ class Google_Service_Calendar_Resource_Events extends Google_Service_Resource
34
  * @param string $eventId Event identifier.
35
  * @param array $optParams Optional parameters.
36
  *
37
- * @opt_param string sendUpdates Guests who should receive notifications about
38
- * the deletion of the event.
39
  * @opt_param bool sendNotifications Deprecated. Please use sendUpdates instead.
40
  *
41
  * Whether to send notifications about the deletion of the event. Note that some
42
  * emails might still be sent even if you set the value to false. The default is
43
  * false.
 
 
44
  */
45
  public function delete($calendarId, $eventId, $optParams = array())
46
  {
@@ -61,11 +61,11 @@ class Google_Service_Calendar_Resource_Events extends Google_Service_Resource
61
  * always be returned in the email field for the organizer, creator and
62
  * attendees, even if no real email address is available (i.e. a generated, non-
63
  * working value will be provided).
64
- * @opt_param string timeZone Time zone used in the response. Optional. The
65
- * default is the time zone of the calendar.
66
  * @opt_param int maxAttendees The maximum number of attendees to include in the
67
  * response. If there are more than the specified number of attendees, only the
68
  * participant is returned. Optional.
 
 
69
  * @return Google_Service_Calendar_Event
70
  */
71
  public function get($calendarId, $eventId, $optParams = array())
@@ -84,13 +84,13 @@ class Google_Service_Calendar_Resource_Events extends Google_Service_Resource
84
  * @param Google_Service_Calendar_Event $postBody
85
  * @param array $optParams Optional parameters.
86
  *
87
- * @opt_param bool supportsAttachments Whether API client performing operation
88
- * supports event attachments. Optional. The default is False.
89
  * @opt_param int conferenceDataVersion Version number of conference data
90
  * supported by the API client. Version 0 assumes no conference data support and
91
  * ignores conference data in the event's body. Version 1 enables support for
92
  * copying of ConferenceData as well as for creating new conferences using the
93
  * createRequest field of conferenceData. The default is 0.
 
 
94
  * @return Google_Service_Calendar_Event
95
  */
96
  public function import($calendarId, Google_Service_Calendar_Event $postBody, $optParams = array())
@@ -108,24 +108,24 @@ class Google_Service_Calendar_Resource_Events extends Google_Service_Resource
108
  * @param Google_Service_Calendar_Event $postBody
109
  * @param array $optParams Optional parameters.
110
  *
111
- * @opt_param bool supportsAttachments Whether API client performing operation
112
- * supports event attachments. Optional. The default is False.
113
- * @opt_param int maxAttendees The maximum number of attendees to include in the
114
- * response. If there are more than the specified number of attendees, only the
115
- * participant is returned. Optional.
116
  * @opt_param int conferenceDataVersion Version number of conference data
117
  * supported by the API client. Version 0 assumes no conference data support and
118
  * ignores conference data in the event's body. Version 1 enables support for
119
  * copying of ConferenceData as well as for creating new conferences using the
120
  * createRequest field of conferenceData. The default is 0.
121
- * @opt_param string sendUpdates Whether to send notifications about the
122
- * creation of the new event. Note that some emails might still be sent. The
123
- * default is false.
124
  * @opt_param bool sendNotifications Deprecated. Please use sendUpdates instead.
125
  *
126
  * Whether to send notifications about the creation of the new event. Note that
127
  * some emails might still be sent even if you set the value to false. The
128
  * default is false.
 
 
 
 
 
129
  * @return Google_Service_Calendar_Event
130
  */
131
  public function insert($calendarId, Google_Service_Calendar_Event $postBody, $optParams = array())
@@ -143,32 +143,32 @@ class Google_Service_Calendar_Resource_Events extends Google_Service_Resource
143
  * @param string $eventId Recurring event identifier.
144
  * @param array $optParams Optional parameters.
145
  *
146
- * @opt_param int maxResults Maximum number of events returned on one result
147
- * page. By default the value is 250 events. The page size can never be larger
148
- * than 2500 events. Optional.
149
  * @opt_param bool alwaysIncludeEmail Deprecated and ignored. A value will
150
  * always be returned in the email field for the organizer, creator and
151
  * attendees, even if no real email address is available (i.e. a generated, non-
152
  * working value will be provided).
153
- * @opt_param string timeMin Lower bound (inclusive) for an event's end time to
154
- * filter by. Optional. The default is not to filter by end time. Must be an
155
- * RFC3339 timestamp with mandatory time zone offset.
156
- * @opt_param string pageToken Token specifying which result page to return.
157
- * Optional.
158
- * @opt_param string timeZone Time zone used in the response. Optional. The
159
- * default is the time zone of the calendar.
160
- * @opt_param string timeMax Upper bound (exclusive) for an event's start time
161
- * to filter by. Optional. The default is not to filter by start time. Must be
162
- * an RFC3339 timestamp with mandatory time zone offset.
163
  * @opt_param int maxAttendees The maximum number of attendees to include in the
164
  * response. If there are more than the specified number of attendees, only the
165
  * participant is returned. Optional.
 
 
 
 
 
 
 
166
  * @opt_param bool showDeleted Whether to include deleted events (with status
167
  * equals "cancelled") in the result. Cancelled instances of recurring events
168
  * will still be included if singleEvents is False. Optional. The default is
169
  * False.
170
- * @opt_param string originalStart The original start time of the instance in
171
- * the result. Optional.
 
 
 
 
 
 
172
  * @return Google_Service_Calendar_Events
173
  */
174
  public function instances($calendarId, $eventId, $optParams = array())
@@ -185,35 +185,47 @@ class Google_Service_Calendar_Resource_Events extends Google_Service_Resource
185
  * the currently logged in user, use the "primary" keyword.
186
  * @param array $optParams Optional parameters.
187
  *
188
- * @opt_param string timeMin Lower bound (exclusive) for an event's end time to
189
- * filter by. Optional. The default is not to filter by end time. Must be an
190
- * RFC3339 timestamp with mandatory time zone offset, for example,
191
- * 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided
192
- * but are ignored. If timeMax is set, timeMin must be smaller than timeMax.
193
- * @opt_param string privateExtendedProperty Extended properties constraint
194
- * specified as propertyName=value. Matches only private properties. This
195
- * parameter might be repeated multiple times to return events that match all
196
- * given constraints.
197
- * @opt_param string timeZone Time zone used in the response. Optional. The
198
- * default is the time zone of the calendar.
199
  * @opt_param int maxResults Maximum number of events returned on one result
200
  * page. The number of events in the resulting page may be less than this value,
201
  * or none at all, even if there are more events matching the query. Incomplete
202
  * pages can be detected by a non-empty nextPageToken field in the response. By
203
  * default the value is 250 events. The page size can never be larger than 2500
204
  * events. Optional.
205
- * @opt_param bool alwaysIncludeEmail Deprecated and ignored. A value will
206
- * always be returned in the email field for the organizer, creator and
207
- * attendees, even if no real email address is available (i.e. a generated, non-
208
- * working value will be provided).
 
 
 
 
 
 
 
 
 
 
209
  * @opt_param bool showDeleted Whether to include deleted events (with status
210
  * equals "cancelled") in the result. Cancelled instances of recurring events
211
  * (but not the underlying recurring event) will still be included if
212
  * showDeleted and singleEvents are both False. If showDeleted and singleEvents
213
  * are both True, only single instances of deleted events (but not the
214
  * underlying recurring events) are returned. Optional. The default is False.
215
- * @opt_param string q Free text search terms to find events that match these
216
- * terms in any field, except for extended properties. Optional.
 
 
 
 
217
  * @opt_param string syncToken Token obtained from the nextSyncToken field
218
  * returned on the last page of results from the previous list request. It makes
219
  * the result of this list request contain only entries that have changed since
@@ -228,34 +240,22 @@ class Google_Service_Calendar_Resource_Events extends Google_Service_Resource
228
  * should clear its storage and perform a full synchronization without any
229
  * syncToken. Learn more about incremental synchronization. Optional. The
230
  * default is to return all entries.
231
- * @opt_param string updatedMin Lower bound for an event's last modification
232
- * time (as a RFC3339 timestamp) to filter by. When specified, entries deleted
233
- * since this time will always be included regardless of showDeleted. Optional.
234
- * The default is not to filter by last modification time.
235
- * @opt_param string pageToken Token specifying which result page to return.
236
- * Optional.
237
- * @opt_param string iCalUID Specifies event ID in the iCalendar format to be
238
- * included in the response. Optional.
239
- * @opt_param int maxAttendees The maximum number of attendees to include in the
240
- * response. If there are more than the specified number of attendees, only the
241
- * participant is returned. Optional.
242
- * @opt_param string orderBy The order of the events returned in the result.
243
- * Optional. The default is an unspecified, stable order.
244
- * @opt_param string sharedExtendedProperty Extended properties constraint
245
- * specified as propertyName=value. Matches only shared properties. This
246
- * parameter might be repeated multiple times to return events that match all
247
- * given constraints.
248
- * @opt_param bool singleEvents Whether to expand recurring events into
249
- * instances and only return single one-off events and instances of recurring
250
- * events, but not the underlying recurring events themselves. Optional. The
251
- * default is False.
252
- * @opt_param bool showHiddenInvitations Whether to include hidden invitations
253
- * in the result. Optional. The default is False.
254
  * @opt_param string timeMax Upper bound (exclusive) for an event's start time
255
  * to filter by. Optional. The default is not to filter by start time. Must be
256
  * an RFC3339 timestamp with mandatory time zone offset, for example,
257
  * 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided
258
  * but are ignored. If timeMin is set, timeMax must be greater than timeMin.
 
 
 
 
 
 
 
 
 
 
 
259
  * @return Google_Service_Calendar_Events
260
  */
261
  public function listEvents($calendarId, $optParams = array())
@@ -300,8 +300,6 @@ class Google_Service_Calendar_Resource_Events extends Google_Service_Resource
300
  * @param Google_Service_Calendar_Event $postBody
301
  * @param array $optParams Optional parameters.
302
  *
303
- * @opt_param bool supportsAttachments Whether API client performing operation
304
- * supports event attachments. Optional. The default is False.
305
  * @opt_param bool alwaysIncludeEmail Deprecated and ignored. A value will
306
  * always be returned in the email field for the organizer, creator and
307
  * attendees, even if no real email address is available (i.e. a generated, non-
@@ -311,16 +309,18 @@ class Google_Service_Calendar_Resource_Events extends Google_Service_Resource
311
  * ignores conference data in the event's body. Version 1 enables support for
312
  * copying of ConferenceData as well as for creating new conferences using the
313
  * createRequest field of conferenceData. The default is 0.
 
 
 
314
  * @opt_param bool sendNotifications Deprecated. Please use sendUpdates instead.
315
  *
316
  * Whether to send notifications about the event update (for example,
317
  * description changes, etc.). Note that some emails might still be sent even if
318
  * you set the value to false. The default is false.
319
- * @opt_param int maxAttendees The maximum number of attendees to include in the
320
- * response. If there are more than the specified number of attendees, only the
321
- * participant is returned. Optional.
322
  * @opt_param string sendUpdates Guests who should receive notifications about
323
  * the event update (for example, title changes, etc.).
 
 
324
  * @return Google_Service_Calendar_Event
325
  */
326
  public function patch($calendarId, $eventId, Google_Service_Calendar_Event $postBody, $optParams = array())
@@ -363,27 +363,27 @@ class Google_Service_Calendar_Resource_Events extends Google_Service_Resource
363
  * @param Google_Service_Calendar_Event $postBody
364
  * @param array $optParams Optional parameters.
365
  *
366
- * @opt_param string sendUpdates Guests who should receive notifications about
367
- * the event update (for example, title changes, etc.).
368
- * @opt_param bool supportsAttachments Whether API client performing operation
369
- * supports event attachments. Optional. The default is False.
370
  * @opt_param int conferenceDataVersion Version number of conference data
371
  * supported by the API client. Version 0 assumes no conference data support and
372
  * ignores conference data in the event's body. Version 1 enables support for
373
  * copying of ConferenceData as well as for creating new conferences using the
374
  * createRequest field of conferenceData. The default is 0.
375
- * @opt_param bool alwaysIncludeEmail Deprecated and ignored. A value will
376
- * always be returned in the email field for the organizer, creator and
377
- * attendees, even if no real email address is available (i.e. a generated, non-
378
- * working value will be provided).
379
  * @opt_param bool sendNotifications Deprecated. Please use sendUpdates instead.
380
  *
381
  * Whether to send notifications about the event update (for example,
382
  * description changes, etc.). Note that some emails might still be sent even if
383
  * you set the value to false. The default is false.
384
- * @opt_param int maxAttendees The maximum number of attendees to include in the
385
- * response. If there are more than the specified number of attendees, only the
386
- * participant is returned. Optional.
 
387
  * @return Google_Service_Calendar_Event
388
  */
389
  public function update($calendarId, $eventId, Google_Service_Calendar_Event $postBody, $optParams = array())
@@ -401,33 +401,47 @@ class Google_Service_Calendar_Resource_Events extends Google_Service_Resource
401
  * @param Google_Service_Calendar_Channel $postBody
402
  * @param array $optParams Optional parameters.
403
  *
404
- * @opt_param string pageToken Token specifying which result page to return.
405
- * Optional.
406
- * @opt_param string sharedExtendedProperty Extended properties constraint
407
- * specified as propertyName=value. Matches only shared properties. This
408
- * parameter might be repeated multiple times to return events that match all
409
- * given constraints.
410
- * @opt_param string timeZone Time zone used in the response. Optional. The
411
- * default is the time zone of the calendar.
 
412
  * @opt_param int maxResults Maximum number of events returned on one result
413
  * page. The number of events in the resulting page may be less than this value,
414
  * or none at all, even if there are more events matching the query. Incomplete
415
  * pages can be detected by a non-empty nextPageToken field in the response. By
416
  * default the value is 250 events. The page size can never be larger than 2500
417
  * events. Optional.
418
- * @opt_param int maxAttendees The maximum number of attendees to include in the
419
- * response. If there are more than the specified number of attendees, only the
420
- * participant is returned. Optional.
421
  * @opt_param string orderBy The order of the events returned in the result.
422
  * Optional. The default is an unspecified, stable order.
423
- * @opt_param string iCalUID Specifies event ID in the iCalendar format to be
424
- * included in the response. Optional.
425
- * @opt_param string updatedMin Lower bound for an event's last modification
426
- * time (as a RFC3339 timestamp) to filter by. When specified, entries deleted
427
- * since this time will always be included regardless of showDeleted. Optional.
428
- * The default is not to filter by last modification time.
429
  * @opt_param string q Free text search terms to find events that match these
430
  * terms in any field, except for extended properties. Optional.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
431
  * @opt_param string syncToken Token obtained from the nextSyncToken field
432
  * returned on the last page of results from the previous list request. It makes
433
  * the result of this list request contain only entries that have changed since
@@ -442,36 +456,22 @@ class Google_Service_Calendar_Resource_Events extends Google_Service_Resource
442
  * should clear its storage and perform a full synchronization without any
443
  * syncToken. Learn more about incremental synchronization. Optional. The
444
  * default is to return all entries.
445
- * @opt_param bool alwaysIncludeEmail Deprecated and ignored. A value will
446
- * always be returned in the email field for the organizer, creator and
447
- * attendees, even if no real email address is available (i.e. a generated, non-
448
- * working value will be provided).
449
- * @opt_param bool singleEvents Whether to expand recurring events into
450
- * instances and only return single one-off events and instances of recurring
451
- * events, but not the underlying recurring events themselves. Optional. The
452
- * default is False.
453
- * @opt_param string privateExtendedProperty Extended properties constraint
454
- * specified as propertyName=value. Matches only private properties. This
455
- * parameter might be repeated multiple times to return events that match all
456
- * given constraints.
457
- * @opt_param string timeMin Lower bound (exclusive) for an event's end time to
458
- * filter by. Optional. The default is not to filter by end time. Must be an
459
- * RFC3339 timestamp with mandatory time zone offset, for example,
460
- * 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided
461
- * but are ignored. If timeMax is set, timeMin must be smaller than timeMax.
462
  * @opt_param string timeMax Upper bound (exclusive) for an event's start time
463
  * to filter by. Optional. The default is not to filter by start time. Must be
464
  * an RFC3339 timestamp with mandatory time zone offset, for example,
465
  * 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided
466
  * but are ignored. If timeMin is set, timeMax must be greater than timeMin.
467
- * @opt_param bool showDeleted Whether to include deleted events (with status
468
- * equals "cancelled") in the result. Cancelled instances of recurring events
469
- * (but not the underlying recurring event) will still be included if
470
- * showDeleted and singleEvents are both False. If showDeleted and singleEvents
471
- * are both True, only single instances of deleted events (but not the
472
- * underlying recurring events) are returned. Optional. The default is False.
473
- * @opt_param bool showHiddenInvitations Whether to include hidden invitations
474
- * in the result. Optional. The default is False.
 
 
 
475
  * @return Google_Service_Calendar_Channel
476
  */
477
  public function watch($calendarId, Google_Service_Calendar_Channel $postBody, $optParams = array())
34
  * @param string $eventId Event identifier.
35
  * @param array $optParams Optional parameters.
36
  *
 
 
37
  * @opt_param bool sendNotifications Deprecated. Please use sendUpdates instead.
38
  *
39
  * Whether to send notifications about the deletion of the event. Note that some
40
  * emails might still be sent even if you set the value to false. The default is
41
  * false.
42
+ * @opt_param string sendUpdates Guests who should receive notifications about
43
+ * the deletion of the event.
44
  */
45
  public function delete($calendarId, $eventId, $optParams = array())
46
  {
61
  * always be returned in the email field for the organizer, creator and
62
  * attendees, even if no real email address is available (i.e. a generated, non-
63
  * working value will be provided).
 
 
64
  * @opt_param int maxAttendees The maximum number of attendees to include in the
65
  * response. If there are more than the specified number of attendees, only the
66
  * participant is returned. Optional.
67
+ * @opt_param string timeZone Time zone used in the response. Optional. The
68
+ * default is the time zone of the calendar.
69
  * @return Google_Service_Calendar_Event
70
  */
71
  public function get($calendarId, $eventId, $optParams = array())
84
  * @param Google_Service_Calendar_Event $postBody
85
  * @param array $optParams Optional parameters.
86
  *
 
 
87
  * @opt_param int conferenceDataVersion Version number of conference data
88
  * supported by the API client. Version 0 assumes no conference data support and
89
  * ignores conference data in the event's body. Version 1 enables support for
90
  * copying of ConferenceData as well as for creating new conferences using the
91
  * createRequest field of conferenceData. The default is 0.
92
+ * @opt_param bool supportsAttachments Whether API client performing operation
93
+ * supports event attachments. Optional. The default is False.
94
  * @return Google_Service_Calendar_Event
95
  */
96
  public function import($calendarId, Google_Service_Calendar_Event $postBody, $optParams = array())
108
  * @param Google_Service_Calendar_Event $postBody
109
  * @param array $optParams Optional parameters.
110
  *
 
 
 
 
 
111
  * @opt_param int conferenceDataVersion Version number of conference data
112
  * supported by the API client. Version 0 assumes no conference data support and
113
  * ignores conference data in the event's body. Version 1 enables support for
114
  * copying of ConferenceData as well as for creating new conferences using the
115
  * createRequest field of conferenceData. The default is 0.
116
+ * @opt_param int maxAttendees The maximum number of attendees to include in the
117
+ * response. If there are more than the specified number of attendees, only the
118
+ * participant is returned. Optional.
119
  * @opt_param bool sendNotifications Deprecated. Please use sendUpdates instead.
120
  *
121
  * Whether to send notifications about the creation of the new event. Note that
122
  * some emails might still be sent even if you set the value to false. The
123
  * default is false.
124
+ * @opt_param string sendUpdates Whether to send notifications about the
125
+ * creation of the new event. Note that some emails might still be sent. The
126
+ * default is false.
127
+ * @opt_param bool supportsAttachments Whether API client performing operation
128
+ * supports event attachments. Optional. The default is False.
129
  * @return Google_Service_Calendar_Event
130
  */
131
  public function insert($calendarId, Google_Service_Calendar_Event $postBody, $optParams = array())
143
  * @param string $eventId Recurring event identifier.
144
  * @param array $optParams Optional parameters.
145
  *
 
 
 
146
  * @opt_param bool alwaysIncludeEmail Deprecated and ignored. A value will
147
  * always be returned in the email field for the organizer, creator and
148
  * attendees, even if no real email address is available (i.e. a generated, non-
149
  * working value will be provided).
 
 
 
 
 
 
 
 
 
 
150
  * @opt_param int maxAttendees The maximum number of attendees to include in the
151
  * response. If there are more than the specified number of attendees, only the
152
  * participant is returned. Optional.
153
+ * @opt_param int maxResults Maximum number of events returned on one result
154
+ * page. By default the value is 250 events. The page size can never be larger
155
+ * than 2500 events. Optional.
156
+ * @opt_param string originalStart The original start time of the instance in
157
+ * the result. Optional.
158
+ * @opt_param string pageToken Token specifying which result page to return.
159
+ * Optional.
160
  * @opt_param bool showDeleted Whether to include deleted events (with status
161
  * equals "cancelled") in the result. Cancelled instances of recurring events
162
  * will still be included if singleEvents is False. Optional. The default is
163
  * False.
164
+ * @opt_param string timeMax Upper bound (exclusive) for an event's start time
165
+ * to filter by. Optional. The default is not to filter by start time. Must be
166
+ * an RFC3339 timestamp with mandatory time zone offset.
167
+ * @opt_param string timeMin Lower bound (inclusive) for an event's end time to
168
+ * filter by. Optional. The default is not to filter by end time. Must be an
169
+ * RFC3339 timestamp with mandatory time zone offset.
170
+ * @opt_param string timeZone Time zone used in the response. Optional. The
171
+ * default is the time zone of the calendar.
172
  * @return Google_Service_Calendar_Events
173
  */
174
  public function instances($calendarId, $eventId, $optParams = array())
185
  * the currently logged in user, use the "primary" keyword.
186
  * @param array $optParams Optional parameters.
187
  *
188
+ * @opt_param bool alwaysIncludeEmail Deprecated and ignored. A value will
189
+ * always be returned in the email field for the organizer, creator and
190
+ * attendees, even if no real email address is available (i.e. a generated, non-
191
+ * working value will be provided).
192
+ * @opt_param string iCalUID Specifies event ID in the iCalendar format to be
193
+ * included in the response. Optional.
194
+ * @opt_param int maxAttendees The maximum number of attendees to include in the
195
+ * response. If there are more than the specified number of attendees, only the
196
+ * participant is returned. Optional.
 
 
197
  * @opt_param int maxResults Maximum number of events returned on one result
198
  * page. The number of events in the resulting page may be less than this value,
199
  * or none at all, even if there are more events matching the query. Incomplete
200
  * pages can be detected by a non-empty nextPageToken field in the response. By
201
  * default the value is 250 events. The page size can never be larger than 2500
202
  * events. Optional.
203
+ * @opt_param string orderBy The order of the events returned in the result.
204
+ * Optional. The default is an unspecified, stable order.
205
+ * @opt_param string pageToken Token specifying which result page to return.
206
+ * Optional.
207
+ * @opt_param string privateExtendedProperty Extended properties constraint
208
+ * specified as propertyName=value. Matches only private properties. This
209
+ * parameter might be repeated multiple times to return events that match all
210
+ * given constraints.
211
+ * @opt_param string q Free text search terms to find events that match these
212
+ * terms in any field, except for extended properties. Optional.
213
+ * @opt_param string sharedExtendedProperty Extended properties constraint
214
+ * specified as propertyName=value. Matches only shared properties. This
215
+ * parameter might be repeated multiple times to return events that match all
216
+ * given constraints.
217
  * @opt_param bool showDeleted Whether to include deleted events (with status
218
  * equals "cancelled") in the result. Cancelled instances of recurring events
219
  * (but not the underlying recurring event) will still be included if
220
  * showDeleted and singleEvents are both False. If showDeleted and singleEvents
221
  * are both True, only single instances of deleted events (but not the
222
  * underlying recurring events) are returned. Optional. The default is False.
223
+ * @opt_param bool showHiddenInvitations Whether to include hidden invitations
224
+ * in the result. Optional. The default is False.
225
+ * @opt_param bool singleEvents Whether to expand recurring events into
226
+ * instances and only return single one-off events and instances of recurring
227
+ * events, but not the underlying recurring events themselves. Optional. The
228
+ * default is False.
229
  * @opt_param string syncToken Token obtained from the nextSyncToken field
230
  * returned on the last page of results from the previous list request. It makes
231
  * the result of this list request contain only entries that have changed since
240
  * should clear its storage and perform a full synchronization without any
241
  * syncToken. Learn more about incremental synchronization. Optional. The
242
  * default is to return all entries.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
243
  * @opt_param string timeMax Upper bound (exclusive) for an event's start time
244
  * to filter by. Optional. The default is not to filter by start time. Must be
245
  * an RFC3339 timestamp with mandatory time zone offset, for example,
246
  * 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided
247
  * but are ignored. If timeMin is set, timeMax must be greater than timeMin.
248
+ * @opt_param string timeMin Lower bound (exclusive) for an event's end time to
249
+ * filter by. Optional. The default is not to filter by end time. Must be an
250
+ * RFC3339 timestamp with mandatory time zone offset, for example,
251
+ * 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided
252
+ * but are ignored. If timeMax is set, timeMin must be smaller than timeMax.
253
+ * @opt_param string timeZone Time zone used in the response. Optional. The
254
+ * default is the time zone of the calendar.
255
+ * @opt_param string updatedMin Lower bound for an event's last modification
256
+ * time (as a RFC3339 timestamp) to filter by. When specified, entries deleted
257
+ * since this time will always be included regardless of showDeleted. Optional.
258
+ * The default is not to filter by last modification time.
259
  * @return Google_Service_Calendar_Events
260
  */
261
  public function listEvents($calendarId, $optParams = array())
300
  * @param Google_Service_Calendar_Event $postBody
301
  * @param array $optParams Optional parameters.
302
  *
 
 
303
  * @opt_param bool alwaysIncludeEmail Deprecated and ignored. A value will
304
  * always be returned in the email field for the organizer, creator and
305
  * attendees, even if no real email address is available (i.e. a generated, non-
309
  * ignores conference data in the event's body. Version 1 enables support for
310
  * copying of ConferenceData as well as for creating new conferences using the
311
  * createRequest field of conferenceData. The default is 0.
312
+ * @opt_param int maxAttendees The maximum number of attendees to include in the
313
+ * response. If there are more than the specified number of attendees, only the
314
+ * participant is returned. Optional.
315
  * @opt_param bool sendNotifications Deprecated. Please use sendUpdates instead.
316
  *
317
  * Whether to send notifications about the event update (for example,
318
  * description changes, etc.). Note that some emails might still be sent even if
319
  * you set the value to false. The default is false.
 
 
 
320
  * @opt_param string sendUpdates Guests who should receive notifications about
321
  * the event update (for example, title changes, etc.).
322
+ * @opt_param bool supportsAttachments Whether API client performing operation
323
+ * supports event attachments. Optional. The default is False.
324
  * @return Google_Service_Calendar_Event
325
  */
326
  public function patch($calendarId, $eventId, Google_Service_Calendar_Event $postBody, $optParams = array())
363
  * @param Google_Service_Calendar_Event $postBody
364
  * @param array $optParams Optional parameters.
365
  *
366
+ * @opt_param bool alwaysIncludeEmail Deprecated and ignored. A value will
367
+ * always be returned in the email field for the organizer, creator and
368
+ * attendees, even if no real email address is available (i.e. a generated, non-
369
+ * working value will be provided).
370
  * @opt_param int conferenceDataVersion Version number of conference data
371
  * supported by the API client. Version 0 assumes no conference data support and
372
  * ignores conference data in the event's body. Version 1 enables support for
373
  * copying of ConferenceData as well as for creating new conferences using the
374
  * createRequest field of conferenceData. The default is 0.
375
+ * @opt_param int maxAttendees The maximum number of attendees to include in the
376
+ * response. If there are more than the specified number of attendees, only the
377
+ * participant is returned. Optional.
 
378
  * @opt_param bool sendNotifications Deprecated. Please use sendUpdates instead.
379
  *
380
  * Whether to send notifications about the event update (for example,
381
  * description changes, etc.). Note that some emails might still be sent even if
382
  * you set the value to false. The default is false.
383
+ * @opt_param string sendUpdates Guests who should receive notifications about
384
+ * the event update (for example, title changes, etc.).
385
+ * @opt_param bool supportsAttachments Whether API client performing operation
386
+ * supports event attachments. Optional. The default is False.
387
  * @return Google_Service_Calendar_Event
388
  */
389
  public function update($calendarId, $eventId, Google_Service_Calendar_Event $postBody, $optParams = array())
401
  * @param Google_Service_Calendar_Channel $postBody
402
  * @param array $optParams Optional parameters.
403
  *
404
+ * @opt_param bool alwaysIncludeEmail Deprecated and ignored. A value will
405
+ * always be returned in the email field for the organizer, creator and
406
+ * attendees, even if no real email address is available (i.e. a generated, non-
407
+ * working value will be provided).
408
+ * @opt_param string iCalUID Specifies event ID in the iCalendar format to be
409
+ * included in the response. Optional.
410
+ * @opt_param int maxAttendees The maximum number of attendees to include in the
411
+ * response. If there are more than the specified number of attendees, only the
412
+ * participant is returned. Optional.
413
  * @opt_param int maxResults Maximum number of events returned on one result
414
  * page. The number of events in the resulting page may be less than this value,
415
  * or none at all, even if there are more events matching the query. Incomplete
416
  * pages can be detected by a non-empty nextPageToken field in the response. By
417
  * default the value is 250 events. The page size can never be larger than 2500
418
  * events. Optional.
 
 
 
419
  * @opt_param string orderBy The order of the events returned in the result.
420
  * Optional. The default is an unspecified, stable order.
421
+ * @opt_param string pageToken Token specifying which result page to return.
422
+ * Optional.
423
+ * @opt_param string privateExtendedProperty Extended properties constraint
424
+ * specified as propertyName=value. Matches only private properties. This
425
+ * parameter might be repeated multiple times to return events that match all
426
+ * given constraints.
427
  * @opt_param string q Free text search terms to find events that match these
428
  * terms in any field, except for extended properties. Optional.
429
+ * @opt_param string sharedExtendedProperty Extended properties constraint
430
+ * specified as propertyName=value. Matches only shared properties. This
431
+ * parameter might be repeated multiple times to return events that match all
432
+ * given constraints.
433
+ * @opt_param bool showDeleted Whether to include deleted events (with status
434
+ * equals "cancelled") in the result. Cancelled instances of recurring events
435
+ * (but not the underlying recurring event) will still be included if
436
+ * showDeleted and singleEvents are both False. If showDeleted and singleEvents
437
+ * are both True, only single instances of deleted events (but not the
438
+ * underlying recurring events) are returned. Optional. The default is False.
439
+ * @opt_param bool showHiddenInvitations Whether to include hidden invitations
440
+ * in the result. Optional. The default is False.
441
+ * @opt_param bool singleEvents Whether to expand recurring events into
442
+ * instances and only return single one-off events and instances of recurring
443
+ * events, but not the underlying recurring events themselves. Optional. The
444
+ * default is False.
445
  * @opt_param string syncToken Token obtained from the nextSyncToken field
446
  * returned on the last page of results from the previous list request. It makes
447
  * the result of this list request contain only entries that have changed since
456
  * should clear its storage and perform a full synchronization without any
457
  * syncToken. Learn more about incremental synchronization. Optional. The
458
  * default is to return all entries.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
459
  * @opt_param string timeMax Upper bound (exclusive) for an event's start time
460
  * to filter by. Optional. The default is not to filter by start time. Must be
461
  * an RFC3339 timestamp with mandatory time zone offset, for example,
462
  * 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided
463
  * but are ignored. If timeMin is set, timeMax must be greater than timeMin.
464
+ * @opt_param string timeMin Lower bound (exclusive) for an event's end time to
465
+ * filter by. Optional. The default is not to filter by end time. Must be an
466
+ * RFC3339 timestamp with mandatory time zone offset, for example,
467
+ * 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided
468
+ * but are ignored. If timeMax is set, timeMin must be smaller than timeMax.
469
+ * @opt_param string timeZone Time zone used in the response. Optional. The
470
+ * default is the time zone of the calendar.
471
+ * @opt_param string updatedMin Lower bound for an event's last modification
472
+ * time (as a RFC3339 timestamp) to filter by. When specified, entries deleted
473
+ * since this time will always be included regardless of showDeleted. Optional.
474
+ * The default is not to filter by last modification time.
475
  * @return Google_Service_Calendar_Channel
476
  */
477
  public function watch($calendarId, Google_Service_Calendar_Channel $postBody, $optParams = array())
vendor/google/apiclient-services/src/Google/Service/Calendar/Resource/Settings.php CHANGED
@@ -43,6 +43,9 @@ class Google_Service_Calendar_Resource_Settings extends Google_Service_Resource
43
  *
44
  * @param array $optParams Optional parameters.
45
  *
 
 
 
46
  * @opt_param string pageToken Token specifying which result page to return.
47
  * Optional.
48
  * @opt_param string syncToken Token obtained from the nextSyncToken field
@@ -52,9 +55,6 @@ class Google_Service_Calendar_Resource_Settings extends Google_Service_Resource
52
  * response code and the client should clear its storage and perform a full
53
  * synchronization without any syncToken. Learn more about incremental
54
  * synchronization. Optional. The default is to return all entries.
55
- * @opt_param int maxResults Maximum number of entries returned on one result
56
- * page. By default the value is 100 entries. The page size can never be larger
57
- * than 250 entries. Optional.
58
  * @return Google_Service_Calendar_Settings
59
  */
60
  public function listSettings($optParams = array())
@@ -69,6 +69,11 @@ class Google_Service_Calendar_Resource_Settings extends Google_Service_Resource
69
  * @param Google_Service_Calendar_Channel $postBody
70
  * @param array $optParams Optional parameters.
71
  *
 
 
 
 
 
72
  * @opt_param string syncToken Token obtained from the nextSyncToken field
73
  * returned on the last page of results from the previous list request. It makes
74
  * the result of this list request contain only entries that have changed since
@@ -76,11 +81,6 @@ class Google_Service_Calendar_Resource_Settings extends Google_Service_Resource
76
  * response code and the client should clear its storage and perform a full
77
  * synchronization without any syncToken. Learn more about incremental
78
  * synchronization. Optional. The default is to return all entries.
79
- * @opt_param int maxResults Maximum number of entries returned on one result
80
- * page. By default the value is 100 entries. The page size can never be larger
81
- * than 250 entries. Optional.
82
- * @opt_param string pageToken Token specifying which result page to return.
83
- * Optional.
84
  * @return Google_Service_Calendar_Channel
85
  */
86
  public function watch(Google_Service_Calendar_Channel $postBody, $optParams = array())
43
  *
44
  * @param array $optParams Optional parameters.
45
  *
46
+ * @opt_param int maxResults Maximum number of entries returned on one result
47
+ * page. By default the value is 100 entries. The page size can never be larger
48
+ * than 250 entries. Optional.
49
  * @opt_param string pageToken Token specifying which result page to return.
50
  * Optional.
51
  * @opt_param string syncToken Token obtained from the nextSyncToken field
55
  * response code and the client should clear its storage and perform a full
56
  * synchronization without any syncToken. Learn more about incremental
57
  * synchronization. Optional. The default is to return all entries.
 
 
 
58
  * @return Google_Service_Calendar_Settings
59
  */
60
  public function listSettings($optParams = array())
69
  * @param Google_Service_Calendar_Channel $postBody
70
  * @param array $optParams Optional parameters.
71
  *
72
+ * @opt_param int maxResults Maximum number of entries returned on one result
73
+ * page. By default the value is 100 entries. The page size can never be larger
74
+ * than 250 entries. Optional.
75
+ * @opt_param string pageToken Token specifying which result page to return.
76
+ * Optional.
77
  * @opt_param string syncToken Token obtained from the nextSyncToken field
78
  * returned on the last page of results from the previous list request. It makes
79
  * the result of this list request contain only entries that have changed since
81
  * response code and the client should clear its storage and perform a full
82
  * synchronization without any syncToken. Learn more about incremental
83
  * synchronization. Optional. The default is to return all entries.
 
 
 
 
 
84
  * @return Google_Service_Calendar_Channel
85
  */
86
  public function watch(Google_Service_Calendar_Channel $postBody, $optParams = array())
vendor/google/apiclient-services/src/Google/Service/Calendar/Settings.php CHANGED
@@ -34,14 +34,14 @@ class Google_Service_Calendar_Settings extends Google_Collection
34
  return $this->etag;
35
  }
36
  /**
37
- * @param Google_Service_Calendar_Setting
38
  */
39
  public function setItems($items)
40
  {
41
  $this->items = $items;
42
  }
43
  /**
44
- * @return Google_Service_Calendar_Setting
45
  */
46
  public function getItems()
47
  {
34
  return $this->etag;
35
  }
36
  /**
37
+ * @param Google_Service_Calendar_Setting[]
38
  */
39
  public function setItems($items)
40
  {
41
  $this->items = $items;
42
  }
43
  /**
44
+ * @return Google_Service_Calendar_Setting[]
45
  */
46
  public function getItems()
47
  {
vendor/google/apiclient-services/src/Google/Service/Drive.php CHANGED
@@ -66,7 +66,7 @@ class Google_Service_Drive extends Google_Service
66
  public $replies;
67
  public $revisions;
68
  public $teamdrives;
69
-
70
  /**
71
  * Constructs the internal representation of the Drive service.
72
  *
66
  public $replies;
67
  public $revisions;
68
  public $teamdrives;
69
+
70
  /**
71
  * Constructs the internal representation of the Drive service.
72
  *
vendor/google/apiclient-services/src/Google/Service/Drive/About.php CHANGED
@@ -61,14 +61,14 @@ class Google_Service_Drive_About extends Google_Collection
61
  return $this->canCreateTeamDrives;
62
  }
63
  /**
64
- * @param Google_Service_Drive_AboutDriveThemes
65
  */
66
  public function setDriveThemes($driveThemes)
67
  {
68
  $this->driveThemes = $driveThemes;
69
  }
70
  /**
71
- * @return Google_Service_Drive_AboutDriveThemes
72
  */
73
  public function getDriveThemes()
74
  {
@@ -137,14 +137,14 @@ class Google_Service_Drive_About extends Google_Collection
137
  return $this->storageQuota;
138
  }
139
  /**
140
- * @param Google_Service_Drive_AboutTeamDriveThemes
141
  */
142
  public function setTeamDriveThemes($teamDriveThemes)
143
  {
144
  $this->teamDriveThemes = $teamDriveThemes;
145
  }
146
  /**
147
- * @return Google_Service_Drive_AboutTeamDriveThemes
148
  */
149
  public function getTeamDriveThemes()
150
  {
61
  return $this->canCreateTeamDrives;
62
  }
63
  /**
64
+ * @param Google_Service_Drive_AboutDriveThemes[]
65
  */
66
  public function setDriveThemes($driveThemes)
67
  {
68
  $this->driveThemes = $driveThemes;
69
  }
70
  /**
71
+ * @return Google_Service_Drive_AboutDriveThemes[]
72
  */
73
  public function getDriveThemes()
74
  {
137
  return $this->storageQuota;
138
  }
139
  /**
140
+ * @param Google_Service_Drive_AboutTeamDriveThemes[]
141
  */
142
  public function setTeamDriveThemes($teamDriveThemes)
143
  {
144
  $this->teamDriveThemes = $teamDriveThemes;
145
  }
146
  /**
147
+ * @return Google_Service_Drive_AboutTeamDriveThemes[]
148
  */
149
  public function getTeamDriveThemes()
150
  {
vendor/google/apiclient-services/src/Google/Service/Drive/ChangeList.php CHANGED
@@ -25,14 +25,14 @@ class Google_Service_Drive_ChangeList extends Google_Collection
25
  public $nextPageToken;
26
 
27
  /**
28
- * @param Google_Service_Drive_Change
29
  */
30
  public function setChanges($changes)
31
  {
32
  $this->changes = $changes;
33
  }
34
  /**
35
- * @return Google_Service_Drive_Change
36
  */
37
  public function getChanges()
38
  {
25
  public $nextPageToken;
26
 
27
  /**
28
+ * @param Google_Service_Drive_Change[]
29
  */
30
  public function setChanges($changes)
31
  {
32
  $this->changes = $changes;
33
  }
34
  /**
35
+ * @return Google_Service_Drive_Change[]
36
  */
37
  public function getChanges()
38
  {
vendor/google/apiclient-services/src/Google/Service/Drive/Comment.php CHANGED
@@ -127,14 +127,14 @@ class Google_Service_Drive_Comment extends Google_Collection
127
  return $this->quotedFileContent;
128
  }
129
  /**
130
- * @param Google_Service_Drive_Reply
131
  */
132
  public function setReplies($replies)
133
  {
134
  $this->replies = $replies;
135
  }
136
  /**
137
- * @return Google_Service_Drive_Reply
138
  */
139
  public function getReplies()
140
  {
127
  return $this->quotedFileContent;
128
  }
129
  /**
130
+ * @param Google_Service_Drive_Reply[]
131
  */
132
  public function setReplies($replies)
133
  {
134
  $this->replies = $replies;
135
  }
136
  /**
137
+ * @return Google_Service_Drive_Reply[]
138
  */
139
  public function getReplies()
140
  {
vendor/google/apiclient-services/src/Google/Service/Drive/CommentList.php CHANGED
@@ -24,14 +24,14 @@ class Google_Service_Drive_CommentList extends Google_Collection
24
  public $nextPageToken;
25
 
26
  /**
27
- * @param Google_Service_Drive_Comment
28
  */
29
  public function setComments($comments)
30
  {
31
  $this->comments = $comments;
32
  }
33
  /**
34
- * @return Google_Service_Drive_Comment
35
  */
36
  public function getComments()
37
  {
24
  public $nextPageToken;
25
 
26
  /**
27
+ * @param Google_Service_Drive_Comment[]
28
  */
29
  public function setComments($comments)
30
  {
31
  $this->comments = $comments;
32
  }
33
  /**
34
+ * @return Google_Service_Drive_Comment[]
35
  */
36
  public function getComments()
37
  {
vendor/google/apiclient-services/src/Google/Service/Drive/DriveFile.php CHANGED
@@ -124,14 +124,14 @@ class Google_Service_Drive_DriveFile extends Google_Collection
124
  return $this->contentHints;
125
  }
126
  /**
127
- * @param Google_Service_Drive_ContentRestriction
128
  */
129
  public function setContentRestrictions($contentRestrictions)
130
  {
131
  $this->contentRestrictions = $contentRestrictions;
132
  }
133
  /**
134
- * @return Google_Service_Drive_ContentRestriction
135
  */
136
  public function getContentRestrictions()
137
  {
@@ -358,14 +358,14 @@ class Google_Service_Drive_DriveFile extends Google_Collection
358
  return $this->ownedByMe;
359
  }
360
  /**
361
- * @param Google_Service_Drive_User
362
  */
363
  public function setOwners($owners)
364
  {
365
  $this->owners = $owners;
366
  }
367
  /**
368
- * @return Google_Service_Drive_User
369
  */
370
  public function getOwners()
371
  {
@@ -388,14 +388,14 @@ class Google_Service_Drive_DriveFile extends Google_Collection
388
  return $this->permissionIds;
389
  }
390
  /**
391
- * @param Google_Service_Drive_Permission
392
  */
393
  public function setPermissions($permissions)
394
  {
395
  $this->permissions = $permissions;
396
  }
397
  /**
398
- * @return Google_Service_Drive_Permission
399
  */
400
  public function getPermissions()
401
  {
124
  return $this->contentHints;
125
  }
126
  /**
127
+ * @param Google_Service_Drive_ContentRestriction[]
128
  */
129
  public function setContentRestrictions($contentRestrictions)
130
  {
131
  $this->contentRestrictions = $contentRestrictions;
132
  }
133
  /**
134
+ * @return Google_Service_Drive_ContentRestriction[]
135
  */
136
  public function getContentRestrictions()
137
  {
358
  return $this->ownedByMe;
359
  }
360
  /**
361
+ * @param Google_Service_Drive_User[]
362
  */
363
  public function setOwners($owners)
364
  {
365
  $this->owners = $owners;
366
  }
367
  /**
368
+ * @return Google_Service_Drive_User[]
369
  */
370
  public function getOwners()
371
  {
388
  return $this->permissionIds;
389
  }
390
  /**
391
+ * @param Google_Service_Drive_Permission[]
392
  */
393
  public function setPermissions($permissions)
394
  {
395
  $this->permissions = $permissions;
396
  }
397
  /**
398
+ * @return Google_Service_Drive_Permission[]
399
  */
400
  public function getPermissions()
401
  {
vendor/google/apiclient-services/src/Google/Service/Drive/DriveList.php CHANGED
@@ -24,14 +24,14 @@ class Google_Service_Drive_DriveList extends Google_Collection
24
  public $nextPageToken;
25
 
26
  /**
27
- * @param Google_Service_Drive_Drive
28
  */
29
  public function setDrives($drives)
30
  {
31
  $this->drives = $drives;
32
  }
33
  /**
34
- * @return Google_Service_Drive_Drive
35
  */
36
  public function getDrives()
37
  {
24
  public $nextPageToken;
25
 
26
  /**
27
+ * @param Google_Service_Drive_Drive[]
28
  */
29
  public function setDrives($drives)
30
  {
31
  $this->drives = $drives;
32
  }
33
  /**
34
+ * @return Google_Service_Drive_Drive[]
35
  */
36
  public function getDrives()
37
  {
vendor/google/apiclient-services/src/Google/Service/Drive/FileList.php CHANGED
@@ -25,14 +25,14 @@ class Google_Service_Drive_FileList extends Google_Collection
25
  public $nextPageToken;
26
 
27
  /**
28
- * @param Google_Service_Drive_DriveFile
29
  */
30
  public function setFiles($files)
31
  {
32
  $this->files = $files;
33
  }
34
  /**
35
- * @return Google_Service_Drive_DriveFile
36
  */
37
  public function getFiles()
38
  {
25
  public $nextPageToken;
26
 
27
  /**
28
+ * @param Google_Service_Drive_DriveFile[]
29
  */
30
  public function setFiles($files)
31
  {
32
  $this->files = $files;
33
  }
34
  /**
35
+ * @return Google_Service_Drive_DriveFile[]
36
  */
37
  public function getFiles()
38
  {
vendor/google/apiclient-services/src/Google/Service/Drive/Permission.php CHANGED
@@ -100,14 +100,14 @@ class Google_Service_Drive_Permission extends Google_Collection
100
  return $this->kind;
101
  }
102
  /**
103
- * @param Google_Service_Drive_PermissionPermissionDetails
104
  */
105
  public function setPermissionDetails($permissionDetails)
106
  {
107
  $this->permissionDetails = $permissionDetails;
108
  }
109
  /**
110
- * @return Google_Service_Drive_PermissionPermissionDetails
111
  */
112
  public function getPermissionDetails()
113
  {
@@ -130,14 +130,14 @@ class Google_Service_Drive_Permission extends Google_Collection
130
  return $this->role;
131
  }
132
  /**
133
- * @param Google_Service_Drive_PermissionTeamDrivePermissionDetails
134
  */
135
  public function setTeamDrivePermissionDetails($teamDrivePermissionDetails)
136
  {
137
  $this->teamDrivePermissionDetails = $teamDrivePermissionDetails;
138
  }
139
  /**
140
- * @return Google_Service_Drive_PermissionTeamDrivePermissionDetails
141
  */
142
  public function getTeamDrivePermissionDetails()
143
  {
100
  return $this->kind;
101
  }
102
  /**
103
+ * @param Google_Service_Drive_PermissionPermissionDetails[]
104
  */
105
  public function setPermissionDetails($permissionDetails)
106
  {
107
  $this->permissionDetails = $permissionDetails;
108
  }
109
  /**
110
+ * @return Google_Service_Drive_PermissionPermissionDetails[]
111
  */
112
  public function getPermissionDetails()
113
  {
130
  return $this->role;
131
  }
132
  /**
133
+ * @param Google_Service_Drive_PermissionTeamDrivePermissionDetails[]
134
  */
135
  public function setTeamDrivePermissionDetails($teamDrivePermissionDetails)
136
  {
137
  $this->teamDrivePermissionDetails = $teamDrivePermissionDetails;
138
  }
139
  /**
140
+ * @return Google_Service_Drive_PermissionTeamDrivePermissionDetails[]
141
  */
142
  public function getTeamDrivePermissionDetails()
143
  {
vendor/google/apiclient-services/src/Google/Service/Drive/PermissionList.php CHANGED
@@ -40,14 +40,14 @@ class Google_Service_Drive_PermissionList extends Google_Collection
40
  return $this->nextPageToken;
41
  }
42
  /**
43
- * @param Google_Service_Drive_Permission
44
  */
45
  public function setPermissions($permissions)
46
  {
47
  $this->permissions = $permissions;
48
  }
49
  /**
50
- * @return Google_Service_Drive_Permission
51
  */
52
  public function getPermissions()
53
  {
40
  return $this->nextPageToken;
41
  }
42
  /**
43
+ * @param Google_Service_Drive_Permission[]
44
  */
45
  public function setPermissions($permissions)
46
  {
47
  $this->permissions = $permissions;
48
  }
49
  /**
50
+ * @return Google_Service_Drive_Permission[]
51
  */
52
  public function getPermissions()
53
  {
vendor/google/apiclient-services/src/Google/Service/Drive/ReplyList.php CHANGED
@@ -40,14 +40,14 @@ class Google_Service_Drive_ReplyList extends Google_Collection
40
  return $this->nextPageToken;
41
  }
42
  /**
43
- * @param Google_Service_Drive_Reply
44
  */
45
  public function setReplies($replies)
46
  {
47
  $this->replies = $replies;
48
  }
49
  /**
50
- * @return Google_Service_Drive_Reply
51
  */
52
  public function getReplies()
53
  {
40
  return $this->nextPageToken;
41
  }
42
  /**
43
+ * @param Google_Service_Drive_Reply[]
44
  */
45
  public function setReplies($replies)
46
  {
47
  $this->replies = $replies;
48
  }
49
  /**
50
+ * @return Google_Service_Drive_Reply[]
51
  */
52
  public function getReplies()
53
  {
vendor/google/apiclient-services/src/Google/Service/Drive/Resource/Files.php CHANGED
@@ -33,10 +33,8 @@ class Google_Service_Drive_Resource_Files extends Google_Service_Resource
33
  * @param Google_Service_Drive_DriveFile $postBody
34
  * @param array $optParams Optional parameters.
35
  *
36
- * @opt_param bool enforceSingleParent Set to true to opt in to API behavior
37
- * that aims for all items to have exactly one parent. This parameter only takes
38
- * effect if the item is not in a shared drive. Requests that specify more than
39
- * one parent fail.
40
  * @opt_param bool ignoreDefaultVisibility Whether to ignore the domain's
41
  * default visibility settings for the created file. Domain administrators can
42
  * choose to make all uploaded files visible to the domain by default; this
@@ -67,10 +65,8 @@ class Google_Service_Drive_Resource_Files extends Google_Service_Resource
67
  * @param Google_Service_Drive_DriveFile $postBody
68
  * @param array $optParams Optional parameters.
69
  *
70
- * @opt_param bool enforceSingleParent Set to true to opt in to API behavior
71
- * that aims for all items to have exactly one parent. This parameter only takes
72
- * effect if the item is not in a shared drive. Requests that specify more than
73
- * one parent fail.
74
  * @opt_param bool ignoreDefaultVisibility Whether to ignore the domain's
75
  * default visibility settings for the created file. Domain administrators can
76
  * choose to make all uploaded files visible to the domain by default; this
@@ -106,11 +102,9 @@ class Google_Service_Drive_Resource_Files extends Google_Service_Resource
106
  * @param string $fileId The ID of the file.
107
  * @param array $optParams Optional parameters.
108
  *
109
- * @opt_param bool enforceSingleParent Set to true to opt in to API behavior
110
- * that aims for all items to have exactly one parent. This parameter will only
111
- * take effect if the item is not in a shared drive. If an item's last parent is
112
- * deleted but the item itself is not, the item will be placed under its owner's
113
- * root.
114
  * @opt_param bool supportsAllDrives Whether the requesting application supports
115
  * both My Drives and shared drives.
116
  * @opt_param bool supportsTeamDrives Deprecated use supportsAllDrives instead.
@@ -126,11 +120,9 @@ class Google_Service_Drive_Resource_Files extends Google_Service_Resource
126
  *
127
  * @param array $optParams Optional parameters.
128
  *
129
- * @opt_param bool enforceSingleParent Set to true to opt in to API behavior
130
- * that aims for all items to have exactly one parent. This parameter will only
131
- * take effect if the item is not in a shared drive. If an item's last parent is
132
- * deleted but the item itself is not, the item will be placed under its owner's
133
- * root.
134
  */
135
  public function emptyTrash($optParams = array())
136
  {
@@ -253,13 +245,8 @@ class Google_Service_Drive_Resource_Files extends Google_Service_Resource
253
  * @param array $optParams Optional parameters.
254
  *
255
  * @opt_param string addParents A comma-separated list of parent IDs to add.
256
- * @opt_param bool enforceSingleParent Set to true to opt in to API behavior
257
- * that aims for all items to have exactly one parent. This parameter only takes
258
- * effect if the item is not in a shared drive. If the item's owner makes a
259
- * request to add a single parent, the item is removed from all current folders
260
- * and placed in the requested folder. Other requests that increase the number
261
- * of parents fail, except when the canAddMyDriveParent file capability is true
262
- * and a single parent is being added.
263
  * @opt_param string includePermissionsForView Specifies which additional view's
264
  * permissions to include in the response. Only 'published' is supported.
265
  * @opt_param bool keepRevisionForever Whether to set the 'keepForever' field in
33
  * @param Google_Service_Drive_DriveFile $postBody
34
  * @param array $optParams Optional parameters.
35
  *
36
+ * @opt_param bool enforceSingleParent Deprecated. Copying files into multiple
37
+ * folders is no longer supported. Use shortcuts instead.
 
 
38
  * @opt_param bool ignoreDefaultVisibility Whether to ignore the domain's
39
  * default visibility settings for the created file. Domain administrators can
40
  * choose to make all uploaded files visible to the domain by default; this
65
  * @param Google_Service_Drive_DriveFile $postBody
66
  * @param array $optParams Optional parameters.
67
  *
68
+ * @opt_param bool enforceSingleParent Deprecated. Creating files in multiple
69
+ * folders is no longer supported.
 
 
70
  * @opt_param bool ignoreDefaultVisibility Whether to ignore the domain's
71
  * default visibility settings for the created file. Domain administrators can
72
  * choose to make all uploaded files visible to the domain by default; this
102
  * @param string $fileId The ID of the file.
103
  * @param array $optParams Optional parameters.
104
  *
105
+ * @opt_param bool enforceSingleParent Deprecated. If an item is not in a shared
106
+ * drive and its last parent is deleted but the item itself is not, the item
107
+ * will be placed under its owner's root.
 
 
108
  * @opt_param bool supportsAllDrives Whether the requesting application supports
109
  * both My Drives and shared drives.
110
  * @opt_param bool supportsTeamDrives Deprecated use supportsAllDrives instead.
120
  *
121
  * @param array $optParams Optional parameters.
122
  *
123
+ * @opt_param bool enforceSingleParent Deprecated. If an item is not in a shared
124
+ * drive and its last parent is deleted but the item itself is not, the item
125
+ * will be placed under its owner's root.
 
 
126
  */
127
  public function emptyTrash($optParams = array())
128
  {
245
  * @param array $optParams Optional parameters.
246
  *
247
  * @opt_param string addParents A comma-separated list of parent IDs to add.
248
+ * @opt_param bool enforceSingleParent Deprecated. Adding files to multiple
249
+ * folders is no longer supported. Use shortcuts instead.
 
 
 
 
 
250
  * @opt_param string includePermissionsForView Specifies which additional view's
251
  * permissions to include in the response. Only 'published' is supported.
252
  * @opt_param bool keepRevisionForever Whether to set the 'keepForever' field in
vendor/google/apiclient-services/src/Google/Service/Drive/Resource/Permissions.php CHANGED
@@ -34,18 +34,13 @@ class Google_Service_Drive_Resource_Permissions extends Google_Service_Resource
34
  *
35
  * @opt_param string emailMessage A plain text custom message to include in the
36
  * notification email.
37
- * @opt_param bool enforceSingleParent Set to true to opt in to API behavior
38
- * that aims for all items to have exactly one parent. This parameter only takes
39
- * effect if the item is not in a shared drive. See moveToNewOwnersRoot for
40
  * details.
41
- * @opt_param bool moveToNewOwnersRoot This parameter only takes effect if the
42
- * item is not in a shared drive and the request is attempting to transfer the
43
- * ownership of the item. When set to true, the item is moved to the new owner's
44
- * My Drive root folder and all prior parents removed. If set to false, when
45
- * enforceSingleParent=true, parents are not changed. If set to false, when
46
- * enforceSingleParent=false, existing parents are not changed; however, the
47
- * file will be added to the new owner's My Drive root folder, unless it is
48
- * already in the new owner's My Drive.
49
  * @opt_param bool sendNotificationEmail Whether to send a notification email
50
  * when sharing to users or groups. This defaults to true for users and groups,
51
  * and is not allowed for other requests. It must not be disabled for ownership
34
  *
35
  * @opt_param string emailMessage A plain text custom message to include in the
36
  * notification email.
37
+ * @opt_param bool enforceSingleParent Deprecated. See moveToNewOwnersRoot for
 
 
38
  * details.
39
+ * @opt_param bool moveToNewOwnersRoot This parameter will only take effect if
40
+ * the item is not in a shared drive and the request is attempting to transfer
41
+ * the ownership of the item. If set to true, the item will be moved to the new
42
+ * owner's My Drive root folder and all prior parents removed. If set to false,
43
+ * parents are not changed.
 
 
 
44
  * @opt_param bool sendNotificationEmail Whether to send a notification email
45
  * when sharing to users or groups. This defaults to true for users and groups,
46
  * and is not allowed for other requests. It must not be disabled for ownership
vendor/google/apiclient-services/src/Google/Service/Drive/RevisionList.php CHANGED
@@ -40,14 +40,14 @@ class Google_Service_Drive_RevisionList extends Google_Collection
40
  return $this->nextPageToken;
41
  }
42
  /**
43
- * @param Google_Service_Drive_Revision
44
  */
45
  public function setRevisions($revisions)
46
  {
47
  $this->revisions = $revisions;
48
  }
49
  /**
50
- * @return Google_Service_Drive_Revision
51
  */
52
  public function getRevisions()
53
  {
40
  return $this->nextPageToken;
41
  }
42
  /**
43
+ * @param Google_Service_Drive_Revision[]
44
  */
45
  public function setRevisions($revisions)
46
  {
47
  $this->revisions = $revisions;
48
  }
49
  /**
50
+ * @return Google_Service_Drive_Revision[]
51
  */
52
  public function getRevisions()
53
  {
vendor/google/apiclient-services/src/Google/Service/Drive/TeamDriveList.php CHANGED
@@ -40,14 +40,14 @@ class Google_Service_Drive_TeamDriveList extends Google_Collection
40
  return $this->nextPageToken;
41
  }
42
  /**
43
- * @param Google_Service_Drive_TeamDrive
44
  */
45
  public function setTeamDrives($teamDrives)
46
  {
47
  $this->teamDrives = $teamDrives;
48
  }
49
  /**
50
- * @return Google_Service_Drive_TeamDrive
51
  */
52
  public function getTeamDrives()
53
  {
40
  return $this->nextPageToken;
41
  }
42
  /**
43
+ * @param Google_Service_Drive_TeamDrive[]
44
  */
45
  public function setTeamDrives($teamDrives)
46
  {
47
  $this->teamDrives = $teamDrives;
48
  }
49
  /**
50
+ * @return Google_Service_Drive_TeamDrive[]
51
  */
52
  public function getTeamDrives()
53
  {
vendor/google/apiclient-services/synth.metadata ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "sources": [
3
+ {
4
+ "git": {
5
+ "name": ".",
6
+ "remote": "https://github.com/googleapis/google-api-php-client-services.git",
7
+ "sha": "1684fb9fe7877332b2eb945402ec417ad84b6b9d"
8
+ }
9
+ },
10
+ {
11
+ "git": {
12
+ "name": "discovery-artifact-manager",
13
+ "remote": "https://github.com/googleapis/discovery-artifact-manager.git",
14
+ "sha": "2a5ed0969936e42cd3f3d7fa5eb0573c9ed275c2"
15
+ }
16
+ }
17
+ ]
18
+ }
vendor/google/apiclient-services/synth.py ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ """This script is used to synthesize generated parts of this library."""
16
+
17
+ import synthtool as s
18
+ from synthtool.__main__ import extra_args
19
+ from synthtool import log, shell
20
+ from synthtool.sources import git
21
+ import logging
22
+ from os import path, remove
23
+ from pathlib import Path
24
+ import glob
25
+ import json
26
+ import re
27
+ import sys
28
+ from packaging import version
29
+
30
+ logging.basicConfig(level=logging.DEBUG)
31
+
32
+ VERSION_REGEX = r"([^\.]*)\.(.+)\.json$"
33
+
34
+ TEMPLATE_VERSIONS = [
35
+ "default",
36
+ ]
37
+ discovery_url = "https://github.com/googleapis/discovery-artifact-manager.git"
38
+
39
+ repository = Path('.')
40
+
41
+ log.debug(f"Cloning {discovery_url}.")
42
+ discovery = git.clone(discovery_url)
43
+
44
+ log.debug("Cleaning output directory.")
45
+ shell.run("rm -rf .cache".split(), cwd=repository)
46
+
47
+ log.debug("Installing dependencies.")
48
+ shell.run(
49
+ "python2 -m pip install -e generator/ --user".split(),
50
+ cwd=repository
51
+ )
52
+
53
+ def generate_service(disco: str):
54
+ m = re.search(VERSION_REGEX, disco)
55
+ name = m.group(1)
56
+ version = m.group(2)
57
+ template = TEMPLATE_VERSIONS[-1] # Generate for latest version
58
+
59
+ log.info(f"Generating {name} {version} ({template}).")
60
+
61
+ output_dir = repository / ".cache" / name / version
62
+ input_file = discovery / "discoveries" / disco
63
+
64
+ command = (
65
+ f"python2 -m googleapis.codegen --output_dir={output_dir}" +
66
+ f" --input={input_file} --language=php --language_variant={template}" +
67
+ f" --package_path=api/services"
68
+ )
69
+
70
+ shell.run(f"mkdir -p {output_dir}".split(), cwd=repository / "generator")
71
+ shell.run(command.split(), cwd=repository, hide_output=False)
72
+
73
+ s.copy(output_dir, f"src/Google/Service")
74
+
75
+ def all_discoveries(skip=None, prefer=None):
76
+ """Returns a map of API IDs to Discovery document filenames.
77
+
78
+ Args:
79
+ skip (list, optional): a list of API IDs to skip.
80
+ prefer (list, optional): a list of API IDs to include.
81
+
82
+ Returns:
83
+ list(string): A list of Discovery document filenames.
84
+ """
85
+ discos = {}
86
+ for file in sorted(glob.glob(str(discovery / 'discoveries/*.*.json'))):
87
+ api_id = None
88
+ with open(file) as api_file:
89
+ api_id = json.load(api_file)['id']
90
+ # If an API has already been visited, skip it.
91
+ if api_id in discos:
92
+ continue
93
+ # Skip APIs explicitly listed in "skip" arg
94
+ if skip and api_id in skip:
95
+ continue
96
+ discos[api_id] = path.basename(file)
97
+
98
+ # Skip APIs not preferred in index.json and not listed in "prefer" arg
99
+ index = {}
100
+ with open(str(discovery / 'discoveries/index.json')) as file:
101
+ index = json.load(file)
102
+ for api in index['items']:
103
+ api_id = api['id']
104
+ if prefer and api_id in prefer:
105
+ continue
106
+ if api['preferred']:
107
+ continue
108
+ discos.pop(api_id, None)
109
+
110
+ return discos.values()
111
+
112
+ def generate_services(services):
113
+ for service in services:
114
+ generate_service(service)
115
+
116
+ skip = ['discovery:v1', 'websecurityscanner:v1']
117
+ prefer = ['admin:directory_v1', 'admin:datatransfer_v1']
118
+ discoveries = all_discoveries(skip, prefer)
119
+ generate_services(discoveries)
vendor/google/apiclient/README.md CHANGED
@@ -52,7 +52,7 @@ This library relies on `google/apiclient-services`. That library provides up-to-
52
 
53
  There are over 200 Google API services. The chances are good that you will not
54
  want them all. In order to avoid shipping these dependencies with your code,
55
- you can run the `Google_Task_Composer::cleanup` task and specify the services
56
  you want to keep in `composer.json`:
57
 
58
  ```json
@@ -61,7 +61,7 @@ you want to keep in `composer.json`:
61
  "google/apiclient": "^2.7"
62
  },
63
  "scripts": {
64
- "post-update-cmd": "Google_Task_Composer::cleanup"
65
  },
66
  "extra": {
67
  "google/apiclient-services": [
@@ -131,7 +131,7 @@ And then browsing to the host and port you specified
131
  // include your composer dependencies
132
  require_once 'vendor/autoload.php';
133
 
134
- $client = new Google_Client();
135
  $client->setApplicationName("Client_Library_Examples");
136
  $client->setDeveloperKey("YOUR_APP_KEY");
137
 
@@ -153,10 +153,10 @@ foreach ($results->getItems() as $item) {
153
 
154
  1. Follow the instructions to [Create Web Application Credentials](docs/oauth-web.md#create-authorization-credentials)
155
  1. Download the JSON credentials
156
- 1. Set the path to these credentials using `Google_Client::setAuthConfig`:
157
 
158
  ```php
159
- $client = new Google_Client();
160
  $client->setAuthConfig('/path/to/client_credentials.json');
161
  ```
162
 
@@ -203,7 +203,7 @@ calls return unexpected 401 or 403 errors.
203
  1. Tell the Google client to use your service account credentials to authenticate:
204
 
205
  ```php
206
- $client = new Google_Client();
207
  $client->useApplicationDefaultCredentials();
208
  ```
209
 
@@ -311,7 +311,7 @@ The `authorize` method returns an authorized [Guzzle Client](http://docs.guzzlep
311
 
312
  ```php
313
  // create the Google client
314
- $client = new Google_Client();
315
 
316
  /**
317
  * Set your method for authentication. Depending on the API, This could be
@@ -355,7 +355,7 @@ composer require cache/filesystem-adapter
355
  When using [Refresh Tokens](https://developers.google.com/identity/protocols/OAuth2InstalledApp#offline) or [Service Account Credentials](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#overview), it may be useful to perform some action when a new access token is granted. To do this, pass a callable to the `setTokenCallback` method on the client:
356
 
357
  ```php
358
- $logger = new Monolog\Logger;
359
  $tokenCallback = function ($cacheKey, $accessToken) use ($logger) {
360
  $logger->debug(sprintf('new access token received at cache key %s', $cacheKey));
361
  };
@@ -373,7 +373,7 @@ $httpClient = new GuzzleHttp\Client([
373
  'verify' => false, // otherwise HTTPS requests will fail.
374
  ]);
375
 
376
- $client = new Google_Client();
377
  $client->setHttpClient($httpClient);
378
  ```
379
 
@@ -396,7 +396,7 @@ $httpClient = new Client([
396
  ]
397
  ]);
398
 
399
- $client = new Google_Client();
400
  $client->setHttpClient($httpClient);
401
  ```
402
 
@@ -438,7 +438,7 @@ $opt_params = array(
438
 
439
  ### How do I set a field to null? ###
440
 
441
- The library strips out nulls from the objects sent to the Google APIs as its the default value of all of the uninitialized properties. To work around this, set the field you want to null to `Google_Model::NULL_VALUE`. This is a placeholder that will be replaced with a true null when sent over the wire.
442
 
443
  ## Code Quality ##
444
 
52
 
53
  There are over 200 Google API services. The chances are good that you will not
54
  want them all. In order to avoid shipping these dependencies with your code,
55
+ you can run the `Google\Task\Composer::cleanup` task and specify the services
56
  you want to keep in `composer.json`:
57
 
58
  ```json
61
  "google/apiclient": "^2.7"
62
  },
63
  "scripts": {
64
+ "post-update-cmd": "Google\\Task\\Composer::cleanup"
65
  },
66
  "extra": {
67
  "google/apiclient-services": [
131
  // include your composer dependencies
132
  require_once 'vendor/autoload.php';
133
 
134
+ $client = new Google\Client();
135
  $client->setApplicationName("Client_Library_Examples");
136
  $client->setDeveloperKey("YOUR_APP_KEY");
137
 
153
 
154
  1. Follow the instructions to [Create Web Application Credentials](docs/oauth-web.md#create-authorization-credentials)
155
  1. Download the JSON credentials
156
+ 1. Set the path to these credentials using `Google\Client::setAuthConfig`:
157
 
158
  ```php
159
+ $client = new Google\Client();
160
  $client->setAuthConfig('/path/to/client_credentials.json');
161
  ```
162
 
203
  1. Tell the Google client to use your service account credentials to authenticate:
204
 
205
  ```php
206
+ $client = new Google\Client();
207
  $client->useApplicationDefaultCredentials();
208
  ```
209
 
311
 
312
  ```php
313
  // create the Google client
314
+ $client = new Google\Client();
315
 
316
  /**
317
  * Set your method for authentication. Depending on the API, This could be
355
  When using [Refresh Tokens](https://developers.google.com/identity/protocols/OAuth2InstalledApp#offline) or [Service Account Credentials](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#overview), it may be useful to perform some action when a new access token is granted. To do this, pass a callable to the `setTokenCallback` method on the client:
356
 
357
  ```php
358
+ $logger = new Monolog\Logger();
359
  $tokenCallback = function ($cacheKey, $accessToken) use ($logger) {
360
  $logger->debug(sprintf('new access token received at cache key %s', $cacheKey));
361
  };
373
  'verify' => false, // otherwise HTTPS requests will fail.
374
  ]);
375
 
376
+ $client = new Google\Client();
377
  $client->setHttpClient($httpClient);
378
  ```
379
 
396
  ]
397
  ]);
398
 
399
+ $client = new Google\Client();
400
  $client->setHttpClient($httpClient);
401
  ```
402
 
438
 
439
  ### How do I set a field to null? ###
440
 
441
+ The library strips out nulls from the objects sent to the Google APIs as its the default value of all of the uninitialized properties. To work around this, set the field you want to null to `Google\Model::NULL_VALUE`. This is a placeholder that will be replaced with a true null when sent over the wire.
442
 
443
  ## Code Quality ##
444
 
vendor/google/apiclient/composer.json CHANGED
@@ -22,18 +22,21 @@
22
  "symfony/css-selector": "~2.1",
23
  "cache/filesystem-adapter": "^0.3.2",
24
  "phpcompatibility/php-compatibility": "^9.2",
25
- "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
26
  "composer/composer": "^1.10"
27
  },
28
  "suggest": {
29
- "cache/filesystem-adapter": "For caching certs and tokens (using Google_Client::setCache)"
30
  },
31
  "autoload": {
32
- "psr-0": {
33
- "Google_": "src/"
34
  },
 
 
 
35
  "classmap": [
36
- "src/Google/Service/"
37
  ]
38
  },
39
  "extra": {
22
  "symfony/css-selector": "~2.1",
23
  "cache/filesystem-adapter": "^0.3.2",
24
  "phpcompatibility/php-compatibility": "^9.2",
25
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.7",
26
  "composer/composer": "^1.10"
27
  },
28
  "suggest": {
29
+ "cache/filesystem-adapter": "For caching certs and tokens (using Google\\Client::setCache)"
30
  },
31
  "autoload": {
32
+ "psr-4": {
33
+ "Google\\": "src/"
34
  },
35
+ "files": [
36
+ "src/aliases.php"
37
+ ],
38
  "classmap": [
39
+ "src/aliases.php"
40
  ]
41
  },
42
  "extra": {
vendor/google/apiclient/src/{Google/AccessToken → AccessToken}/Revoke.php RENAMED
@@ -16,7 +16,10 @@
16
  * limitations under the License.
17
  */
18
 
 
 
19
  use Google\Auth\HttpHandler\HttpHandlerFactory;
 
20
  use GuzzleHttp\ClientInterface;
21
  use GuzzleHttp\Psr7;
22
  use GuzzleHttp\Psr7\Request;
@@ -25,10 +28,10 @@ use GuzzleHttp\Psr7\Request;
25
  * Wrapper around Google Access Tokens which provides convenience functions
26
  *
27
  */
28
- class Google_AccessToken_Revoke
29
  {
30
  /**
31
- * @var GuzzleHttp\ClientInterface The http client
32
  */
33
  private $http;
34
 
@@ -61,7 +64,7 @@ class Google_AccessToken_Revoke
61
  $body = Psr7\stream_for(http_build_query(array('token' => $token)));
62
  $request = new Request(
63
  'POST',
64
- Google_Client::OAUTH2_REVOKE_URI,
65
  [
66
  'Cache-Control' => 'no-store',
67
  'Content-Type' => 'application/x-www-form-urlencoded',
16
  * limitations under the License.
17
  */
18
 
19
+ namespace Google\AccessToken;
20
+
21
  use Google\Auth\HttpHandler\HttpHandlerFactory;
22
+ use Google\Client;
23
  use GuzzleHttp\ClientInterface;
24
  use GuzzleHttp\Psr7;
25
  use GuzzleHttp\Psr7\Request;
28
  * Wrapper around Google Access Tokens which provides convenience functions
29
  *
30
  */
31
+ class Revoke
32
  {
33
  /**
34
+ * @var ClientInterface The http client
35
  */
36
  private $http;
37
 
64
  $body = Psr7\stream_for(http_build_query(array('token' => $token)));
65
  $request = new Request(
66
  'POST',
67
+ Client::OAUTH2_REVOKE_URI,
68
  [
69
  'Cache-Control' => 'no-store',
70
  'Content-Type' => 'application/x-www-form-urlencoded',
vendor/google/apiclient/src/{Google/AccessToken → AccessToken}/Verify.php RENAMED
@@ -16,32 +16,40 @@
16
  * limitations under the License.
17
  */
18
 
 
 
19
  use Firebase\JWT\ExpiredException as ExpiredExceptionV3;
20
  use Firebase\JWT\SignatureInvalidException;
21
  use GuzzleHttp\Client;
22
  use GuzzleHttp\ClientInterface;
23
  use Psr\Cache\CacheItemPoolInterface;
24
  use Google\Auth\Cache\MemoryCacheItemPool;
 
25
  use Stash\Driver\FileSystem;
26
  use Stash\Pool;
 
 
 
 
 
27
 
28
  /**
29
  * Wrapper around Google Access Tokens which provides convenience functions
30
  *
31
  */
32
- class Google_AccessToken_Verify
33
  {
34
  const FEDERATED_SIGNON_CERT_URL = 'https://www.googleapis.com/oauth2/v3/certs';
35
  const OAUTH2_ISSUER = 'accounts.google.com';
36
  const OAUTH2_ISSUER_HTTPS = 'https://accounts.google.com';
37
 
38
  /**
39
- * @var GuzzleHttp\ClientInterface The http client
40
  */
41
  private $http;
42
 
43
  /**
44
- * @var Psr\Cache\CacheItemPoolInterface cache class
45
  */
46
  private $cache;
47
 
@@ -141,7 +149,7 @@ class Google_AccessToken_Verify
141
  * Retrieve and cache a certificates file.
142
  *
143
  * @param $url string location
144
- * @throws Google_Exception
145
  * @return array certificates
146
  */
147
  private function retrieveCertsFromLocation($url)
@@ -149,7 +157,7 @@ class Google_AccessToken_Verify
149
  // If we're retrieving a local file, just grab it.
150
  if (0 !== strpos($url, 'http')) {
151
  if (!$file = file_get_contents($url)) {
152
- throw new Google_Exception(
153
  "Failed to retrieve verification certificates: '" .
154
  $url . "'."
155
  );
@@ -163,7 +171,7 @@ class Google_AccessToken_Verify
163
  if ($response->getStatusCode() == 200) {
164
  return json_decode((string) $response->getBody(), true);
165
  }
166
- throw new Google_Exception(
167
  sprintf(
168
  'Failed to retrieve verification certificates: "%s".',
169
  $response->getBody()->getContents()
@@ -249,7 +257,7 @@ class Google_AccessToken_Verify
249
  return 'CRYPT_RSA_MODE_OPENSSL';
250
  }
251
 
252
- throw new \Exception('Cannot find RSA class');
253
  }
254
 
255
  /**
16
  * limitations under the License.
17
  */
18
 
19
+ namespace Google\AccessToken;
20
+
21
  use Firebase\JWT\ExpiredException as ExpiredExceptionV3;
22
  use Firebase\JWT\SignatureInvalidException;
23
  use GuzzleHttp\Client;
24
  use GuzzleHttp\ClientInterface;
25
  use Psr\Cache\CacheItemPoolInterface;
26
  use Google\Auth\Cache\MemoryCacheItemPool;
27
+ use Google\Exception as GoogleException;
28
  use Stash\Driver\FileSystem;
29
  use Stash\Pool;
30
+ use DateTime;
31
+ use DomainException;
32
+ use Exception;
33
+ use ExpiredException; // Firebase v2
34
+ use LogicException;
35
 
36
  /**
37
  * Wrapper around Google Access Tokens which provides convenience functions
38
  *
39
  */
40
+ class Verify
41
  {
42
  const FEDERATED_SIGNON_CERT_URL = 'https://www.googleapis.com/oauth2/v3/certs';
43
  const OAUTH2_ISSUER = 'accounts.google.com';
44
  const OAUTH2_ISSUER_HTTPS = 'https://accounts.google.com';
45
 
46
  /**
47
+ * @var ClientInterface The http client
48
  */
49
  private $http;
50
 
51
  /**
52
+ * @var CacheItemPoolInterface cache class
53
  */
54
  private $cache;
55
 
149
  * Retrieve and cache a certificates file.
150
  *
151
  * @param $url string location
152
+ * @throws \Google\Exception
153
  * @return array certificates
154
  */
155
  private function retrieveCertsFromLocation($url)
157
  // If we're retrieving a local file, just grab it.
158
  if (0 !== strpos($url, 'http')) {
159
  if (!$file = file_get_contents($url)) {
160
+ throw new GoogleException(
161
  "Failed to retrieve verification certificates: '" .
162
  $url . "'."
163
  );
171
  if ($response->getStatusCode() == 200) {
172
  return json_decode((string) $response->getBody(), true);
173
  }
174
+ throw new GoogleException(
175
  sprintf(
176
  'Failed to retrieve verification certificates: "%s".',
177
  $response->getBody()->getContents()
257
  return 'CRYPT_RSA_MODE_OPENSSL';
258
  }
259
 
260
+ throw new Exception('Cannot find RSA class');
261
  }
262
 
263
  /**
vendor/google/apiclient/src/{Google/AuthHandler → AuthHandler}/AuthHandlerFactory.php RENAMED
@@ -15,15 +15,18 @@
15
  * limitations under the License.
16
  */
17
 
 
 
18
  use GuzzleHttp\Client;
19
  use GuzzleHttp\ClientInterface;
 
20
 
21
- class Google_AuthHandler_AuthHandlerFactory
22
  {
23
  /**
24
  * Builds out a default http handler for the installed version of guzzle.
25
  *
26
- * @return Google_AuthHandler_Guzzle5AuthHandler|Google_AuthHandler_Guzzle6AuthHandler
27
  * @throws Exception
28
  */
29
  public static function build($cache = null, array $cacheConfig = [])
@@ -37,11 +40,11 @@ class Google_AuthHandler_AuthHandlerFactory
37
 
38
  switch ($guzzleVersion) {
39
  case 5:
40
- return new Google_AuthHandler_Guzzle5AuthHandler($cache, $cacheConfig);
41
  case 6:
42
- return new Google_AuthHandler_Guzzle6AuthHandler($cache, $cacheConfig);
43
  case 7:
44
- return new Google_AuthHandler_Guzzle7AuthHandler($cache, $cacheConfig);
45
  default:
46
  throw new Exception('Version not supported');
47
  }
15
  * limitations under the License.
16
  */
17
 
18
+ namespace Google\AuthHandler;
19
+
20
  use GuzzleHttp\Client;
21
  use GuzzleHttp\ClientInterface;
22
+ use Exception;
23
 
24
+ class AuthHandlerFactory
25
  {
26
  /**
27
  * Builds out a default http handler for the installed version of guzzle.
28
  *
29
+ * @return Guzzle5AuthHandler|Guzzle6AuthHandler|Guzzle7AuthHandler
30
  * @throws Exception
31
  */
32
  public static function build($cache = null, array $cacheConfig = [])
40
 
41
  switch ($guzzleVersion) {
42
  case 5:
43
+ return new Guzzle5AuthHandler($cache, $cacheConfig);
44
  case 6:
45
+ return new Guzzle6AuthHandler($cache, $cacheConfig);
46
  case 7:
47
+ return new Guzzle7AuthHandler($cache, $cacheConfig);
48
  default:
49
  throw new Exception('Version not supported');
50
  }
vendor/google/apiclient/src/{Google/AuthHandler → AuthHandler}/Guzzle5AuthHandler.php RENAMED
@@ -1,5 +1,7 @@
1
  <?php
2
 
 
 
3
  use Google\Auth\CredentialsLoader;
4
  use Google\Auth\HttpHandler\HttpHandlerFactory;
5
  use Google\Auth\FetchAuthTokenCache;
@@ -13,7 +15,7 @@ use Psr\Cache\CacheItemPoolInterface;
13
  /**
14
  *
15
  */
16
- class Google_AuthHandler_Guzzle5AuthHandler
17
  {
18
  protected $cache;
19
  protected $cacheConfig;
@@ -37,6 +39,15 @@ class Google_AuthHandler_Guzzle5AuthHandler
37
  $this->cache
38
  );
39
  }
 
 
 
 
 
 
 
 
 
40
  // if we end up needing to make an HTTP request to retrieve credentials, we
41
  // can use our existing one, but we need to throw exceptions so the error
42
  // bubbles up.
1
  <?php
2
 
3
+ namespace Google\AuthHandler;
4
+
5
  use Google\Auth\CredentialsLoader;
6
  use Google\Auth\HttpHandler\HttpHandlerFactory;
7
  use Google\Auth\FetchAuthTokenCache;
15
  /**
16
  *
17
  */
18
+ class Guzzle5AuthHandler
19
  {
20
  protected $cache;
21
  protected $cacheConfig;
39
  $this->cache
40
  );
41
  }
42
+
43
+ return $this->attachCredentialsCache($http, $credentials, $tokenCallback);
44
+ }
45
+
46
+ public function attachCredentialsCache(
47
+ ClientInterface $http,
48
+ FetchAuthTokenCache $credentials,
49
+ callable $tokenCallback = null
50
+ ) {
51
  // if we end up needing to make an HTTP request to retrieve credentials, we
52
  // can use our existing one, but we need to throw exceptions so the error
53
  // bubbles up.
vendor/google/apiclient/src/{Google/AuthHandler → AuthHandler}/Guzzle6AuthHandler.php RENAMED
@@ -1,5 +1,7 @@
1
  <?php
2
 
 
 
3
  use Google\Auth\CredentialsLoader;
4
  use Google\Auth\HttpHandler\HttpHandlerFactory;
5
  use Google\Auth\FetchAuthTokenCache;
@@ -13,7 +15,7 @@ use Psr\Cache\CacheItemPoolInterface;
13
  /**
14
  * This supports Guzzle 6
15
  */
16
- class Google_AuthHandler_Guzzle6AuthHandler
17
  {
18
  protected $cache;
19
  protected $cacheConfig;
@@ -37,6 +39,15 @@ class Google_AuthHandler_Guzzle6AuthHandler
37
  $this->cache
38
  );
39
  }
 
 
 
 
 
 
 
 
 
40
  // if we end up needing to make an HTTP request to retrieve credentials, we
41
  // can use our existing one, but we need to throw exceptions so the error
42
  // bubbles up.
@@ -97,7 +108,7 @@ class Google_AuthHandler_Guzzle6AuthHandler
97
  return new Client(
98
  [
99
  'base_uri' => $http->getConfig('base_uri'),
100
- 'exceptions' => true,
101
  'verify' => $http->getConfig('verify'),
102
  'proxy' => $http->getConfig('proxy'),
103
  ]
1
  <?php
2
 
3
+ namespace Google\AuthHandler;
4
+
5
  use Google\Auth\CredentialsLoader;
6
  use Google\Auth\HttpHandler\HttpHandlerFactory;
7
  use Google\Auth\FetchAuthTokenCache;
15
  /**
16
  * This supports Guzzle 6
17
  */
18
+ class Guzzle6AuthHandler
19
  {
20
  protected $cache;
21
  protected $cacheConfig;
39
  $this->cache
40
  );
41
  }
42
+
43
+ return $this->attachCredentialsCache($http, $credentials, $tokenCallback);
44
+ }
45
+
46
+ public function attachCredentialsCache(
47
+ ClientInterface $http,
48
+ FetchAuthTokenCache $credentials,
49
+ callable $tokenCallback = null
50
+ ) {
51
  // if we end up needing to make an HTTP request to retrieve credentials, we
52
  // can use our existing one, but we need to throw exceptions so the error
53
  // bubbles up.
108
  return new Client(
109
  [
110
  'base_uri' => $http->getConfig('base_uri'),
111
+ 'http_errors' => true,
112
  'verify' => $http->getConfig('verify'),
113
  'proxy' => $http->getConfig('proxy'),
114
  ]
vendor/google/apiclient/src/{Google/AuthHandler → AuthHandler}/Guzzle7AuthHandler.php RENAMED
@@ -15,9 +15,11 @@
15
  * limitations under the License.
16
  */
17
 
 
 
18
  /**
19
  * This supports Guzzle 7
20
  */
21
- class Google_AuthHandler_Guzzle7AuthHandler extends Google_AuthHandler_Guzzle6AuthHandler
22
  {
23
  }
15
  * limitations under the License.
16
  */
17
 
18
+ namespace Google\AuthHandler;
19
+
20
  /**
21
  * This supports Guzzle 7
22
  */
23
+ class Guzzle7AuthHandler extends Guzzle6AuthHandler
24
  {
25
  }
vendor/google/apiclient/src/{Google/Client.php → Client.php} RENAMED
@@ -15,14 +15,21 @@
15
  * limitations under the License.
16
  */
17
 
 
 
 
 
18
  use Google\Auth\ApplicationDefaultCredentials;
19
  use Google\Auth\Cache\MemoryCacheItemPool;
20
  use Google\Auth\CredentialsLoader;
 
21
  use Google\Auth\HttpHandler\HttpHandlerFactory;
22
  use Google\Auth\OAuth2;
23
  use Google\Auth\Credentials\ServiceAccountCredentials;
24
  use Google\Auth\Credentials\UserRefreshCredentials;
25
- use GuzzleHttp\Client;
 
 
26
  use GuzzleHttp\ClientInterface;
27
  use GuzzleHttp\Ring\Client\StreamHandler;
28
  use Psr\Cache\CacheItemPoolInterface;
@@ -31,14 +38,18 @@ use Psr\Log\LoggerInterface;
31
  use Monolog\Logger;
32
  use Monolog\Handler\StreamHandler as MonologStreamHandler;
33
  use Monolog\Handler\SyslogHandler as MonologSyslogHandler;
 
 
 
 
34
 
35
  /**
36
  * The Google API Client
37
  * https://github.com/google/google-api-php-client
38
  */
39
- class Google_Client
40
  {
41
- const LIBVER = "2.7.2";
42
  const USER_AGENT_SUFFIX = "google-api-php-client/";
43
  const OAUTH2_REVOKE_URI = 'https://oauth2.googleapis.com/revoke';
44
  const OAUTH2_TOKEN_URI = 'https://oauth2.googleapis.com/token';
@@ -46,17 +57,17 @@ class Google_Client
46
  const API_BASE_PATH = 'https://www.googleapis.com';
47
 
48
  /**
49
- * @var Google\Auth\OAuth2 $auth
50
  */
51
  private $auth;
52
 
53
  /**
54
- * @var GuzzleHttp\ClientInterface $http
55
  */
56
  private $http;
57
 
58
  /**
59
- * @var Psr\Cache\CacheItemPoolInterface $cache
60
  */
61
  private $cache;
62
 
@@ -71,7 +82,7 @@ class Google_Client
71
  private $config;
72
 
73
  /**
74
- * @var Psr\Log\LoggerInterface $logger
75
  */
76
  private $logger;
77
 
@@ -104,9 +115,9 @@ class Google_Client
104
  'client_secret' => '',
105
 
106
  // Path to JSON credentials or an array representing those credentials
107
- // @see Google_Client::setAuthConfig
108
  'credentials' => null,
109
- // @see Google_Client::setScopes
110
  'scopes' => null,
111
  // Sets X-Goog-User-Project, which specifies a user project to bill
112
  // for access charges associated with the request
@@ -138,10 +149,13 @@ class Google_Client
138
  'approval_prompt' => 'auto',
139
 
140
  // Task Runner retry configuration
141
- // @see Google_Task_Runner
142
  'retry' => array(),
143
  'retry_map' => null,
144
 
 
 
 
145
  // cache config for downstream auth caching
146
  'cache_config' => [],
147
 
@@ -149,7 +163,7 @@ class Google_Client
149
  // follows the signature function ($cacheKey, $accessToken)
150
  'token_callback' => null,
151
 
152
- // Service class used in Google_Client::verifyIdToken.
153
  // Explicitly pass this in to avoid setting JWT::$leeway
154
  'jwt' => null,
155
 
@@ -182,6 +196,11 @@ class Google_Client
182
  );
183
  };
184
  }
 
 
 
 
 
185
  }
186
 
187
  /**
@@ -256,9 +275,9 @@ class Google_Client
256
  if (!$this->isUsingApplicationDefaultCredentials()) {
257
  throw new DomainException(
258
  'set the JSON service account credentials using'
259
- . ' Google_Client::setAuthConfig or set the path to your JSON file'
260
  . ' with the "GOOGLE_APPLICATION_CREDENTIALS" environment variable'
261
- . ' and call Google_Client::useApplicationDefaultCredentials to'
262
  . ' refresh a token with assertion.'
263
  );
264
  }
@@ -381,17 +400,16 @@ class Google_Client
381
  * Adds auth listeners to the HTTP client based on the credentials
382
  * set in the Google API Client object
383
  *
384
- * @param GuzzleHttp\ClientInterface $http the http client object.
385
- * @return GuzzleHttp\ClientInterface the http client object
386
  */
387
  public function authorize(ClientInterface $http = null)
388
  {
389
  $credentials = null;
390
  $token = null;
391
  $scopes = null;
392
- if (null === $http) {
393
- $http = $this->getHttpClient();
394
- }
395
 
396
  // These conditionals represent the decision tree for authentication
397
  // 1. Check for Application Default Credentials
@@ -400,6 +418,11 @@ class Google_Client
400
  // 3b. If access token exists but is expired, try to refresh it
401
  if ($this->isUsingApplicationDefaultCredentials()) {
402
  $credentials = $this->createApplicationDefaultCredentials();
 
 
 
 
 
403
  } elseif ($token = $this->getAccessToken()) {
404
  $scopes = $this->prepareScopes();
405
  // add refresh subscriber to request a new token
@@ -408,16 +431,14 @@ class Google_Client
408
  $scopes,
409
  $token['refresh_token']
410
  );
 
 
 
 
 
 
 
411
  }
412
- }
413
-
414
- $authHandler = $this->getAuthHandler();
415
-
416
- if ($credentials) {
417
- $callback = $this->config['token_callback'];
418
- $http = $authHandler->attachCredentials($http, $credentials, $callback);
419
- } elseif ($token) {
420
- $http = $authHandler->attachToken($http, $token, (array) $scopes);
421
  } elseif ($key = $this->config['developer_key']) {
422
  $http = $authHandler->attachKey($http, $key);
423
  }
@@ -734,9 +755,7 @@ class Google_Client
734
  */
735
  public function revokeToken($token = null)
736
  {
737
- $tokenRevoker = new Google_AccessToken_Revoke(
738
- $this->getHttpClient()
739
- );
740
 
741
  return $tokenRevoker->revokeToken($token ?: $this->getAccessToken());
742
  }
@@ -753,7 +772,7 @@ class Google_Client
753
  */
754
  public function verifyIdToken($idToken = null)
755
  {
756
- $tokenVerifier = new Google_AccessToken_Verify(
757
  $this->getHttpClient(),
758
  $this->getCache(),
759
  $this->config['jwt']
@@ -834,9 +853,9 @@ class Google_Client
834
  /**
835
  * Helper method to execute deferred HTTP requests.
836
  *
837
- * @param $request Psr\Http\Message\RequestInterface|Google_Http_Batch
838
  * @param string $expectedClass
839
- * @throws Google_Exception
840
  * @return object of the type of the expected class or Psr\Http\Message\ResponseInterface.
841
  */
842
  public function execute(RequestInterface $request, $expectedClass = null)
@@ -871,7 +890,7 @@ class Google_Client
871
  // this is where most of the grunt work is done
872
  $http = $this->authorize();
873
 
874
- return Google_Http_REST::execute(
875
  $http,
876
  $request,
877
  $expectedClass,
@@ -918,7 +937,7 @@ class Google_Client
918
  * alias for setAuthConfig
919
  *
920
  * @param string $file the configuration file
921
- * @throws Google_Exception
922
  * @deprecated
923
  */
924
  public function setAuthConfigFile($file)
@@ -932,7 +951,7 @@ class Google_Client
932
  * the "Download JSON" button on in the Google Developer
933
  * Console.
934
  * @param string|array $config the configuration json
935
- * @throws Google_Exception
936
  */
937
  public function setAuthConfig($config)
938
  {
@@ -1006,7 +1025,7 @@ class Google_Client
1006
  }
1007
 
1008
  /**
1009
- * @return Google\Auth\OAuth2 implementation
1010
  */
1011
  public function getOAuth2Service()
1012
  {
@@ -1040,7 +1059,7 @@ class Google_Client
1040
 
1041
  /**
1042
  * Set the Cache object
1043
- * @param Psr\Cache\CacheItemPoolInterface $cache
1044
  */
1045
  public function setCache(CacheItemPoolInterface $cache)
1046
  {
@@ -1048,7 +1067,7 @@ class Google_Client
1048
  }
1049
 
1050
  /**
1051
- * @return Psr\Cache\CacheItemPoolInterface Cache implementation
1052
  */
1053
  public function getCache()
1054
  {
@@ -1069,7 +1088,7 @@ class Google_Client
1069
 
1070
  /**
1071
  * Set the Logger object
1072
- * @param Psr\Log\LoggerInterface $logger
1073
  */
1074
  public function setLogger(LoggerInterface $logger)
1075
  {
@@ -1077,7 +1096,7 @@ class Google_Client
1077
  }
1078
 
1079
  /**
1080
- * @return Psr\Log\LoggerInterface implementation
1081
  */
1082
  public function getLogger()
1083
  {
@@ -1108,7 +1127,7 @@ class Google_Client
1108
 
1109
  /**
1110
  * Set the Http Client object
1111
- * @param GuzzleHttp\ClientInterface $http
1112
  */
1113
  public function setHttpClient(ClientInterface $http)
1114
  {
@@ -1116,7 +1135,7 @@ class Google_Client
1116
  }
1117
 
1118
  /**
1119
- * @return GuzzleHttp\ClientInterface implementation
1120
  */
1121
  public function getHttpClient()
1122
  {
@@ -1148,11 +1167,10 @@ class Google_Client
1148
  $guzzleVersion = (int)substr(ClientInterface::VERSION, 0, 1);
1149
  }
1150
 
1151
- $options = ['exceptions' => false];
1152
  if (5 === $guzzleVersion) {
1153
  $options = [
1154
  'base_url' => $this->config['base_path'],
1155
- 'defaults' => $options,
1156
  ];
1157
  if ($this->isAppEngine()) {
1158
  // set StreamHandler on AppEngine by default
@@ -1161,14 +1179,20 @@ class Google_Client
1161
  }
1162
  } elseif (6 === $guzzleVersion || 7 === $guzzleVersion) {
1163
  // guzzle 6 or 7
1164
- $options['base_uri'] = $this->config['base_path'];
 
 
 
1165
  } else {
1166
  throw new LogicException('Could not find supported version of Guzzle.');
1167
  }
1168
 
1169
- return new Client($options);
1170
  }
1171
 
 
 
 
1172
  private function createApplicationDefaultCredentials()
1173
  {
1174
  $scopes = $this->prepareScopes();
@@ -1189,11 +1213,14 @@ class Google_Client
1189
  $serviceAccountCredentials
1190
  );
1191
  } else {
 
 
 
1192
  $credentials = ApplicationDefaultCredentials::getCredentials(
1193
  $scopes,
1194
  null,
1195
- null,
1196
- null,
1197
  $this->config['quota_project']
1198
  );
1199
  }
@@ -1208,6 +1235,14 @@ class Google_Client
1208
  $credentials->setSub($sub);
1209
  }
1210
 
 
 
 
 
 
 
 
 
1211
  return $credentials;
1212
  }
1213
 
@@ -1218,7 +1253,7 @@ class Google_Client
1218
  // sessions.
1219
  //
1220
  // @see https://github.com/google/google-api-php-client/issues/821
1221
- return Google_AuthHandler_AuthHandlerFactory::build(
1222
  $this->getCache(),
1223
  $this->config['cache_config']
1224
  );
15
  * limitations under the License.
16
  */
17
 
18
+ namespace Google;
19
+
20
+ use Google\AccessToken\Revoke;
21
+ use Google\AccessToken\Verify;
22
  use Google\Auth\ApplicationDefaultCredentials;
23
  use Google\Auth\Cache\MemoryCacheItemPool;
24
  use Google\Auth\CredentialsLoader;
25
+ use Google\Auth\FetchAuthTokenCache;
26
  use Google\Auth\HttpHandler\HttpHandlerFactory;
27
  use Google\Auth\OAuth2;
28
  use Google\Auth\Credentials\ServiceAccountCredentials;
29
  use Google\Auth\Credentials\UserRefreshCredentials;
30
+ use Google\AuthHandler\AuthHandlerFactory;
31
+ use Google\Http\REST;
32
+ use GuzzleHttp\Client as GuzzleClient;
33
  use GuzzleHttp\ClientInterface;
34
  use GuzzleHttp\Ring\Client\StreamHandler;
35
  use Psr\Cache\CacheItemPoolInterface;
38
  use Monolog\Logger;
39
  use Monolog\Handler\StreamHandler as MonologStreamHandler;
40
  use Monolog\Handler\SyslogHandler as MonologSyslogHandler;
41
+ use BadMethodCallException;
42
+ use DomainException;
43
+ use InvalidArgumentException;
44
+ use LogicException;
45
 
46
  /**
47
  * The Google API Client
48
  * https://github.com/google/google-api-php-client
49
  */
50
+ class Client
51
  {
52
+ const LIBVER = "2.8.3";
53
  const USER_AGENT_SUFFIX = "google-api-php-client/";
54
  const OAUTH2_REVOKE_URI = 'https://oauth2.googleapis.com/revoke';
55
  const OAUTH2_TOKEN_URI = 'https://oauth2.googleapis.com/token';
57
  const API_BASE_PATH = 'https://www.googleapis.com';
58
 
59
  /**
60
+ * @var OAuth2 $auth
61
  */
62
  private $auth;
63
 
64
  /**
65
+ * @var ClientInterface $http
66
  */
67
  private $http;
68
 
69
  /**
70
+ * @var CacheItemPoolInterface $cache
71
  */
72
  private $cache;
73
 
82
  private $config;
83
 
84
  /**
85
+ * @var LoggerInterface $logger
86
  */
87
  private $logger;
88
 
115
  'client_secret' => '',
116
 
117
  // Path to JSON credentials or an array representing those credentials
118
+ // @see Google\Client::setAuthConfig
119
  'credentials' => null,
120
+ // @see Google\Client::setScopes
121
  'scopes' => null,
122
  // Sets X-Goog-User-Project, which specifies a user project to bill
123
  // for access charges associated with the request
149
  'approval_prompt' => 'auto',
150
 
151
  // Task Runner retry configuration
152
+ // @see Google\Task\Runner
153
  'retry' => array(),
154
  'retry_map' => null,
155
 
156
+ // Cache class implementing Psr\Cache\CacheItemPoolInterface.
157
+ // Defaults to Google\Auth\Cache\MemoryCacheItemPool.
158
+ 'cache' => null,
159
  // cache config for downstream auth caching
160
  'cache_config' => [],
161
 
163
  // follows the signature function ($cacheKey, $accessToken)
164
  'token_callback' => null,
165
 
166
+ // Service class used in Google\Client::verifyIdToken.
167
  // Explicitly pass this in to avoid setting JWT::$leeway
168
  'jwt' => null,
169
 
196
  );
197
  };
198
  }
199
+
200
+ if (!is_null($this->config['cache'])) {
201
+ $this->setCache($this->config['cache']);
202
+ unset($this->config['cache']);
203
+ }
204
  }
205
 
206
  /**
275
  if (!$this->isUsingApplicationDefaultCredentials()) {
276
  throw new DomainException(
277
  'set the JSON service account credentials using'
278
+ . ' Google\Client::setAuthConfig or set the path to your JSON file'
279
  . ' with the "GOOGLE_APPLICATION_CREDENTIALS" environment variable'
280
+ . ' and call Google\Client::useApplicationDefaultCredentials to'
281
  . ' refresh a token with assertion.'
282
  );
283
  }
400
  * Adds auth listeners to the HTTP client based on the credentials
401
  * set in the Google API Client object
402
  *
403
+ * @param ClientInterface $http the http client object.
404
+ * @return ClientInterface the http client object
405
  */
406
  public function authorize(ClientInterface $http = null)
407
  {
408
  $credentials = null;
409
  $token = null;
410
  $scopes = null;
411
+ $http = $http ?: $this->getHttpClient();
412
+ $authHandler = $this->getAuthHandler();
 
413
 
414
  // These conditionals represent the decision tree for authentication
415
  // 1. Check for Application Default Credentials
418
  // 3b. If access token exists but is expired, try to refresh it
419
  if ($this->isUsingApplicationDefaultCredentials()) {
420
  $credentials = $this->createApplicationDefaultCredentials();
421
+ $http = $authHandler->attachCredentialsCache(
422
+ $http,
423
+ $credentials,
424
+ $this->config['token_callback']
425
+ );
426
  } elseif ($token = $this->getAccessToken()) {
427
  $scopes = $this->prepareScopes();
428
  // add refresh subscriber to request a new token
431
  $scopes,
432
  $token['refresh_token']
433
  );
434
+ $http = $authHandler->attachCredentials(
435
+ $http,
436
+ $credentials,
437
+ $this->config['token_callback']
438
+ );
439
+ } else {
440
+ $http = $authHandler->attachToken($http, $token, (array) $scopes);
441
  }
 
 
 
 
 
 
 
 
 
442
  } elseif ($key = $this->config['developer_key']) {
443
  $http = $authHandler->attachKey($http, $key);
444
  }
755
  */
756
  public function revokeToken($token = null)
757
  {
758
+ $tokenRevoker = new Revoke($this->getHttpClient());
 
 
759
 
760
  return $tokenRevoker->revokeToken($token ?: $this->getAccessToken());
761
  }
772
  */
773
  public function verifyIdToken($idToken = null)
774
  {
775
+ $tokenVerifier = new Verify(
776
  $this->getHttpClient(),
777
  $this->getCache(),
778
  $this->config['jwt']
853
  /**
854
  * Helper method to execute deferred HTTP requests.
855
  *
856
+ * @param $request RequestInterface|\Google\Http\Batch
857
  * @param string $expectedClass
858
+ * @throws \Google\Exception
859
  * @return object of the type of the expected class or Psr\Http\Message\ResponseInterface.
860
  */
861
  public function execute(RequestInterface $request, $expectedClass = null)
890
  // this is where most of the grunt work is done
891
  $http = $this->authorize();
892
 
893
+ return REST::execute(
894
  $http,
895
  $request,
896
  $expectedClass,
937
  * alias for setAuthConfig
938
  *
939
  * @param string $file the configuration file
940
+ * @throws \Google\Exception
941
  * @deprecated
942
  */
943
  public function setAuthConfigFile($file)
951
  * the "Download JSON" button on in the Google Developer
952
  * Console.
953
  * @param string|array $config the configuration json
954
+ * @throws \Google\Exception
955
  */
956
  public function setAuthConfig($config)
957
  {
1025
  }
1026
 
1027
  /**
1028
+ * @return OAuth2 implementation
1029
  */
1030
  public function getOAuth2Service()
1031
  {
1059
 
1060
  /**
1061
  * Set the Cache object
1062
+ * @param CacheItemPoolInterface $cache
1063
  */
1064
  public function setCache(CacheItemPoolInterface $cache)
1065
  {
1067
  }
1068
 
1069
  /**
1070
+ * @return CacheItemPoolInterface
1071
  */
1072
  public function getCache()
1073
  {
1088
 
1089
  /**
1090
  * Set the Logger object
1091
+ * @param LoggerInterface $logger
1092
  */
1093
  public function setLogger(LoggerInterface $logger)
1094
  {
1096
  }
1097
 
1098
  /**
1099
+ * @return LoggerInterface
1100
  */
1101
  public function getLogger()
1102
  {
1127
 
1128
  /**
1129
  * Set the Http Client object
1130
+ * @param ClientInterface $http
1131
  */
1132
  public function setHttpClient(ClientInterface $http)
1133
  {
1135
  }
1136
 
1137
  /**
1138
+ * @return ClientInterface
1139
  */
1140
  public function getHttpClient()
1141
  {
1167
  $guzzleVersion = (int)substr(ClientInterface::VERSION, 0, 1);
1168
  }
1169
 
 
1170
  if (5 === $guzzleVersion) {
1171
  $options = [
1172
  'base_url' => $this->config['base_path'],
1173
+ 'defaults' => ['exceptions' => false],
1174
  ];
1175
  if ($this->isAppEngine()) {
1176
  // set StreamHandler on AppEngine by default
1179
  }
1180
  } elseif (6 === $guzzleVersion || 7 === $guzzleVersion) {
1181
  // guzzle 6 or 7
1182
+ $options = [
1183
+ 'base_uri' => $this->config['base_path'],
1184
+ 'http_errors' => false,
1185
+ ];
1186
  } else {
1187
  throw new LogicException('Could not find supported version of Guzzle.');
1188
  }
1189
 
1190
+ return new GuzzleClient($options);
1191
  }
1192
 
1193
+ /**
1194
+ * @return FetchAuthTokenCache
1195
+ */
1196
  private function createApplicationDefaultCredentials()
1197
  {
1198
  $scopes = $this->prepareScopes();
1213
  $serviceAccountCredentials
1214
  );
1215
  } else {
1216
+ // When $sub is provided, we cannot pass cache classes to ::getCredentials
1217
+ // because FetchAuthTokenCache::setSub does not exist.
1218
+ // The result is when $sub is provided, calls to ::onGce are not cached.
1219
  $credentials = ApplicationDefaultCredentials::getCredentials(
1220
  $scopes,
1221
  null,
1222
+ $sub ? null : $this->config['cache_config'],
1223
+ $sub ? null : $this->getCache(),
1224
  $this->config['quota_project']
1225
  );
1226
  }
1235
  $credentials->setSub($sub);
1236
  }
1237
 
1238
+ // If we are not using FetchAuthTokenCache yet, create it now
1239
+ if (!$credentials instanceof FetchAuthTokenCache) {
1240
+ $credentials = new FetchAuthTokenCache(
1241
+ $credentials,
1242
+ $this->config['cache_config'],
1243
+ $this->getCache()
1244
+ );
1245
+ }
1246
  return $credentials;
1247
  }
1248
 
1253
  // sessions.
1254
  //
1255
  // @see https://github.com/google/google-api-php-client/issues/821
1256
+ return AuthHandlerFactory::build(
1257
  $this->getCache(),
1258
  $this->config['cache_config']
1259
  );
vendor/google/apiclient/src/{Google/Collection.php → Collection.php} RENAMED
@@ -1,11 +1,13 @@
1
  <?php
2
 
 
 
3
  /**
4
- * Extension to the regular Google_Model that automatically
5
  * exposes the items array for iteration, so you can just
6
  * iterate over the object rather than a reference inside.
7
  */
8
- class Google_Collection extends Google_Model implements Iterator, Countable
9
  {
10
  protected $collection_key = 'items';
11
 
1
  <?php
2
 
3
+ namespace Google;
4
+
5
  /**
6
+ * Extension to the regular Google\Model that automatically
7
  * exposes the items array for iteration, so you can just
8
  * iterate over the object rather than a reference inside.
9
  */
10
+ class Collection extends Model implements \Iterator, \Countable
11
  {
12
  protected $collection_key = 'items';
13
 
vendor/google/apiclient/src/{Google/Exception.php → Exception.php} RENAMED
@@ -15,6 +15,10 @@
15
  * limitations under the License.
16
  */
17
 
18
- class Google_Exception extends Exception
 
 
 
 
19
  {
20
  }
15
  * limitations under the License.
16
  */
17
 
18
+ namespace Google;
19
+
20
+ use Exception as BaseException;
21
+
22
+ class Exception extends BaseException
23
  {
24
  }
vendor/google/apiclient/src/{Google/Http → Http}/Batch.php RENAMED
@@ -15,6 +15,11 @@
15
  * limitations under the License.
16
  */
17
 
 
 
 
 
 
18
  use GuzzleHttp\Psr7;
19
  use GuzzleHttp\Psr7\Request;
20
  use GuzzleHttp\Psr7\Response;
@@ -24,11 +29,11 @@ use Psr\Http\Message\ResponseInterface;
24
  /**
25
  * Class to handle batched requests to the Google API service.
26
  *
27
- * Note that calls to `Google_Http_Batch::execute()` do not clear the queued
28
  * requests. To start a new batch, be sure to create a new instance of this
29
  * class.
30
  */
31
- class Google_Http_Batch
32
  {
33
  const BATCH_PATH = 'batch';
34
 
@@ -43,7 +48,7 @@ class Google_Http_Batch
43
  /** @var array service requests to be executed. */
44
  private $requests = array();
45
 
46
- /** @var Google_Client */
47
  private $client;
48
 
49
  private $rootUrl;
@@ -51,7 +56,7 @@ class Google_Http_Batch
51
  private $batchPath;
52
 
53
  public function __construct(
54
- Google_Client $client,
55
  $boundary = false,
56
  $rootUrl = null,
57
  $batchPath = null
@@ -88,7 +93,7 @@ Content-ID: %s
88
 
89
  EOF;
90
 
91
- /** @var Google_Http_Request $req */
92
  foreach ($this->requests as $key => $request) {
93
  $firstLine = sprintf(
94
  '%s %s HTTP/%s',
@@ -176,8 +181,8 @@ EOF;
176
  $key = $headers['content-id'];
177
 
178
  try {
179
- $response = Google_Http_REST::decodeHttpResponse($response, $requests[$i-1]);
180
- } catch (Google_Service_Exception $e) {
181
  // Store the exception as the response, so successful responses
182
  // can be processed.
183
  $response = $e;
15
  * limitations under the License.
16
  */
17
 
18
+ namespace Google\Http;
19
+
20
+ use Google\Client;
21
+ use Google\Http\REST;
22
+ use Google\Service\Exception as GoogleServiceException;
23
  use GuzzleHttp\Psr7;
24
  use GuzzleHttp\Psr7\Request;
25
  use GuzzleHttp\Psr7\Response;
29
  /**
30
  * Class to handle batched requests to the Google API service.
31
  *
32
+ * Note that calls to `Google\Http\Batch::execute()` do not clear the queued
33
  * requests. To start a new batch, be sure to create a new instance of this
34
  * class.
35
  */
36
+ class Batch
37
  {
38
  const BATCH_PATH = 'batch';
39
 
48
  /** @var array service requests to be executed. */
49
  private $requests = array();
50
 
51
+ /** @var Client */
52
  private $client;
53
 
54
  private $rootUrl;
56
  private $batchPath;
57
 
58
  public function __construct(
59
+ Client $client,
60
  $boundary = false,
61
  $rootUrl = null,
62
  $batchPath = null
93
 
94
  EOF;
95
 
96
+ /** @var RequestInterface $req */
97
  foreach ($this->requests as $key => $request) {
98
  $firstLine = sprintf(
99
  '%s %s HTTP/%s',
181
  $key = $headers['content-id'];
182
 
183
  try {
184
+ $response = REST::decodeHttpResponse($response, $requests[$i-1]);
185
+ } catch (GoogleServiceException $e) {
186
  // Store the exception as the response, so successful responses
187
  // can be processed.
188
  $response = $e;
vendor/google/apiclient/src/{Google/Http → Http}/MediaFileUpload.php RENAMED
@@ -15,6 +15,11 @@
15
  * limitations under the License.
16
  */
17
 
 
 
 
 
 
18
  use GuzzleHttp\Psr7;
19
  use GuzzleHttp\Psr7\Request;
20
  use GuzzleHttp\Psr7\Uri;
@@ -24,7 +29,7 @@ use Psr\Http\Message\RequestInterface;
24
  * Manage large file uploads, which may be media but can be any type
25
  * of sizable data.
26
  */
27
- class Google_Http_MediaFileUpload
28
  {
29
  const UPLOAD_MEDIA_TYPE = 'media';
30
  const UPLOAD_MULTIPART_TYPE = 'multipart';
@@ -51,10 +56,10 @@ class Google_Http_MediaFileUpload
51
  /** @var int $progress */
52
  private $progress;
53
 
54
- /** @var Google_Client */
55
  private $client;
56
 
57
- /** @var Psr\Http\Message\RequestInterface */
58
  private $request;
59
 
60
  /** @var string */
@@ -67,7 +72,7 @@ class Google_Http_MediaFileUpload
67
  private $httpResultCode;
68
 
69
  /**
70
- * @param Google_Client $client
71
  * @param RequestInterface $request
72
  * @param string $mimeType
73
  * @param string $data The bytes you want to upload.
@@ -76,7 +81,7 @@ class Google_Http_MediaFileUpload
76
  * only used if resumable=True
77
  */
78
  public function __construct(
79
- Google_Client $client,
80
  RequestInterface $request,
81
  $mimeType,
82
  $data,
@@ -155,7 +160,7 @@ class Google_Http_MediaFileUpload
155
  * Sends a PUT-Request to google drive and parses the response,
156
  * setting the appropiate variables from the response()
157
  *
158
- * @param Google_Http_Request $httpRequest the Reuqest which will be send
159
  *
160
  * @return false|mixed false when the upload is unfinished or the decoded http response
161
  *
@@ -183,7 +188,7 @@ class Google_Http_MediaFileUpload
183
  return false;
184
  }
185
 
186
- return Google_Http_REST::decodeHttpResponse($response, $this->request);
187
  }
188
 
189
  /**
@@ -207,7 +212,7 @@ class Google_Http_MediaFileUpload
207
  }
208
 
209
  /**
210
- * @return Psr\Http\Message\RequestInterface $request
211
  * @visible for testing
212
  */
213
  private function process()
@@ -327,7 +332,7 @@ class Google_Http_MediaFileUpload
327
  $error = "Failed to start the resumable upload (HTTP {$message})";
328
  $this->client->getLogger()->error($error);
329
 
330
- throw new Google_Exception($error);
331
  }
332
 
333
  private function transformToUploadUrl()
15
  * limitations under the License.
16
  */
17
 
18
+ namespace Google\Http;
19
+
20
+ use Google\Client;
21
+ use Google\Http\REST;
22
+ use Google\Exception as GoogleException;
23
  use GuzzleHttp\Psr7;
24
  use GuzzleHttp\Psr7\Request;
25
  use GuzzleHttp\Psr7\Uri;
29
  * Manage large file uploads, which may be media but can be any type
30
  * of sizable data.
31
  */
32
+ class MediaFileUpload
33
  {
34
  const UPLOAD_MEDIA_TYPE = 'media';
35
  const UPLOAD_MULTIPART_TYPE = 'multipart';
56
  /** @var int $progress */
57
  private $progress;
58
 
59
+ /** @var Client */
60
  private $client;
61
 
62
+ /** @var RequestInterface */
63
  private $request;
64
 
65
  /** @var string */
72
  private $httpResultCode;
73
 
74
  /**
75
+ * @param Client $client
76
  * @param RequestInterface $request
77
  * @param string $mimeType
78
  * @param string $data The bytes you want to upload.
81
  * only used if resumable=True
82
  */
83
  public function __construct(
84
+ Client $client,
85
  RequestInterface $request,
86
  $mimeType,
87
  $data,
160
  * Sends a PUT-Request to google drive and parses the response,
161
  * setting the appropiate variables from the response()
162
  *
163
+ * @param RequestInterface $request the Request which will be send
164
  *
165
  * @return false|mixed false when the upload is unfinished or the decoded http response
166
  *
188
  return false;
189
  }
190
 
191
+ return REST::decodeHttpResponse($response, $this->request);
192
  }
193
 
194
  /**
212
  }
213
 
214
  /**
215
+ * @return RequestInterface
216
  * @visible for testing
217
  */
218
  private function process()
332
  $error = "Failed to start the resumable upload (HTTP {$message})";
333
  $this->client->getLogger()->error($error);
334
 
335
+ throw new GoogleException($error);
336
  }
337
 
338
  private function transformToUploadUrl()
vendor/google/apiclient/src/{Google/Http → Http}/REST.php RENAMED
@@ -15,7 +15,12 @@
15
  * limitations under the License.
16
  */
17
 
 
 
18
  use Google\Auth\HttpHandler\HttpHandlerFactory;
 
 
 
19
  use GuzzleHttp\ClientInterface;
20
  use GuzzleHttp\Exception\RequestException;
21
  use GuzzleHttp\Psr7\Response;
@@ -25,19 +30,19 @@ use Psr\Http\Message\ResponseInterface;
25
  /**
26
  * This class implements the RESTful transport of apiServiceRequest()'s
27
  */
28
- class Google_Http_REST
29
  {
30
  /**
31
  * Executes a Psr\Http\Message\RequestInterface and (if applicable) automatically retries
32
  * when errors occur.
33
  *
34
- * @param Google_Client $client
35
- * @param Psr\Http\Message\RequestInterface $req
36
  * @param string $expectedClass
37
  * @param array $config
38
  * @param array $retryMap
39
  * @return array decoded result
40
- * @throws Google_Service_Exception on server side error (ie: not authenticated,
41
  * invalid or malformed post body, invalid url)
42
  */
43
  public static function execute(
@@ -47,7 +52,7 @@ class Google_Http_REST
47
  $config = array(),
48
  $retryMap = null
49
  ) {
50
- $runner = new Google_Task_Runner(
51
  $config,
52
  sprintf('%s %s', $request->getMethod(), (string) $request->getUri()),
53
  array(get_class(), 'doExecute'),
@@ -64,11 +69,11 @@ class Google_Http_REST
64
  /**
65
  * Executes a Psr\Http\Message\RequestInterface
66
  *
67
- * @param Google_Client $client
68
- * @param Psr\Http\Message\RequestInterface $request
69
  * @param string $expectedClass
70
  * @return array decoded result
71
- * @throws Google_Service_Exception on server side error (ie: not authenticated,
72
  * invalid or malformed post body, invalid url)
73
  */
74
  public static function doExecute(ClientInterface $client, RequestInterface $request, $expectedClass = null)
@@ -101,9 +106,9 @@ class Google_Http_REST
101
  /**
102
  * Decode an HTTP Response.
103
  * @static
104
- * @throws Google_Service_Exception
105
- * @param Psr\Http\Message\RequestInterface $response The http response to be decoded.
106
- * @param Psr\Http\Message\ResponseInterface $response
107
  * @param string $expectedClass
108
  * @return mixed|null
109
  */
@@ -120,7 +125,7 @@ class Google_Http_REST
120
  $body = (string) $response->getBody();
121
 
122
  // Check if we received errors, and add those to the Exception for convenience
123
- throw new Google_Service_Exception($body, $code, null, self::getResponseErrors($body));
124
  }
125
 
126
  // Ensure we only pull the entire body into memory if the request is not
15
  * limitations under the License.
16
  */
17
 
18
+ namespace Google\Http;
19
+
20
  use Google\Auth\HttpHandler\HttpHandlerFactory;
21
+ use Google\Client;
22
+ use Google\Task\Runner;
23
+ use Google\Service\Exception as GoogleServiceException;
24
  use GuzzleHttp\ClientInterface;
25
  use GuzzleHttp\Exception\RequestException;
26
  use GuzzleHttp\Psr7\Response;
30
  /**
31
  * This class implements the RESTful transport of apiServiceRequest()'s
32
  */
33
+ class REST
34
  {
35
  /**
36
  * Executes a Psr\Http\Message\RequestInterface and (if applicable) automatically retries
37
  * when errors occur.
38
  *
39
+ * @param Client $client
40
+ * @param RequestInterface $req
41
  * @param string $expectedClass
42
  * @param array $config
43
  * @param array $retryMap
44
  * @return array decoded result
45
+ * @throws \Google\Service\Exception on server side error (ie: not authenticated,
46
  * invalid or malformed post body, invalid url)
47
  */
48
  public static function execute(
52
  $config = array(),
53
  $retryMap = null
54
  ) {
55
+ $runner = new Runner(
56
  $config,
57
  sprintf('%s %s', $request->getMethod(), (string) $request->getUri()),
58
  array(get_class(), 'doExecute'),
69
  /**
70
  * Executes a Psr\Http\Message\RequestInterface
71
  *
72
+ * @param Client $client
73
+ * @param RequestInterface $request
74
  * @param string $expectedClass
75
  * @return array decoded result
76
+ * @throws \Google\Service\Exception on server side error (ie: not authenticated,
77
  * invalid or malformed post body, invalid url)
78
  */
79
  public static function doExecute(ClientInterface $client, RequestInterface $request, $expectedClass = null)
106
  /**
107
  * Decode an HTTP Response.
108
  * @static
109
+ * @throws \Google\Service\Exception
110
+ * @param RequestInterface $response The http response to be decoded.
111
+ * @param ResponseInterface $response
112
  * @param string $expectedClass
113
  * @return mixed|null
114
  */
125
  $body = (string) $response->getBody();
126
 
127
  // Check if we received errors, and add those to the Exception for convenience
128
+ throw new GoogleServiceException($body, $code, null, self::getResponseErrors($body));
129
  }
130
 
131
  // Ensure we only pull the entire body into memory if the request is not
vendor/google/apiclient/src/{Google/Model.php → Model.php} RENAMED
@@ -15,16 +15,23 @@
15
  * limitations under the License.
16
  */
17
 
 
 
 
 
 
 
 
18
  /**
19
  * This class defines attributes, valid values, and usage which is generated
20
  * from a given json schema.
21
  * http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5
22
  *
23
  */
24
- class Google_Model implements ArrayAccess
25
  {
26
  /**
27
- * If you need to specify a NULL JSON value, use Google_Model::NULL_VALUE
28
  * instead - it will be replaced when converting to JSON with a real null.
29
  */
30
  const NULL_VALUE = "{}gapi-php-null";
@@ -174,7 +181,7 @@ class Google_Model implements ArrayAccess
174
  */
175
  private function getSimpleValue($value)
176
  {
177
- if ($value instanceof Google_Model) {
178
  return $value->toSimpleObject();
179
  } else if (is_array($value)) {
180
  $return = array();
@@ -233,14 +240,14 @@ class Google_Model implements ArrayAccess
233
 
234
  /**
235
  * Verify if $obj is an array.
236
- * @throws Google_Exception Thrown if $obj isn't an array.
237
  * @param array $obj Items that should be validated.
238
  * @param string $method Method expecting an array as an argument.
239
  */
240
  public function assertIsArray($obj, $method)
241
  {
242
  if ($obj && !is_array($obj)) {
243
- throw new Google_Exception(
244
  "Incorrect parameter type passed to $method(). Expected an array."
245
  );
246
  }
15
  * limitations under the License.
16
  */
17
 
18
+ namespace Google;
19
+
20
+ use Google\Exception as GoogleException;
21
+ use ReflectionObject;
22
+ use ReflectionProperty;
23
+ use stdClass;
24
+
25
  /**
26
  * This class defines attributes, valid values, and usage which is generated
27
  * from a given json schema.
28
  * http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5
29
  *
30
  */
31
+ class Model implements \ArrayAccess
32
  {
33
  /**
34
+ * If you need to specify a NULL JSON value, use Google\Model::NULL_VALUE
35
  * instead - it will be replaced when converting to JSON with a real null.
36
  */
37
  const NULL_VALUE = "{}gapi-php-null";
181
  */
182
  private function getSimpleValue($value)
183
  {
184
+ if ($value instanceof Model) {
185
  return $value->toSimpleObject();
186
  } else if (is_array($value)) {
187
  $return = array();
240
 
241
  /**
242
  * Verify if $obj is an array.
243
+ * @throws \Google\Exception Thrown if $obj isn't an array.
244
  * @param array $obj Items that should be validated.
245
  * @param string $method Method expecting an array as an argument.
246
  */
247
  public function assertIsArray($obj, $method)
248
  {
249
  if ($obj && !is_array($obj)) {
250
+ throw new GoogleException(
251
  "Incorrect parameter type passed to $method(). Expected an array."
252
  );
253
  }
vendor/google/apiclient/src/{Google/Service.php → Service.php} RENAMED
@@ -15,7 +15,12 @@
15
  * limitations under the License.
16
  */
17
 
18
- class Google_Service
 
 
 
 
 
19
  {
20
  public $batchPath;
21
  public $rootUrl;
@@ -25,14 +30,24 @@ class Google_Service
25
  public $resource;
26
  private $client;
27
 
28
- public function __construct(Google_Client $client)
29
  {
30
- $this->client = $client;
 
 
 
 
 
 
 
 
 
 
31
  }
32
 
33
  /**
34
- * Return the associated Google_Client class.
35
- * @return Google_Client
36
  */
37
  public function getClient()
38
  {
@@ -42,11 +57,11 @@ class Google_Service
42
  /**
43
  * Create a new HTTP Batch handler for this service
44
  *
45
- * @return Google_Http_Batch
46
  */
47
  public function createBatch()
48
  {
49
- return new Google_Http_Batch(
50
  $this->client,
51
  false,
52
  $this->rootUrl,
15
  * limitations under the License.
16
  */
17
 
18
+ namespace Google;
19
+
20
+ use Google\Http\Batch;
21
+ use TypeError;
22
+
23
+ class Service
24
  {
25
  public $batchPath;
26
  public $rootUrl;
30
  public $resource;
31
  private $client;
32
 
33
+ public function __construct($clientOrConfig = [])
34
  {
35
+ if ($clientOrConfig instanceof Client) {
36
+ $this->client = $clientOrConfig;
37
+ } elseif (is_array($clientOrConfig)) {
38
+ $this->client = new Client($clientOrConfig ?: []);
39
+ } else {
40
+ $errorMessage = 'constructor must be array or instance of Google\Client';
41
+ if (class_exists('TypeError')) {
42
+ throw new TypeError($errorMessage);
43
+ }
44
+ trigger_error($errorMessage, E_USER_ERROR);
45
+ }
46
  }
47
 
48
  /**
49
+ * Return the associated Google\Client class.
50
+ * @return \Google\Client
51
  */
52
  public function getClient()
53
  {
57
  /**
58
  * Create a new HTTP Batch handler for this service
59
  *
60
+ * @return Batch
61
  */
62
  public function createBatch()
63
  {
64
+ return new Batch(
65
  $this->client,
66
  false,
67
  $this->rootUrl,
vendor/google/apiclient/src/{Google/Service → Service}/Exception.php RENAMED
@@ -15,7 +15,11 @@
15
  * limitations under the License.
16
  */
17
 
18
- class Google_Service_Exception extends Google_Exception
 
 
 
 
19
  {
20
  /**
21
  * Optional list of errors returned in a JSON body of an HTTP error response.
@@ -28,7 +32,7 @@ class Google_Service_Exception extends Google_Exception
28
  *
29
  * @param string $message
30
  * @param int $code
31
- * @param Exception|null $previous
32
  * @param [{string, string}] errors List of errors returned in an HTTP
33
  * response. Defaults to [].
34
  */
15
  * limitations under the License.
16
  */
17
 
18
+ namespace Google\Service;
19
+
20
+ use Google\Exception as GoogleException;
21
+
22
+ class Exception extends GoogleException
23
  {
24
  /**
25
  * Optional list of errors returned in a JSON body of an HTTP error response.
32
  *
33
  * @param string $message
34
  * @param int $code
35
+ * @param \Exception|null $previous
36
  * @param [{string, string}] errors List of errors returned in an HTTP
37
  * response. Defaults to [].
38
  */
vendor/google/apiclient/src/{Google/Service → Service}/README.md RENAMED
File without changes
vendor/google/apiclient/src/{Google/Service → Service}/Resource.php RENAMED
@@ -15,6 +15,12 @@
15
  * limitations under the License.
16
  */
17
 
 
 
 
 
 
 
18
  use GuzzleHttp\Psr7\Request;
19
 
20
  /**
@@ -23,7 +29,7 @@ use GuzzleHttp\Psr7\Request;
23
  * is available in this service, and if so construct an apiHttpRequest representing it.
24
  *
25
  */
26
- class Google_Service_Resource
27
  {
28
  // Valid query parameters that work, but don't appear in discovery.
29
  private $stackParameters = array(
@@ -42,7 +48,7 @@ class Google_Service_Resource
42
  /** @var string $rootUrl */
43
  private $rootUrl;
44
 
45
- /** @var Google_Client $client */
46
  private $client;
47
 
48
  /** @var string $serviceName */
@@ -74,8 +80,8 @@ class Google_Service_Resource
74
  * @param $name
75
  * @param $arguments
76
  * @param $expectedClass - optional, the expected class name
77
- * @return Google_Http_Request|expectedClass
78
- * @throws Google_Exception
79
  */
80
  public function call($name, $arguments, $expectedClass = null)
81
  {
@@ -89,7 +95,7 @@ class Google_Service_Resource
89
  )
90
  );
91
 
92
- throw new Google_Exception(
93
  "Unknown function: " .
94
  "{$this->serviceName}->{$this->resourceName}->{$name}()"
95
  );
@@ -101,7 +107,7 @@ class Google_Service_Resource
101
  // document as parameter, but we abuse the param entry for storing it.
102
  $postBody = null;
103
  if (isset($parameters['postBody'])) {
104
- if ($parameters['postBody'] instanceof Google_Model) {
105
  // In the cases the post body is an existing object, we want
106
  // to use the smart method to create a simple object for
107
  // for JSONification.
@@ -144,7 +150,7 @@ class Google_Service_Resource
144
  'parameter' => $key
145
  )
146
  );
147
- throw new Google_Exception("($name) unknown parameter: '$key'");
148
  }
149
  }
150
 
@@ -162,7 +168,7 @@ class Google_Service_Resource
162
  'parameter' => $paramName
163
  )
164
  );
165
- throw new Google_Exception("($name) missing required param: '$paramName'");
166
  }
167
  if (isset($parameters[$paramName])) {
168
  $value = $parameters[$paramName];
@@ -207,7 +213,7 @@ class Google_Service_Resource
207
  ? $parameters['mimeType']['value']
208
  : 'application/octet-stream';
209
  $data = $parameters['data']['value'];
210
- $upload = new Google_Http_MediaFileUpload($this->client, $request, $mimeType, $data);
211
 
212
  // pull down the modified request
213
  $request = $upload->getRequest();
@@ -289,7 +295,7 @@ class Google_Service_Resource
289
  }
290
 
291
  if (count($uriTemplateVars)) {
292
- $uriTemplateParser = new Google_Utils_UriTemplate();
293
  $requestUrl = $uriTemplateParser->parse($requestUrl, $uriTemplateVars);
294
  }
295
 
15
  * limitations under the License.
16
  */
17
 
18
+ namespace Google\Service;
19
+
20
+ use Google\Model;
21
+ use Google\Http\MediaFileUpload;
22
+ use Google\Exception as GoogleException;
23
+ use Google\Utils\UriTemplate;
24
  use GuzzleHttp\Psr7\Request;
25
 
26
  /**
29
  * is available in this service, and if so construct an apiHttpRequest representing it.
30
  *
31
  */
32
+ class Resource
33
  {
34
  // Valid query parameters that work, but don't appear in discovery.
35
  private $stackParameters = array(
48
  /** @var string $rootUrl */
49
  private $rootUrl;
50
 
51
+ /** @var \Google\Client $client */
52
  private $client;
53
 
54
  /** @var string $serviceName */
80
  * @param $name
81
  * @param $arguments
82
  * @param $expectedClass - optional, the expected class name
83
+ * @return Request|$expectedClass
84
+ * @throws \Google\Exception
85
  */
86
  public function call($name, $arguments, $expectedClass = null)
87
  {
95
  )
96
  );
97
 
98
+ throw new GoogleException(
99
  "Unknown function: " .
100
  "{$this->serviceName}->{$this->resourceName}->{$name}()"
101
  );
107
  // document as parameter, but we abuse the param entry for storing it.
108
  $postBody = null;
109
  if (isset($parameters['postBody'])) {
110
+ if ($parameters['postBody'] instanceof Model) {
111
  // In the cases the post body is an existing object, we want
112
  // to use the smart method to create a simple object for
113
  // for JSONification.
150
  'parameter' => $key
151
  )
152
  );
153
+ throw new GoogleException("($name) unknown parameter: '$key'");
154
  }
155
  }
156
 
168
  'parameter' => $paramName
169
  )
170
  );
171
+ throw new GoogleException("($name) missing required param: '$paramName'");
172
  }
173
  if (isset($parameters[$paramName])) {
174
  $value = $parameters[$paramName];
213
  ? $parameters['mimeType']['value']
214
  : 'application/octet-stream';
215
  $data = $parameters['data']['value'];
216
+ $upload = new MediaFileUpload($this->client, $request, $mimeType, $data);
217
 
218
  // pull down the modified request
219
  $request = $upload->getRequest();
295
  }
296
 
297
  if (count($uriTemplateVars)) {
298
+ $uriTemplateParser = new UriTemplate();
299
  $requestUrl = $uriTemplateParser->parse($requestUrl, $uriTemplateVars);
300
  }
301
 
vendor/google/apiclient/src/{Google/Task → Task}/Composer.php RENAMED
@@ -15,15 +15,18 @@
15
  * the License.
16
  */
17
 
 
 
18
  use Composer\Script\Event;
19
  use Symfony\Component\Filesystem\Filesystem;
20
  use Symfony\Component\Finder\Finder;
 
21
 
22
- class Google_Task_Composer
23
  {
24
  /**
25
  * @param Event $event Composer event passed in for any script method
26
- * @param FilesystemInterface $filesystem Optional. Used for testing.
27
  */
28
  public static function cleanup(
29
  Event $event,
@@ -70,7 +73,7 @@ class Google_Task_Composer
70
 
71
  foreach ($servicesToKeep as $service) {
72
  if (!preg_match('/^[a-zA-Z0-9]*$/', $service)) {
73
- throw new \InvalidArgumentException(
74
  sprintf(
75
  'Invalid Google service name "%s"',
76
  $service
@@ -79,8 +82,8 @@ class Google_Task_Composer
79
  }
80
  try {
81
  $finder->in($serviceDir . '/' . $service);
82
- } catch (\InvalidArgumentException $e) {
83
- throw new \InvalidArgumentException(
84
  sprintf(
85
  'Google service "%s" does not exist or was removed previously',
86
  $service
15
  * the License.
16
  */
17
 
18
+ namespace Google\Task;
19
+
20
  use Composer\Script\Event;
21
  use Symfony\Component\Filesystem\Filesystem;
22
  use Symfony\Component\Finder\Finder;
23
+ use InvalidArgumentException;
24
 
25
+ class Composer
26
  {
27
  /**
28
  * @param Event $event Composer event passed in for any script method
29
+ * @param Filesystem $filesystem Optional. Used for testing.
30
  */
31
  public static function cleanup(
32
  Event $event,
73
 
74
  foreach ($servicesToKeep as $service) {
75
  if (!preg_match('/^[a-zA-Z0-9]*$/', $service)) {
76
+ throw new InvalidArgumentException(
77
  sprintf(
78
  'Invalid Google service name "%s"',
79
  $service
82
  }
83
  try {
84
  $finder->in($serviceDir . '/' . $service);
85
+ } catch (InvalidArgumentException $e) {
86
+ throw new InvalidArgumentException(
87
  sprintf(
88
  'Google service "%s" does not exist or was removed previously',
89
  $service
vendor/google/apiclient/src/{Google/Task → Task}/Exception.php RENAMED
@@ -15,6 +15,10 @@
15
  * limitations under the License.
16
  */
17
 
18
- class Google_Task_Exception extends Google_Exception
 
 
 
 
19
  {
20
  }
15
  * limitations under the License.
16
  */
17
 
18
+ namespace Google\Task;
19
+
20
+ use Google\Exception as GoogleException;
21
+
22
+ class Exception extends GoogleException
23
  {
24
  }
vendor/google/apiclient/src/{Google/Task → Task}/Retryable.php RENAMED
@@ -15,10 +15,12 @@
15
  * limitations under the License.
16
  */
17
 
 
 
18
  /**
19
  * Interface for checking how many times a given task can be retried following
20
  * a failure.
21
  */
22
- interface Google_Task_Retryable
23
  {
24
  }
15
  * limitations under the License.
16
  */
17
 
18
+ namespace Google\Task;
19
+
20
  /**
21
  * Interface for checking how many times a given task can be retried following
22
  * a failure.
23
  */
24
+ interface Retryable
25
  {
26
  }
vendor/google/apiclient/src/{Google/Task → Task}/Runner.php RENAMED
@@ -15,12 +15,17 @@
15
  * limitations under the License.
16
  */
17
 
 
 
 
 
 
18
  /**
19
  * A task runner with exponential backoff support.
20
  *
21
  * @see https://developers.google.com/drive/web/handle-errors#implementing_exponential_backoff
22
  */
23
- class Google_Task_Runner
24
  {
25
  const TASK_RETRY_NEVER = 0;
26
  const TASK_RETRY_ONCE = 1;
@@ -86,7 +91,7 @@ class Google_Task_Runner
86
  * @param string $name The name of the current task (used for logging)
87
  * @param callable $action The task to run and possibly retry
88
  * @param array $arguments The task arguments
89
- * @throws Google_Task_Exception when misconfigured
90
  */
91
  public function __construct(
92
  $config,
@@ -96,7 +101,7 @@ class Google_Task_Runner
96
  ) {
97
  if (isset($config['initial_delay'])) {
98
  if ($config['initial_delay'] < 0) {
99
- throw new Google_Task_Exception(
100
  'Task configuration `initial_delay` must not be negative.'
101
  );
102
  }
@@ -106,7 +111,7 @@ class Google_Task_Runner
106
 
107
  if (isset($config['max_delay'])) {
108
  if ($config['max_delay'] <= 0) {
109
- throw new Google_Task_Exception(
110
  'Task configuration `max_delay` must be greater than 0.'
111
  );
112
  }
@@ -116,7 +121,7 @@ class Google_Task_Runner
116
 
117
  if (isset($config['factor'])) {
118
  if ($config['factor'] <= 0) {
119
- throw new Google_Task_Exception(
120
  'Task configuration `factor` must be greater than 0.'
121
  );
122
  }
@@ -126,7 +131,7 @@ class Google_Task_Runner
126
 
127
  if (isset($config['jitter'])) {
128
  if ($config['jitter'] <= 0) {
129
- throw new Google_Task_Exception(
130
  'Task configuration `jitter` must be greater than 0.'
131
  );
132
  }
@@ -136,7 +141,7 @@ class Google_Task_Runner
136
 
137
  if (isset($config['retries'])) {
138
  if ($config['retries'] < 0) {
139
- throw new Google_Task_Exception(
140
  'Task configuration `retries` must not be negative.'
141
  );
142
  }
@@ -144,7 +149,7 @@ class Google_Task_Runner
144
  }
145
 
146
  if (!is_callable($action)) {
147
- throw new Google_Task_Exception(
148
  'Task argument `$action` must be a valid callable.'
149
  );
150
  }
@@ -167,14 +172,14 @@ class Google_Task_Runner
167
  * Runs the task and (if applicable) automatically retries when errors occur.
168
  *
169
  * @return mixed
170
- * @throws Google_Task_Retryable on failure when no retries are available.
171
  */
172
  public function run()
173
  {
174
  while ($this->attempt()) {
175
  try {
176
  return call_user_func_array($this->action, $this->arguments);
177
- } catch (Google_Service_Exception $exception) {
178
  $allowedRetries = $this->allowedRetries(
179
  $exception->getCode(),
180
  $exception->getErrors()
15
  * limitations under the License.
16
  */
17
 
18
+ namespace Google\Task;
19
+
20
+ use Google\Service\Exception as GoogleServiceException;
21
+ use Google\Task\Exception as GoogleTaskException;
22
+
23
  /**
24
  * A task runner with exponential backoff support.
25
  *
26
  * @see https://developers.google.com/drive/web/handle-errors#implementing_exponential_backoff
27
  */
28
+ class Runner
29
  {
30
  const TASK_RETRY_NEVER = 0;
31
  const TASK_RETRY_ONCE = 1;
91
  * @param string $name The name of the current task (used for logging)
92
  * @param callable $action The task to run and possibly retry
93
  * @param array $arguments The task arguments
94
+ * @throws \Google\Task\Exception when misconfigured
95
  */
96
  public function __construct(
97
  $config,
101
  ) {
102
  if (isset($config['initial_delay'])) {
103
  if ($config['initial_delay'] < 0) {
104
+ throw new GoogleTaskException(
105
  'Task configuration `initial_delay` must not be negative.'
106
  );
107
  }
111
 
112
  if (isset($config['max_delay'])) {
113
  if ($config['max_delay'] <= 0) {
114
+ throw new GoogleTaskException(
115
  'Task configuration `max_delay` must be greater than 0.'
116
  );
117
  }
121
 
122
  if (isset($config['factor'])) {
123
  if ($config['factor'] <= 0) {
124
+ throw new GoogleTaskException(
125
  'Task configuration `factor` must be greater than 0.'
126
  );
127
  }
131
 
132
  if (isset($config['jitter'])) {
133
  if ($config['jitter'] <= 0) {
134
+ throw new GoogleTaskException(
135
  'Task configuration `jitter` must be greater than 0.'
136
  );
137
  }
141
 
142
  if (isset($config['retries'])) {
143
  if ($config['retries'] < 0) {
144
+ throw new GoogleTaskException(
145
  'Task configuration `retries` must not be negative.'
146
  );
147
  }
149
  }
150
 
151
  if (!is_callable($action)) {
152
+ throw new GoogleTaskException(
153
  'Task argument `$action` must be a valid callable.'
154
  );
155
  }
172
  * Runs the task and (if applicable) automatically retries when errors occur.
173
  *
174
  * @return mixed
175
+ * @throws \Google\Service\Exception on failure when no retries are available.
176
  */
177
  public function run()
178
  {
179
  while ($this->attempt()) {
180
  try {
181
  return call_user_func_array($this->action, $this->arguments);
182
+ } catch (GoogleServiceException $exception) {
183
  $allowedRetries = $this->allowedRetries(
184
  $exception->getCode(),
185
  $exception->getErrors()
vendor/google/apiclient/src/{Google/Utils → Utils}/UriTemplate.php RENAMED
@@ -15,11 +15,13 @@
15
  * limitations under the License.
16
  */
17
 
 
 
18
  /**
19
  * Implementation of levels 1-3 of the URI Template spec.
20
  * @see http://tools.ietf.org/html/rfc6570
21
  */
22
- class Google_Utils_UriTemplate
23
  {
24
  const TYPE_MAP = "1";
25
  const TYPE_LIST = "2";
15
  * limitations under the License.
16
  */
17
 
18
+ namespace Google\Utils;
19
+
20
  /**
21
  * Implementation of levels 1-3 of the URI Template spec.
22
  * @see http://tools.ietf.org/html/rfc6570
23
  */
24
+ class UriTemplate
25
  {
26
  const TYPE_MAP = "1";
27
  const TYPE_LIST = "2";
vendor/google/apiclient/src/aliases.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (class_exists('Google_Client', false)) {
4
+ // Prevent error with preloading in PHP 7.4
5
+ // @see https://github.com/googleapis/google-api-php-client/issues/1976
6
+ return;
7
+ }
8
+
9
+ $classMap = [
10
+ 'Google\\Client' => 'Google_Client',
11
+ 'Google\\Service' => 'Google_Service',
12
+ 'Google\\AccessToken\\Revoke' => 'Google_AccessToken_Revoke',
13
+ 'Google\\AccessToken\\Verify' => 'Google_AccessToken_Verify',
14
+ 'Google\\Model' => 'Google_Model',
15
+ 'Google\\Utils\\UriTemplate' => 'Google_Utils_UriTemplate',
16
+ 'Google\\AuthHandler\\Guzzle6AuthHandler' => 'Google_AuthHandler_Guzzle6AuthHandler',
17
+ 'Google\\AuthHandler\\Guzzle7AuthHandler' => 'Google_AuthHandler_Guzzle7AuthHandler',
18
+ 'Google\\AuthHandler\\Guzzle5AuthHandler' => 'Google_AuthHandler_Guzzle5AuthHandler',
19
+ 'Google\\AuthHandler\\AuthHandlerFactory' => 'Google_AuthHandler_AuthHandlerFactory',
20
+ 'Google\\Http\\Batch' => 'Google_Http_Batch',
21
+ 'Google\\Http\\MediaFileUpload' => 'Google_Http_MediaFileUpload',
22
+ 'Google\\Http\\REST' => 'Google_Http_REST',
23
+ 'Google\\Task\\Retryable' => 'Google_Task_Retryable',
24
+ 'Google\\Task\\Exception' => 'Google_Task_Exception',
25
+ 'Google\\Task\\Runner' => 'Google_Task_Runner',
26
+ 'Google\\Collection' => 'Google_Collection',
27
+ 'Google\\Service\\Exception' => 'Google_Service_Exception',
28
+ 'Google\\Service\\Resource' => 'Google_Service_Resource',
29
+ 'Google\\Exception' => 'Google_Exception',
30
+ ];
31
+
32
+ foreach ($classMap as $class => $alias) {
33
+ class_alias($class, $alias);
34
+ }
35
+
36
+ /**
37
+ * This class needs to be defined explicitly as scripts must be recognized by
38
+ * the autoloader.
39
+ */
40
+ class Google_Task_Composer extends \Google\Task\Composer
41
+ {
42
+ }
43
+
44
+ if (\false) {
45
+ class Google_AccessToken_Revoke extends \Google\AccessToken\Revoke {}
46
+ class Google_AccessToken_Verify extends \Google\AccessToken\Verify {}
47
+ class Google_AuthHandler_AuthHandlerFactory extends \Google\AuthHandler\AuthHandlerFactory {}
48
+ class Google_AuthHandler_Guzzle5AuthHandler extends \Google\AuthHandler\Guzzle5AuthHandler {}
49
+ class Google_AuthHandler_Guzzle6AuthHandler extends \Google\AuthHandler\Guzzle6AuthHandler {}
50
+ class Google_AuthHandler_Guzzle7AuthHandler extends \Google\AuthHandler\Guzzle7AuthHandler {}
51
+ class Google_Client extends \Google\Client {}
52
+ class Google_Collection extends \Google\Collection {}
53
+ class Google_Exception extends \Google\Exception {}
54
+ class Google_Http_Batch extends \Google\Http\Batch {}
55
+ class Google_Http_MediaFileUpload extends \Google\Http\MediaFileUpload {}
56
+ class Google_Http_REST extends \Google\Http\REST {}
57
+ class Google_Model extends \Google\Model {}
58
+ class Google_Service extends \Google\Service {}
59
+ class Google_Service_Exception extends \Google\Service\Exception {}
60
+ class Google_Service_Resource extends \Google\Service\Resource {}
61
+ class Google_Task_Exception extends \Google\Task\Exception {}
62
+ class Google_Task_Retryable extends \Google\Task\Retryable {}
63
+ class Google_Task_Runner extends \Google\Task\Runner {}
64
+ class Google_Utils_UriTemplate extends \Google\Utils\UriTemplate {}
65
+ }
vendor/google/auth/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ## 1.13.0 (9/18/2020)
2
 
3
  * [feat]: Add service account identity support to GCECredentials (#304)
1
+ ## 1.14.3 (10/16/2020)
2
+
3
+ * [fix]: add expires_at to GCECredentials (#314)
4
+
5
+ ## 1.14.2 (10/14/2020)
6
+
7
+ * [fix]: Better FetchAuthTokenCache and getLastReceivedToken (#311)
8
+
9
+ ## 1.14.1 (10/05/2020)
10
+
11
+ * [fix]: variable typo (#310)
12
+
13
+ ## 1.14.0 (10/02/2020)
14
+
15
+ * [feat]: Add support for default scopes (#306)
16
+
17
  ## 1.13.0 (9/18/2020)
18
 
19
  * [feat]: Add service account identity support to GCECredentials (#304)
vendor/google/auth/src/ApplicationDefaultCredentials.php CHANGED
@@ -133,7 +133,7 @@ class ApplicationDefaultCredentials
133
  * If supplied, $scope is used to in creating the credentials instance if
134
  * this does not fallback to the Compute Engine defaults.
135
  *
136
- * @param string|array scope the scope of the access request, expressed
137
  * either as an Array or as a space-delimited String.
138
  * @param callable $httpHandler callback which delivers psr7 request
139
  * @param array $cacheConfig configuration for the cache when it's present
@@ -141,6 +141,9 @@ class ApplicationDefaultCredentials
141
  * provided if you have one already available for use.
142
  * @param string $quotaProject specifies a project to bill for access
143
  * charges associated with the request.
 
 
 
144
  *
145
  * @return CredentialsLoader
146
  * @throws DomainException if no implementation can be obtained.
@@ -150,11 +153,13 @@ class ApplicationDefaultCredentials
150
  callable $httpHandler = null,
151
  array $cacheConfig = null,
152
  CacheItemPoolInterface $cache = null,
153
- $quotaProject = null
 
154
  ) {
155
  $creds = null;
156
  $jsonKey = CredentialsLoader::fromEnv()
157
  ?: CredentialsLoader::fromWellKnownFile();
 
158
 
159
  if (!$httpHandler) {
160
  if (!($client = HttpClientCache::getHttpClient())) {
@@ -169,11 +174,15 @@ class ApplicationDefaultCredentials
169
  if ($quotaProject) {
170
  $jsonKey['quota_project_id'] = $quotaProject;
171
  }
172
- $creds = CredentialsLoader::makeCredentials($scope, $jsonKey);
 
 
 
 
173
  } elseif (AppIdentityCredentials::onAppEngine() && !GCECredentials::onAppEngineFlexible()) {
174
- $creds = new AppIdentityCredentials($scope);
175
  } elseif (self::onGce($httpHandler, $cacheConfig, $cache)) {
176
- $creds = new GCECredentials(null, $scope, null, $quotaProject);
177
  }
178
 
179
  if (is_null($creds)) {
133
  * If supplied, $scope is used to in creating the credentials instance if
134
  * this does not fallback to the Compute Engine defaults.
135
  *
136
+ * @param string|array $scope the scope of the access request, expressed
137
  * either as an Array or as a space-delimited String.
138
  * @param callable $httpHandler callback which delivers psr7 request
139
  * @param array $cacheConfig configuration for the cache when it's present
141
  * provided if you have one already available for use.
142
  * @param string $quotaProject specifies a project to bill for access
143
  * charges associated with the request.
144
+ * @param string|array $defaultScope The default scope to use if no
145
+ * user-defined scopes exist, expressed either as an Array or as a
146
+ * space-delimited string.
147
  *
148
  * @return CredentialsLoader
149
  * @throws DomainException if no implementation can be obtained.
153
  callable $httpHandler = null,
154
  array $cacheConfig = null,
155
  CacheItemPoolInterface $cache = null,
156
+ $quotaProject = null,
157
+ $defaultScope = null
158
  ) {
159
  $creds = null;
160
  $jsonKey = CredentialsLoader::fromEnv()
161
  ?: CredentialsLoader::fromWellKnownFile();
162
+ $anyScope = $scope ?: $defaultScope;
163
 
164
  if (!$httpHandler) {
165
  if (!($client = HttpClientCache::getHttpClient())) {
174
  if ($quotaProject) {
175
  $jsonKey['quota_project_id'] = $quotaProject;
176
  }
177
+ $creds = CredentialsLoader::makeCredentials(
178
+ $scope,
179
+ $jsonKey,
180
+ $defaultScope
181
+ );
182
  } elseif (AppIdentityCredentials::onAppEngine() && !GCECredentials::onAppEngineFlexible()) {
183
+ $creds = new AppIdentityCredentials($anyScope);
184
  } elseif (self::onGce($httpHandler, $cacheConfig, $cache)) {
185
+ $creds = new GCECredentials(null, $anyScope, null, $quotaProject);
186
  }
187
 
188
  if (is_null($creds)) {
vendor/google/auth/src/Credentials/GCECredentials.php CHANGED
@@ -385,9 +385,10 @@ class GCECredentials extends CredentialsLoader implements
385
  throw new \Exception('Invalid JSON response');
386
  }
387
 
 
 
388
  // store this so we can retrieve it later
389
  $this->lastReceivedToken = $json;
390
- $this->lastReceivedToken['expires_at'] = time() + $json['expires_in'];
391
 
392
  return $json;
393
  }
385
  throw new \Exception('Invalid JSON response');
386
  }
387
 
388
+ $json['expires_at'] = time() + $json['expires_in'];
389
+
390
  // store this so we can retrieve it later
391
  $this->lastReceivedToken = $json;
 
392
 
393
  return $json;
394
  }
vendor/google/auth/src/Credentials/ServiceAccountCredentials.php CHANGED
@@ -84,6 +84,11 @@ class ServiceAccountCredentials extends CredentialsLoader implements
84
  */
85
  protected $projectId;
86
 
 
 
 
 
 
87
  /**
88
  * Create a new ServiceAccountCredentials.
89
  *
@@ -180,7 +185,11 @@ class ServiceAccountCredentials extends CredentialsLoader implements
180
  */
181
  public function getLastReceivedToken()
182
  {
183
- return $this->auth->getLastReceivedToken();
 
 
 
 
184
  }
185
 
186
  /**
@@ -210,8 +219,7 @@ class ServiceAccountCredentials extends CredentialsLoader implements
210
  callable $httpHandler = null
211
  ) {
212
  // scope exists. use oauth implementation
213
- $scope = $this->auth->getScope();
214
- if (!is_null($scope)) {
215
  return parent::updateMetadata($metadata, $authUri, $httpHandler);
216
  }
217
 
@@ -222,7 +230,14 @@ class ServiceAccountCredentials extends CredentialsLoader implements
222
  );
223
  $jwtCreds = new ServiceAccountJwtAccessCredentials($credJson);
224
 
225
- return $jwtCreds->updateMetadata($metadata, $authUri, $httpHandler);
 
 
 
 
 
 
 
226
  }
227
 
228
  /**
@@ -256,4 +271,9 @@ class ServiceAccountCredentials extends CredentialsLoader implements
256
  {
257
  return $this->quotaProject;
258
  }
 
 
 
 
 
259
  }
84
  */
85
  protected $projectId;
86
 
87
+ /*
88
+ * @var array|null
89
+ */
90
+ private $lastReceivedJwtAccessToken;
91
+
92
  /**
93
  * Create a new ServiceAccountCredentials.
94
  *
185
  */
186
  public function getLastReceivedToken()
187
  {
188
+ // If self-signed JWTs are being used, fetch the last received token
189
+ // from memory. Else, fetch it from OAuth2
190
+ return $this->useSelfSignedJwt()
191
+ ? $this->lastReceivedJwtAccessToken
192
+ : $this->auth->getLastReceivedToken();
193
  }
194
 
195
  /**
219
  callable $httpHandler = null
220
  ) {
221
  // scope exists. use oauth implementation
222
+ if (!$this->useSelfSignedJwt()) {
 
223
  return parent::updateMetadata($metadata, $authUri, $httpHandler);
224
  }
225
 
230
  );
231
  $jwtCreds = new ServiceAccountJwtAccessCredentials($credJson);
232
 
233
+ $updatedMetadata = $jwtCreds->updateMetadata($metadata, $authUri, $httpHandler);
234
+
235
+ if ($lastReceivedToken = $jwtCreds->getLastReceivedToken()) {
236
+ // Keep self-signed JWTs in memory as the last received token
237
+ $this->lastReceivedJwtAccessToken = $lastReceivedToken;
238
+ }
239
+
240
+ return $updatedMetadata;
241
  }
242
 
243
  /**
271
  {
272
  return $this->quotaProject;
273
  }
274
+
275
+ private function useSelfSignedJwt()
276
+ {
277
+ return is_null($this->auth->getScope());
278
+ }
279
  }
vendor/google/auth/src/Credentials/ServiceAccountJwtAccessCredentials.php CHANGED
@@ -134,6 +134,9 @@ class ServiceAccountJwtAccessCredentials extends CredentialsLoader implements
134
 
135
  $access_token = $this->auth->toJwt();
136
 
 
 
 
137
  return array('access_token' => $access_token);
138
  }
139
 
134
 
135
  $access_token = $this->auth->toJwt();
136
 
137
+ // Set the self-signed access token in OAuth2 for getLastReceivedToken
138
+ $this->auth->setAccessToken($access_token);
139
+
140
  return array('access_token' => $access_token);
141
  }
142
 
vendor/google/auth/src/CredentialsLoader.php CHANGED
@@ -131,20 +131,29 @@ abstract class CredentialsLoader implements
131
  * @param string|array $scope the scope of the access request, expressed
132
  * either as an Array or as a space-delimited String.
133
  * @param array $jsonKey the JSON credentials.
 
 
 
 
134
  * @return ServiceAccountCredentials|UserRefreshCredentials
135
  */
136
- public static function makeCredentials($scope, array $jsonKey)
137
- {
 
 
 
138
  if (!array_key_exists('type', $jsonKey)) {
139
  throw new \InvalidArgumentException('json key is missing the type field');
140
  }
141
 
142
  if ($jsonKey['type'] == 'service_account') {
 
143
  return new ServiceAccountCredentials($scope, $jsonKey);
144
  }
145
 
146
  if ($jsonKey['type'] == 'authorized_user') {
147
- return new UserRefreshCredentials($scope, $jsonKey);
 
148
  }
149
 
150
  throw new \InvalidArgumentException('invalid value in the type field');
@@ -227,7 +236,7 @@ abstract class CredentialsLoader implements
227
  ) {
228
  if (isset($metadata[self::AUTH_METADATA_KEY])) {
229
  // Auth metadata has already been set
230
- return $metdadata;
231
  }
232
  $result = $this->fetchAuthToken($httpHandler);
233
  if (!isset($result['access_token'])) {
131
  * @param string|array $scope the scope of the access request, expressed
132
  * either as an Array or as a space-delimited String.
133
  * @param array $jsonKey the JSON credentials.
134
+ * @param string|array $defaultScope The default scope to use if no
135
+ * user-defined scopes exist, expressed either as an Array or as a
136
+ * space-delimited string.
137
+ *
138
  * @return ServiceAccountCredentials|UserRefreshCredentials
139
  */
140
+ public static function makeCredentials(
141
+ $scope,
142
+ array $jsonKey,
143
+ $defaultScope = null
144
+ ) {
145
  if (!array_key_exists('type', $jsonKey)) {
146
  throw new \InvalidArgumentException('json key is missing the type field');
147
  }
148
 
149
  if ($jsonKey['type'] == 'service_account') {
150
+ // Do not pass $defaultScope to ServiceAccountCredentials
151
  return new ServiceAccountCredentials($scope, $jsonKey);
152
  }
153
 
154
  if ($jsonKey['type'] == 'authorized_user') {
155
+ $anyScope = $scope ?: $defaultScope;
156
+ return new UserRefreshCredentials($anyScope, $jsonKey);
157
  }
158
 
159
  throw new \InvalidArgumentException('invalid value in the type field');
236
  ) {
237
  if (isset($metadata[self::AUTH_METADATA_KEY])) {
238
  // Auth metadata has already been set
239
+ return $metadata;
240
  }
241
  $result = $this->fetchAuthToken($httpHandler);
242
  if (!isset($result['access_token'])) {
vendor/google/auth/src/FetchAuthTokenCache.php CHANGED
@@ -77,32 +77,13 @@ class FetchAuthTokenCache implements
77
  */
78
  public function fetchAuthToken(callable $httpHandler = null)
79
  {
80
- // Use the cached value if its available.
81
- //
82
- // TODO: correct caching; update the call to setCachedValue to set the expiry
83
- // to the value returned with the auth token.
84
- //
85
- // TODO: correct caching; enable the cache to be cleared.
86
- $cacheKey = $this->fetcher->getCacheKey();
87
- $cached = $this->getCachedValue($cacheKey);
88
- if (is_array($cached)) {
89
- if (empty($cached['expires_at'])) {
90
- // If there is no expiration data, assume token is not expired.
91
- // (for JwtAccess and ID tokens)
92
- return $cached;
93
- }
94
- if (time() < $cached['expires_at']) {
95
- // access token is not expired
96
- return $cached;
97
- }
98
  }
99
 
100
  $auth_token = $this->fetcher->fetchAuthToken($httpHandler);
101
 
102
- if (isset($auth_token['access_token']) ||
103
- isset($auth_token['id_token'])) {
104
- $this->setCachedValue($cacheKey, $auth_token);
105
- }
106
 
107
  return $auth_token;
108
  }
@@ -212,20 +193,71 @@ class FetchAuthTokenCache implements
212
  );
213
  }
214
 
215
- // Set the `Authentication` header from the cache, so it is not set
216
- // again by the fetcher
217
- $result = $this->fetchAuthToken($httpHandler);
218
-
219
- if (isset($result['access_token'])) {
220
- $metadata[self::AUTH_METADATA_KEY] = [
221
- 'Bearer ' . $result['access_token']
222
- ];
 
 
223
  }
224
 
225
- return $this->fetcher->updateMetadata(
226
  $metadata,
227
  $authUri,
228
  $httpHandler
229
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
230
  }
231
  }
77
  */
78
  public function fetchAuthToken(callable $httpHandler = null)
79
  {
80
+ if ($cached = $this->fetchAuthTokenFromCache()) {
81
+ return $cached;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  }
83
 
84
  $auth_token = $this->fetcher->fetchAuthToken($httpHandler);
85
 
86
+ $this->saveAuthTokenInCache($auth_token);
 
 
 
87
 
88
  return $auth_token;
89
  }
193
  );
194
  }
195
 
196
+ $cached = $this->fetchAuthTokenFromCache($authUri);
197
+ if ($cached) {
198
+ // Set the access token in the `Authorization` metadata header so
199
+ // the downstream call to updateMetadata know they don't need to
200
+ // fetch another token.
201
+ if (isset($cached['access_token'])) {
202
+ $metadata[self::AUTH_METADATA_KEY] = [
203
+ 'Bearer ' . $cached['access_token']
204
+ ];
205
+ }
206
  }
207
 
208
+ $newMetadata = $this->fetcher->updateMetadata(
209
  $metadata,
210
  $authUri,
211
  $httpHandler
212
  );
213
+
214
+ if (!$cached && $token = $this->fetcher->getLastReceivedToken()) {
215
+ $this->saveAuthTokenInCache($token, $authUri);
216
+ }
217
+
218
+ return $newMetadata;
219
+ }
220
+
221
+ private function fetchAuthTokenFromCache($authUri = null)
222
+ {
223
+ // Use the cached value if its available.
224
+ //
225
+ // TODO: correct caching; update the call to setCachedValue to set the expiry
226
+ // to the value returned with the auth token.
227
+ //
228
+ // TODO: correct caching; enable the cache to be cleared.
229
+
230
+ // if $authUri is set, use it as the cache key
231
+ $cacheKey = $authUri
232
+ ? $this->getFullCacheKey($authUri)
233
+ : $this->fetcher->getCacheKey();
234
+
235
+ $cached = $this->getCachedValue($cacheKey);
236
+ if (is_array($cached)) {
237
+ if (empty($cached['expires_at'])) {
238
+ // If there is no expiration data, assume token is not expired.
239
+ // (for JwtAccess and ID tokens)
240
+ return $cached;
241
+ }
242
+ if (time() < $cached['expires_at']) {
243
+ // access token is not expired
244
+ return $cached;
245
+ }
246
+ }
247
+
248
+ return null;
249
+ }
250
+
251
+ private function saveAuthTokenInCache($authToken, $authUri = null)
252
+ {
253
+ if (isset($authToken['access_token']) ||
254
+ isset($authToken['id_token'])) {
255
+ // if $authUri is set, use it as the cache key
256
+ $cacheKey = $authUri
257
+ ? $this->getFullCacheKey($authUri)
258
+ : $this->fetcher->getCacheKey();
259
+
260
+ $this->setCachedValue($cacheKey, $authToken);
261
+ }
262
  }
263
  }
vendor/google/auth/src/OAuth2.php CHANGED
@@ -1303,18 +1303,36 @@ class OAuth2 implements FetchAuthTokenInterface
1303
  /**
1304
  * The expiration of the last received token.
1305
  *
1306
- * @return array
1307
  */
1308
  public function getLastReceivedToken()
1309
  {
1310
  if ($token = $this->getAccessToken()) {
1311
- return [
 
1312
  'access_token' => $token,
1313
  'expires_at' => $this->getExpiresAt(),
1314
  ];
 
 
 
 
 
 
 
1315
  }
1316
 
1317
- return null;
 
 
 
 
 
 
 
 
 
 
1318
  }
1319
 
1320
  /**
1303
  /**
1304
  * The expiration of the last received token.
1305
  *
1306
+ * @return array|null
1307
  */
1308
  public function getLastReceivedToken()
1309
  {
1310
  if ($token = $this->getAccessToken()) {
1311
+ // the bare necessity of an auth token
1312
+ $authToken = [
1313
  'access_token' => $token,
1314
  'expires_at' => $this->getExpiresAt(),
1315
  ];
1316
+ } elseif ($idToken = $this->getIdToken()) {
1317
+ $authToken = [
1318
+ 'id_token' => $idToken,
1319
+ 'expires_at' => $this->getExpiresAt(),
1320
+ ];
1321
+ } else {
1322
+ return null;
1323
  }
1324
 
1325
+ if ($expiresIn = $this->getExpiresIn()) {
1326
+ $authToken['expires_in'] = $expiresIn;
1327
+ }
1328
+ if ($issuedAt = $this->getIssuedAt()) {
1329
+ $authToken['issued_at'] = $issuedAt;
1330
+ }
1331
+ if ($refreshToken = $this->getRefreshToken()) {
1332
+ $authToken['refresh_token'] = $refreshToken;
1333
+ }
1334
+
1335
+ return $authToken;
1336
  }
1337
 
1338
  /**
vendor/guzzlehttp/guzzle/CHANGELOG.md CHANGED
@@ -1,103 +1,17 @@
1
  # Change Log
2
 
3
- Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version.
4
 
5
- ## UNRELEASED
6
 
7
- ## 7.1.0 - 2020-09-22
8
 
9
- ### Added
10
 
11
- - `GuzzleHttp\MessageFormatterInterface`
12
 
13
- ### Fixed
14
-
15
- - Fixed issue that caused cookies with no value not to be stored.
16
- - On redirects, we allow all safe methods like GET, HEAD and OPTIONS.
17
- - Fixed logging on empty responses.
18
- - Make sure MessageFormatter::format returns string
19
-
20
- ### Deprecated
21
-
22
- - All functions in `GuzzleHttp` has been deprecated. Use static methods on `Utils` instead.
23
- - `ClientInterface::getConfig()`
24
- - `Client::getConfig()`
25
- - `Client::__call()`
26
- - `Utils::defaultCaBundle()`
27
- - `CurlFactory::LOW_CURL_VERSION_NUMBER`
28
-
29
- ## 7.0.1 - 2020-06-27
30
-
31
- * Fix multiply defined functions fatal error [#2699](https://github.com/guzzle/guzzle/pull/2699)
32
-
33
- ## 7.0.0 - 2020-06-27
34
-
35
- No changes since 7.0.0-rc1.
36
-
37
- ## 7.0.0-rc1 - 2020-06-15
38
-
39
- ### Changed
40
-
41
- * Use error level for logging errors in Middleware [#2629](https://github.com/guzzle/guzzle/pull/2629)
42
- * Disabled IDN support by default and require ext-intl to use it [#2675](https://github.com/guzzle/guzzle/pull/2675)
43
-
44
- ## 7.0.0-beta2 - 2020-05-25
45
-
46
- ### Added
47
-
48
- * Using `Utils` class instead of functions in the `GuzzleHttp` namespace. [#2546](https://github.com/guzzle/guzzle/pull/2546)
49
- * `ClientInterface::MAJOR_VERSION` [#2583](https://github.com/guzzle/guzzle/pull/2583)
50
-
51
- ### Changed
52
-
53
- * Avoid the `getenv` function when unsafe [#2531](https://github.com/guzzle/guzzle/pull/2531)
54
- * Added real client methods [#2529](https://github.com/guzzle/guzzle/pull/2529)
55
- * Avoid functions due to global install conflicts [#2546](https://github.com/guzzle/guzzle/pull/2546)
56
  * Use Symfony intl-idn polyfill [#2550](https://github.com/guzzle/guzzle/pull/2550)
57
- * Adding methods for HTTP verbs like `Client::get()`, `Client::head()`, `Client::patch()` etc [#2529](https://github.com/guzzle/guzzle/pull/2529)
58
- * `ConnectException` extends `TransferException` [#2541](https://github.com/guzzle/guzzle/pull/2541)
59
- * Updated the default User Agent to "GuzzleHttp/7" [#2654](https://github.com/guzzle/guzzle/pull/2654)
60
-
61
- ### Fixed
62
-
63
- * Various intl icu issues [#2626](https://github.com/guzzle/guzzle/pull/2626)
64
-
65
- ### Removed
66
-
67
- * Pool option `pool_size` [#2528](https://github.com/guzzle/guzzle/pull/2528)
68
-
69
- ## 7.0.0-beta1 - 2019-12-30
70
-
71
- The diff might look very big but 95% of Guzzle users will be able to upgrade without modification.
72
- Please see [the upgrade document](UPGRADING.md) that describes all BC breaking changes.
73
-
74
- ### Added
75
-
76
- * Implement PSR-18 and dropped PHP 5 support [#2421](https://github.com/guzzle/guzzle/pull/2421) [#2474](https://github.com/guzzle/guzzle/pull/2474)
77
- * PHP 7 types [#2442](https://github.com/guzzle/guzzle/pull/2442) [#2449](https://github.com/guzzle/guzzle/pull/2449) [#2466](https://github.com/guzzle/guzzle/pull/2466) [#2497](https://github.com/guzzle/guzzle/pull/2497) [#2499](https://github.com/guzzle/guzzle/pull/2499)
78
- * IDN support for redirects [2424](https://github.com/guzzle/guzzle/pull/2424)
79
-
80
- ### Changed
81
-
82
- * Dont allow passing null as third argument to `BadResponseException::__construct()` [#2427](https://github.com/guzzle/guzzle/pull/2427)
83
- * Use SAPI constant instead of method call [#2450](https://github.com/guzzle/guzzle/pull/2450)
84
- * Use native function invocation [#2444](https://github.com/guzzle/guzzle/pull/2444)
85
- * Better defaults for PHP installations with old ICU lib [2454](https://github.com/guzzle/guzzle/pull/2454)
86
- * Added visibility to all constants [#2462](https://github.com/guzzle/guzzle/pull/2462)
87
- * Dont allow passing `null` as URI to `Client::request()` and `Client::requestAsync()` [#2461](https://github.com/guzzle/guzzle/pull/2461)
88
- * Widen the exception argument to throwable [#2495](https://github.com/guzzle/guzzle/pull/2495)
89
-
90
- ### Fixed
91
-
92
- * Logging when Promise rejected with a string [#2311](https://github.com/guzzle/guzzle/pull/2311)
93
-
94
- ### Removed
95
-
96
- * Class `SeekException` [#2162](https://github.com/guzzle/guzzle/pull/2162)
97
- * `RequestException::getResponseBodySummary()` [#2425](https://github.com/guzzle/guzzle/pull/2425)
98
- * `CookieJar::getCookieValue()` [#2433](https://github.com/guzzle/guzzle/pull/2433)
99
- * `uri_template()` and `UriTemplate` [#2440](https://github.com/guzzle/guzzle/pull/2440)
100
- * Request options `save_to` and `exceptions` [#2464](https://github.com/guzzle/guzzle/pull/2464)
101
 
102
  ## 6.5.2 - 2019-12-23
103
 
@@ -113,13 +27,16 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c
113
  * Improvement: Added support for reset internal queue in MockHandler. [#2143](https://github.com/guzzle/guzzle/pull/2143)
114
  * Improvement: Added support to pass arbitrary options to `curl_multi_init`. [#2287](https://github.com/guzzle/guzzle/pull/2287)
115
  * Fix: Gracefully handle passing `null` to the `header` option. [#2132](https://github.com/guzzle/guzzle/pull/2132)
116
- * Fix: `RetryMiddleware` did not do exponential delay between retires due unit mismatch. [#2132](https://github.com/guzzle/guzzle/pull/2132)
 
 
 
117
  * Fix: Prevent undefined offset when using array for ssl_key options. [#2348](https://github.com/guzzle/guzzle/pull/2348)
118
  * Deprecated `ClientInterface::VERSION`
119
 
120
  ## 6.4.1 - 2019-10-23
121
 
122
- * No `guzzle.phar` was created in 6.4.0 due expired API token. This release will fix that
123
  * Added `parent::__construct()` to `FileCookieJar` and `SessionCookieJar`
124
 
125
  ## 6.4.0 - 2019-10-23
@@ -441,7 +358,7 @@ object).
441
  * Note: This has been changed in 5.0.3 to now encode query string values by
442
  default unless the `rawString` argument is provided when setting the query
443
  string on a URL: Now allowing many more characters to be present in the
444
- query string without being percent encoded. See https://tools.ietf.org/html/rfc3986#appendix-A
445
 
446
  ## 5.0.1 - 2014-10-16
447
 
@@ -483,7 +400,7 @@ interfaces.
483
  responses, `GuzzleHttp\Collection`, `GuzzleHttp\Url`,
484
  `GuzzleHttp\Query`, `GuzzleHttp\Post\PostBody`, and
485
  `GuzzleHttp\Cookie\SetCookie`. This blog post provides a good outline of
486
- why I did this: https://ocramius.github.io/blog/fluent-interfaces-are-evil/.
487
  This also makes the Guzzle message interfaces compatible with the current
488
  PSR-7 message proposal.
489
  * Removed "functions.php", so that Guzzle is truly PSR-4 compliant. Except
@@ -669,6 +586,8 @@ interfaces.
669
 
670
  ## 4.0.0 - 2014-03-29
671
 
 
 
672
  * For information on changes and upgrading, see:
673
  https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40
674
  * Added `GuzzleHttp\batch()` as a convenience function for sending requests in
@@ -977,7 +896,7 @@ interfaces.
977
 
978
  ## 3.4.0 - 2013-04-11
979
 
980
- * Bug fix: URLs are now resolved correctly based on https://tools.ietf.org/html/rfc3986#section-5.2. #289
981
  * Bug fix: Absolute URLs with a path in a service description will now properly override the base URL. #289
982
  * Bug fix: Parsing a query string with a single PHP array value will now result in an array. #263
983
  * Bug fix: Better normalization of the User-Agent header to prevent duplicate headers. #264.
1
  # Change Log
2
 
3
+ ## 6.5.5 - 2020-06-16
4
 
5
+ * Unpin version constraint for `symfony/polyfill-intl-idn` [#2678](https://github.com/guzzle/guzzle/pull/2678)
6
 
7
+ ## 6.5.4 - 2020-05-25
8
 
9
+ * Fix various intl icu issues [#2626](https://github.com/guzzle/guzzle/pull/2626)
10
 
11
+ ## 6.5.3 - 2020-04-18
12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  * Use Symfony intl-idn polyfill [#2550](https://github.com/guzzle/guzzle/pull/2550)
14
+ * Remove use of internal functions [#2548](https://github.com/guzzle/guzzle/pull/2548)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
  ## 6.5.2 - 2019-12-23
17
 
27
  * Improvement: Added support for reset internal queue in MockHandler. [#2143](https://github.com/guzzle/guzzle/pull/2143)
28
  * Improvement: Added support to pass arbitrary options to `curl_multi_init`. [#2287](https://github.com/guzzle/guzzle/pull/2287)
29
  * Fix: Gracefully handle passing `null` to the `header` option. [#2132](https://github.com/guzzle/guzzle/pull/2132)
30
+ * Fix: `RetryMiddleware` did not do exponential delay between retries due unit mismatch. [#2132](https://github.com/guzzle/guzzle/pull/2132)
31
+ Previously, `RetryMiddleware` would sleep for 1 millisecond, then 2 milliseconds, then 4 milliseconds.
32
+ **After this change, `RetryMiddleware` will sleep for 1 second, then 2 seconds, then 4 seconds.**
33
+ `Middleware::retry()` accepts a second callback parameter to override the default timeouts if needed.
34
  * Fix: Prevent undefined offset when using array for ssl_key options. [#2348](https://github.com/guzzle/guzzle/pull/2348)
35
  * Deprecated `ClientInterface::VERSION`
36
 
37
  ## 6.4.1 - 2019-10-23
38
 
39
+ * No `guzzle.phar` was created in 6.4.0 due expired API token. This release will fix that
40
  * Added `parent::__construct()` to `FileCookieJar` and `SessionCookieJar`
41
 
42
  ## 6.4.0 - 2019-10-23
358
  * Note: This has been changed in 5.0.3 to now encode query string values by
359
  default unless the `rawString` argument is provided when setting the query
360
  string on a URL: Now allowing many more characters to be present in the
361
+ query string without being percent encoded. See http://tools.ietf.org/html/rfc3986#appendix-A
362
 
363
  ## 5.0.1 - 2014-10-16
364
 
400
  responses, `GuzzleHttp\Collection`, `GuzzleHttp\Url`,
401
  `GuzzleHttp\Query`, `GuzzleHttp\Post\PostBody`, and
402
  `GuzzleHttp\Cookie\SetCookie`. This blog post provides a good outline of
403
+ why I did this: http://ocramius.github.io/blog/fluent-interfaces-are-evil/.
404
  This also makes the Guzzle message interfaces compatible with the current
405
  PSR-7 message proposal.
406
  * Removed "functions.php", so that Guzzle is truly PSR-4 compliant. Except
586
 
587
  ## 4.0.0 - 2014-03-29
588
 
589
+ * For more information on the 4.0 transition, see:
590
+ http://mtdowling.com/blog/2014/03/15/guzzle-4-rc/
591
  * For information on changes and upgrading, see:
592
  https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40
593
  * Added `GuzzleHttp\batch()` as a convenience function for sending requests in
896
 
897
  ## 3.4.0 - 2013-04-11
898
 
899
+ * Bug fix: URLs are now resolved correctly based on http://tools.ietf.org/html/rfc3986#section-5.2. #289
900
  * Bug fix: Absolute URLs with a path in a service description will now properly override the base URL. #289
901
  * Bug fix: Parsing a query string with a single PHP array value will now result in an array. #263
902
  * Bug fix: Better normalization of the User-Agent header to prevent duplicate headers. #264.
vendor/guzzlehttp/guzzle/Dockerfile ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM composer:latest as setup
2
+
3
+ RUN mkdir /guzzle
4
+
5
+ WORKDIR /guzzle
6
+
7
+ RUN set -xe \
8
+ && composer init --name=guzzlehttp/test --description="Simple project for testing Guzzle scripts" --author="Márk Sági-Kazár <mark.sagikazar@gmail.com>" --no-interaction \
9
+ && composer require guzzlehttp/guzzle
10
+
11
+
12
+ FROM php:7.3
13
+
14
+ RUN mkdir /guzzle
15
+
16
+ WORKDIR /guzzle
17
+
18
+ COPY --from=setup /guzzle /guzzle
vendor/guzzlehttp/guzzle/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2011 Michael Dowling, https://github.com/mtdowling <mtdowling@gmail.com>
2
 
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
  of this software and associated documentation files (the "Software"), to deal
1
+ Copyright (c) 2011-2018 Michael Dowling, https://github.com/mtdowling <mtdowling@gmail.com>
2
 
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
  of this software and associated documentation files (the "Software"), to deal
vendor/guzzlehttp/guzzle/README.md CHANGED
@@ -1,9 +1,8 @@
1
- ![Guzzle](.github/logo.png?raw=true)
2
-
3
- # Guzzle, PHP HTTP client
4
 
5
  [![Latest Version](https://img.shields.io/github/release/guzzle/guzzle.svg?style=flat-square)](https://github.com/guzzle/guzzle/releases)
6
- [![Build Status](https://img.shields.io/github/workflow/status/guzzle/guzzle/CI?label=ci%20build&style=flat-square)](https://github.com/guzzle/guzzle/actions?query=workflow%3ACI)
7
  [![Total Downloads](https://img.shields.io/packagist/dt/guzzlehttp/guzzle.svg?style=flat-square)](https://packagist.org/packages/guzzlehttp/guzzle)
8
 
9
  Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and
@@ -15,7 +14,6 @@ trivial to integrate with web services.
15
  - Can send both synchronous and asynchronous requests using the same interface.
16
  - Uses PSR-7 interfaces for requests, responses, and streams. This allows you
17
  to utilize other PSR-7 compatible libraries with Guzzle.
18
- - Supports PSR-18 allowing interoperability between other PSR-18 HTTP Clients.
19
  - Abstracts away the underlying HTTP transport, allowing you to write
20
  environment and transport agnostic code; i.e., no hard dependency on cURL,
21
  PHP streams, sockets, or non-blocking event loops.
@@ -25,11 +23,11 @@ trivial to integrate with web services.
25
  $client = new \GuzzleHttp\Client();
26
  $response = $client->request('GET', 'https://api.github.com/repos/guzzle/guzzle');
27
 
28
- echo $response->getStatusCode(); // 200
29
- echo $response->getHeaderLine('content-type'); // 'application/json; charset=utf8'
30
- echo $response->getBody(); // '{"id": 1420053, "name": "guzzle", ...}'
31
 
32
- // Send an asynchronous request.
33
  $request = new \GuzzleHttp\Psr7\Request('GET', 'http://httpbin.org');
34
  $promise = $client->sendAsync($request)->then(function ($response) {
35
  echo 'I completed! ' . $response->getBody();
@@ -40,23 +38,39 @@ $promise->wait();
40
 
41
  ## Help and docs
42
 
43
- We use GitHub issues only to discuss bugs and new features. For support please refer to:
44
-
45
  - [Documentation](http://guzzlephp.org/)
46
  - [Stack Overflow](http://stackoverflow.com/questions/tagged/guzzle)
47
- - [#guzzle](https://app.slack.com/client/T0D2S9JCT/CE6UAAKL4) channel on [PHP-HTTP Slack](http://slack.httplug.io/)
48
  - [Gitter](https://gitter.im/guzzle/guzzle)
49
 
50
 
51
  ## Installing Guzzle
52
 
53
  The recommended way to install Guzzle is through
54
- [Composer](https://getcomposer.org/).
 
 
 
 
 
 
 
55
 
56
  ```bash
57
  composer require guzzlehttp/guzzle
58
  ```
59
 
 
 
 
 
 
 
 
 
 
 
 
 
60
 
61
  ## Version Guidance
62
 
@@ -65,15 +79,12 @@ composer require guzzlehttp/guzzle
65
  | 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >= 5.3.3 |
66
  | 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >= 5.4 |
67
  | 5.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >= 5.4 |
68
- | 6.x | Bugfixes | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >= 5.5 |
69
- | 7.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v7][guzzle-7-repo] | [v7][guzzle-7-docs] | Yes | >= 7.2 |
70
 
71
  [guzzle-3-repo]: https://github.com/guzzle/guzzle3
72
  [guzzle-4-repo]: https://github.com/guzzle/guzzle/tree/4.x
73
  [guzzle-5-repo]: https://github.com/guzzle/guzzle/tree/5.3
74
- [guzzle-6-repo]: https://github.com/guzzle/guzzle/tree/6.5
75
- [guzzle-7-repo]: https://github.com/guzzle/guzzle
76
  [guzzle-3-docs]: http://guzzle3.readthedocs.org
77
- [guzzle-5-docs]: http://docs.guzzlephp.org/en/5.3/
78
- [guzzle-6-docs]: http://docs.guzzlephp.org/en/6.5/
79
- [guzzle-7-docs]: http://docs.guzzlephp.org/en/latest/
1
+ Guzzle, PHP HTTP client
2
+ =======================
 
3
 
4
  [![Latest Version](https://img.shields.io/github/release/guzzle/guzzle.svg?style=flat-square)](https://github.com/guzzle/guzzle/releases)
5
+ [![Build Status](https://img.shields.io/travis/guzzle/guzzle.svg?style=flat-square)](https://travis-ci.org/guzzle/guzzle)
6
  [![Total Downloads](https://img.shields.io/packagist/dt/guzzlehttp/guzzle.svg?style=flat-square)](https://packagist.org/packages/guzzlehttp/guzzle)
7
 
8
  Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and
14
  - Can send both synchronous and asynchronous requests using the same interface.
15
  - Uses PSR-7 interfaces for requests, responses, and streams. This allows you
16
  to utilize other PSR-7 compatible libraries with Guzzle.
 
17
  - Abstracts away the underlying HTTP transport, allowing you to write
18
  environment and transport agnostic code; i.e., no hard dependency on cURL,
19
  PHP streams, sockets, or non-blocking event loops.
23
  $client = new \GuzzleHttp\Client();
24
  $response = $client->request('GET', 'https://api.github.com/repos/guzzle/guzzle');
25
 
26
+ echo $response->getStatusCode(); # 200
27
+ echo $response->getHeaderLine('content-type'); # 'application/json; charset=utf8'
28
+ echo $response->getBody(); # '{"id": 1420053, "name": "guzzle", ...}'
29
 
30
+ # Send an asynchronous request.
31
  $request = new \GuzzleHttp\Psr7\Request('GET', 'http://httpbin.org');
32
  $promise = $client->sendAsync($request)->then(function ($response) {
33
  echo 'I completed! ' . $response->getBody();
38
 
39
  ## Help and docs
40
 
 
 
41
  - [Documentation](http://guzzlephp.org/)
42
  - [Stack Overflow](http://stackoverflow.com/questions/tagged/guzzle)
 
43
  - [Gitter](https://gitter.im/guzzle/guzzle)
44
 
45
 
46
  ## Installing Guzzle
47
 
48
  The recommended way to install Guzzle is through
49
+ [Composer](http://getcomposer.org).
50
+
51
+ ```bash
52
+ # Install Composer
53
+ curl -sS https://getcomposer.org/installer | php
54
+ ```
55
+
56
+ Next, run the Composer command to install the latest stable version of Guzzle:
57
 
58
  ```bash
59
  composer require guzzlehttp/guzzle
60
  ```
61
 
62
+ After installing, you need to require Composer's autoloader:
63
+
64
+ ```php
65
+ require 'vendor/autoload.php';
66
+ ```
67
+
68
+ You can then later update Guzzle using composer:
69
+
70
+ ```bash
71
+ composer update
72
+ ```
73
+
74
 
75
  ## Version Guidance
76
 
79
  | 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >= 5.3.3 |
80
  | 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >= 5.4 |
81
  | 5.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >= 5.4 |
82
+ | 6.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >= 5.5 |
 
83
 
84
  [guzzle-3-repo]: https://github.com/guzzle/guzzle3
85
  [guzzle-4-repo]: https://github.com/guzzle/guzzle/tree/4.x
86
  [guzzle-5-repo]: https://github.com/guzzle/guzzle/tree/5.3
87
+ [guzzle-6-repo]: https://github.com/guzzle/guzzle
 
88
  [guzzle-3-docs]: http://guzzle3.readthedocs.org
89
+ [guzzle-5-docs]: http://guzzle.readthedocs.org/en/5.3/
90
+ [guzzle-6-docs]: http://guzzle.readthedocs.org/en/latest/
 
vendor/guzzlehttp/guzzle/UPGRADING.md CHANGED
@@ -1,60 +1,10 @@
1
  Guzzle Upgrade Guide
2
  ====================
3
 
4
- 6.0 to 7.0
5
- ----------
6
-
7
- In order to take advantage of the new features of PHP, Guzzle dropped the support
8
- of PHP 5. The minimum supported PHP version is now PHP 7.2. Type hints and return
9
- types for functions and methods have been added wherever possible.
10
-
11
- Please make sure:
12
- - You are calling a function or a method with the correct type.
13
- - If you extend a class of Guzzle; update all signatures on methods you override.
14
-
15
- #### Other backwards compatibility breaking changes
16
-
17
- - Class `GuzzleHttp\UriTemplate` is removed.
18
- - Class `GuzzleHttp\Exception\SeekException` is removed.
19
- - Classes `GuzzleHttp\Exception\BadResponseException`, `GuzzleHttp\Exception\ClientException`,
20
- `GuzzleHttp\Exception\ServerException` can no longer be initialized with an empty
21
- Response as argument.
22
- - Class `GuzzleHttp\Exception\ConnectException` now extends `GuzzleHttp\Exception\TransferException`
23
- instead of `GuzzleHttp\Exception\RequestException`.
24
- - Function `GuzzleHttp\Exception\ConnectException::getResponse()` is removed.
25
- - Function `GuzzleHttp\Exception\ConnectException::hasResponse()` is removed.
26
- - Constant `GuzzleHttp\ClientInterface::VERSION` is removed. Added `GuzzleHttp\ClientInterface::MAJOR_VERSION` instead.
27
- - Function `GuzzleHttp\Exception\RequestException::getResponseBodySummary` is removed.
28
- Use `\GuzzleHttp\Psr7\get_message_body_summary` as an alternative.
29
- - Function `GuzzleHttp\Cookie\CookieJar::getCookieValue` is removed.
30
- - Request option `exception` is removed. Please use `http_errors`.
31
- - Request option `save_to` is removed. Please use `sink`.
32
- - Pool option `pool_size` is removed. Please use `concurrency`.
33
- - We now look for environment variables in the `$_SERVER` super global, due to thread safety issues with `getenv`. We continue to fallback to `getenv` in CLI environments, for maximum compatibility.
34
- - The `get`, `head`, `put`, `post`, `patch`, `delete`, `getAsync`, `headAsync`, `putAsync`, `postAsync`, `patchAsync`, and `deleteAsync` methods are now implemented as genuine methods on `GuzzleHttp\Client`, with strong typing. The original `__call` implementation remains unchanged for now, for maximum backwards compatibility, but won't be invoked under normal operation.
35
- - The `log` middleware will log the errors with level `error` instead of `notice`
36
- - Support for international domain names (IDN) is now disabled by default, and enabling it requires installing ext-intl, linked against a modern version of the C library (ICU 4.6 or higher).
37
-
38
- #### Native functions calls
39
-
40
- All internal native functions calls of Guzzle are now prefixed with a slash. This
41
- change makes it impossible for method overloading by other libraries or applications.
42
- Example:
43
-
44
- ```php
45
- // Before:
46
- curl_version();
47
-
48
- // After:
49
- \curl_version();
50
- ```
51
-
52
- For the full diff you can check [here](https://github.com/guzzle/guzzle/compare/6.5.4..master).
53
-
54
  5.0 to 6.0
55
  ----------
56
 
57
- Guzzle now uses [PSR-7](https://www.php-fig.org/psr/psr-7/) for HTTP messages.
58
  Due to the fact that these messages are immutable, this prompted a refactoring
59
  of Guzzle to use a middleware based system rather than an event system. Any
60
  HTTP message interaction (e.g., `GuzzleHttp\Message\Request`) need to be
@@ -217,7 +167,7 @@ passing a `GuzzleHttp\Adapter\AdapterInterface`, you must now pass a PHP
217
 
218
  ## Removed Fluent Interfaces
219
 
220
- [Fluent interfaces were removed](https://ocramius.github.io/blog/fluent-interfaces-are-evil/)
221
  from the following classes:
222
 
223
  - `GuzzleHttp\Collection`
@@ -870,7 +820,7 @@ HeaderInterface (e.g. toArray(), getAll(), etc.).
870
  3.3 to 3.4
871
  ----------
872
 
873
- Base URLs of a client now follow the rules of https://tools.ietf.org/html/rfc3986#section-5.2.2 when merging URLs.
874
 
875
  3.2 to 3.3
876
  ----------
1
  Guzzle Upgrade Guide
2
  ====================
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  5.0 to 6.0
5
  ----------
6
 
7
+ Guzzle now uses [PSR-7](http://www.php-fig.org/psr/psr-7/) for HTTP messages.
8
  Due to the fact that these messages are immutable, this prompted a refactoring
9
  of Guzzle to use a middleware based system rather than an event system. Any
10
  HTTP message interaction (e.g., `GuzzleHttp\Message\Request`) need to be
167
 
168
  ## Removed Fluent Interfaces
169
 
170
+ [Fluent interfaces were removed](http://ocramius.github.io/blog/fluent-interfaces-are-evil)
171
  from the following classes:
172
 
173
  - `GuzzleHttp\Collection`
820
  3.3 to 3.4
821
  ----------
822
 
823
+ Base URLs of a client now follow the rules of http://tools.ietf.org/html/rfc3986#section-5.2.2 when merging URLs.
824
 
825
  3.2 to 3.3
826
  ----------
vendor/guzzlehttp/guzzle/composer.json CHANGED
@@ -9,9 +9,7 @@
9
  "web service",
10
  "curl",
11
  "client",
12
- "HTTP client",
13
- "PSR-7",
14
- "PSR-18"
15
  ],
16
  "homepage": "http://guzzlephp.org/",
17
  "license": "MIT",
@@ -20,32 +18,21 @@
20
  "name": "Michael Dowling",
21
  "email": "mtdowling@gmail.com",
22
  "homepage": "https://github.com/mtdowling"
23
- },
24
- {
25
- "name": "Márk Sági-Kazár",
26
- "email": "mark.sagikazar@gmail.com",
27
- "homepage": "https://sagikazarmark.hu"
28
  }
29
  ],
30
  "require": {
31
- "php": "^7.2.5",
32
  "ext-json": "*",
 
33
  "guzzlehttp/promises": "^1.0",
34
- "guzzlehttp/psr7": "^1.6.1",
35
- "psr/http-client": "^1.0"
36
- },
37
- "provide": {
38
- "psr/http-client-implementation": "1.0"
39
  },
40
  "require-dev": {
41
  "ext-curl": "*",
42
- "php-http/client-integration-tests": "dev-phpunit8",
43
- "phpunit/phpunit": "^8.5.5",
44
  "psr/log": "^1.1"
45
  },
46
  "suggest": {
47
- "ext-curl": "Required for CURL handler support",
48
- "ext-intl": "Required for Internationalized Domain Name (IDN) support",
49
  "psr/log": "Required for using the Log middleware"
50
  },
51
  "config": {
@@ -53,7 +40,7 @@
53
  },
54
  "extra": {
55
  "branch-alias": {
56
- "dev-master": "7.1-dev"
57
  }
58
  },
59
  "autoload": {
9
  "web service",
10
  "curl",
11
  "client",
12
+ "HTTP client"
 
 
13
  ],
14
  "homepage": "http://guzzlephp.org/",
15
  "license": "MIT",
18
  "name": "Michael Dowling",
19
  "email": "mtdowling@gmail.com",
20
  "homepage": "https://github.com/mtdowling"
 
 
 
 
 
21
  }
22
  ],
23
  "require": {
24
+ "php": ">=5.5",
25
  "ext-json": "*",
26
+ "symfony/polyfill-intl-idn": "^1.17.0",
27
  "guzzlehttp/promises": "^1.0",
28
+ "guzzlehttp/psr7": "^1.6.1"
 
 
 
 
29
  },
30
  "require-dev": {
31
  "ext-curl": "*",
32
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
 
33
  "psr/log": "^1.1"
34
  },
35
  "suggest": {
 
 
36
  "psr/log": "Required for using the Log middleware"
37
  },
38
  "config": {
40
  },
41
  "extra": {
42
  "branch-alias": {
43
+ "dev-master": "6.5-dev"
44
  }
45
  },
46
  "autoload": {
vendor/guzzlehttp/guzzle/psalm.baseline.xml DELETED
@@ -1,87 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <files psalm-version="3.11.5@3c60609c218d4d4b3b257728b8089094e5c6c6c2">
3
- <file src="src/Client.php">
4
- <NullArgument occurrences="1">
5
- <code>null</code>
6
- </NullArgument>
7
- <PossiblyUndefinedVariable occurrences="1">
8
- <code>$options</code>
9
- </PossiblyUndefinedVariable>
10
- <UndefinedInterfaceMethod occurrences="1">
11
- <code>getBoundary</code>
12
- </UndefinedInterfaceMethod>
13
- </file>
14
- <file src="src/Cookie/CookieJar.php">
15
- <PossiblyFalseOperand occurrences="1">
16
- <code>$result</code>
17
- </PossiblyFalseOperand>
18
- </file>
19
- <file src="src/Exception/RequestException.php">
20
- <ImplicitToStringCast occurrences="1">
21
- <code>$uri</code>
22
- </ImplicitToStringCast>
23
- </file>
24
- <file src="src/Handler/CurlFactory.php">
25
- <ImplicitToStringCast occurrences="1">
26
- <code>$easy-&gt;request-&gt;getUri()</code>
27
- </ImplicitToStringCast>
28
- <TypeDoesNotContainType occurrences="1">
29
- <code>$timeoutRequiresNoSignal &amp;&amp; \strtoupper(\substr(\PHP_OS, 0, 3)) !== 'WIN'</code>
30
- </TypeDoesNotContainType>
31
- </file>
32
- <file src="src/Handler/CurlMultiHandler.php">
33
- <InvalidArgument occurrences="1">
34
- <code>$this-&gt;active</code>
35
- </InvalidArgument>
36
- <InvalidPropertyAssignmentValue occurrences="1">
37
- <code>$this-&gt;active</code>
38
- </InvalidPropertyAssignmentValue>
39
- <UndefinedThisPropertyAssignment occurrences="1">
40
- <code>$this-&gt;_mh</code>
41
- </UndefinedThisPropertyAssignment>
42
- </file>
43
- <file src="src/Handler/MockHandler.php">
44
- <InvalidScalarArgument occurrences="1">
45
- <code>$options['delay'] * 1000</code>
46
- </InvalidScalarArgument>
47
- </file>
48
- <file src="src/Handler/StreamHandler.php">
49
- <ImplicitToStringCast occurrences="1">
50
- <code>$uri</code>
51
- </ImplicitToStringCast>
52
- </file>
53
- <file src="src/HandlerStack.php">
54
- <PropertyTypeCoercion occurrences="4">
55
- <code>$this-&gt;stack</code>
56
- <code>$this-&gt;stack</code>
57
- <code>$this-&gt;stack</code>
58
- <code>$this-&gt;stack</code>
59
- </PropertyTypeCoercion>
60
- </file>
61
- <file src="src/MessageFormatter.php">
62
- <InvalidScalarArgument occurrences="1"/>
63
- </file>
64
- <file src="src/Middleware.php">
65
- <InvalidArgument occurrences="1">
66
- <code>$request</code>
67
- </InvalidArgument>
68
- </file>
69
- <file src="src/RedirectMiddleware.php">
70
- <ImplicitToStringCast occurrences="1">
71
- <code>$location</code>
72
- </ImplicitToStringCast>
73
- </file>
74
- <file src="src/RetryMiddleware.php">
75
- <TooManyArguments occurrences="1">
76
- <code>($this-&gt;delay)(++$options['retries'], $response)</code>
77
- </TooManyArguments>
78
- </file>
79
- <file src="src/Utils.php">
80
- <ForbiddenCode occurrences="1">
81
- <code>\var_dump($input)</code>
82
- </ForbiddenCode>
83
- <PossiblyNullArgument occurrences="1">
84
- <code>$info</code>
85
- </PossiblyNullArgument>
86
- </file>
87
- </files>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/guzzlehttp/guzzle/src/Client.php CHANGED
@@ -1,25 +1,31 @@
1
  <?php
2
-
3
  namespace GuzzleHttp;
4
 
5
  use GuzzleHttp\Cookie\CookieJar;
6
  use GuzzleHttp\Exception\GuzzleException;
7
- use GuzzleHttp\Exception\InvalidArgumentException;
8
- use GuzzleHttp\Promise\PromiseInterface;
9
  use Psr\Http\Message\RequestInterface;
10
  use Psr\Http\Message\ResponseInterface;
11
  use Psr\Http\Message\UriInterface;
12
 
13
  /**
14
- * @final
 
 
 
 
 
 
 
 
 
 
 
15
  */
16
- class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
17
  {
18
- use ClientTrait;
19
-
20
- /**
21
- * @var array Default request options
22
- */
23
  private $config;
24
 
25
  /**
@@ -57,8 +63,8 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
57
  {
58
  if (!isset($config['handler'])) {
59
  $config['handler'] = HandlerStack::create();
60
- } elseif (!\is_callable($config['handler'])) {
61
- throw new InvalidArgumentException('handler must be a callable');
62
  }
63
 
64
  // Convert the base_uri to a UriInterface
@@ -73,21 +79,19 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
73
  * @param string $method
74
  * @param array $args
75
  *
76
- * @return PromiseInterface|ResponseInterface
77
- *
78
- * @deprecated Client::__call will be removed in guzzlehttp/guzzle:8.0.
79
  */
80
  public function __call($method, $args)
81
  {
82
- if (\count($args) < 1) {
83
- throw new InvalidArgumentException('Magic request methods require a URI and optional options array');
84
  }
85
 
86
  $uri = $args[0];
87
- $opts = $args[1] ?? [];
88
 
89
- return \substr($method, -5) === 'Async'
90
- ? $this->requestAsync(\substr($method, 0, -5), $uri, $opts)
91
  : $this->request($method, $uri, $opts);
92
  }
93
 
@@ -96,8 +100,10 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
96
  *
97
  * @param array $options Request options to apply to the given
98
  * request and to the transfer. See \GuzzleHttp\RequestOptions.
 
 
99
  */
100
- public function sendAsync(RequestInterface $request, array $options = []): PromiseInterface
101
  {
102
  // Merge the base URI into the request URI if needed.
103
  $options = $this->prepareDefaults($options);
@@ -114,28 +120,15 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
114
  * @param array $options Request options to apply to the given
115
  * request and to the transfer. See \GuzzleHttp\RequestOptions.
116
  *
 
117
  * @throws GuzzleException
118
  */
119
- public function send(RequestInterface $request, array $options = []): ResponseInterface
120
  {
121
  $options[RequestOptions::SYNCHRONOUS] = true;
122
  return $this->sendAsync($request, $options)->wait();
123
  }
124
 
125
- /**
126
- * The HttpClient PSR (PSR-18) specify this method.
127
- *
128
- * @inheritDoc
129
- */
130
- public function sendRequest(RequestInterface $request): ResponseInterface
131
- {
132
- $options[RequestOptions::SYNCHRONOUS] = true;
133
- $options[RequestOptions::ALLOW_REDIRECTS] = false;
134
- $options[RequestOptions::HTTP_ERRORS] = false;
135
-
136
- return $this->sendAsync($request, $options)->wait();
137
- }
138
-
139
  /**
140
  * Create and send an asynchronous HTTP request.
141
  *
@@ -147,18 +140,20 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
147
  * @param string $method HTTP method
148
  * @param string|UriInterface $uri URI object or string.
149
  * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions.
 
 
150
  */
151
- public function requestAsync(string $method, $uri = '', array $options = []): PromiseInterface
152
  {
153
  $options = $this->prepareDefaults($options);
154
  // Remove request modifying parameter because it can be done up-front.
155
- $headers = $options['headers'] ?? [];
156
- $body = $options['body'] ?? null;
157
- $version = $options['version'] ?? '1.1';
158
  // Merge the URI into the base URI.
159
- $uri = $this->buildUri(Psr7\uri_for($uri), $options);
160
- if (\is_array($body)) {
161
- throw $this->invalidBody();
162
  }
163
  $request = new Psr7\Request($method, $uri, $headers, $body, $version);
164
  // Remove the option so that they are not doubly-applied.
@@ -178,9 +173,10 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
178
  * @param string|UriInterface $uri URI object or string.
179
  * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions.
180
  *
 
181
  * @throws GuzzleException
182
  */
183
- public function request(string $method, $uri = '', array $options = []): ResponseInterface
184
  {
185
  $options[RequestOptions::SYNCHRONOUS] = true;
186
  return $this->requestAsync($method, $uri, $options)->wait();
@@ -196,24 +192,30 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
196
  * @param string|null $option The config option to retrieve.
197
  *
198
  * @return mixed
199
- *
200
- * @deprecated Client::getConfig will be removed in guzzlehttp/guzzle:8.0.
201
  */
202
- public function getConfig(?string $option = null)
203
  {
204
  return $option === null
205
  ? $this->config
206
  : (isset($this->config[$option]) ? $this->config[$option] : null);
207
  }
208
 
209
- private function buildUri(UriInterface $uri, array $config): UriInterface
 
 
 
 
 
210
  {
 
 
 
211
  if (isset($config['base_uri'])) {
212
  $uri = Psr7\UriResolver::resolve(Psr7\uri_for($config['base_uri']), $uri);
213
  }
214
 
215
  if (isset($config['idn_conversion']) && ($config['idn_conversion'] !== false)) {
216
- $idnOptions = ($config['idn_conversion'] === true) ? \IDNA_DEFAULT : $config['idn_conversion'];
217
  $uri = Utils::idnUriConvert($uri, $idnOptions);
218
  }
219
 
@@ -222,8 +224,11 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
222
 
223
  /**
224
  * Configures the default options for a client.
 
 
 
225
  */
226
- private function configureDefaults(array $config): void
227
  {
228
  $defaults = [
229
  'allow_redirects' => RedirectMiddleware::$defaultSettings,
@@ -231,7 +236,7 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
231
  'decode_content' => true,
232
  'verify' => true,
233
  'cookies' => false,
234
- 'idn_conversion' => false,
235
  ];
236
 
237
  // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set.
@@ -239,17 +244,17 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
239
  // We can only trust the HTTP_PROXY environment variable in a CLI
240
  // process due to the fact that PHP has no reliable mechanism to
241
  // get environment variables that start with "HTTP_".
242
- if (\PHP_SAPI === 'cli' && ($proxy = Utils::getenv('HTTP_PROXY'))) {
243
- $defaults['proxy']['http'] = $proxy;
244
  }
245
 
246
- if ($proxy = Utils::getenv('HTTPS_PROXY')) {
247
  $defaults['proxy']['https'] = $proxy;
248
  }
249
 
250
- if ($noProxy = Utils::getenv('NO_PROXY')) {
251
- $cleanedNoProxy = \str_replace(' ', '', $noProxy);
252
- $defaults['proxy']['no'] = \explode(',', $cleanedNoProxy);
253
  }
254
 
255
  $this->config = $config + $defaults;
@@ -260,15 +265,15 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
260
 
261
  // Add the default user-agent header.
262
  if (!isset($this->config['headers'])) {
263
- $this->config['headers'] = ['User-Agent' => Utils::defaultUserAgent()];
264
  } else {
265
  // Add the User-Agent header if one was not already set.
266
- foreach (\array_keys($this->config['headers']) as $name) {
267
- if (\strtolower($name) === 'user-agent') {
268
  return;
269
  }
270
  }
271
- $this->config['headers']['User-Agent'] = Utils::defaultUserAgent();
272
  }
273
  }
274
 
@@ -276,8 +281,10 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
276
  * Merges default options into the array.
277
  *
278
  * @param array $options Options to modify by reference
 
 
279
  */
280
- private function prepareDefaults(array $options): array
281
  {
282
  $defaults = $this->config;
283
 
@@ -289,13 +296,13 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
289
 
290
  // Special handling for headers is required as they are added as
291
  // conditional headers and as headers passed to a request ctor.
292
- if (\array_key_exists('headers', $options)) {
293
  // Allows default headers to be unset.
294
  if ($options['headers'] === null) {
295
  $defaults['_conditional'] = [];
296
  unset($options['headers']);
297
- } elseif (!\is_array($options['headers'])) {
298
- throw new InvalidArgumentException('headers must be an array');
299
  }
300
  }
301
 
@@ -319,9 +326,23 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
319
  * as-is without merging in default options.
320
  *
321
  * @param array $options See \GuzzleHttp\RequestOptions.
 
 
322
  */
323
- private function transfer(RequestInterface $request, array $options): PromiseInterface
324
  {
 
 
 
 
 
 
 
 
 
 
 
 
325
  $request = $this->applyOptions($request, $options);
326
  /** @var HandlerStack $handler */
327
  $handler = $options['handler'];
@@ -335,8 +356,13 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
335
 
336
  /**
337
  * Applies the array of request options to a request.
 
 
 
 
 
338
  */
339
- private function applyOptions(RequestInterface $request, array &$options): RequestInterface
340
  {
341
  $modify = [
342
  'set_headers' => [],
@@ -349,13 +375,13 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
349
 
350
  if (isset($options['form_params'])) {
351
  if (isset($options['multipart'])) {
352
- throw new InvalidArgumentException('You cannot use '
353
  . 'form_params and multipart at the same time. Use the '
354
  . 'form_params option if you want to send application/'
355
  . 'x-www-form-urlencoded requests, and the multipart '
356
  . 'option to send multipart/form-data requests.');
357
  }
358
- $options['body'] = \http_build_query($options['form_params'], '', '&');
359
  unset($options['form_params']);
360
  // Ensure that we don't have the header in different case and set the new value.
361
  $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']);
@@ -368,7 +394,7 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
368
  }
369
 
370
  if (isset($options['json'])) {
371
- $options['body'] = Utils::jsonEncode($options['json']);
372
  unset($options['json']);
373
  // Ensure that we don't have the header in different case and set the new value.
374
  $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']);
@@ -384,42 +410,42 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
384
  }
385
 
386
  if (isset($options['body'])) {
387
- if (\is_array($options['body'])) {
388
- throw $this->invalidBody();
389
  }
390
  $modify['body'] = Psr7\stream_for($options['body']);
391
  unset($options['body']);
392
  }
393
 
394
- if (!empty($options['auth']) && \is_array($options['auth'])) {
395
  $value = $options['auth'];
396
- $type = isset($value[2]) ? \strtolower($value[2]) : 'basic';
397
  switch ($type) {
398
  case 'basic':
399
  // Ensure that we don't have the header in different case and set the new value.
400
  $modify['set_headers'] = Psr7\_caseless_remove(['Authorization'], $modify['set_headers']);
401
  $modify['set_headers']['Authorization'] = 'Basic '
402
- . \base64_encode("$value[0]:$value[1]");
403
  break;
404
  case 'digest':
405
  // @todo: Do not rely on curl
406
- $options['curl'][\CURLOPT_HTTPAUTH] = \CURLAUTH_DIGEST;
407
- $options['curl'][\CURLOPT_USERPWD] = "$value[0]:$value[1]";
408
  break;
409
  case 'ntlm':
410
- $options['curl'][\CURLOPT_HTTPAUTH] = \CURLAUTH_NTLM;
411
- $options['curl'][\CURLOPT_USERPWD] = "$value[0]:$value[1]";
412
  break;
413
  }
414
  }
415
 
416
  if (isset($options['query'])) {
417
  $value = $options['query'];
418
- if (\is_array($value)) {
419
- $value = \http_build_query($value, '', '&', \PHP_QUERY_RFC3986);
420
  }
421
- if (!\is_string($value)) {
422
- throw new InvalidArgumentException('query must be a string or array');
423
  }
424
  $modify['query'] = $value;
425
  unset($options['query']);
@@ -428,8 +454,8 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
428
  // Ensure that sink is not an invalid value.
429
  if (isset($options['sink'])) {
430
  // TODO: Add more sink validation?
431
- if (\is_bool($options['sink'])) {
432
- throw new InvalidArgumentException('sink must not be a boolean');
433
  }
434
  }
435
 
@@ -460,12 +486,14 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface
460
  }
461
 
462
  /**
463
- * Return an InvalidArgumentException with pre-set message.
 
 
464
  */
465
- private function invalidBody(): InvalidArgumentException
466
  {
467
- return new InvalidArgumentException('Passing in the "body" request '
468
- . 'option as an array to send a request is not supported. '
469
  . 'Please use the "form_params" request option to send a '
470
  . 'application/x-www-form-urlencoded request, or the "multipart" '
471
  . 'request option to send a multipart/form-data request.');
1
  <?php
 
2
  namespace GuzzleHttp;
3
 
4
  use GuzzleHttp\Cookie\CookieJar;
5
  use GuzzleHttp\Exception\GuzzleException;
6
+ use GuzzleHttp\Promise;
7
+ use GuzzleHttp\Psr7;
8
  use Psr\Http\Message\RequestInterface;
9
  use Psr\Http\Message\ResponseInterface;
10
  use Psr\Http\Message\UriInterface;
11
 
12
  /**
13
+ * @method ResponseInterface get(string|UriInterface $uri, array $options = [])
14
+ * @method ResponseInterface head(string|UriInterface $uri, array $options = [])
15
+ * @method ResponseInterface put(string|UriInterface $uri, array $options = [])
16
+ * @method ResponseInterface post(string|UriInterface $uri, array $options = [])
17
+ * @method ResponseInterface patch(string|UriInterface $uri, array $options = [])
18
+ * @method ResponseInterface delete(string|UriInterface $uri, array $options = [])
19
+ * @method Promise\PromiseInterface getAsync(string|UriInterface $uri, array $options = [])
20
+ * @method Promise\PromiseInterface headAsync(string|UriInterface $uri, array $options = [])
21
+ * @method Promise\PromiseInterface putAsync(string|UriInterface $uri, array $options = [])
22
+ * @method Promise\PromiseInterface postAsync(string|UriInterface $uri, array $options = [])
23
+ * @method Promise\PromiseInterface patchAsync(string|UriInterface $uri, array $options = [])
24
+ * @method Promise\PromiseInterface deleteAsync(string|UriInterface $uri, array $options = [])
25
  */
26
+ class Client implements ClientInterface
27
  {
28
+ /** @var array Default request options */
 
 
 
 
29
  private $config;
30
 
31
  /**
63
  {
64
  if (!isset($config['handler'])) {
65
  $config['handler'] = HandlerStack::create();
66
+ } elseif (!is_callable($config['handler'])) {
67
+ throw new \InvalidArgumentException('handler must be a callable');
68
  }
69
 
70
  // Convert the base_uri to a UriInterface
79
  * @param string $method
80
  * @param array $args
81
  *
82
+ * @return Promise\PromiseInterface
 
 
83
  */
84
  public function __call($method, $args)
85
  {
86
+ if (count($args) < 1) {
87
+ throw new \InvalidArgumentException('Magic request methods require a URI and optional options array');
88
  }
89
 
90
  $uri = $args[0];
91
+ $opts = isset($args[1]) ? $args[1] : [];
92
 
93
+ return substr($method, -5) === 'Async'
94
+ ? $this->requestAsync(substr($method, 0, -5), $uri, $opts)
95
  : $this->request($method, $uri, $opts);
96
  }
97
 
100
  *
101
  * @param array $options Request options to apply to the given
102
  * request and to the transfer. See \GuzzleHttp\RequestOptions.
103
+ *
104
+ * @return Promise\PromiseInterface
105
  */
106
+ public function sendAsync(RequestInterface $request, array $options = [])
107
  {
108
  // Merge the base URI into the request URI if needed.
109
  $options = $this->prepareDefaults($options);
120
  * @param array $options Request options to apply to the given
121
  * request and to the transfer. See \GuzzleHttp\RequestOptions.
122
  *
123
+ * @return ResponseInterface
124
  * @throws GuzzleException
125
  */
126
+ public function send(RequestInterface $request, array $options = [])
127
  {
128
  $options[RequestOptions::SYNCHRONOUS] = true;
129
  return $this->sendAsync($request, $options)->wait();
130
  }
131
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  /**
133
  * Create and send an asynchronous HTTP request.
134
  *
140
  * @param string $method HTTP method
141
  * @param string|UriInterface $uri URI object or string.
142
  * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions.
143
+ *
144
+ * @return Promise\PromiseInterface
145
  */
146
+ public function requestAsync($method, $uri = '', array $options = [])
147
  {
148
  $options = $this->prepareDefaults($options);
149
  // Remove request modifying parameter because it can be done up-front.
150
+ $headers = isset($options['headers']) ? $options['headers'] : [];
151
+ $body = isset($options['body']) ? $options['body'] : null;
152
+ $version = isset($options['version']) ? $options['version'] : '1.1';
153
  // Merge the URI into the base URI.
154
+ $uri = $this->buildUri($uri, $options);
155
+ if (is_array($body)) {
156
+ $this->invalidBody();
157
  }
158
  $request = new Psr7\Request($method, $uri, $headers, $body, $version);
159
  // Remove the option so that they are not doubly-applied.
173
  * @param string|UriInterface $uri URI object or string.
174
  * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions.
175
  *
176
+ * @return ResponseInterface
177
  * @throws GuzzleException
178
  */
179
+ public function request($method, $uri = '', array $options = [])
180
  {
181
  $options[RequestOptions::SYNCHRONOUS] = true;
182
  return $this->requestAsync($method, $uri, $options)->wait();
192
  * @param string|null $option The config option to retrieve.
193
  *
194
  * @return mixed
 
 
195
  */
196
+ public function getConfig($option = null)
197
  {
198
  return $option === null
199
  ? $this->config
200
  : (isset($this->config[$option]) ? $this->config[$option] : null);
201
  }
202
 
203
+ /**
204
+ * @param string|null $uri
205
+ *
206
+ * @return UriInterface
207
+ */
208
+ private function buildUri($uri, array $config)
209
  {
210
+ // for BC we accept null which would otherwise fail in uri_for
211
+ $uri = Psr7\uri_for($uri === null ? '' : $uri);
212
+
213
  if (isset($config['base_uri'])) {
214
  $uri = Psr7\UriResolver::resolve(Psr7\uri_for($config['base_uri']), $uri);
215
  }
216
 
217
  if (isset($config['idn_conversion']) && ($config['idn_conversion'] !== false)) {
218
+ $idnOptions = ($config['idn_conversion'] === true) ? IDNA_DEFAULT : $config['idn_conversion'];
219
  $uri = Utils::idnUriConvert($uri, $idnOptions);
220
  }
221
 
224
 
225
  /**
226
  * Configures the default options for a client.
227
+ *
228
+ * @param array $config
229
+ * @return void
230
  */
231
+ private function configureDefaults(array $config)
232
  {
233
  $defaults = [
234
  'allow_redirects' => RedirectMiddleware::$defaultSettings,
236
  'decode_content' => true,
237
  'verify' => true,
238
  'cookies' => false,
239
+ 'idn_conversion' => true,
240
  ];
241
 
242
  // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set.
244
  // We can only trust the HTTP_PROXY environment variable in a CLI
245
  // process due to the fact that PHP has no reliable mechanism to
246
  // get environment variables that start with "HTTP_".
247
+ if (php_sapi_name() === 'cli' && getenv('HTTP_PROXY')) {
248
+ $defaults['proxy']['http'] = getenv('HTTP_PROXY');
249
  }
250
 
251
+ if ($proxy = getenv('HTTPS_PROXY')) {
252
  $defaults['proxy']['https'] = $proxy;
253
  }
254
 
255
+ if ($noProxy = getenv('NO_PROXY')) {
256
+ $cleanedNoProxy = str_replace(' ', '', $noProxy);
257
+ $defaults['proxy']['no'] = explode(',', $cleanedNoProxy);
258
  }
259
 
260
  $this->config = $config + $defaults;
265
 
266
  // Add the default user-agent header.
267
  if (!isset($this->config['headers'])) {
268
+ $this->config['headers'] = ['User-Agent' => default_user_agent()];
269
  } else {
270
  // Add the User-Agent header if one was not already set.
271
+ foreach (array_keys($this->config['headers']) as $name) {
272
+ if (strtolower($name) === 'user-agent') {
273
  return;
274
  }
275
  }
276
+ $this->config['headers']['User-Agent'] = default_user_agent();
277
  }
278
  }
279
 
281
  * Merges default options into the array.
282
  *
283
  * @param array $options Options to modify by reference
284
+ *
285
+ * @return array
286
  */
287
+ private function prepareDefaults(array $options)
288
  {
289
  $defaults = $this->config;
290
 
296
 
297
  // Special handling for headers is required as they are added as
298
  // conditional headers and as headers passed to a request ctor.
299
+ if (array_key_exists('headers', $options)) {
300
  // Allows default headers to be unset.
301
  if ($options['headers'] === null) {
302
  $defaults['_conditional'] = [];
303
  unset($options['headers']);
304
+ } elseif (!is_array($options['headers'])) {
305
+ throw new \InvalidArgumentException('headers must be an array');
306
  }
307
  }
308
 
326
  * as-is without merging in default options.
327
  *
328
  * @param array $options See \GuzzleHttp\RequestOptions.
329
+ *
330
+ * @return Promise\PromiseInterface
331
  */
332
+ private function transfer(RequestInterface $request, array $options)
333
  {
334
+ // save_to -> sink
335
+ if (isset($options['save_to'])) {
336
+ $options['sink'] = $options['save_to'];
337
+ unset($options['save_to']);
338
+ }
339
+
340
+ // exceptions -> http_errors
341
+ if (isset($options['exceptions'])) {
342
+ $options['http_errors'] = $options['exceptions'];
343
+ unset($options['exceptions']);
344
+ }
345
+
346
  $request = $this->applyOptions($request, $options);
347
  /** @var HandlerStack $handler */
348
  $handler = $options['handler'];
356
 
357
  /**
358
  * Applies the array of request options to a request.
359
+ *
360
+ * @param RequestInterface $request
361
+ * @param array $options
362
+ *
363
+ * @return RequestInterface
364
  */
365
+ private function applyOptions(RequestInterface $request, array &$options)
366
  {
367
  $modify = [
368
  'set_headers' => [],
375
 
376
  if (isset($options['form_params'])) {
377
  if (isset($options['multipart'])) {
378
+ throw new \InvalidArgumentException('You cannot use '
379
  . 'form_params and multipart at the same time. Use the '
380
  . 'form_params option if you want to send application/'
381
  . 'x-www-form-urlencoded requests, and the multipart '
382
  . 'option to send multipart/form-data requests.');
383
  }
384
+ $options['body'] = http_build_query($options['form_params'], '', '&');
385
  unset($options['form_params']);
386
  // Ensure that we don't have the header in different case and set the new value.
387
  $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']);
394
  }
395
 
396
  if (isset($options['json'])) {
397
+ $options['body'] = \GuzzleHttp\json_encode($options['json']);
398
  unset($options['json']);
399
  // Ensure that we don't have the header in different case and set the new value.
400
  $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']);
410
  }
411
 
412
  if (isset($options['body'])) {
413
+ if (is_array($options['body'])) {
414
+ $this->invalidBody();
415
  }
416
  $modify['body'] = Psr7\stream_for($options['body']);
417
  unset($options['body']);
418
  }
419
 
420
+ if (!empty($options['auth']) && is_array($options['auth'])) {
421
  $value = $options['auth'];
422
+ $type = isset($value[2]) ? strtolower($value[2]) : 'basic';
423
  switch ($type) {
424
  case 'basic':
425
  // Ensure that we don't have the header in different case and set the new value.
426
  $modify['set_headers'] = Psr7\_caseless_remove(['Authorization'], $modify['set_headers']);
427
  $modify['set_headers']['Authorization'] = 'Basic '
428
+ . base64_encode("$value[0]:$value[1]");
429
  break;
430
  case 'digest':
431
  // @todo: Do not rely on curl
432
+ $options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_DIGEST;
433
+ $options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]";
434
  break;
435
  case 'ntlm':
436
+ $options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_NTLM;
437
+ $options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]";
438
  break;
439
  }
440
  }
441
 
442
  if (isset($options['query'])) {
443
  $value = $options['query'];
444
+ if (is_array($value)) {
445
+ $value = http_build_query($value, null, '&', PHP_QUERY_RFC3986);
446
  }
447
+ if (!is_string($value)) {
448
+ throw new \InvalidArgumentException('query must be a string or array');
449
  }
450
  $modify['query'] = $value;
451
  unset($options['query']);
454
  // Ensure that sink is not an invalid value.
455
  if (isset($options['sink'])) {
456
  // TODO: Add more sink validation?
457
+ if (is_bool($options['sink'])) {
458
+ throw new \InvalidArgumentException('sink must not be a boolean');
459
  }
460
  }
461
 
486
  }
487
 
488
  /**
489
+ * Throw Exception with pre-set message.
490
+ * @return void
491
+ * @throws \InvalidArgumentException Invalid body.
492
  */
493
+ private function invalidBody()
494
  {
495
+ throw new \InvalidArgumentException('Passing in the "body" request '
496
+ . 'option as an array to send a POST request has been deprecated. '
497
  . 'Please use the "form_params" request option to send a '
498
  . 'application/x-www-form-urlencoded request, or the "multipart" '
499
  . 'request option to send a multipart/form-data request.');
vendor/guzzlehttp/guzzle/src/ClientInterface.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  namespace GuzzleHttp;
4
 
5
  use GuzzleHttp\Exception\GuzzleException;
@@ -14,9 +13,9 @@ use Psr\Http\Message\UriInterface;
14
  interface ClientInterface
15
  {
16
  /**
17
- * The Guzzle major version.
18
  */
19
- const MAJOR_VERSION = 7;
20
 
21
  /**
22
  * Send an HTTP request.
@@ -25,9 +24,10 @@ interface ClientInterface
25
  * @param array $options Request options to apply to the given
26
  * request and to the transfer.
27
  *
 
28
  * @throws GuzzleException
29
  */
30
- public function send(RequestInterface $request, array $options = []): ResponseInterface;
31
 
32
  /**
33
  * Asynchronously send an HTTP request.
@@ -35,8 +35,10 @@ interface ClientInterface
35
  * @param RequestInterface $request Request to send
36
  * @param array $options Request options to apply to the given
37
  * request and to the transfer.
 
 
38
  */
39
- public function sendAsync(RequestInterface $request, array $options = []): PromiseInterface;
40
 
41
  /**
42
  * Create and send an HTTP request.
@@ -49,9 +51,10 @@ interface ClientInterface
49
  * @param string|UriInterface $uri URI object or string.
50
  * @param array $options Request options to apply.
51
  *
 
52
  * @throws GuzzleException
53
  */
54
- public function request(string $method, $uri, array $options = []): ResponseInterface;
55
 
56
  /**
57
  * Create and send an asynchronous HTTP request.
@@ -64,8 +67,10 @@ interface ClientInterface
64
  * @param string $method HTTP method
65
  * @param string|UriInterface $uri URI object or string.
66
  * @param array $options Request options to apply.
 
 
67
  */
68
- public function requestAsync(string $method, $uri, array $options = []): PromiseInterface;
69
 
70
  /**
71
  * Get a client configuration option.
@@ -77,8 +82,6 @@ interface ClientInterface
77
  * @param string|null $option The config option to retrieve.
78
  *
79
  * @return mixed
80
- *
81
- * @deprecated ClientInterface::getConfig will be removed in guzzlehttp/guzzle:8.0.
82
  */
83
- public function getConfig(?string $option = null);
84
  }
1
  <?php
 
2
  namespace GuzzleHttp;
3
 
4
  use GuzzleHttp\Exception\GuzzleException;
13
  interface ClientInterface
14
  {
15
  /**
16
+ * @deprecated Will be removed in Guzzle 7.0.0
17
  */
18
+ const VERSION = '6.5.5';
19
 
20
  /**
21
  * Send an HTTP request.
24
  * @param array $options Request options to apply to the given
25
  * request and to the transfer.
26
  *
27
+ * @return ResponseInterface
28
  * @throws GuzzleException
29
  */
30
+ public function send(RequestInterface $request, array $options = []);
31
 
32
  /**
33
  * Asynchronously send an HTTP request.
35
  * @param RequestInterface $request Request to send
36
  * @param array $options Request options to apply to the given
37
  * request and to the transfer.
38
+ *
39
+ * @return PromiseInterface
40
  */
41
+ public function sendAsync(RequestInterface $request, array $options = []);
42
 
43
  /**
44
  * Create and send an HTTP request.
51
  * @param string|UriInterface $uri URI object or string.
52
  * @param array $options Request options to apply.
53
  *
54
+ * @return ResponseInterface
55
  * @throws GuzzleException
56
  */
57
+ public function request($method, $uri, array $options = []);
58
 
59
  /**
60
  * Create and send an asynchronous HTTP request.
67
  * @param string $method HTTP method
68
  * @param string|UriInterface $uri URI object or string.
69
  * @param array $options Request options to apply.
70
+ *
71
+ * @return PromiseInterface
72
  */
73
+ public function requestAsync($method, $uri, array $options = []);
74
 
75
  /**
76
  * Get a client configuration option.
82
  * @param string|null $option The config option to retrieve.
83
  *
84
  * @return mixed
 
 
85
  */
86
+ public function getConfig($option = null);
87
  }
vendor/guzzlehttp/guzzle/src/ClientTrait.php DELETED
@@ -1,241 +0,0 @@
1
- <?php
2
-
3
- namespace GuzzleHttp;
4
-
5
- use GuzzleHttp\Exception\GuzzleException;
6
- use GuzzleHttp\Promise\PromiseInterface;
7
- use Psr\Http\Message\ResponseInterface;
8
- use Psr\Http\Message\UriInterface;
9
-
10
- /**
11
- * Client interface for sending HTTP requests.
12
- */
13
- trait ClientTrait
14
- {
15
- /**
16
- * Create and send an HTTP request.
17
- *
18
- * Use an absolute path to override the base path of the client, or a
19
- * relative path to append to the base path of the client. The URL can
20
- * contain the query string as well.
21
- *
22
- * @param string $method HTTP method.
23
- * @param string|UriInterface $uri URI object or string.
24
- * @param array $options Request options to apply.
25
- *
26
- * @throws GuzzleException
27
- */
28
- abstract public function request(string $method, $uri, array $options = []): ResponseInterface;
29
-
30
- /**
31
- * Create and send an HTTP GET request.
32
- *
33
- * Use an absolute path to override the base path of the client, or a
34
- * relative path to append to the base path of the client. The URL can
35
- * contain the query string as well.
36
- *
37
- * @param string|UriInterface $uri URI object or string.
38
- * @param array $options Request options to apply.
39
- *
40
- * @throws GuzzleException
41
- */
42
- public function get($uri, array $options = []): ResponseInterface
43
- {
44
- return $this->request('GET', $uri, $options);
45
- }
46
-
47
- /**
48
- * Create and send an HTTP HEAD request.
49
- *
50
- * Use an absolute path to override the base path of the client, or a
51
- * relative path to append to the base path of the client. The URL can
52
- * contain the query string as well.
53
- *
54
- * @param string|UriInterface $uri URI object or string.
55
- * @param array $options Request options to apply.
56
- *
57
- * @throws GuzzleException
58
- */
59
- public function head($uri, array $options = []): ResponseInterface
60
- {
61
- return $this->request('HEAD', $uri, $options);
62
- }
63
-
64
- /**
65
- * Create and send an HTTP PUT request.
66
- *
67
- * Use an absolute path to override the base path of the client, or a
68
- * relative path to append to the base path of the client. The URL can
69
- * contain the query string as well.
70
- *
71
- * @param string|UriInterface $uri URI object or string.
72
- * @param array $options Request options to apply.
73
- *
74
- * @throws GuzzleException
75
- */
76
- public function put($uri, array $options = []): ResponseInterface
77
- {
78
- return $this->request('PUT', $uri, $options);
79
- }
80
-
81
- /**
82
- * Create and send an HTTP POST request.
83
- *
84
- * Use an absolute path to override the base path of the client, or a
85
- * relative path to append to the base path of the client. The URL can
86
- * contain the query string as well.
87
- *
88
- * @param string|UriInterface $uri URI object or string.
89
- * @param array $options Request options to apply.
90
- *
91
- * @throws GuzzleException
92
- */
93
- public function post($uri, array $options = []): ResponseInterface
94
- {
95
- return $this->request('POST', $uri, $options);
96
- }
97
-
98
- /**
99
- * Create and send an HTTP PATCH request.
100
- *
101
- * Use an absolute path to override the base path of the client, or a
102
- * relative path to append to the base path of the client. The URL can
103
- * contain the query string as well.
104
- *
105
- * @param string|UriInterface $uri URI object or string.
106
- * @param array $options Request options to apply.
107
- *
108
- * @throws GuzzleException
109
- */
110
- public function patch($uri, array $options = []): ResponseInterface
111
- {
112
- return $this->request('PATCH', $uri, $options);
113
- }
114
-
115
- /**
116
- * Create and send an HTTP DELETE request.
117
- *
118
- * Use an absolute path to override the base path of the client, or a
119
- * relative path to append to the base path of the client. The URL can
120
- * contain the query string as well.
121
- *
122
- * @param string|UriInterface $uri URI object or string.
123
- * @param array $options Request options to apply.
124
- *
125
- * @throws GuzzleException
126
- */
127
- public function delete($uri, array $options = []): ResponseInterface
128
- {
129
- return $this->request('DELETE', $uri, $options);
130
- }
131
-
132
- /**
133
- * Create and send an asynchronous HTTP request.
134
- *
135
- * Use an absolute path to override the base path of the client, or a
136
- * relative path to append to the base path of the client. The URL can
137
- * contain the query string as well. Use an array to provide a URL
138
- * template and additional variables to use in the URL template expansion.
139
- *
140
- * @param string $method HTTP method
141
- * @param string|UriInterface $uri URI object or string.
142
- * @param array $options Request options to apply.
143
- */
144
- abstract public function requestAsync(string $method, $uri, array $options = []): PromiseInterface;
145
-
146
- /**
147
- * Create and send an asynchronous HTTP GET request.
148
- *
149
- * Use an absolute path to override the base path of the client, or a
150
- * relative path to append to the base path of the client. The URL can
151
- * contain the query string as well. Use an array to provide a URL
152
- * template and additional variables to use in the URL template expansion.
153
- *
154
- * @param string|UriInterface $uri URI object or string.
155
- * @param array $options Request options to apply.
156
- */
157
- public function getAsync($uri, array $options = []): PromiseInterface
158
- {
159
- return $this->requestAsync('GET', $uri, $options);
160
- }
161
-
162
- /**
163
- * Create and send an asynchronous HTTP HEAD request.
164
- *
165
- * Use an absolute path to override the base path of the client, or a
166
- * relative path to append to the base path of the client. The URL can
167
- * contain the query string as well. Use an array to provide a URL
168
- * template and additional variables to use in the URL template expansion.
169
- *
170
- * @param string|UriInterface $uri URI object or string.
171
- * @param array $options Request options to apply.
172
- */
173
- public function headAsync($uri, array $options = []): PromiseInterface
174
- {
175
- return $this->requestAsync('HEAD', $uri, $options);
176
- }
177
-
178
- /**
179
- * Create and send an asynchronous HTTP PUT request.
180
- *
181
- * Use an absolute path to override the base path of the client, or a
182
- * relative path to append to the base path of the client. The URL can
183
- * contain the query string as well. Use an array to provide a URL
184
- * template and additional variables to use in the URL template expansion.
185
- *
186
- * @param string|UriInterface $uri URI object or string.
187
- * @param array $options Request options to apply.
188
- */
189
- public function putAsync($uri, array $options = []): PromiseInterface
190
- {
191
- return $this->requestAsync('PUT', $uri, $options);
192
- }
193
-
194
- /**
195
- * Create and send an asynchronous HTTP POST request.
196
- *
197
- * Use an absolute path to override the base path of the client, or a
198
- * relative path to append to the base path of the client. The URL can
199
- * contain the query string as well. Use an array to provide a URL
200
- * template and additional variables to use in the URL template expansion.
201
- *
202
- * @param string|UriInterface $uri URI object or string.
203
- * @param array $options Request options to apply.
204
- */
205
- public function postAsync($uri, array $options = []): PromiseInterface
206
- {
207
- return $this->requestAsync('POST', $uri, $options);
208
- }
209
-
210
- /**
211
- * Create and send an asynchronous HTTP PATCH request.
212
- *
213
- * Use an absolute path to override the base path of the client, or a
214
- * relative path to append to the base path of the client. The URL can
215
- * contain the query string as well. Use an array to provide a URL
216
- * template and additional variables to use in the URL template expansion.
217
- *
218
- * @param string|UriInterface $uri URI object or string.
219
- * @param array $options Request options to apply.
220
- */
221
- public function patchAsync($uri, array $options = []): PromiseInterface
222
- {
223
- return $this->requestAsync('PATCH', $uri, $options);
224
- }
225
-
226
- /**
227
- * Create and send an asynchronous HTTP DELETE request.
228
- *
229
- * Use an absolute path to override the base path of the client, or a
230
- * relative path to append to the base path of the client. The URL can
231
- * contain the query string as well. Use an array to provide a URL
232
- * template and additional variables to use in the URL template expansion.
233
- *
234
- * @param string|UriInterface $uri URI object or string.
235
- * @param array $options Request options to apply.
236
- */
237
- public function deleteAsync($uri, array $options = []): PromiseInterface
238
- {
239
- return $this->requestAsync('DELETE', $uri, $options);
240
- }
241
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  namespace GuzzleHttp\Cookie;
4
 
5
  use Psr\Http\Message\RequestInterface;
@@ -10,24 +9,20 @@ use Psr\Http\Message\ResponseInterface;
10
  */
11
  class CookieJar implements CookieJarInterface
12
  {
13
- /**
14
- * @var SetCookie[] Loaded cookie data
15
- */
16
  private $cookies = [];
17
 
18
- /**
19
- * @var bool
20
- */
21
  private $strictMode;
22
 
23
  /**
24
- * @param bool $strictMode Set to true to throw exceptions when invalid
25
  * cookies are added to the cookie jar.
26
  * @param array $cookieArray Array of SetCookie objects or a hash of
27
  * arrays that can be used with the SetCookie
28
  * constructor
29
  */
30
- public function __construct(bool $strictMode = false, array $cookieArray = [])
31
  {
32
  $this->strictMode = $strictMode;
33
 
@@ -44,8 +39,10 @@ class CookieJar implements CookieJarInterface
44
  *
45
  * @param array $cookies Cookies to create the jar from
46
  * @param string $domain Domain to set the cookies to
 
 
47
  */
48
- public static function fromArray(array $cookies, string $domain): self
49
  {
50
  $cookieJar = new self();
51
  foreach ($cookies as $name => $value) {
@@ -60,15 +57,26 @@ class CookieJar implements CookieJarInterface
60
  return $cookieJar;
61
  }
62
 
 
 
 
 
 
 
 
 
63
  /**
64
  * Evaluate if this cookie should be persisted to storage
65
  * that survives between requests.
66
  *
67
- * @param SetCookie $cookie Being evaluated.
68
- * @param bool $allowSessionCookies If we should persist session cookies
 
69
  */
70
- public static function shouldPersist(SetCookie $cookie, bool $allowSessionCookies = false): bool
71
- {
 
 
72
  if ($cookie->getExpires() || $allowSessionCookies) {
73
  if (!$cookie->getDiscard()) {
74
  return true;
@@ -82,13 +90,16 @@ class CookieJar implements CookieJarInterface
82
  * Finds and returns the cookie based on the name
83
  *
84
  * @param string $name cookie name to search for
85
- *
86
  * @return SetCookie|null cookie that was found or null if not found
87
  */
88
- public function getCookieByName(string $name): ?SetCookie
89
  {
 
 
 
 
90
  foreach ($this->cookies as $cookie) {
91
- if ($cookie->getName() !== null && \strcasecmp($cookie->getName(), $name) === 0) {
92
  return $cookie;
93
  }
94
  }
@@ -96,43 +107,37 @@ class CookieJar implements CookieJarInterface
96
  return null;
97
  }
98
 
99
- /**
100
- * @inheritDoc
101
- */
102
- public function toArray(): array
103
  {
104
- return \array_map(static function (SetCookie $cookie): array {
105
  return $cookie->toArray();
106
  }, $this->getIterator()->getArrayCopy());
107
  }
108
 
109
- /**
110
- * @inheritDoc
111
- */
112
- public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void
113
  {
114
  if (!$domain) {
115
  $this->cookies = [];
116
  return;
117
  } elseif (!$path) {
118
- $this->cookies = \array_filter(
119
  $this->cookies,
120
- static function (SetCookie $cookie) use ($domain): bool {
121
  return !$cookie->matchesDomain($domain);
122
  }
123
  );
124
  } elseif (!$name) {
125
- $this->cookies = \array_filter(
126
  $this->cookies,
127
- static function (SetCookie $cookie) use ($path, $domain): bool {
128
  return !($cookie->matchesPath($path) &&
129
  $cookie->matchesDomain($domain));
130
  }
131
  );
132
  } else {
133
- $this->cookies = \array_filter(
134
  $this->cookies,
135
- static function (SetCookie $cookie) use ($path, $domain, $name) {
136
  return !($cookie->getName() == $name &&
137
  $cookie->matchesPath($path) &&
138
  $cookie->matchesDomain($domain));
@@ -141,23 +146,17 @@ class CookieJar implements CookieJarInterface
141
  }
142
  }
143
 
144
- /**
145
- * @inheritDoc
146
- */
147
- public function clearSessionCookies(): void
148
  {
149
- $this->cookies = \array_filter(
150
  $this->cookies,
151
- static function (SetCookie $cookie): bool {
152
  return !$cookie->getDiscard() && $cookie->getExpires();
153
  }
154
  );
155
  }
156
 
157
- /**
158
- * @inheritDoc
159
- */
160
- public function setCookie(SetCookie $cookie): bool
161
  {
162
  // If the name string is empty (but not 0), ignore the set-cookie
163
  // string entirely.
@@ -171,9 +170,10 @@ class CookieJar implements CookieJarInterface
171
  if ($result !== true) {
172
  if ($this->strictMode) {
173
  throw new \RuntimeException('Invalid cookie: ' . $result);
 
 
 
174
  }
175
- $this->removeCookieIfEmpty($cookie);
176
- return false;
177
  }
178
 
179
  // Resolve conflicts with previously set cookies
@@ -217,28 +217,27 @@ class CookieJar implements CookieJarInterface
217
  return true;
218
  }
219
 
220
- public function count(): int
221
  {
222
- return \count($this->cookies);
223
  }
224
 
225
- /**
226
- * @return \ArrayIterator<int, SetCookie>
227
- */
228
- public function getIterator(): \ArrayIterator
229
  {
230
- return new \ArrayIterator(\array_values($this->cookies));
231
  }
232
 
233
- public function extractCookies(RequestInterface $request, ResponseInterface $response): void
234
- {
 
 
235
  if ($cookieHeader = $response->getHeader('Set-Cookie')) {
236
  foreach ($cookieHeader as $cookie) {
237
  $sc = SetCookie::fromString($cookie);
238
  if (!$sc->getDomain()) {
239
  $sc->setDomain($request->getUri()->getHost());
240
  }
241
- if (0 !== \strpos($sc->getPath(), '/')) {
242
  $sc->setPath($this->getCookiePathFromRequest($request));
243
  }
244
  $this->setCookie($sc);
@@ -250,28 +249,30 @@ class CookieJar implements CookieJarInterface
250
  * Computes cookie path following RFC 6265 section 5.1.4
251
  *
252
  * @link https://tools.ietf.org/html/rfc6265#section-5.1.4
 
 
 
253
  */
254
- private function getCookiePathFromRequest(RequestInterface $request): string
255
  {
256
  $uriPath = $request->getUri()->getPath();
257
- if ('' === $uriPath) {
258
  return '/';
259
  }
260
- if (0 !== \strpos($uriPath, '/')) {
261
  return '/';
262
  }
263
  if ('/' === $uriPath) {
264
  return '/';
265
  }
266
- $lastSlashPos = \strrpos($uriPath, '/');
267
- if (0 === $lastSlashPos || false === $lastSlashPos) {
268
  return '/';
269
  }
270
 
271
- return \substr($uriPath, 0, $lastSlashPos);
272
  }
273
 
274
- public function withCookieHeader(RequestInterface $request): RequestInterface
275
  {
276
  $values = [];
277
  $uri = $request->getUri();
@@ -291,15 +292,17 @@ class CookieJar implements CookieJarInterface
291
  }
292
 
293
  return $values
294
- ? $request->withHeader('Cookie', \implode('; ', $values))
295
  : $request;
296
  }
297
 
298
  /**
299
  * If a cookie already exists and the server asks to set it again with a
300
  * null value, the cookie must be deleted.
 
 
301
  */
302
- private function removeCookieIfEmpty(SetCookie $cookie): void
303
  {
304
  $cookieValue = $cookie->getValue();
305
  if ($cookieValue === null || $cookieValue === '') {
1
  <?php
 
2
  namespace GuzzleHttp\Cookie;
3
 
4
  use Psr\Http\Message\RequestInterface;
9
  */
10
  class CookieJar implements CookieJarInterface
11
  {
12
+ /** @var SetCookie[] Loaded cookie data */
 
 
13
  private $cookies = [];
14
 
15
+ /** @var bool */
 
 
16
  private $strictMode;
17
 
18
  /**
19
+ * @param bool $strictMode Set to true to throw exceptions when invalid
20
  * cookies are added to the cookie jar.
21
  * @param array $cookieArray Array of SetCookie objects or a hash of
22
  * arrays that can be used with the SetCookie
23
  * constructor
24
  */
25
+ public function __construct($strictMode = false, $cookieArray = [])
26
  {
27
  $this->strictMode = $strictMode;
28
 
39
  *
40
  * @param array $cookies Cookies to create the jar from
41
  * @param string $domain Domain to set the cookies to
42
+ *
43
+ * @return self
44
  */
45
+ public static function fromArray(array $cookies, $domain)
46
  {
47
  $cookieJar = new self();
48
  foreach ($cookies as $name => $value) {
57
  return $cookieJar;
58
  }
59
 
60
+ /**
61
+ * @deprecated
62
+ */
63
+ public static function getCookieValue($value)
64
+ {
65
+ return $value;
66
+ }
67
+
68
  /**
69
  * Evaluate if this cookie should be persisted to storage
70
  * that survives between requests.
71
  *
72
+ * @param SetCookie $cookie Being evaluated.
73
+ * @param bool $allowSessionCookies If we should persist session cookies
74
+ * @return bool
75
  */
76
+ public static function shouldPersist(
77
+ SetCookie $cookie,
78
+ $allowSessionCookies = false
79
+ ) {
80
  if ($cookie->getExpires() || $allowSessionCookies) {
81
  if (!$cookie->getDiscard()) {
82
  return true;
90
  * Finds and returns the cookie based on the name
91
  *
92
  * @param string $name cookie name to search for
 
93
  * @return SetCookie|null cookie that was found or null if not found
94
  */
95
+ public function getCookieByName($name)
96
  {
97
+ // don't allow a non string name
98
+ if ($name === null || !is_scalar($name)) {
99
+ return null;
100
+ }
101
  foreach ($this->cookies as $cookie) {
102
+ if ($cookie->getName() !== null && strcasecmp($cookie->getName(), $name) === 0) {
103
  return $cookie;
104
  }
105
  }
107
  return null;
108
  }
109
 
110
+ public function toArray()
 
 
 
111
  {
112
+ return array_map(function (SetCookie $cookie) {
113
  return $cookie->toArray();
114
  }, $this->getIterator()->getArrayCopy());
115
  }
116
 
117
+ public function clear($domain = null, $path = null, $name = null)
 
 
 
118
  {
119
  if (!$domain) {
120
  $this->cookies = [];
121
  return;
122
  } elseif (!$path) {
123
+ $this->cookies = array_filter(
124
  $this->cookies,
125
+ function (SetCookie $cookie) use ($domain) {
126
  return !$cookie->matchesDomain($domain);
127
  }
128
  );
129
  } elseif (!$name) {
130
+ $this->cookies = array_filter(
131
  $this->cookies,
132
+ function (SetCookie $cookie) use ($path, $domain) {
133
  return !($cookie->matchesPath($path) &&
134
  $cookie->matchesDomain($domain));
135
  }
136
  );
137
  } else {
138
+ $this->cookies = array_filter(
139
  $this->cookies,
140
+ function (SetCookie $cookie) use ($path, $domain, $name) {
141
  return !($cookie->getName() == $name &&
142
  $cookie->matchesPath($path) &&
143
  $cookie->matchesDomain($domain));
146
  }
147
  }
148
 
149
+ public function clearSessionCookies()
 
 
 
150
  {
151
+ $this->cookies = array_filter(
152
  $this->cookies,
153
+ function (SetCookie $cookie) {
154
  return !$cookie->getDiscard() && $cookie->getExpires();
155
  }
156
  );
157
  }
158
 
159
+ public function setCookie(SetCookie $cookie)
 
 
 
160
  {
161
  // If the name string is empty (but not 0), ignore the set-cookie
162
  // string entirely.
170
  if ($result !== true) {
171
  if ($this->strictMode) {
172
  throw new \RuntimeException('Invalid cookie: ' . $result);
173
+ } else {
174
+ $this->removeCookieIfEmpty($cookie);
175
+ return false;
176
  }
 
 
177
  }
178
 
179
  // Resolve conflicts with previously set cookies
217
  return true;
218
  }
219
 
220
+ public function count()
221
  {
222
+ return count($this->cookies);
223
  }
224
 
225
+ public function getIterator()
 
 
 
226
  {
227
+ return new \ArrayIterator(array_values($this->cookies));
228
  }
229
 
230
+ public function extractCookies(
231
+ RequestInterface $request,
232
+ ResponseInterface $response
233
+ ) {
234
  if ($cookieHeader = $response->getHeader('Set-Cookie')) {
235
  foreach ($cookieHeader as $cookie) {
236
  $sc = SetCookie::fromString($cookie);
237
  if (!$sc->getDomain()) {
238
  $sc->setDomain($request->getUri()->getHost());
239
  }
240
+ if (0 !== strpos($sc->getPath(), '/')) {
241
  $sc->setPath($this->getCookiePathFromRequest($request));
242
  }
243
  $this->setCookie($sc);
249
  * Computes cookie path following RFC 6265 section 5.1.4
250
  *
251
  * @link https://tools.ietf.org/html/rfc6265#section-5.1.4
252
+ *
253
+ * @param RequestInterface $request
254
+ * @return string
255
  */
256
+ private function getCookiePathFromRequest(RequestInterface $request)
257
  {
258
  $uriPath = $request->getUri()->getPath();
259
+ if ('' === $uriPath) {
260
  return '/';
261
  }
262
+ if (0 !== strpos($uriPath, '/')) {
263
  return '/';
264
  }
265
  if ('/' === $uriPath) {
266
  return '/';
267
  }
268
+ if (0 === $lastSlashPos = strrpos($uriPath, '/')) {
 
269
  return '/';
270
  }
271
 
272
+ return substr($uriPath, 0, $lastSlashPos);
273
  }
274
 
275
+ public function withCookieHeader(RequestInterface $request)
276
  {
277
  $values = [];
278
  $uri = $request->getUri();
292
  }
293
 
294
  return $values
295
+ ? $request->withHeader('Cookie', implode('; ', $values))
296
  : $request;
297
  }
298
 
299
  /**
300
  * If a cookie already exists and the server asks to set it again with a
301
  * null value, the cookie must be deleted.
302
+ *
303
+ * @param SetCookie $cookie
304
  */
305
+ private function removeCookieIfEmpty(SetCookie $cookie)
306
  {
307
  $cookieValue = $cookie->getValue();
308
  if ($cookieValue === null || $cookieValue === '') {
vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  namespace GuzzleHttp\Cookie;
4
 
5
  use Psr\Http\Message\RequestInterface;
@@ -13,8 +12,7 @@ use Psr\Http\Message\ResponseInterface;
13
  * necessary. Subclasses are also responsible for storing and retrieving
14
  * cookies from a file, database, etc.
15
  *
16
- * @link https://docs.python.org/2/library/cookielib.html Inspiration
17
- * @extends \IteratorAggregate<SetCookie>
18
  */
19
  interface CookieJarInterface extends \Countable, \IteratorAggregate
20
  {
@@ -28,7 +26,7 @@ interface CookieJarInterface extends \Countable, \IteratorAggregate
28
  *
29
  * @return RequestInterface returns the modified request.
30
  */
31
- public function withCookieHeader(RequestInterface $request): RequestInterface;
32
 
33
  /**
34
  * Extract cookies from an HTTP response and store them in the CookieJar.
@@ -39,7 +37,7 @@ interface CookieJarInterface extends \Countable, \IteratorAggregate
39
  public function extractCookies(
40
  RequestInterface $request,
41
  ResponseInterface $response
42
- ): void;
43
 
44
  /**
45
  * Sets a cookie in the cookie jar.
@@ -48,7 +46,7 @@ interface CookieJarInterface extends \Countable, \IteratorAggregate
48
  *
49
  * @return bool Returns true on success or false on failure
50
  */
51
- public function setCookie(SetCookie $cookie): bool;
52
 
53
  /**
54
  * Remove cookies currently held in the cookie jar.
@@ -63,8 +61,10 @@ interface CookieJarInterface extends \Countable, \IteratorAggregate
63
  * @param string|null $domain Clears cookies matching a domain
64
  * @param string|null $path Clears cookies matching a domain and path
65
  * @param string|null $name Clears cookies matching a domain, path, and name
 
 
66
  */
67
- public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void;
68
 
69
  /**
70
  * Discard all sessions cookies.
@@ -73,10 +73,12 @@ interface CookieJarInterface extends \Countable, \IteratorAggregate
73
  * field set to true. To be called when the user agent shuts down according
74
  * to RFC 2965.
75
  */
76
- public function clearSessionCookies(): void;
77
 
78
  /**
79
  * Converts the cookie jar to an array.
 
 
80
  */
81
- public function toArray(): array;
82
  }
1
  <?php
 
2
  namespace GuzzleHttp\Cookie;
3
 
4
  use Psr\Http\Message\RequestInterface;
12
  * necessary. Subclasses are also responsible for storing and retrieving
13
  * cookies from a file, database, etc.
14
  *
15
+ * @link http://docs.python.org/2/library/cookielib.html Inspiration
 
16
  */
17
  interface CookieJarInterface extends \Countable, \IteratorAggregate
18
  {
26
  *
27
  * @return RequestInterface returns the modified request.
28
  */
29
+ public function withCookieHeader(RequestInterface $request);
30
 
31
  /**
32
  * Extract cookies from an HTTP response and store them in the CookieJar.
37
  public function extractCookies(
38
  RequestInterface $request,
39
  ResponseInterface $response
40
+ );
41
 
42
  /**
43
  * Sets a cookie in the cookie jar.
46
  *
47
  * @return bool Returns true on success or false on failure
48
  */
49
+ public function setCookie(SetCookie $cookie);
50
 
51
  /**
52
  * Remove cookies currently held in the cookie jar.
61
  * @param string|null $domain Clears cookies matching a domain
62
  * @param string|null $path Clears cookies matching a domain and path
63
  * @param string|null $name Clears cookies matching a domain, path, and name
64
+ *
65
+ * @return CookieJarInterface
66
  */
67
+ public function clear($domain = null, $path = null, $name = null);
68
 
69
  /**
70
  * Discard all sessions cookies.
73
  * field set to true. To be called when the user agent shuts down according
74
  * to RFC 2965.
75
  */
76
+ public function clearSessionCookies();
77
 
78
  /**
79
  * Converts the cookie jar to an array.
80
+ *
81
+ * @return array
82
  */
83
+ public function toArray();
84
  }
vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php CHANGED
@@ -1,40 +1,33 @@
1
  <?php
2
-
3
  namespace GuzzleHttp\Cookie;
4
 
5
- use GuzzleHttp\Utils;
6
-
7
  /**
8
  * Persists non-session cookies using a JSON formatted file
9
  */
10
  class FileCookieJar extends CookieJar
11
  {
12
- /**
13
- * @var string filename
14
- */
15
  private $filename;
16
 
17
- /**
18
- * @var bool Control whether to persist session cookies or not.
19
- */
20
  private $storeSessionCookies;
21
 
22
  /**
23
  * Create a new FileCookieJar object
24
  *
25
- * @param string $cookieFile File to store the cookie data
26
- * @param bool $storeSessionCookies Set to true to store session cookies
27
- * in the cookie jar.
28
  *
29
  * @throws \RuntimeException if the file cannot be found or created
30
  */
31
- public function __construct(string $cookieFile, bool $storeSessionCookies = false)
32
  {
33
  parent::__construct();
34
  $this->filename = $cookieFile;
35
  $this->storeSessionCookies = $storeSessionCookies;
36
 
37
- if (\file_exists($cookieFile)) {
38
  $this->load($cookieFile);
39
  }
40
  }
@@ -51,21 +44,20 @@ class FileCookieJar extends CookieJar
51
  * Saves the cookies to a file.
52
  *
53
  * @param string $filename File to save
54
- *
55
  * @throws \RuntimeException if the file cannot be found or created
56
  */
57
- public function save(string $filename): void
58
  {
59
  $json = [];
60
- /** @var SetCookie $cookie */
61
  foreach ($this as $cookie) {
 
62
  if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) {
63
  $json[] = $cookie->toArray();
64
  }
65
  }
66
 
67
- $jsonStr = Utils::jsonEncode($json);
68
- if (false === \file_put_contents($filename, $jsonStr, \LOCK_EX)) {
69
  throw new \RuntimeException("Unable to save file {$filename}");
70
  }
71
  }
@@ -76,25 +68,23 @@ class FileCookieJar extends CookieJar
76
  * Old cookies are kept unless overwritten by newly loaded ones.
77
  *
78
  * @param string $filename Cookie file to load.
79
- *
80
  * @throws \RuntimeException if the file cannot be loaded.
81
  */
82
- public function load(string $filename): void
83
  {
84
- $json = \file_get_contents($filename);
85
  if (false === $json) {
86
  throw new \RuntimeException("Unable to load file {$filename}");
87
- }
88
- if ($json === '') {
89
  return;
90
  }
91
 
92
- $data = Utils::jsonDecode($json, true);
93
- if (\is_array($data)) {
94
- foreach ($data as $cookie) {
95
  $this->setCookie(new SetCookie($cookie));
96
  }
97
- } elseif (\is_scalar($data) && !empty($data)) {
98
  throw new \RuntimeException("Invalid cookie file: {$filename}");
99
  }
100
  }
1
  <?php
 
2
  namespace GuzzleHttp\Cookie;
3
 
 
 
4
  /**
5
  * Persists non-session cookies using a JSON formatted file
6
  */
7
  class FileCookieJar extends CookieJar
8
  {
9
+ /** @var string filename */
 
 
10
  private $filename;
11
 
12
+ /** @var bool Control whether to persist session cookies or not. */
 
 
13
  private $storeSessionCookies;
14
 
15
  /**
16
  * Create a new FileCookieJar object
17
  *
18
+ * @param string $cookieFile File to store the cookie data
19
+ * @param bool $storeSessionCookies Set to true to store session cookies
20
+ * in the cookie jar.
21
  *
22
  * @throws \RuntimeException if the file cannot be found or created
23
  */
24
+ public function __construct($cookieFile, $storeSessionCookies = false)
25
  {
26
  parent::__construct();
27
  $this->filename = $cookieFile;
28
  $this->storeSessionCookies = $storeSessionCookies;
29
 
30
+ if (file_exists($cookieFile)) {
31
  $this->load($cookieFile);
32
  }
33
  }
44
  * Saves the cookies to a file.
45
  *
46
  * @param string $filename File to save
 
47
  * @throws \RuntimeException if the file cannot be found or created
48
  */
49
+ public function save($filename)
50
  {
51
  $json = [];
 
52
  foreach ($this as $cookie) {
53
+ /** @var SetCookie $cookie */
54
  if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) {
55
  $json[] = $cookie->toArray();
56
  }
57
  }
58
 
59
+ $jsonStr = \GuzzleHttp\json_encode($json);
60
+ if (false === file_put_contents($filename, $jsonStr, LOCK_EX)) {
61
  throw new \RuntimeException("Unable to save file {$filename}");
62
  }
63
  }
68
  * Old cookies are kept unless overwritten by newly loaded ones.
69
  *
70
  * @param string $filename Cookie file to load.
 
71
  * @throws \RuntimeException if the file cannot be loaded.
72
  */
73
+ public function load($filename)
74
  {
75
+ $json = file_get_contents($filename);
76
  if (false === $json) {
77
  throw new \RuntimeException("Unable to load file {$filename}");
78
+ } elseif ($json === '') {
 
79
  return;
80
  }
81
 
82
+ $data = \GuzzleHttp\json_decode($json, true);
83
+ if (is_array($data)) {
84
+ foreach (json_decode($json, true) as $cookie) {
85
  $this->setCookie(new SetCookie($cookie));
86
  }
87
+ } elseif (strlen($data)) {
88
  throw new \RuntimeException("Invalid cookie file: {$filename}");
89
  }
90
  }
vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  namespace GuzzleHttp\Cookie;
4
 
5
  /**
@@ -7,25 +6,21 @@ namespace GuzzleHttp\Cookie;
7
  */
8
  class SessionCookieJar extends CookieJar
9
  {
10
- /**
11
- * @var string session key
12
- */
13
  private $sessionKey;
14
-
15
- /**
16
- * @var bool Control whether to persist session cookies or not.
17
- */
18
  private $storeSessionCookies;
19
 
20
  /**
21
  * Create a new SessionCookieJar object
22
  *
23
- * @param string $sessionKey Session key name to store the cookie
24
- * data in session
25
- * @param bool $storeSessionCookies Set to true to store session cookies
26
- * in the cookie jar.
27
  */
28
- public function __construct(string $sessionKey, bool $storeSessionCookies = false)
29
  {
30
  parent::__construct();
31
  $this->sessionKey = $sessionKey;
@@ -44,33 +39,33 @@ class SessionCookieJar extends CookieJar
44
  /**
45
  * Save cookies to the client session
46
  */
47
- public function save(): void
48
  {
49
  $json = [];
50
- /** @var SetCookie $cookie */
51
  foreach ($this as $cookie) {
 
52
  if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) {
53
  $json[] = $cookie->toArray();
54
  }
55
  }
56
 
57
- $_SESSION[$this->sessionKey] = \json_encode($json);
58
  }
59
 
60
  /**
61
  * Load the contents of the client session into the data array
62
  */
63
- protected function load(): void
64
  {
65
  if (!isset($_SESSION[$this->sessionKey])) {
66
  return;
67
  }
68
- $data = \json_decode($_SESSION[$this->sessionKey], true);
69
- if (\is_array($data)) {
70
  foreach ($data as $cookie) {
71
  $this->setCookie(new SetCookie($cookie));
72
  }
73
- } elseif (\strlen($data)) {
74
  throw new \RuntimeException("Invalid cookie data");
75
  }
76
  }
1
  <?php
 
2
  namespace GuzzleHttp\Cookie;
3
 
4
  /**
6
  */
7
  class SessionCookieJar extends CookieJar
8
  {
9
+ /** @var string session key */
 
 
10
  private $sessionKey;
11
+
12
+ /** @var bool Control whether to persist session cookies or not. */
 
 
13
  private $storeSessionCookies;
14
 
15
  /**
16
  * Create a new SessionCookieJar object
17
  *
18
+ * @param string $sessionKey Session key name to store the cookie
19
+ * data in session
20
+ * @param bool $storeSessionCookies Set to true to store session cookies
21
+ * in the cookie jar.
22
  */
23
+ public function __construct($sessionKey, $storeSessionCookies = false)
24
  {
25
  parent::__construct();
26
  $this->sessionKey = $sessionKey;
39
  /**
40
  * Save cookies to the client session
41
  */
42
+ public function save()
43
  {
44
  $json = [];
 
45
  foreach ($this as $cookie) {
46
+ /** @var SetCookie $cookie */
47
  if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) {
48
  $json[] = $cookie->toArray();
49
  }
50
  }
51
 
52
+ $_SESSION[$this->sessionKey] = json_encode($json);
53
  }
54
 
55
  /**
56
  * Load the contents of the client session into the data array
57
  */
58
+ protected function load()
59
  {
60
  if (!isset($_SESSION[$this->sessionKey])) {
61
  return;
62
  }
63
+ $data = json_decode($_SESSION[$this->sessionKey], true);
64
+ if (is_array($data)) {
65
  foreach ($data as $cookie) {
66
  $this->setCookie(new SetCookie($cookie));
67
  }
68
+ } elseif (strlen($data)) {
69
  throw new \RuntimeException("Invalid cookie data");
70
  }
71
  }
vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  namespace GuzzleHttp\Cookie;
4
 
5
  /**
@@ -7,9 +6,7 @@ namespace GuzzleHttp\Cookie;
7
  */
8
  class SetCookie
9
  {
10
- /**
11
- * @var array
12
- */
13
  private static $defaults = [
14
  'Name' => null,
15
  'Value' => null,
@@ -22,42 +19,42 @@ class SetCookie
22
  'HttpOnly' => false
23
  ];
24
 
25
- /**
26
- * @var array Cookie data
27
- */
28
  private $data;
29
 
30
  /**
31
- * Create a new SetCookie object from a string.
32
  *
33
  * @param string $cookie Set-Cookie header string
 
 
34
  */
35
- public static function fromString(string $cookie): self
36
  {
37
  // Create the default return array
38
  $data = self::$defaults;
39
  // Explode the cookie string using a series of semicolons
40
- $pieces = \array_filter(\array_map('trim', \explode(';', $cookie)));
41
  // The name of the cookie (first kvp) must exist and include an equal sign.
42
- if (!isset($pieces[0]) || \strpos($pieces[0], '=') === false) {
43
  return new self($data);
44
  }
45
 
46
  // Add the cookie pieces into the parsed data array
47
  foreach ($pieces as $part) {
48
- $cookieParts = \explode('=', $part, 2);
49
- $key = \trim($cookieParts[0]);
50
  $value = isset($cookieParts[1])
51
- ? \trim($cookieParts[1], " \n\r\t\0\x0B")
52
  : true;
53
 
54
  // Only check for non-cookies when cookies have been found
55
- if (!isset($data['Name'])) {
56
  $data['Name'] = $key;
57
  $data['Value'] = $value;
58
  } else {
59
- foreach (\array_keys(self::$defaults) as $search) {
60
- if (!\strcasecmp($search, $key)) {
61
  $data[$search] = $value;
62
  continue 2;
63
  }
@@ -74,19 +71,13 @@ class SetCookie
74
  */
75
  public function __construct(array $data = [])
76
  {
77
- /** @var array|null $replaced will be null in case of replace error */
78
- $replaced = \array_replace(self::$defaults, $data);
79
- if ($replaced === null) {
80
- throw new \InvalidArgumentException('Unable to replace the default values for the Cookie.');
81
- }
82
-
83
- $this->data = $replaced;
84
  // Extract the Expires value and turn it into a UNIX timestamp if needed
85
  if (!$this->getExpires() && $this->getMaxAge()) {
86
  // Calculate the Expires date
87
- $this->setExpires(\time() + $this->getMaxAge());
88
- } elseif (null !== ($expires = $this->getExpires()) && !\is_numeric($expires)) {
89
- $this->setExpires($expires);
90
  }
91
  }
92
 
@@ -96,23 +87,23 @@ class SetCookie
96
  foreach ($this->data as $k => $v) {
97
  if ($k !== 'Name' && $k !== 'Value' && $v !== null && $v !== false) {
98
  if ($k === 'Expires') {
99
- $str .= 'Expires=' . \gmdate('D, d M Y H:i:s \G\M\T', $v) . '; ';
100
  } else {
101
  $str .= ($v === true ? $k : "{$k}={$v}") . '; ';
102
  }
103
  }
104
  }
105
 
106
- return \rtrim($str, '; ');
107
  }
108
 
109
- public function toArray(): array
110
  {
111
  return $this->data;
112
  }
113
 
114
  /**
115
- * Get the cookie name.
116
  *
117
  * @return string
118
  */
@@ -122,19 +113,19 @@ class SetCookie
122
  }
123
 
124
  /**
125
- * Set the cookie name.
126
  *
127
  * @param string $name Cookie name
128
  */
129
- public function setName($name): void
130
  {
131
  $this->data['Name'] = $name;
132
  }
133
 
134
  /**
135
- * Get the cookie value.
136
  *
137
- * @return string|null
138
  */
139
  public function getValue()
140
  {
@@ -142,17 +133,17 @@ class SetCookie
142
  }
143
 
144
  /**
145
- * Set the cookie value.
146
  *
147
  * @param string $value Cookie value
148
  */
149
- public function setValue($value): void
150
  {
151
  $this->data['Value'] = $value;
152
  }
153
 
154
  /**
155
- * Get the domain.
156
  *
157
  * @return string|null
158
  */
@@ -162,17 +153,17 @@ class SetCookie
162
  }
163
 
164
  /**
165
- * Set the domain of the cookie.
166
  *
167
  * @param string $domain
168
  */
169
- public function setDomain($domain): void
170
  {
171
  $this->data['Domain'] = $domain;
172
  }
173
 
174
  /**
175
- * Get the path.
176
  *
177
  * @return string
178
  */
@@ -182,17 +173,17 @@ class SetCookie
182
  }
183
 
184
  /**
185
- * Set the path of the cookie.
186
  *
187
  * @param string $path Path of the cookie
188
  */
189
- public function setPath($path): void
190
  {
191
  $this->data['Path'] = $path;
192
  }
193
 
194
  /**
195
- * Maximum lifetime of the cookie in seconds.
196
  *
197
  * @return int|null
198
  */
@@ -202,19 +193,19 @@ class SetCookie
202
  }
203
 
204
  /**
205
- * Set the max-age of the cookie.
206
  *
207
  * @param int $maxAge Max age of the cookie in seconds
208
  */
209
- public function setMaxAge($maxAge): void
210
  {
211
  $this->data['Max-Age'] = $maxAge;
212
  }
213
 
214
  /**
215
- * The UNIX timestamp when the cookie Expires.
216
  *
217
- * @return string|int|null
218
  */
219
  public function getExpires()
220
  {
@@ -222,19 +213,19 @@ class SetCookie
222
  }
223
 
224
  /**
225
- * Set the unix timestamp for which the cookie will expire.
226
  *
227
- * @param int|string $timestamp Unix timestamp or any English textual datetime description.
228
  */
229
- public function setExpires($timestamp): void
230
  {
231
- $this->data['Expires'] = \is_numeric($timestamp)
232
  ? (int) $timestamp
233
- : \strtotime($timestamp);
234
  }
235
 
236
  /**
237
- * Get whether or not this is a secure cookie.
238
  *
239
  * @return bool|null
240
  */
@@ -244,17 +235,17 @@ class SetCookie
244
  }
245
 
246
  /**
247
- * Set whether or not the cookie is secure.
248
  *
249
  * @param bool $secure Set to true or false if secure
250
  */
251
- public function setSecure($secure): void
252
  {
253
  $this->data['Secure'] = $secure;
254
  }
255
 
256
  /**
257
- * Get whether or not this is a session cookie.
258
  *
259
  * @return bool|null
260
  */
@@ -264,17 +255,17 @@ class SetCookie
264
  }
265
 
266
  /**
267
- * Set whether or not this is a session cookie.
268
  *
269
  * @param bool $discard Set to true or false if this is a session cookie
270
  */
271
- public function setDiscard($discard): void
272
  {
273
  $this->data['Discard'] = $discard;
274
  }
275
 
276
  /**
277
- * Get whether or not this is an HTTP only cookie.
278
  *
279
  * @return bool
280
  */
@@ -284,11 +275,11 @@ class SetCookie
284
  }
285
 
286
  /**
287
- * Set whether or not this is an HTTP only cookie.
288
  *
289
  * @param bool $httpOnly Set to true or false if this is HTTP only
290
  */
291
- public function setHttpOnly($httpOnly): void
292
  {
293
  $this->data['HttpOnly'] = $httpOnly;
294
  }
@@ -307,8 +298,10 @@ class SetCookie
307
  * path is a %x2F ("/") character.
308
  *
309
  * @param string $requestPath Path to check against
 
 
310
  */
311
- public function matchesPath(string $requestPath): bool
312
  {
313
  $cookiePath = $this->getPath();
314
 
@@ -318,71 +311,71 @@ class SetCookie
318
  }
319
 
320
  // Ensure that the cookie-path is a prefix of the request path.
321
- if (0 !== \strpos($requestPath, $cookiePath)) {
322
  return false;
323
  }
324
 
325
  // Match if the last character of the cookie-path is "/"
326
- if (\substr($cookiePath, -1, 1) === '/') {
327
  return true;
328
  }
329
 
330
  // Match if the first character not included in cookie path is "/"
331
- return \substr($requestPath, \strlen($cookiePath), 1) === '/';
332
  }
333
 
334
  /**
335
- * Check if the cookie matches a domain value.
336
  *
337
  * @param string $domain Domain to check against
 
 
338
  */
339
- public function matchesDomain(string $domain): bool
340
  {
341
- $cookieDomain = $this->getDomain();
342
- if (null === $cookieDomain) {
343
- return true;
344
- }
345
-
346
  // Remove the leading '.' as per spec in RFC 6265.
347
- // https://tools.ietf.org/html/rfc6265#section-5.2.3
348
- $cookieDomain = \ltrim($cookieDomain, '.');
349
 
350
  // Domain not set or exact match.
351
- if (!$cookieDomain || !\strcasecmp($domain, $cookieDomain)) {
352
  return true;
353
  }
354
 
355
  // Matching the subdomain according to RFC 6265.
356
- // https://tools.ietf.org/html/rfc6265#section-5.1.3
357
- if (\filter_var($domain, \FILTER_VALIDATE_IP)) {
358
  return false;
359
  }
360
 
361
- return (bool) \preg_match('/\.' . \preg_quote($cookieDomain, '/') . '$/', $domain);
362
  }
363
 
364
  /**
365
- * Check if the cookie is expired.
 
 
366
  */
367
- public function isExpired(): bool
368
  {
369
- return $this->getExpires() !== null && \time() > $this->getExpires();
370
  }
371
 
372
  /**
373
- * Check if the cookie is valid according to RFC 6265.
374
  *
375
  * @return bool|string Returns true if valid or an error message if invalid
376
  */
377
  public function validate()
378
  {
 
379
  $name = $this->getName();
380
- if ($name === '') {
381
  return 'The cookie name must not be empty';
382
  }
383
 
384
  // Check if any of the invalid characters are present in the cookie name
385
- if (\preg_match(
386
  '/[\x00-\x20\x22\x28-\x29\x2c\x2f\x3a-\x40\x5c\x7b\x7d\x7f]/',
387
  $name
388
  )) {
@@ -391,17 +384,17 @@ class SetCookie
391
  . 'following characters: ()<>@,;:\"/?={}';
392
  }
393
 
394
- // Value must not be null. 0 and empty string are valid. Empty strings
395
- // are technically against RFC 6265, but known to happen in the wild.
396
  $value = $this->getValue();
397
- if ($value === null) {
398
  return 'The cookie value must not be empty';
399
  }
400
 
401
- // Domains must not be empty, but can be 0. "0" is not a valid internet
402
- // domain, but may be used as server name in a private network.
 
403
  $domain = $this->getDomain();
404
- if ($domain === null || $domain === '') {
405
  return 'The cookie domain must not be empty';
406
  }
407
 
1
  <?php
 
2
  namespace GuzzleHttp\Cookie;
3
 
4
  /**
6
  */
7
  class SetCookie
8
  {
9
+ /** @var array */
 
 
10
  private static $defaults = [
11
  'Name' => null,
12
  'Value' => null,
19
  'HttpOnly' => false
20
  ];
21
 
22
+ /** @var array Cookie data */
 
 
23
  private $data;
24
 
25
  /**
26
+ * Create a new SetCookie object from a string
27
  *
28
  * @param string $cookie Set-Cookie header string
29
+ *
30
+ * @return self
31
  */
32
+ public static function fromString($cookie)
33
  {
34
  // Create the default return array
35
  $data = self::$defaults;
36
  // Explode the cookie string using a series of semicolons
37
+ $pieces = array_filter(array_map('trim', explode(';', $cookie)));
38
  // The name of the cookie (first kvp) must exist and include an equal sign.
39
+ if (empty($pieces[0]) || !strpos($pieces[0], '=')) {
40
  return new self($data);
41
  }
42
 
43
  // Add the cookie pieces into the parsed data array
44
  foreach ($pieces as $part) {
45
+ $cookieParts = explode('=', $part, 2);
46
+ $key = trim($cookieParts[0]);
47
  $value = isset($cookieParts[1])
48
+ ? trim($cookieParts[1], " \n\r\t\0\x0B")
49
  : true;
50
 
51
  // Only check for non-cookies when cookies have been found
52
+ if (empty($data['Name'])) {
53
  $data['Name'] = $key;
54
  $data['Value'] = $value;
55
  } else {
56
+ foreach (array_keys(self::$defaults) as $search) {
57
+ if (!strcasecmp($search, $key)) {
58
  $data[$search] = $value;
59
  continue 2;
60
  }
71
  */
72
  public function __construct(array $data = [])
73
  {
74
+ $this->data = array_replace(self::$defaults, $data);
 
 
 
 
 
 
75
  // Extract the Expires value and turn it into a UNIX timestamp if needed
76
  if (!$this->getExpires() && $this->getMaxAge()) {
77
  // Calculate the Expires date
78
+ $this->setExpires(time() + $this->getMaxAge());
79
+ } elseif ($this->getExpires() && !is_numeric($this->getExpires())) {
80
+ $this->setExpires($this->getExpires());
81
  }
82
  }
83
 
87
  foreach ($this->data as $k => $v) {
88
  if ($k !== 'Name' && $k !== 'Value' && $v !== null && $v !== false) {
89
  if ($k === 'Expires') {
90
+ $str .= 'Expires=' . gmdate('D, d M Y H:i:s \G\M\T', $v) . '; ';
91
  } else {
92
  $str .= ($v === true ? $k : "{$k}={$v}") . '; ';
93
  }
94
  }
95
  }
96
 
97
+ return rtrim($str, '; ');
98
  }
99
 
100
+ public function toArray()
101
  {
102
  return $this->data;
103
  }
104
 
105
  /**
106
+ * Get the cookie name
107
  *
108
  * @return string
109
  */
113
  }
114
 
115
  /**
116
+ * Set the cookie name
117
  *
118
  * @param string $name Cookie name
119
  */
120
+ public function setName($name)
121
  {
122
  $this->data['Name'] = $name;
123
  }
124
 
125
  /**
126
+ * Get the cookie value
127
  *
128
+ * @return string
129
  */
130
  public function getValue()
131
  {
133
  }
134
 
135
  /**
136
+ * Set the cookie value
137
  *
138
  * @param string $value Cookie value
139
  */
140
+ public function setValue($value)
141
  {
142
  $this->data['Value'] = $value;
143
  }
144
 
145
  /**
146
+ * Get the domain
147
  *
148
  * @return string|null
149
  */
153
  }
154
 
155
  /**
156
+ * Set the domain of the cookie
157
  *
158
  * @param string $domain
159
  */
160
+ public function setDomain($domain)
161
  {
162
  $this->data['Domain'] = $domain;
163
  }
164
 
165
  /**
166
+ * Get the path
167
  *
168
  * @return string
169
  */
173
  }
174
 
175
  /**
176
+ * Set the path of the cookie
177
  *
178
  * @param string $path Path of the cookie
179
  */
180
+ public function setPath($path)
181
  {
182
  $this->data['Path'] = $path;
183
  }
184
 
185
  /**
186
+ * Maximum lifetime of the cookie in seconds
187
  *
188
  * @return int|null
189
  */
193
  }
194
 
195
  /**
196
+ * Set the max-age of the cookie
197
  *
198
  * @param int $maxAge Max age of the cookie in seconds
199
  */
200
+ public function setMaxAge($maxAge)
201
  {
202
  $this->data['Max-Age'] = $maxAge;
203
  }
204
 
205
  /**
206
+ * The UNIX timestamp when the cookie Expires
207
  *
208
+ * @return mixed
209
  */
210
  public function getExpires()
211
  {
213
  }
214
 
215
  /**
216
+ * Set the unix timestamp for which the cookie will expire
217
  *
218
+ * @param int $timestamp Unix timestamp
219
  */
220
+ public function setExpires($timestamp)
221
  {
222
+ $this->data['Expires'] = is_numeric($timestamp)
223
  ? (int) $timestamp
224
+ : strtotime($timestamp);
225
  }
226
 
227
  /**
228
+ * Get whether or not this is a secure cookie
229
  *
230
  * @return bool|null
231
  */
235
  }
236
 
237
  /**
238
+ * Set whether or not the cookie is secure
239
  *
240
  * @param bool $secure Set to true or false if secure
241
  */
242
+ public function setSecure($secure)
243
  {
244
  $this->data['Secure'] = $secure;
245
  }
246
 
247
  /**
248
+ * Get whether or not this is a session cookie
249
  *
250
  * @return bool|null
251
  */
255
  }
256
 
257
  /**
258
+ * Set whether or not this is a session cookie
259
  *
260
  * @param bool $discard Set to true or false if this is a session cookie
261
  */
262
+ public function setDiscard($discard)
263
  {
264
  $this->data['Discard'] = $discard;
265
  }
266
 
267
  /**
268
+ * Get whether or not this is an HTTP only cookie
269
  *
270
  * @return bool
271
  */
275
  }
276
 
277
  /**
278
+ * Set whether or not this is an HTTP only cookie
279
  *
280
  * @param bool $httpOnly Set to true or false if this is HTTP only
281
  */
282
+ public function setHttpOnly($httpOnly)
283
  {
284
  $this->data['HttpOnly'] = $httpOnly;
285
  }
298
  * path is a %x2F ("/") character.
299
  *
300
  * @param string $requestPath Path to check against
301
+ *
302
+ * @return bool
303
  */
304
+ public function matchesPath($requestPath)
305
  {
306
  $cookiePath = $this->getPath();
307
 
311
  }
312
 
313
  // Ensure that the cookie-path is a prefix of the request path.
314
+ if (0 !== strpos($requestPath, $cookiePath)) {
315
  return false;
316
  }
317
 
318
  // Match if the last character of the cookie-path is "/"
319
+ if (substr($cookiePath, -1, 1) === '/') {
320
  return true;
321
  }
322
 
323
  // Match if the first character not included in cookie path is "/"
324
+ return substr($requestPath, strlen($cookiePath), 1) === '/';
325
  }
326
 
327
  /**
328
+ * Check if the cookie matches a domain value
329
  *
330
  * @param string $domain Domain to check against
331
+ *
332
+ * @return bool
333
  */
334
+ public function matchesDomain($domain)
335
  {
 
 
 
 
 
336
  // Remove the leading '.' as per spec in RFC 6265.
337
+ // http://tools.ietf.org/html/rfc6265#section-5.2.3
338
+ $cookieDomain = ltrim($this->getDomain(), '.');
339
 
340
  // Domain not set or exact match.
341
+ if (!$cookieDomain || !strcasecmp($domain, $cookieDomain)) {
342
  return true;
343
  }
344
 
345
  // Matching the subdomain according to RFC 6265.
346
+ // http://tools.ietf.org/html/rfc6265#section-5.1.3
347
+ if (filter_var($domain, FILTER_VALIDATE_IP)) {
348
  return false;
349
  }
350
 
351
+ return (bool) preg_match('/\.' . preg_quote($cookieDomain, '/') . '$/', $domain);
352
  }
353
 
354
  /**
355
+ * Check if the cookie is expired
356
+ *
357
+ * @return bool
358
  */
359
+ public function isExpired()
360
  {
361
+ return $this->getExpires() !== null && time() > $this->getExpires();
362
  }
363
 
364
  /**
365
+ * Check if the cookie is valid according to RFC 6265
366
  *
367
  * @return bool|string Returns true if valid or an error message if invalid
368
  */
369
  public function validate()
370
  {
371
+ // Names must not be empty, but can be 0
372
  $name = $this->getName();
373
+ if (empty($name) && !is_numeric($name)) {
374
  return 'The cookie name must not be empty';
375
  }
376
 
377
  // Check if any of the invalid characters are present in the cookie name
378
+ if (preg_match(
379
  '/[\x00-\x20\x22\x28-\x29\x2c\x2f\x3a-\x40\x5c\x7b\x7d\x7f]/',
380
  $name
381
  )) {
384
  . 'following characters: ()<>@,;:\"/?={}';
385
  }
386
 
387
+ // Value must not be empty, but can be 0
 
388
  $value = $this->getValue();
389
+ if (empty($value) && !is_numeric($value)) {
390
  return 'The cookie value must not be empty';
391
  }
392
 
393
+ // Domains must not be empty, but can be 0
394
+ // A "0" is not a valid internet domain, but may be used as server name
395
+ // in a private network.
396
  $domain = $this->getDomain();
397
+ if (empty($domain) && !is_numeric($domain)) {
398
  return 'The cookie domain must not be empty';
399
  }
400
 
vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  namespace GuzzleHttp\Exception;
4
 
5
  use Psr\Http\Message\RequestInterface;
@@ -11,29 +10,18 @@ use Psr\Http\Message\ResponseInterface;
11
  class BadResponseException extends RequestException
12
  {
13
  public function __construct(
14
- string $message,
15
  RequestInterface $request,
16
- ResponseInterface $response,
17
- \Throwable $previous = null,
18
  array $handlerContext = []
19
  ) {
 
 
 
 
 
 
20
  parent::__construct($message, $request, $response, $previous, $handlerContext);
21
  }
22
-
23
- /**
24
- * Current exception and the ones that extend it will always have a response.
25
- */
26
- public function hasResponse(): bool
27
- {
28
- return true;
29
- }
30
-
31
- /**
32
- * This function narrows the return type from the parent class and does not allow it to be nullable.
33
- */
34
- public function getResponse(): ResponseInterface
35
- {
36
- /** @var ResponseInterface */
37
- return parent::getResponse();
38
- }
39
  }
1
  <?php
 
2
  namespace GuzzleHttp\Exception;
3
 
4
  use Psr\Http\Message\RequestInterface;
10
  class BadResponseException extends RequestException
11
  {
12
  public function __construct(
13
+ $message,
14
  RequestInterface $request,
15
+ ResponseInterface $response = null,
16
+ \Exception $previous = null,
17
  array $handlerContext = []
18
  ) {
19
+ if (null === $response) {
20
+ @trigger_error(
21
+ 'Instantiating the ' . __CLASS__ . ' class without a Response is deprecated since version 6.3 and will be removed in 7.0.',
22
+ E_USER_DEPRECATED
23
+ );
24
+ }
25
  parent::__construct($message, $request, $response, $previous, $handlerContext);
26
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  }
vendor/guzzlehttp/guzzle/src/Exception/ClientException.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  namespace GuzzleHttp\Exception;
4
 
5
  /**
1
  <?php
 
2
  namespace GuzzleHttp\Exception;
3
 
4
  /**
vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php CHANGED
@@ -1,8 +1,6 @@
1
  <?php
2
-
3
  namespace GuzzleHttp\Exception;
4
 
5
- use Psr\Http\Client\NetworkExceptionInterface;
6
  use Psr\Http\Message\RequestInterface;
7
 
8
  /**
@@ -10,47 +8,30 @@ use Psr\Http\Message\RequestInterface;
10
  *
11
  * Note that no response is present for a ConnectException
12
  */
13
- class ConnectException extends TransferException implements NetworkExceptionInterface
14
  {
15
- /**
16
- * @var RequestInterface
17
- */
18
- private $request;
19
-
20
- /**
21
- * @var array
22
- */
23
- private $handlerContext;
24
-
25
  public function __construct(
26
- string $message,
27
  RequestInterface $request,
28
- \Throwable $previous = null,
29
  array $handlerContext = []
30
  ) {
31
- parent::__construct($message, 0, $previous);
32
- $this->request = $request;
33
- $this->handlerContext = $handlerContext;
34
  }
35
 
36
  /**
37
- * Get the request that caused the exception
38
  */
39
- public function getRequest(): RequestInterface
40
  {
41
- return $this->request;
42
  }
43
 
44
  /**
45
- * Get contextual information about the error from the underlying handler.
46
- *
47
- * The contents of this array will vary depending on which handler you are
48
- * using. It may also be just an empty array. Relying on this data will
49
- * couple you to a specific handler, but can give more debug information
50
- * when needed.
51
  */
52
- public function getHandlerContext(): array
53
  {
54
- return $this->handlerContext;
55
  }
56
  }
1
  <?php
 
2
  namespace GuzzleHttp\Exception;
3
 
 
4
  use Psr\Http\Message\RequestInterface;
5
 
6
  /**
8
  *
9
  * Note that no response is present for a ConnectException
10
  */
11
+ class ConnectException extends RequestException
12
  {
 
 
 
 
 
 
 
 
 
 
13
  public function __construct(
14
+ $message,
15
  RequestInterface $request,
16
+ \Exception $previous = null,
17
  array $handlerContext = []
18
  ) {
19
+ parent::__construct($message, $request, null, $previous, $handlerContext);
 
 
20
  }
21
 
22
  /**
23
+ * @return null
24
  */
25
+ public function getResponse()
26
  {
27
+ return null;
28
  }
29
 
30
  /**
31
+ * @return bool
 
 
 
 
 
32
  */
33
+ public function hasResponse()
34
  {
35
+ return false;
36
  }
37
  }
vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php CHANGED
@@ -1,9 +1,23 @@
1
  <?php
2
-
3
  namespace GuzzleHttp\Exception;
4
 
5
- use Psr\Http\Client\ClientExceptionInterface;
6
 
7
- interface GuzzleException extends ClientExceptionInterface
8
- {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  }
1
  <?php
 
2
  namespace GuzzleHttp\Exception;
3
 
4
+ use Throwable;
5
 
6
+ if (interface_exists(Throwable::class)) {
7
+ interface GuzzleException extends Throwable
8
+ {
9
+ }
10
+ } else {
11
+ /**
12
+ * @method string getMessage()
13
+ * @method \Throwable|null getPrevious()
14
+ * @method mixed getCode()
15
+ * @method string getFile()
16
+ * @method int getLine()
17
+ * @method array getTrace()
18
+ * @method string getTraceAsString()
19
+ */
20
+ interface GuzzleException
21
+ {
22
+ }
23
  }
vendor/guzzlehttp/guzzle/src/Exception/RequestException.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
-
3
  namespace GuzzleHttp\Exception;
4
 
5
- use Psr\Http\Client\RequestExceptionInterface;
6
  use Psr\Http\Message\RequestInterface;
7
  use Psr\Http\Message\ResponseInterface;
8
  use Psr\Http\Message\UriInterface;
@@ -10,32 +9,28 @@ use Psr\Http\Message\UriInterface;
10
  /**
11
  * HTTP Request exception
12
  */
13
- class RequestException extends TransferException implements RequestExceptionInterface
14
  {
15
- /**
16
- * @var RequestInterface
17
- */
18
  private $request;
19
 
20
- /**
21
- * @var ResponseInterface|null
22
- */
23
  private $response;
24
 
25
- /**
26
- * @var array
27
- */
28
  private $handlerContext;
29
 
30
  public function __construct(
31
- string $message,
32
  RequestInterface $request,
33
  ResponseInterface $response = null,
34
- \Throwable $previous = null,
35
  array $handlerContext = []
36
  ) {
37
  // Set the code of the exception if the response is set and not future.
38
- $code = $response ? $response->getStatusCode() : 0;
 
 
39
  parent::__construct($message, $code, $previous);
40
  $this->request = $request;
41
  $this->response = $response;
@@ -44,8 +39,13 @@ class RequestException extends TransferException implements RequestExceptionInte
44
 
45
  /**
46
  * Wrap non-RequestExceptions with a RequestException
 
 
 
 
 
47
  */
48
- public static function wrapException(RequestInterface $request, \Throwable $e): RequestException
49
  {
50
  return $e instanceof RequestException
51
  ? $e
@@ -57,15 +57,17 @@ class RequestException extends TransferException implements RequestExceptionInte
57
  *
58
  * @param RequestInterface $request Request
59
  * @param ResponseInterface $response Response received
60
- * @param \Throwable $previous Previous exception
61
  * @param array $ctx Optional handler context.
 
 
62
  */
63
  public static function create(
64
  RequestInterface $request,
65
  ResponseInterface $response = null,
66
- \Throwable $previous = null,
67
  array $ctx = []
68
- ): self {
69
  if (!$response) {
70
  return new self(
71
  'Error completing request',
@@ -76,7 +78,7 @@ class RequestException extends TransferException implements RequestExceptionInte
76
  );
77
  }
78
 
79
- $level = (int) \floor($response->getStatusCode() / 100);
80
  if ($level === 4) {
81
  $label = 'Client error';
82
  $className = ClientException::class;
@@ -93,7 +95,7 @@ class RequestException extends TransferException implements RequestExceptionInte
93
 
94
  // Client Error: `GET /` resulted in a `404 Not Found` response:
95
  // <html> ... (truncated)
96
- $message = \sprintf(
97
  '%s: `%s %s` resulted in a `%s %s` response',
98
  $label,
99
  $request->getMethod(),
@@ -102,7 +104,7 @@ class RequestException extends TransferException implements RequestExceptionInte
102
  $response->getReasonPhrase()
103
  );
104
 
105
- $summary = \GuzzleHttp\Psr7\get_message_body_summary($response);
106
 
107
  if ($summary !== null) {
108
  $message .= ":\n{$summary}\n";
@@ -111,15 +113,33 @@ class RequestException extends TransferException implements RequestExceptionInte
111
  return new $className($message, $request, $response, $previous, $ctx);
112
  }
113
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  /**
115
  * Obfuscates URI if there is a username and a password present
 
 
 
 
116
  */
117
- private static function obfuscateUri(UriInterface $uri): UriInterface
118
  {
119
  $userInfo = $uri->getUserInfo();
120
 
121
- if (false !== ($pos = \strpos($userInfo, ':'))) {
122
- return $uri->withUserInfo(\substr($userInfo, 0, $pos), '***');
123
  }
124
 
125
  return $uri;
@@ -127,24 +147,30 @@ class RequestException extends TransferException implements RequestExceptionInte
127
 
128
  /**
129
  * Get the request that caused the exception
 
 
130
  */
131
- public function getRequest(): RequestInterface
132
  {
133
  return $this->request;
134
  }
135
 
136
  /**
137
  * Get the associated response
 
 
138
  */
139
- public function getResponse(): ?ResponseInterface
140
  {
141
  return $this->response;
142
  }
143
 
144
  /**
145
  * Check if a response was received
 
 
146
  */
147
- public function hasResponse(): bool
148
  {
149
  return $this->response !== null;
150
  }
@@ -156,8 +182,10 @@ class RequestException extends TransferException implements RequestExceptionInte
156
  * using. It may also be just an empty array. Relying on this data will
157
  * couple you to a specific handler, but can give more debug information
158
  * when needed.
 
 
159
  */
160
- public function getHandlerContext(): array
161
  {
162
  return $this->handlerContext;
163
  }
1
  <?php
 
2
  namespace GuzzleHttp\Exception;
3
 
4
+ use GuzzleHttp\Promise\PromiseInterface;
5
  use Psr\Http\Message\RequestInterface;
6
  use Psr\Http\Message\ResponseInterface;
7
  use Psr\Http\Message\UriInterface;
9
  /**
10
  * HTTP Request exception
11
  */
12
+ class RequestException extends TransferException
13
  {
14
+ /** @var RequestInterface */
 
 
15
  private $request;
16
 
17
+ /** @var ResponseInterface|null */
 
 
18
  private $response;
19
 
20
+ /** @var array */
 
 
21
  private $handlerContext;
22
 
23
  public function __construct(
24
+ $message,
25
  RequestInterface $request,
26
  ResponseInterface $response = null,
27
+ \Exception $previous = null,
28
  array $handlerContext = []
29
  ) {
30
  // Set the code of the exception if the response is set and not future.
31
+ $code = $response && !($response instanceof PromiseInterface)
32
+ ? $response->getStatusCode()
33
+ : 0;
34
  parent::__construct($message, $code, $previous);
35
  $this->request = $request;
36
  $this->response = $response;
39
 
40
  /**
41
  * Wrap non-RequestExceptions with a RequestException
42
+ *
43
+ * @param RequestInterface $request
44
+ * @param \Exception $e
45
+ *
46
+ * @return RequestException
47
  */
48
+ public static function wrapException(RequestInterface $request, \Exception $e)
49
  {
50
  return $e instanceof RequestException
51
  ? $e
57
  *
58
  * @param RequestInterface $request Request
59
  * @param ResponseInterface $response Response received
60
+ * @param \Exception $previous Previous exception
61
  * @param array $ctx Optional handler context.
62
+ *
63
+ * @return self
64
  */
65
  public static function create(
66
  RequestInterface $request,
67
  ResponseInterface $response = null,
68
+ \Exception $previous = null,
69
  array $ctx = []
70
+ ) {
71
  if (!$response) {
72
  return new self(
73
  'Error completing request',
78
  );
79
  }
80
 
81
+ $level = (int) floor($response->getStatusCode() / 100);
82
  if ($level === 4) {
83
  $label = 'Client error';
84
  $className = ClientException::class;
95
 
96
  // Client Error: `GET /` resulted in a `404 Not Found` response:
97
  // <html> ... (truncated)
98
+ $message = sprintf(
99
  '%s: `%s %s` resulted in a `%s %s` response',
100
  $label,
101
  $request->getMethod(),
104
  $response->getReasonPhrase()
105
  );
106
 
107
+ $summary = static::getResponseBodySummary($response);
108
 
109
  if ($summary !== null) {
110
  $message .= ":\n{$summary}\n";
113
  return new $className($message, $request, $response, $previous, $ctx);
114
  }
115
 
116
+ /**
117
+ * Get a short summary of the response
118
+ *
119
+ * Will return `null` if the response is not printable.
120
+ *
121
+ * @param ResponseInterface $response
122
+ *
123
+ * @return string|null
124
+ */
125
+ public static function getResponseBodySummary(ResponseInterface $response)
126
+ {
127
+ return \GuzzleHttp\Psr7\get_message_body_summary($response);
128
+ }
129
+
130
  /**
131
  * Obfuscates URI if there is a username and a password present
132
+ *
133
+ * @param UriInterface $uri
134
+ *
135
+ * @return UriInterface
136
  */
137
+ private static function obfuscateUri(UriInterface $uri)
138
  {
139
  $userInfo = $uri->getUserInfo();
140
 
141
+ if (false !== ($pos = strpos($userInfo, ':'))) {
142
+ return $uri->withUserInfo(substr($userInfo, 0, $pos), '***');
143
  }
144
 
145
  return $uri;
147
 
148
  /**
149
  * Get the request that caused the exception
150
+ *
151
+ * @return RequestInterface
152
  */
153
+ public function getRequest()
154
  {
155
  return $this->request;
156
  }
157
 
158
  /**
159
  * Get the associated response
160
+ *
161
+ * @return ResponseInterface|null
162
  */
163
+ public function getResponse()
164
  {
165
  return $this->response;
166
  }
167
 
168
  /**
169
  * Check if a response was received
170
+ *
171
+ * @return bool
172
  */
173
+ public function hasResponse()
174
  {
175
  return $this->response !== null;
176
  }
182
  * using. It may also be just an empty array. Relying on this data will
183
  * couple you to a specific handler, but can give more debug information
184
  * when needed.
185
+ *
186
+ * @return array
187
  */
188
+ public function getHandlerContext()
189
  {
190
  return $this->handlerContext;
191
  }
vendor/guzzlehttp/guzzle/src/Exception/SeekException.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp\Exception;
3
+
4
+ use Psr\Http\Message\StreamInterface;
5
+
6
+ /**
7
+ * Exception thrown when a seek fails on a stream.
8
+ */
9
+ class SeekException extends \RuntimeException implements GuzzleException
10
+ {
11
+ private $stream;
12
+
13
+ public function __construct(StreamInterface $stream, $pos = 0, $msg = '')
14
+ {
15
+ $this->stream = $stream;
16
+ $msg = $msg ?: 'Could not seek the stream to position ' . $pos;
17
+ parent::__construct($msg);
18
+ }
19
+
20
+ /**
21
+ * @return StreamInterface
22
+ */
23
+ public function getStream()
24
+ {
25
+ return $this->stream;
26
+ }
27
+ }
vendor/guzzlehttp/guzzle/src/Exception/ServerException.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  namespace GuzzleHttp\Exception;
4
 
5
  /**
1
  <?php
 
2
  namespace GuzzleHttp\Exception;
3
 
4
  /**
vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  namespace GuzzleHttp\Exception;
4
 
5
  class TooManyRedirectsException extends RequestException
1
  <?php
 
2
  namespace GuzzleHttp\Exception;
3
 
4
  class TooManyRedirectsException extends RequestException
vendor/guzzlehttp/guzzle/src/Exception/TransferException.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  namespace GuzzleHttp\Exception;
4
 
5
  class TransferException extends \RuntimeException implements GuzzleException
1
  <?php
 
2
  namespace GuzzleHttp\Exception;
3
 
4
  class TransferException extends \RuntimeException implements GuzzleException
vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php CHANGED
@@ -1,50 +1,37 @@
1
  <?php
2
-
3
  namespace GuzzleHttp\Handler;
4
 
5
  use GuzzleHttp\Exception\ConnectException;
6
  use GuzzleHttp\Exception\RequestException;
7
  use GuzzleHttp\Promise\FulfilledPromise;
8
- use GuzzleHttp\Promise\PromiseInterface;
9
  use GuzzleHttp\Psr7;
10
  use GuzzleHttp\Psr7\LazyOpenStream;
11
  use GuzzleHttp\TransferStats;
12
- use GuzzleHttp\Utils;
13
  use Psr\Http\Message\RequestInterface;
14
 
15
  /**
16
  * Creates curl resources from a request
17
- *
18
- * @final
19
  */
20
  class CurlFactory implements CurlFactoryInterface
21
  {
22
- public const CURL_VERSION_STR = 'curl_version';
 
23
 
24
- /**
25
- * @deprecated
26
- */
27
- public const LOW_CURL_VERSION_NUMBER = '7.21.2';
28
-
29
- /**
30
- * @var resource[]
31
- */
32
  private $handles = [];
33
 
34
- /**
35
- * @var int Total number of idle handles to keep in cache
36
- */
37
  private $maxHandles;
38
 
39
  /**
40
  * @param int $maxHandles Maximum number of idle handles.
41
  */
42
- public function __construct(int $maxHandles)
43
  {
44
  $this->maxHandles = $maxHandles;
45
  }
46
 
47
- public function create(RequestInterface $request, array $options): EasyHandle
48
  {
49
  if (isset($options['curl']['body_as_string'])) {
50
  $options['_body_as_string'] = $options['curl']['body_as_string'];
@@ -62,35 +49,35 @@ class CurlFactory implements CurlFactoryInterface
62
 
63
  // Add handler options from the request configuration options
64
  if (isset($options['curl'])) {
65
- $conf = \array_replace($conf, $options['curl']);
66
  }
67
 
68
- $conf[\CURLOPT_HEADERFUNCTION] = $this->createHeaderFn($easy);
69
  $easy->handle = $this->handles
70
- ? \array_pop($this->handles)
71
- : \curl_init();
72
  curl_setopt_array($easy->handle, $conf);
73
 
74
  return $easy;
75
  }
76
 
77
- public function release(EasyHandle $easy): void
78
  {
79
  $resource = $easy->handle;
80
  unset($easy->handle);
81
 
82
- if (\count($this->handles) >= $this->maxHandles) {
83
- \curl_close($resource);
84
  } else {
85
  // Remove all callback functions as they can hold onto references
86
  // and are not cleaned up by curl_reset. Using curl_setopt_array
87
  // does not work for some reason, so removing each one
88
  // individually.
89
- \curl_setopt($resource, \CURLOPT_HEADERFUNCTION, null);
90
- \curl_setopt($resource, \CURLOPT_READFUNCTION, null);
91
- \curl_setopt($resource, \CURLOPT_WRITEFUNCTION, null);
92
- \curl_setopt($resource, \CURLOPT_PROGRESSFUNCTION, null);
93
- \curl_reset($resource);
94
  $this->handles[] = $resource;
95
  }
96
  }
@@ -99,14 +86,17 @@ class CurlFactory implements CurlFactoryInterface
99
  * Completes a cURL transaction, either returning a response promise or a
100
  * rejected promise.
101
  *
102
- * @param callable(RequestInterface, array): PromiseInterface $handler
103
- * @param CurlFactoryInterface $factory Dictates how the handle is released
 
 
 
104
  */
105
  public static function finish(
106
  callable $handler,
107
  EasyHandle $easy,
108
  CurlFactoryInterface $factory
109
- ): PromiseInterface {
110
  if (isset($easy->options['on_stats'])) {
111
  self::invokeStats($easy);
112
  }
@@ -127,10 +117,10 @@ class CurlFactory implements CurlFactoryInterface
127
  return new FulfilledPromise($easy->response);
128
  }
129
 
130
- private static function invokeStats(EasyHandle $easy): void
131
  {
132
- $curlStats = \curl_getinfo($easy->handle);
133
- $curlStats['appconnect_time'] = \curl_getinfo($easy->handle, \CURLINFO_APPCONNECT_TIME);
134
  $stats = new TransferStats(
135
  $easy->request,
136
  $easy->response,
@@ -138,24 +128,21 @@ class CurlFactory implements CurlFactoryInterface
138
  $easy->errno,
139
  $curlStats
140
  );
141
- ($easy->options['on_stats'])($stats);
142
  }
143
 
144
- /**
145
- * @param callable(RequestInterface, array): PromiseInterface $handler
146
- */
147
  private static function finishError(
148
  callable $handler,
149
  EasyHandle $easy,
150
  CurlFactoryInterface $factory
151
- ): PromiseInterface {
152
  // Get error information and release the handle to the factory.
153
  $ctx = [
154
  'errno' => $easy->errno,
155
- 'error' => \curl_error($easy->handle),
156
- 'appconnect_time' => \curl_getinfo($easy->handle, \CURLINFO_APPCONNECT_TIME),
157
- ] + \curl_getinfo($easy->handle);
158
- $ctx[self::CURL_VERSION_STR] = \curl_version()['version'];
159
  $factory->release($easy);
160
 
161
  // Retry when nothing is present or when curl failed to rewind.
@@ -168,14 +155,14 @@ class CurlFactory implements CurlFactoryInterface
168
  return self::createRejection($easy, $ctx);
169
  }
170
 
171
- private static function createRejection(EasyHandle $easy, array $ctx): PromiseInterface
172
  {
173
  static $connectionErrors = [
174
- \CURLE_OPERATION_TIMEOUTED => true,
175
- \CURLE_COULDNT_RESOLVE_HOST => true,
176
- \CURLE_COULDNT_CONNECT => true,
177
- \CURLE_SSL_CONNECT_ERROR => true,
178
- \CURLE_GOT_NOTHING => true,
179
  ];
180
 
181
  // If an exception was encountered during the onHeaders event, then
@@ -191,16 +178,21 @@ class CurlFactory implements CurlFactoryInterface
191
  )
192
  );
193
  }
194
-
195
- $message = \sprintf(
196
- 'cURL error %s: %s (%s)',
197
- $ctx['errno'],
198
- $ctx['error'],
199
- 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html'
200
- );
201
- $uriString = (string) $easy->request->getUri();
202
- if ($uriString !== '' && false === \strpos($ctx['error'], $uriString)) {
203
- $message .= \sprintf(' for %s', $uriString);
 
 
 
 
 
204
  }
205
 
206
  // Create a connection exception if it was a specific error code.
@@ -211,37 +203,34 @@ class CurlFactory implements CurlFactoryInterface
211
  return \GuzzleHttp\Promise\rejection_for($error);
212
  }
213
 
214
- /**
215
- * @return array<int|string, mixed>
216
- */
217
- private function getDefaultConf(EasyHandle $easy): array
218
  {
219
  $conf = [
220
- '_headers' => $easy->request->getHeaders(),
221
- \CURLOPT_CUSTOMREQUEST => $easy->request->getMethod(),
222
- \CURLOPT_URL => (string) $easy->request->getUri()->withFragment(''),
223
- \CURLOPT_RETURNTRANSFER => false,
224
- \CURLOPT_HEADER => false,
225
- \CURLOPT_CONNECTTIMEOUT => 150,
226
  ];
227
 
228
- if (\defined('CURLOPT_PROTOCOLS')) {
229
- $conf[\CURLOPT_PROTOCOLS] = \CURLPROTO_HTTP | \CURLPROTO_HTTPS;
230
  }
231
 
232
  $version = $easy->request->getProtocolVersion();
233
  if ($version == 1.1) {
234
- $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_1;
235
  } elseif ($version == 2.0) {
236
- $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_2_0;
237
  } else {
238
- $conf[\CURLOPT_HTTP_VERSION] = \CURL_HTTP_VERSION_1_0;
239
  }
240
 
241
  return $conf;
242
  }
243
 
244
- private function applyMethod(EasyHandle $easy, array &$conf): void
245
  {
246
  $body = $easy->request->getBody();
247
  $size = $body->getSize();
@@ -253,22 +242,22 @@ class CurlFactory implements CurlFactoryInterface
253
 
254
  $method = $easy->request->getMethod();
255
  if ($method === 'PUT' || $method === 'POST') {
256
- // See https://tools.ietf.org/html/rfc7230#section-3.3.2
257
  if (!$easy->request->hasHeader('Content-Length')) {
258
- $conf[\CURLOPT_HTTPHEADER][] = 'Content-Length: 0';
259
  }
260
  } elseif ($method === 'HEAD') {
261
- $conf[\CURLOPT_NOBODY] = true;
262
  unset(
263
- $conf[\CURLOPT_WRITEFUNCTION],
264
- $conf[\CURLOPT_READFUNCTION],
265
- $conf[\CURLOPT_FILE],
266
- $conf[\CURLOPT_INFILE]
267
  );
268
  }
269
  }
270
 
271
- private function applyBody(RequestInterface $request, array $options, array &$conf): void
272
  {
273
  $size = $request->hasHeader('Content-Length')
274
  ? (int) $request->getHeaderLine('Content-Length')
@@ -279,37 +268,37 @@ class CurlFactory implements CurlFactoryInterface
279
  if (($size !== null && $size < 1000000) ||
280
  !empty($options['_body_as_string'])
281
  ) {
282
- $conf[\CURLOPT_POSTFIELDS] = (string) $request->getBody();
283
  // Don't duplicate the Content-Length header
284
  $this->removeHeader('Content-Length', $conf);
285
  $this->removeHeader('Transfer-Encoding', $conf);
286
  } else {
287
- $conf[\CURLOPT_UPLOAD] = true;
288
  if ($size !== null) {
289
- $conf[\CURLOPT_INFILESIZE] = $size;
290
  $this->removeHeader('Content-Length', $conf);
291
  }
292
  $body = $request->getBody();
293
  if ($body->isSeekable()) {
294
  $body->rewind();
295
  }
296
- $conf[\CURLOPT_READFUNCTION] = static function ($ch, $fd, $length) use ($body) {
297
  return $body->read($length);
298
  };
299
  }
300
 
301
  // If the Expect header is not present, prevent curl from adding it
302
  if (!$request->hasHeader('Expect')) {
303
- $conf[\CURLOPT_HTTPHEADER][] = 'Expect:';
304
  }
305
 
306
  // cURL sometimes adds a content-type by default. Prevent this.
307
  if (!$request->hasHeader('Content-Type')) {
308
- $conf[\CURLOPT_HTTPHEADER][] = 'Content-Type:';
309
  }
310
  }
311
 
312
- private function applyHeaders(EasyHandle $easy, array &$conf): void
313
  {
314
  foreach ($conf['_headers'] as $name => $values) {
315
  foreach ($values as $value) {
@@ -317,16 +306,16 @@ class CurlFactory implements CurlFactoryInterface
317
  if ($value === '') {
318
  // cURL requires a special format for empty headers.
319
  // See https://github.com/guzzle/guzzle/issues/1882 for more details.
320
- $conf[\CURLOPT_HTTPHEADER][] = "$name;";
321
  } else {
322
- $conf[\CURLOPT_HTTPHEADER][] = "$name: $value";
323
  }
324
  }
325
  }
326
 
327
  // Remove the Accept header if one was not set
328
  if (!$easy->request->hasHeader('Accept')) {
329
- $conf[\CURLOPT_HTTPHEADER][] = 'Accept:';
330
  }
331
  }
332
 
@@ -336,47 +325,41 @@ class CurlFactory implements CurlFactoryInterface
336
  * @param string $name Case-insensitive header to remove
337
  * @param array $options Array of options to modify
338
  */
339
- private function removeHeader(string $name, array &$options): void
340
  {
341
- foreach (\array_keys($options['_headers']) as $key) {
342
- if (!\strcasecmp($key, $name)) {
343
  unset($options['_headers'][$key]);
344
  return;
345
  }
346
  }
347
  }
348
 
349
- private function applyHandlerOptions(EasyHandle $easy, array &$conf): void
350
  {
351
  $options = $easy->options;
352
  if (isset($options['verify'])) {
353
  if ($options['verify'] === false) {
354
- unset($conf[\CURLOPT_CAINFO]);
355
- $conf[\CURLOPT_SSL_VERIFYHOST] = 0;
356
- $conf[\CURLOPT_SSL_VERIFYPEER] = false;
357
  } else {
358
- $conf[\CURLOPT_SSL_VERIFYHOST] = 2;
359
- $conf[\CURLOPT_SSL_VERIFYPEER] = true;
360
- if (\is_string($options['verify'])) {
361
  // Throw an error if the file/folder/link path is not valid or doesn't exist.
362
- if (!\file_exists($options['verify'])) {
363
  throw new \InvalidArgumentException(
364
  "SSL CA bundle not found: {$options['verify']}"
365
  );
366
  }
367
  // If it's a directory or a link to a directory use CURLOPT_CAPATH.
368
  // If not, it's probably a file, or a link to a file, so use CURLOPT_CAINFO.
369
- if (
370
- \is_dir($options['verify']) ||
371
- (
372
- \is_link($options['verify']) === true &&
373
- ($verifyLink = \readlink($options['verify'])) !== false &&
374
- \is_dir($verifyLink)
375
- )
376
- ) {
377
- $conf[\CURLOPT_CAPATH] = $options['verify'];
378
  } else {
379
- $conf[\CURLOPT_CAINFO] = $options['verify'];
380
  }
381
  }
382
  }
@@ -385,72 +368,72 @@ class CurlFactory implements CurlFactoryInterface
385
  if (!empty($options['decode_content'])) {
386
  $accept = $easy->request->getHeaderLine('Accept-Encoding');
387
  if ($accept) {
388
- $conf[\CURLOPT_ENCODING] = $accept;
389
  } else {
390
- $conf[\CURLOPT_ENCODING] = '';
391
  // Don't let curl send the header over the wire
392
- $conf[\CURLOPT_HTTPHEADER][] = 'Accept-Encoding:';
393
  }
394
  }
395
 
396
  if (isset($options['sink'])) {
397
  $sink = $options['sink'];
398
- if (!\is_string($sink)) {
399
  $sink = \GuzzleHttp\Psr7\stream_for($sink);
400
- } elseif (!\is_dir(\dirname($sink))) {
401
  // Ensure that the directory exists before failing in curl.
402
- throw new \RuntimeException(\sprintf(
403
  'Directory %s does not exist for sink value of %s',
404
- \dirname($sink),
405
  $sink
406
  ));
407
  } else {
408
  $sink = new LazyOpenStream($sink, 'w+');
409
  }
410
  $easy->sink = $sink;
411
- $conf[\CURLOPT_WRITEFUNCTION] = static function ($ch, $write) use ($sink): int {
412
  return $sink->write($write);
413
  };
414
  } else {
415
  // Use a default temp stream if no sink was set.
416
- $conf[\CURLOPT_FILE] = \fopen('php://temp', 'w+');
417
- $easy->sink = Psr7\stream_for($conf[\CURLOPT_FILE]);
418
  }
419
  $timeoutRequiresNoSignal = false;
420
  if (isset($options['timeout'])) {
421
  $timeoutRequiresNoSignal |= $options['timeout'] < 1;
422
- $conf[\CURLOPT_TIMEOUT_MS] = $options['timeout'] * 1000;
423
  }
424
 
425
  // CURL default value is CURL_IPRESOLVE_WHATEVER
426
  if (isset($options['force_ip_resolve'])) {
427
  if ('v4' === $options['force_ip_resolve']) {
428
- $conf[\CURLOPT_IPRESOLVE] = \CURL_IPRESOLVE_V4;
429
  } elseif ('v6' === $options['force_ip_resolve']) {
430
- $conf[\CURLOPT_IPRESOLVE] = \CURL_IPRESOLVE_V6;
431
  }
432
  }
433
 
434
  if (isset($options['connect_timeout'])) {
435
  $timeoutRequiresNoSignal |= $options['connect_timeout'] < 1;
436
- $conf[\CURLOPT_CONNECTTIMEOUT_MS] = $options['connect_timeout'] * 1000;
437
  }
438
 
439
- if ($timeoutRequiresNoSignal && \strtoupper(\substr(\PHP_OS, 0, 3)) !== 'WIN') {
440
- $conf[\CURLOPT_NOSIGNAL] = true;
441
  }
442
 
443
  if (isset($options['proxy'])) {
444
- if (!\is_array($options['proxy'])) {
445
- $conf[\CURLOPT_PROXY] = $options['proxy'];
446
  } else {
447
  $scheme = $easy->request->getUri()->getScheme();
448
  if (isset($options['proxy'][$scheme])) {
449
  $host = $easy->request->getUri()->getHost();
450
  if (!isset($options['proxy']['no']) ||
451
- !Utils::isHostInNoProxy($host, $options['proxy']['no'])
452
  ) {
453
- $conf[\CURLOPT_PROXY] = $options['proxy'][$scheme];
454
  }
455
  }
456
  }
@@ -458,58 +441,58 @@ class CurlFactory implements CurlFactoryInterface
458
 
459
  if (isset($options['cert'])) {
460
  $cert = $options['cert'];
461
- if (\is_array($cert)) {
462
- $conf[\CURLOPT_SSLCERTPASSWD] = $cert[1];
463
  $cert = $cert[0];
464
  }
465
- if (!\file_exists($cert)) {
466
  throw new \InvalidArgumentException(
467
  "SSL certificate not found: {$cert}"
468
  );
469
  }
470
- $conf[\CURLOPT_SSLCERT] = $cert;
471
  }
472
 
473
  if (isset($options['ssl_key'])) {
474
- if (\is_array($options['ssl_key'])) {
475
- if (\count($options['ssl_key']) === 2) {
476
- [$sslKey, $conf[\CURLOPT_SSLKEYPASSWD]] = $options['ssl_key'];
477
  } else {
478
- [$sslKey] = $options['ssl_key'];
479
  }
480
  }
481
 
482
- $sslKey = $sslKey ?? $options['ssl_key'];
483
 
484
- if (!\file_exists($sslKey)) {
485
  throw new \InvalidArgumentException(
486
  "SSL private key not found: {$sslKey}"
487
  );
488
  }
489
- $conf[\CURLOPT_SSLKEY] = $sslKey;
490
  }
491
 
492
  if (isset($options['progress'])) {
493
  $progress = $options['progress'];
494
- if (!\is_callable($progress)) {
495
  throw new \InvalidArgumentException(
496
  'progress client option must be callable'
497
  );
498
  }
499
- $conf[\CURLOPT_NOPROGRESS] = false;
500
- $conf[\CURLOPT_PROGRESSFUNCTION] = static function () use ($progress) {
501
- $args = \func_get_args();
502
  // PHP 5.5 pushed the handle onto the start of the args
503
- if (\is_resource($args[0])) {
504
- \array_shift($args);
505
  }
506
- \call_user_func_array($progress, $args);
507
  };
508
  }
509
 
510
  if (!empty($options['debug'])) {
511
- $conf[\CURLOPT_STDERR] = Utils::debugResource($options['debug']);
512
- $conf[\CURLOPT_VERBOSE] = true;
513
  }
514
  }
515
 
@@ -521,14 +504,12 @@ class CurlFactory implements CurlFactoryInterface
521
  * stream, and then encountered a "necessary data rewind wasn't possible"
522
  * error, causing the request to be sent through curl_multi_info_read()
523
  * without an error status.
524
- *
525
- * @param callable(RequestInterface, array): PromiseInterface $handler
526
  */
527
  private static function retryFailedRewind(
528
  callable $handler,
529
  EasyHandle $easy,
530
  array $ctx
531
- ): PromiseInterface {
532
  try {
533
  // Only rewind if the body has been read from.
534
  $body = $easy->request->getBody();
@@ -561,24 +542,24 @@ class CurlFactory implements CurlFactoryInterface
561
  return $handler($easy->request, $easy->options);
562
  }
563
 
564
- private function createHeaderFn(EasyHandle $easy): callable
565
  {
566
  if (isset($easy->options['on_headers'])) {
567
  $onHeaders = $easy->options['on_headers'];
568
 
569
- if (!\is_callable($onHeaders)) {
570
  throw new \InvalidArgumentException('on_headers must be callable');
571
  }
572
  } else {
573
  $onHeaders = null;
574
  }
575
 
576
- return static function ($ch, $h) use (
577
  $onHeaders,
578
  $easy,
579
  &$startingResponse
580
  ) {
581
- $value = \trim($h);
582
  if ($value === '') {
583
  $startingResponse = true;
584
  $easy->createResponse();
@@ -598,7 +579,7 @@ class CurlFactory implements CurlFactoryInterface
598
  } else {
599
  $easy->headers[] = $value;
600
  }
601
- return \strlen($h);
602
  };
603
  }
604
  }
1
  <?php
 
2
  namespace GuzzleHttp\Handler;
3
 
4
  use GuzzleHttp\Exception\ConnectException;
5
  use GuzzleHttp\Exception\RequestException;
6
  use GuzzleHttp\Promise\FulfilledPromise;
 
7
  use GuzzleHttp\Psr7;
8
  use GuzzleHttp\Psr7\LazyOpenStream;
9
  use GuzzleHttp\TransferStats;
 
10
  use Psr\Http\Message\RequestInterface;
11
 
12
  /**
13
  * Creates curl resources from a request
 
 
14
  */
15
  class CurlFactory implements CurlFactoryInterface
16
  {
17
+ const CURL_VERSION_STR = 'curl_version';
18
+ const LOW_CURL_VERSION_NUMBER = '7.21.2';
19
 
20
+ /** @var array */
 
 
 
 
 
 
 
21
  private $handles = [];
22
 
23
+ /** @var int Total number of idle handles to keep in cache */
 
 
24
  private $maxHandles;
25
 
26
  /**
27
  * @param int $maxHandles Maximum number of idle handles.
28
  */
29
+ public function __construct($maxHandles)
30
  {
31
  $this->maxHandles = $maxHandles;
32
  }
33
 
34
+ public function create(RequestInterface $request, array $options)
35
  {
36
  if (isset($options['curl']['body_as_string'])) {
37
  $options['_body_as_string'] = $options['curl']['body_as_string'];
49
 
50
  // Add handler options from the request configuration options
51
  if (isset($options['curl'])) {
52
+ $conf = array_replace($conf, $options['curl']);
53
  }
54
 
55
+ $conf[CURLOPT_HEADERFUNCTION] = $this->createHeaderFn($easy);
56
  $easy->handle = $this->handles
57
+ ? array_pop($this->handles)
58
+ : curl_init();
59
  curl_setopt_array($easy->handle, $conf);
60
 
61
  return $easy;
62
  }
63
 
64
+ public function release(EasyHandle $easy)
65
  {
66
  $resource = $easy->handle;
67
  unset($easy->handle);
68
 
69
+ if (count($this->handles) >= $this->maxHandles) {
70
+ curl_close($resource);
71
  } else {
72
  // Remove all callback functions as they can hold onto references
73
  // and are not cleaned up by curl_reset. Using curl_setopt_array
74
  // does not work for some reason, so removing each one
75
  // individually.
76
+ curl_setopt($resource, CURLOPT_HEADERFUNCTION, null);
77
+ curl_setopt($resource, CURLOPT_READFUNCTION, null);
78
+ curl_setopt($resource, CURLOPT_WRITEFUNCTION, null);
79
+ curl_setopt($resource, CURLOPT_PROGRESSFUNCTION, null);
80
+ curl_reset($resource);
81
  $this->handles[] = $resource;
82
  }
83
  }
86
  * Completes a cURL transaction, either returning a response promise or a
87
  * rejected promise.
88
  *
89
+ * @param callable $handler
90
+ * @param EasyHandle $easy
91
+ * @param CurlFactoryInterface $factory Dictates how the handle is released
92
+ *
93
+ * @return \GuzzleHttp\Promise\PromiseInterface
94
  */
95
  public static function finish(
96
  callable $handler,
97
  EasyHandle $easy,
98
  CurlFactoryInterface $factory
99
+ ) {
100
  if (isset($easy->options['on_stats'])) {
101
  self::invokeStats($easy);
102
  }
117
  return new FulfilledPromise($easy->response);
118
  }
119
 
120
+ private static function invokeStats(EasyHandle $easy)
121
  {
122
+ $curlStats = curl_getinfo($easy->handle);
123
+ $curlStats['appconnect_time'] = curl_getinfo($easy->handle, CURLINFO_APPCONNECT_TIME);
124
  $stats = new TransferStats(
125
  $easy->request,
126
  $easy->response,
128
  $easy->errno,
129
  $curlStats
130
  );
131
+ call_user_func($easy->options['on_stats'], $stats);
132
  }
133
 
 
 
 
134
  private static function finishError(
135
  callable $handler,
136
  EasyHandle $easy,
137
  CurlFactoryInterface $factory
138
+ ) {
139
  // Get error information and release the handle to the factory.
140
  $ctx = [
141
  'errno' => $easy->errno,
142
+ 'error' => curl_error($easy->handle),
143
+ 'appconnect_time' => curl_getinfo($easy->handle, CURLINFO_APPCONNECT_TIME),
144
+ ] + curl_getinfo($easy->handle);
145
+ $ctx[self::CURL_VERSION_STR] = curl_version()['version'];
146
  $factory->release($easy);
147
 
148
  // Retry when nothing is present or when curl failed to rewind.
155
  return self::createRejection($easy, $ctx);
156
  }
157
 
158
+ private static function createRejection(EasyHandle $easy, array $ctx)
159
  {
160
  static $connectionErrors = [
161
+ CURLE_OPERATION_TIMEOUTED => true,
162
+ CURLE_COULDNT_RESOLVE_HOST => true,
163
+ CURLE_COULDNT_CONNECT => true,
164
+ CURLE_SSL_CONNECT_ERROR => true,
165
+ CURLE_GOT_NOTHING => true,
166
  ];
167
 
168
  // If an exception was encountered during the onHeaders event, then
178
  )
179
  );
180
  }
181
+ if (version_compare($ctx[self::CURL_VERSION_STR], self::LOW_CURL_VERSION_NUMBER)) {
182
+ $message = sprintf(
183
+ 'cURL error %s: %s (%s)',
184
+ $ctx['errno'],
185
+ $ctx['error'],
186
+ 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html'
187
+ );
188
+ } else {
189
+ $message = sprintf(
190
+ 'cURL error %s: %s (%s) for %s',
191
+ $ctx['errno'],
192
+ $ctx['error'],
193
+ 'see https://curl.haxx.se/libcurl/c/libcurl-errors.html',
194
+ $easy->request->getUri()
195
+ );
196
  }
197
 
198
  // Create a connection exception if it was a specific error code.
203
  return \GuzzleHttp\Promise\rejection_for($error);
204
  }
205
 
206
+ private function getDefaultConf(EasyHandle $easy)
 
 
 
207
  {
208
  $conf = [
209
+ '_headers' => $easy->request->getHeaders(),
210
+ CURLOPT_CUSTOMREQUEST => $easy->request->getMethod(),
211
+ CURLOPT_URL => (string) $easy->request->getUri()->withFragment(''),
212
+ CURLOPT_RETURNTRANSFER => false,
213
+ CURLOPT_HEADER => false,
214
+ CURLOPT_CONNECTTIMEOUT => 150,
215
  ];
216
 
217
+ if (defined('CURLOPT_PROTOCOLS')) {
218
+ $conf[CURLOPT_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS;
219
  }
220
 
221
  $version = $easy->request->getProtocolVersion();
222
  if ($version == 1.1) {
223
+ $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_1;
224
  } elseif ($version == 2.0) {
225
+ $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_2_0;
226
  } else {
227
+ $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_0;
228
  }
229
 
230
  return $conf;
231
  }
232
 
233
+ private function applyMethod(EasyHandle $easy, array &$conf)
234
  {
235
  $body = $easy->request->getBody();
236
  $size = $body->getSize();
242
 
243
  $method = $easy->request->getMethod();
244
  if ($method === 'PUT' || $method === 'POST') {
245
+ // See http://tools.ietf.org/html/rfc7230#section-3.3.2
246
  if (!$easy->request->hasHeader('Content-Length')) {
247
+ $conf[CURLOPT_HTTPHEADER][] = 'Content-Length: 0';
248
  }
249
  } elseif ($method === 'HEAD') {
250
+ $conf[CURLOPT_NOBODY] = true;
251
  unset(
252
+ $conf[CURLOPT_WRITEFUNCTION],
253
+ $conf[CURLOPT_READFUNCTION],
254
+ $conf[CURLOPT_FILE],
255
+ $conf[CURLOPT_INFILE]
256
  );
257
  }
258
  }
259
 
260
+ private function applyBody(RequestInterface $request, array $options, array &$conf)
261
  {
262
  $size = $request->hasHeader('Content-Length')
263
  ? (int) $request->getHeaderLine('Content-Length')
268
  if (($size !== null && $size < 1000000) ||
269
  !empty($options['_body_as_string'])
270
  ) {
271
+ $conf[CURLOPT_POSTFIELDS] = (string) $request->getBody();
272
  // Don't duplicate the Content-Length header
273
  $this->removeHeader('Content-Length', $conf);
274
  $this->removeHeader('Transfer-Encoding', $conf);
275
  } else {
276
+ $conf[CURLOPT_UPLOAD] = true;
277
  if ($size !== null) {
278
+ $conf[CURLOPT_INFILESIZE] = $size;
279
  $this->removeHeader('Content-Length', $conf);
280
  }
281
  $body = $request->getBody();
282
  if ($body->isSeekable()) {
283
  $body->rewind();
284
  }
285
+ $conf[CURLOPT_READFUNCTION] = function ($ch, $fd, $length) use ($body) {
286
  return $body->read($length);
287
  };
288
  }
289
 
290
  // If the Expect header is not present, prevent curl from adding it
291
  if (!$request->hasHeader('Expect')) {
292
+ $conf[CURLOPT_HTTPHEADER][] = 'Expect:';
293
  }
294
 
295
  // cURL sometimes adds a content-type by default. Prevent this.
296
  if (!$request->hasHeader('Content-Type')) {
297
+ $conf[CURLOPT_HTTPHEADER][] = 'Content-Type:';
298
  }
299
  }
300
 
301
+ private function applyHeaders(EasyHandle $easy, array &$conf)
302
  {
303
  foreach ($conf['_headers'] as $name => $values) {
304
  foreach ($values as $value) {
306
  if ($value === '') {
307
  // cURL requires a special format for empty headers.
308
  // See https://github.com/guzzle/guzzle/issues/1882 for more details.
309
+ $conf[CURLOPT_HTTPHEADER][] = "$name;";
310
  } else {
311
+ $conf[CURLOPT_HTTPHEADER][] = "$name: $value";
312
  }
313
  }
314
  }
315
 
316
  // Remove the Accept header if one was not set
317
  if (!$easy->request->hasHeader('Accept')) {
318
+ $conf[CURLOPT_HTTPHEADER][] = 'Accept:';
319
  }
320
  }
321
 
325
  * @param string $name Case-insensitive header to remove
326
  * @param array $options Array of options to modify
327
  */
328
+ private function removeHeader($name, array &$options)
329
  {
330
+ foreach (array_keys($options['_headers']) as $key) {
331
+ if (!strcasecmp($key, $name)) {
332
  unset($options['_headers'][$key]);
333
  return;
334
  }
335
  }
336
  }
337
 
338
+ private function applyHandlerOptions(EasyHandle $easy, array &$conf)
339
  {
340
  $options = $easy->options;
341
  if (isset($options['verify'])) {
342
  if ($options['verify'] === false) {
343
+ unset($conf[CURLOPT_CAINFO]);
344
+ $conf[CURLOPT_SSL_VERIFYHOST] = 0;
345
+ $conf[CURLOPT_SSL_VERIFYPEER] = false;
346
  } else {
347
+ $conf[CURLOPT_SSL_VERIFYHOST] = 2;
348
+ $conf[CURLOPT_SSL_VERIFYPEER] = true;
349
+ if (is_string($options['verify'])) {
350
  // Throw an error if the file/folder/link path is not valid or doesn't exist.
351
+ if (!file_exists($options['verify'])) {
352
  throw new \InvalidArgumentException(
353
  "SSL CA bundle not found: {$options['verify']}"
354
  );
355
  }
356
  // If it's a directory or a link to a directory use CURLOPT_CAPATH.
357
  // If not, it's probably a file, or a link to a file, so use CURLOPT_CAINFO.
358
+ if (is_dir($options['verify']) ||
359
+ (is_link($options['verify']) && is_dir(readlink($options['verify'])))) {
360
+ $conf[CURLOPT_CAPATH] = $options['verify'];
 
 
 
 
 
 
361
  } else {
362
+ $conf[CURLOPT_CAINFO] = $options['verify'];
363
  }
364
  }
365
  }
368
  if (!empty($options['decode_content'])) {
369
  $accept = $easy->request->getHeaderLine('Accept-Encoding');
370
  if ($accept) {
371
+ $conf[CURLOPT_ENCODING] = $accept;
372
  } else {
373
+ $conf[CURLOPT_ENCODING] = '';
374
  // Don't let curl send the header over the wire
375
+ $conf[CURLOPT_HTTPHEADER][] = 'Accept-Encoding:';
376
  }
377
  }
378
 
379
  if (isset($options['sink'])) {
380
  $sink = $options['sink'];
381
+ if (!is_string($sink)) {
382
  $sink = \GuzzleHttp\Psr7\stream_for($sink);
383
+ } elseif (!is_dir(dirname($sink))) {
384
  // Ensure that the directory exists before failing in curl.
385
+ throw new \RuntimeException(sprintf(
386
  'Directory %s does not exist for sink value of %s',
387
+ dirname($sink),
388
  $sink
389
  ));
390
  } else {
391
  $sink = new LazyOpenStream($sink, 'w+');
392
  }
393
  $easy->sink = $sink;
394
+ $conf[CURLOPT_WRITEFUNCTION] = function ($ch, $write) use ($sink) {
395
  return $sink->write($write);
396
  };
397
  } else {
398
  // Use a default temp stream if no sink was set.
399
+ $conf[CURLOPT_FILE] = fopen('php://temp', 'w+');
400
+ $easy->sink = Psr7\stream_for($conf[CURLOPT_FILE]);
401
  }
402
  $timeoutRequiresNoSignal = false;
403
  if (isset($options['timeout'])) {
404
  $timeoutRequiresNoSignal |= $options['timeout'] < 1;
405
+ $conf[CURLOPT_TIMEOUT_MS] = $options['timeout'] * 1000;
406
  }
407
 
408
  // CURL default value is CURL_IPRESOLVE_WHATEVER
409
  if (isset($options['force_ip_resolve'])) {
410
  if ('v4' === $options['force_ip_resolve']) {
411
+ $conf[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V4;
412
  } elseif ('v6' === $options['force_ip_resolve']) {
413
+ $conf[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V6;
414
  }
415
  }
416
 
417
  if (isset($options['connect_timeout'])) {
418
  $timeoutRequiresNoSignal |= $options['connect_timeout'] < 1;
419
+ $conf[CURLOPT_CONNECTTIMEOUT_MS] = $options['connect_timeout'] * 1000;
420
  }
421
 
422
+ if ($timeoutRequiresNoSignal && strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
423
+ $conf[CURLOPT_NOSIGNAL] = true;
424
  }
425
 
426
  if (isset($options['proxy'])) {
427
+ if (!is_array($options['proxy'])) {
428
+ $conf[CURLOPT_PROXY] = $options['proxy'];
429
  } else {
430
  $scheme = $easy->request->getUri()->getScheme();
431
  if (isset($options['proxy'][$scheme])) {
432
  $host = $easy->request->getUri()->getHost();
433
  if (!isset($options['proxy']['no']) ||
434
+ !\GuzzleHttp\is_host_in_noproxy($host, $options['proxy']['no'])
435
  ) {
436
+ $conf[CURLOPT_PROXY] = $options['proxy'][$scheme];
437
  }
438
  }
439
  }
441
 
442
  if (isset($options['cert'])) {
443
  $cert = $options['cert'];
444
+ if (is_array($cert)) {
445
+ $conf[CURLOPT_SSLCERTPASSWD] = $cert[1];
446
  $cert = $cert[0];
447
  }
448
+ if (!file_exists($cert)) {
449
  throw new \InvalidArgumentException(
450
  "SSL certificate not found: {$cert}"
451
  );
452
  }
453
+ $conf[CURLOPT_SSLCERT] = $cert;
454
  }
455
 
456
  if (isset($options['ssl_key'])) {
457
+ if (is_array($options['ssl_key'])) {
458
+ if (count($options['ssl_key']) === 2) {
459
+ list($sslKey, $conf[CURLOPT_SSLKEYPASSWD]) = $options['ssl_key'];
460
  } else {
461
+ list($sslKey) = $options['ssl_key'];
462
  }
463
  }
464
 
465
+ $sslKey = isset($sslKey) ? $sslKey: $options['ssl_key'];
466
 
467
+ if (!file_exists($sslKey)) {
468
  throw new \InvalidArgumentException(
469
  "SSL private key not found: {$sslKey}"
470
  );
471
  }
472
+ $conf[CURLOPT_SSLKEY] = $sslKey;
473
  }
474
 
475
  if (isset($options['progress'])) {
476
  $progress = $options['progress'];
477
+ if (!is_callable($progress)) {
478
  throw new \InvalidArgumentException(
479
  'progress client option must be callable'
480
  );
481
  }
482
+ $conf[CURLOPT_NOPROGRESS] = false;
483
+ $conf[CURLOPT_PROGRESSFUNCTION] = function () use ($progress) {
484
+ $args = func_get_args();
485
  // PHP 5.5 pushed the handle onto the start of the args
486
+ if (is_resource($args[0])) {
487
+ array_shift($args);
488
  }
489
+ call_user_func_array($progress, $args);
490
  };
491
  }
492
 
493
  if (!empty($options['debug'])) {
494
+ $conf[CURLOPT_STDERR] = \GuzzleHttp\debug_resource($options['debug']);
495
+ $conf[CURLOPT_VERBOSE] = true;
496
  }
497
  }
498
 
504
  * stream, and then encountered a "necessary data rewind wasn't possible"
505
  * error, causing the request to be sent through curl_multi_info_read()
506
  * without an error status.
 
 
507
  */
508
  private static function retryFailedRewind(
509
  callable $handler,
510
  EasyHandle $easy,
511
  array $ctx
512
+ ) {
513
  try {
514
  // Only rewind if the body has been read from.
515
  $body = $easy->request->getBody();
542
  return $handler($easy->request, $easy->options);
543
  }
544
 
545
+ private function createHeaderFn(EasyHandle $easy)
546
  {
547
  if (isset($easy->options['on_headers'])) {
548
  $onHeaders = $easy->options['on_headers'];
549
 
550
+ if (!is_callable($onHeaders)) {
551
  throw new \InvalidArgumentException('on_headers must be callable');
552
  }
553
  } else {
554
  $onHeaders = null;
555
  }
556
 
557
+ return function ($ch, $h) use (
558
  $onHeaders,
559
  $easy,
560
  &$startingResponse
561
  ) {
562
+ $value = trim($h);
563
  if ($value === '') {
564
  $startingResponse = true;
565
  $easy->createResponse();
579
  } else {
580
  $easy->headers[] = $value;
581
  }
582
+ return strlen($h);
583
  };
584
  }
585
  }
vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  namespace GuzzleHttp\Handler;
4
 
5
  use Psr\Http\Message\RequestInterface;
@@ -12,14 +11,17 @@ interface CurlFactoryInterface
12
  * @param RequestInterface $request Request
13
  * @param array $options Transfer options
14
  *
 
15
  * @throws \RuntimeException when an option cannot be applied
16
  */
17
- public function create(RequestInterface $request, array $options): EasyHandle;
18
 
19
  /**
20
  * Release an easy handle, allowing it to be reused or closed.
21
  *
22
  * This function must call unset on the easy handle's "handle" property.
 
 
23
  */
24
- public function release(EasyHandle $easy): void;
25
  }
1
  <?php
 
2
  namespace GuzzleHttp\Handler;
3
 
4
  use Psr\Http\Message\RequestInterface;
11
  * @param RequestInterface $request Request
12
  * @param array $options Transfer options
13
  *
14
+ * @return EasyHandle
15
  * @throws \RuntimeException when an option cannot be applied
16
  */
17
+ public function create(RequestInterface $request, array $options);
18
 
19
  /**
20
  * Release an easy handle, allowing it to be reused or closed.
21
  *
22
  * This function must call unset on the easy handle's "handle" property.
23
+ *
24
+ * @param EasyHandle $easy
25
  */
26
+ public function release(EasyHandle $easy);
27
  }
vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
-
3
  namespace GuzzleHttp\Handler;
4
 
5
- use GuzzleHttp\Promise\PromiseInterface;
6
  use Psr\Http\Message\RequestInterface;
7
 
8
  /**
@@ -11,14 +10,10 @@ use Psr\Http\Message\RequestInterface;
11
  * When using the CurlHandler, custom curl options can be specified as an
12
  * associative array of curl option constants mapping to values in the
13
  * **curl** key of the "client" key of the request.
14
- *
15
- * @final
16
  */
17
  class CurlHandler
18
  {
19
- /**
20
- * @var CurlFactoryInterface
21
- */
22
  private $factory;
23
 
24
  /**
@@ -30,19 +25,20 @@ class CurlHandler
30
  */
31
  public function __construct(array $options = [])
32
  {
33
- $this->factory = $options['handle_factory']
34
- ?? new CurlFactory(3);
 
35
  }
36
 
37
- public function __invoke(RequestInterface $request, array $options): PromiseInterface
38
  {
39
  if (isset($options['delay'])) {
40
- \usleep($options['delay'] * 1000);
41
  }
42
 
43
  $easy = $this->factory->create($request, $options);
44
- \curl_exec($easy->handle);
45
- $easy->errno = \curl_errno($easy->handle);
46
 
47
  return CurlFactory::finish($this, $easy, $this->factory);
48
  }
1
  <?php
 
2
  namespace GuzzleHttp\Handler;
3
 
4
+ use GuzzleHttp\Psr7;
5
  use Psr\Http\Message\RequestInterface;
6
 
7
  /**
10
  * When using the CurlHandler, custom curl options can be specified as an
11
  * associative array of curl option constants mapping to values in the
12
  * **curl** key of the "client" key of the request.
 
 
13
  */
14
  class CurlHandler
15
  {
16
+ /** @var CurlFactoryInterface */
 
 
17
  private $factory;
18
 
19
  /**
25
  */
26
  public function __construct(array $options = [])
27
  {
28
+ $this->factory = isset($options['handle_factory'])
29
+ ? $options['handle_factory']
30
+ : new CurlFactory(3);
31
  }
32
 
33
+ public function __invoke(RequestInterface $request, array $options)
34
  {
35
  if (isset($options['delay'])) {
36
+ usleep($options['delay'] * 1000);
37
  }
38
 
39
  $easy = $this->factory->create($request, $options);
40
+ curl_exec($easy->handle);
41
+ $easy->errno = curl_errno($easy->handle);
42
 
43
  return CurlFactory::finish($this, $easy, $this->factory);
44
  }
vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php CHANGED
@@ -1,10 +1,8 @@
1
  <?php
2
-
3
  namespace GuzzleHttp\Handler;
4
 
5
  use GuzzleHttp\Promise as P;
6
  use GuzzleHttp\Promise\Promise;
7
- use GuzzleHttp\Promise\PromiseInterface;
8
  use GuzzleHttp\Utils;
9
  use Psr\Http\Message\RequestInterface;
10
 
@@ -16,43 +14,15 @@ use Psr\Http\Message\RequestInterface;
16
  * **curl** key of the provided request options.
17
  *
18
  * @property resource $_mh Internal use only. Lazy loaded multi-handle.
19
- *
20
- * @final
21
  */
22
  class CurlMultiHandler
23
  {
24
- /**
25
- * @var CurlFactoryInterface
26
- */
27
  private $factory;
28
-
29
- /**
30
- * @var int
31
- */
32
  private $selectTimeout;
33
-
34
- /**
35
- * @var resource|null the currently executing resource in `curl_multi_exec`.
36
- */
37
  private $active;
38
-
39
- /**
40
- * @var array Request entry handles, indexed by handle id in `addRequest`.
41
- *
42
- * @see CurlMultiHandler::addRequest
43
- */
44
  private $handles = [];
45
-
46
- /**
47
- * @var array<int, float> An array of delay times, indexed by handle id in `addRequest`.
48
- *
49
- * @see CurlMultiHandler::addRequest
50
- */
51
  private $delays = [];
52
-
53
- /**
54
- * @var array<mixed> An associative array of CURLMOPT_* options and corresponding values for curl_multi_setopt()
55
- */
56
  private $options = [];
57
 
58
  /**
@@ -63,61 +33,52 @@ class CurlMultiHandler
63
  * out while selecting curl handles. Defaults to 1 second.
64
  * - options: An associative array of CURLMOPT_* options and
65
  * corresponding values for curl_multi_setopt()
 
 
66
  */
67
  public function __construct(array $options = [])
68
  {
69
- $this->factory = $options['handle_factory'] ?? new CurlFactory(50);
 
70
 
71
  if (isset($options['select_timeout'])) {
72
  $this->selectTimeout = $options['select_timeout'];
73
- } elseif ($selectTimeout = Utils::getenv('GUZZLE_CURL_SELECT_TIMEOUT')) {
74
- $this->selectTimeout = (int) $selectTimeout;
75
  } else {
76
  $this->selectTimeout = 1;
77
  }
78
 
79
- $this->options = $options['options'] ?? [];
80
  }
81
 
82
- /**
83
- * @param string $name
84
- *
85
- * @return resource
86
- *
87
- * @throws \BadMethodCallException when another field as `_mh` will be gotten
88
- * @throws \RuntimeException when curl can not initialize a multi handle
89
- */
90
  public function __get($name)
91
  {
92
- if ($name !== '_mh') {
93
- throw new \BadMethodCallException("Can not get other property as '_mh'.");
94
- }
95
-
96
- $multiHandle = \curl_multi_init();
97
 
98
- if (false === $multiHandle) {
99
- throw new \RuntimeException('Can not initialize curl multi handle.');
100
- }
101
-
102
- $this->_mh = $multiHandle;
103
 
104
- foreach ($this->options as $option => $value) {
105
- // A warning is raised in case of a wrong option.
106
- curl_multi_setopt($this->_mh, $option, $value);
107
  }
108
 
109
- return $this->_mh;
110
  }
111
 
112
  public function __destruct()
113
  {
114
  if (isset($this->_mh)) {
115
- \curl_multi_close($this->_mh);
116
  unset($this->_mh);
117
  }
118
  }
119
 
120
- public function __invoke(RequestInterface $request, array $options): PromiseInterface
121
  {
122
  $easy = $this->factory->create($request, $options);
123
  $id = (int) $easy->handle;
@@ -137,7 +98,7 @@ class CurlMultiHandler
137
  /**
138
  * Ticks the curl event loop.
139
  */
140
- public function tick(): void
141
  {
142
  // Add any delayed handles if needed.
143
  if ($this->delays) {
@@ -145,7 +106,7 @@ class CurlMultiHandler
145
  foreach ($this->delays as $id => $delay) {
146
  if ($currentTime >= $delay) {
147
  unset($this->delays[$id]);
148
- \curl_multi_add_handle(
149
  $this->_mh,
150
  $this->handles[$id]['easy']->handle
151
  );
@@ -157,14 +118,14 @@ class CurlMultiHandler
157
  P\queue()->run();
158
 
159
  if ($this->active &&
160
- \curl_multi_select($this->_mh, $this->selectTimeout) === -1
161
  ) {
162
  // Perform a usleep if a select returns -1.
163
  // See: https://bugs.php.net/bug.php?id=61141
164
- \usleep(250);
165
  }
166
 
167
- while (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM);
168
 
169
  $this->processMessages();
170
  }
@@ -172,26 +133,26 @@ class CurlMultiHandler
172
  /**
173
  * Runs until all outstanding connections have completed.
174
  */
175
- public function execute(): void
176
  {
177
  $queue = P\queue();
178
 
179
  while ($this->handles || !$queue->isEmpty()) {
180
  // If there are no transfers, then sleep for the next delay
181
  if (!$this->active && $this->delays) {
182
- \usleep($this->timeToNext());
183
  }
184
  $this->tick();
185
  }
186
  }
187
 
188
- private function addRequest(array $entry): void
189
  {
190
  $easy = $entry['easy'];
191
  $id = (int) $easy->handle;
192
  $this->handles[$id] = $entry;
193
  if (empty($easy->options['delay'])) {
194
- \curl_multi_add_handle($this->_mh, $easy->handle);
195
  } else {
196
  $this->delays[$id] = Utils::currentTime() + ($easy->options['delay'] / 1000);
197
  }
@@ -204,7 +165,7 @@ class CurlMultiHandler
204
  *
205
  * @return bool True on success, false on failure.
206
  */
207
- private function cancel($id): bool
208
  {
209
  // Cannot cancel if it has been processed.
210
  if (!isset($this->handles[$id])) {
@@ -213,17 +174,17 @@ class CurlMultiHandler
213
 
214
  $handle = $this->handles[$id]['easy']->handle;
215
  unset($this->delays[$id], $this->handles[$id]);
216
- \curl_multi_remove_handle($this->_mh, $handle);
217
- \curl_close($handle);
218
 
219
  return true;
220
  }
221
 
222
- private function processMessages(): void
223
  {
224
- while ($done = \curl_multi_info_read($this->_mh)) {
225
  $id = (int) $done['handle'];
226
- \curl_multi_remove_handle($this->_mh, $done['handle']);
227
 
228
  if (!isset($this->handles[$id])) {
229
  // Probably was cancelled.
@@ -243,16 +204,16 @@ class CurlMultiHandler
243
  }
244
  }
245
 
246
- private function timeToNext(): int
247
  {
248
  $currentTime = Utils::currentTime();
249
- $nextTime = \PHP_INT_MAX;
250
  foreach ($this->delays as $time) {
251
  if ($time < $nextTime) {
252
  $nextTime = $time;
253
  }
254
  }
255
 
256
- return ((int) \max(0, $nextTime - $currentTime)) * 1000000;
257
  }
258
  }
1
  <?php
 
2
  namespace GuzzleHttp\Handler;
3
 
4
  use GuzzleHttp\Promise as P;
5
  use GuzzleHttp\Promise\Promise;
 
6
  use GuzzleHttp\Utils;
7
  use Psr\Http\Message\RequestInterface;
8
 
14
  * **curl** key of the provided request options.
15
  *
16
  * @property resource $_mh Internal use only. Lazy loaded multi-handle.
 
 
17
  */
18
  class CurlMultiHandler
19
  {
20
+ /** @var CurlFactoryInterface */
 
 
21
  private $factory;
 
 
 
 
22
  private $selectTimeout;
 
 
 
 
23
  private $active;
 
 
 
 
 
 
24
  private $handles = [];
 
 
 
 
 
 
25
  private $delays = [];
 
 
 
 
26
  private $options = [];
27
 
28
  /**
33
  * out while selecting curl handles. Defaults to 1 second.
34
  * - options: An associative array of CURLMOPT_* options and
35
  * corresponding values for curl_multi_setopt()
36
+ *
37
+ * @param array $options
38
  */
39
  public function __construct(array $options = [])
40
  {
41
+ $this->factory = isset($options['handle_factory'])
42
+ ? $options['handle_factory'] : new CurlFactory(50);
43
 
44
  if (isset($options['select_timeout'])) {
45
  $this->selectTimeout = $options['select_timeout'];
46
+ } elseif ($selectTimeout = getenv('GUZZLE_CURL_SELECT_TIMEOUT')) {
47
+ $this->selectTimeout = $selectTimeout;
48
  } else {
49
  $this->selectTimeout = 1;
50
  }
51
 
52
+ $this->options = isset($options['options']) ? $options['options'] : [];
53
  }
54
 
 
 
 
 
 
 
 
 
55
  public function __get($name)
56
  {
57
+ if ($name === '_mh') {
58
+ $this->_mh = curl_multi_init();
 
 
 
59
 
60
+ foreach ($this->options as $option => $value) {
61
+ // A warning is raised in case of a wrong option.
62
+ curl_multi_setopt($this->_mh, $option, $value);
63
+ }
 
64
 
65
+ // Further calls to _mh will return the value directly, without entering the
66
+ // __get() method at all.
67
+ return $this->_mh;
68
  }
69
 
70
+ throw new \BadMethodCallException();
71
  }
72
 
73
  public function __destruct()
74
  {
75
  if (isset($this->_mh)) {
76
+ curl_multi_close($this->_mh);
77
  unset($this->_mh);
78
  }
79
  }
80
 
81
+ public function __invoke(RequestInterface $request, array $options)
82
  {
83
  $easy = $this->factory->create($request, $options);
84
  $id = (int) $easy->handle;
98
  /**
99
  * Ticks the curl event loop.
100
  */
101
+ public function tick()
102
  {
103
  // Add any delayed handles if needed.
104
  if ($this->delays) {
106
  foreach ($this->delays as $id => $delay) {
107
  if ($currentTime >= $delay) {
108
  unset($this->delays[$id]);
109
+ curl_multi_add_handle(
110
  $this->_mh,
111
  $this->handles[$id]['easy']->handle
112
  );
118
  P\queue()->run();
119
 
120
  if ($this->active &&
121
+ curl_multi_select($this->_mh, $this->selectTimeout) === -1
122
  ) {
123
  // Perform a usleep if a select returns -1.
124
  // See: https://bugs.php.net/bug.php?id=61141
125
+ usleep(250);
126
  }
127
 
128
+ while (curl_multi_exec($this->_mh, $this->active) === CURLM_CALL_MULTI_PERFORM);
129
 
130
  $this->processMessages();
131
  }
133
  /**
134
  * Runs until all outstanding connections have completed.
135
  */
136
+ public function execute()
137
  {
138
  $queue = P\queue();
139
 
140
  while ($this->handles || !$queue->isEmpty()) {
141
  // If there are no transfers, then sleep for the next delay
142
  if (!$this->active && $this->delays) {
143
+ usleep($this->timeToNext());
144
  }
145
  $this->tick();
146
  }
147
  }
148
 
149
+ private function addRequest(array $entry)
150
  {
151
  $easy = $entry['easy'];
152
  $id = (int) $easy->handle;
153
  $this->handles[$id] = $entry;
154
  if (empty($easy->options['delay'])) {
155
+ curl_multi_add_handle($this->_mh, $easy->handle);
156
  } else {
157
  $this->delays[$id] = Utils::currentTime() + ($easy->options['delay'] / 1000);
158
  }
165
  *
166
  * @return bool True on success, false on failure.
167
  */
168
+ private function cancel($id)
169
  {
170
  // Cannot cancel if it has been processed.
171
  if (!isset($this->handles[$id])) {
174
 
175
  $handle = $this->handles[$id]['easy']->handle;
176
  unset($this->delays[$id], $this->handles[$id]);
177
+ curl_multi_remove_handle($this->_mh, $handle);
178
+ curl_close($handle);
179
 
180
  return true;
181
  }
182
 
183
+ private function processMessages()
184
  {
185
+ while ($done = curl_multi_info_read($this->_mh)) {
186
  $id = (int) $done['handle'];
187
+ curl_multi_remove_handle($this->_mh, $done['handle']);
188
 
189
  if (!isset($this->handles[$id])) {
190
  // Probably was cancelled.
204
  }
205
  }
206
 
207
+ private function timeToNext()
208
  {
209
  $currentTime = Utils::currentTime();
210
+ $nextTime = PHP_INT_MAX;
211
  foreach ($this->delays as $time) {
212
  if ($time < $nextTime) {
213
  $nextTime = $time;
214
  }
215
  }
216
 
217
+ return max(0, $nextTime - $currentTime) * 1000000;
218
  }
219
  }
vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php CHANGED
@@ -1,9 +1,7 @@
1
  <?php
2
-
3
  namespace GuzzleHttp\Handler;
4
 
5
  use GuzzleHttp\Psr7\Response;
6
- use GuzzleHttp\Utils;
7
  use Psr\Http\Message\RequestInterface;
8
  use Psr\Http\Message\ResponseInterface;
9
  use Psr\Http\Message\StreamInterface;
@@ -15,44 +13,28 @@ use Psr\Http\Message\StreamInterface;
15
  */
16
  final class EasyHandle
17
  {
18
- /**
19
- * @var resource cURL resource
20
- */
21
  public $handle;
22
 
23
- /**
24
- * @var StreamInterface Where data is being written
25
- */
26
  public $sink;
27
 
28
- /**
29
- * @var array Received HTTP headers so far
30
- */
31
  public $headers = [];
32
 
33
- /**
34
- * @var ResponseInterface|null Received response (if any)
35
- */
36
  public $response;
37
 
38
- /**
39
- * @var RequestInterface Request being sent
40
- */
41
  public $request;
42
 
43
- /**
44
- * @var array Request options
45
- */
46
  public $options = [];
47
 
48
- /**
49
- * @var int cURL error number (if any)
50
- */
51
  public $errno = 0;
52
 
53
- /**
54
- * @var \Throwable|null Exception during on_headers (if any)
55
- */
56
  public $onHeadersException;
57
 
58
  /**
@@ -60,16 +42,16 @@ final class EasyHandle
60
  *
61
  * @throws \RuntimeException if no headers have been received.
62
  */
63
- public function createResponse(): void
64
  {
65
  if (empty($this->headers)) {
66
  throw new \RuntimeException('No headers have been received');
67
  }
68
 
69
  // HTTP-version SP status-code SP reason-phrase
70
- $startLine = \explode(' ', \array_shift($this->headers), 3);
71
- $headers = Utils::headersFromLines($this->headers);
72
- $normalizedKeys = Utils::normalizeHeaderKeys($headers);
73
 
74
  if (!empty($this->options['decode_content'])
75
  && isset($normalizedKeys['content-encoding'])
@@ -90,25 +72,16 @@ final class EasyHandle
90
  }
91
  }
92
 
93
- $statusCode = (int) $startLine[1];
94
-
95
  // Attach a response to the easy handle with the parsed headers.
96
  $this->response = new Response(
97
- $statusCode,
98
  $headers,
99
  $this->sink,
100
- \substr($startLine[0], 5),
101
  isset($startLine[2]) ? (string) $startLine[2] : null
102
  );
103
  }
104
 
105
- /**
106
- * @param string $name
107
- *
108
- * @return void
109
- *
110
- * @throws \BadMethodCallException
111
- */
112
  public function __get($name)
113
  {
114
  $msg = $name === 'handle'
1
  <?php
 
2
  namespace GuzzleHttp\Handler;
3
 
4
  use GuzzleHttp\Psr7\Response;
 
5
  use Psr\Http\Message\RequestInterface;
6
  use Psr\Http\Message\ResponseInterface;
7
  use Psr\Http\Message\StreamInterface;
13
  */
14
  final class EasyHandle
15
  {
16
+ /** @var resource cURL resource */
 
 
17
  public $handle;
18
 
19
+ /** @var StreamInterface Where data is being written */
 
 
20
  public $sink;
21
 
22
+ /** @var array Received HTTP headers so far */
 
 
23
  public $headers = [];
24
 
25
+ /** @var ResponseInterface Received response (if any) */
 
 
26
  public $response;
27
 
28
+ /** @var RequestInterface Request being sent */
 
 
29
  public $request;
30
 
31
+ /** @var array Request options */
 
 
32
  public $options = [];
33
 
34
+ /** @var int cURL error number (if any) */
 
 
35
  public $errno = 0;
36
 
37
+ /** @var \Exception Exception during on_headers (if any) */
 
 
38
  public $onHeadersException;
39
 
40
  /**
42
  *
43
  * @throws \RuntimeException if no headers have been received.
44
  */
45
+ public function createResponse()
46
  {
47
  if (empty($this->headers)) {
48
  throw new \RuntimeException('No headers have been received');
49
  }
50
 
51
  // HTTP-version SP status-code SP reason-phrase
52
+ $startLine = explode(' ', array_shift($this->headers), 3);
53
+ $headers = \GuzzleHttp\headers_from_lines($this->headers);
54
+ $normalizedKeys = \GuzzleHttp\normalize_header_keys($headers);
55
 
56
  if (!empty($this->options['decode_content'])
57
  && isset($normalizedKeys['content-encoding'])
72
  }
73
  }
74
 
 
 
75
  // Attach a response to the easy handle with the parsed headers.
76
  $this->response = new Response(
77
+ $startLine[1],
78
  $headers,
79
  $this->sink,
80
+ substr($startLine[0], 5),
81
  isset($startLine[2]) ? (string) $startLine[2] : null
82
  );
83
  }
84
 
 
 
 
 
 
 
 
85
  public function __get($name)
86
  {
87
  $msg = $name === 'handle'
vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php CHANGED
@@ -1,72 +1,51 @@
1
  <?php
2
-
3
  namespace GuzzleHttp\Handler;
4
 
5
  use GuzzleHttp\Exception\RequestException;
6
  use GuzzleHttp\HandlerStack;
7
  use GuzzleHttp\Promise\PromiseInterface;
 
8
  use GuzzleHttp\TransferStats;
9
- use GuzzleHttp\Utils;
10
  use Psr\Http\Message\RequestInterface;
11
  use Psr\Http\Message\ResponseInterface;
12
- use Psr\Http\Message\StreamInterface;
13
 
14
  /**
15
  * Handler that returns responses or throw exceptions from a queue.
16
- *
17
- * @final
18
  */
19
  class MockHandler implements \Countable
20
  {
21
- /**
22
- * @var array
23
- */
24
  private $queue = [];
25
-
26
- /**
27
- * @var RequestInterface|null
28
- */
29
  private $lastRequest;
30
-
31
- /**
32
- * @var array
33
- */
34
- private $lastOptions = [];
35
-
36
- /**
37
- * @var callable|null
38
- */
39
  private $onFulfilled;
40
-
41
- /**
42
- * @var callable|null
43
- */
44
  private $onRejected;
45
 
46
  /**
47
  * Creates a new MockHandler that uses the default handler stack list of
48
  * middlewares.
49
  *
50
- * @param array|null $queue Array of responses, callables, or exceptions.
51
- * @param callable|null $onFulfilled Callback to invoke when the return value is fulfilled.
52
- * @param callable|null $onRejected Callback to invoke when the return value is rejected.
 
 
53
  */
54
  public static function createWithMiddleware(
55
  array $queue = null,
56
  callable $onFulfilled = null,
57
  callable $onRejected = null
58
- ): HandlerStack {
59
  return HandlerStack::create(new self($queue, $onFulfilled, $onRejected));
60
  }
61
 
62
  /**
63
  * The passed in value must be an array of
64
- * {@see \Psr\Http\Message\ResponseInterface} objects, Exceptions,
65
  * callables, or Promises.
66
  *
67
- * @param array<int, mixed>|null $queue The parameters to be passed to the append function, as an indexed array.
68
- * @param callable|null $onFulfilled Callback to invoke when the return value is fulfilled.
69
- * @param callable|null $onRejected Callback to invoke when the return value is rejected.
70
  */
71
  public function __construct(
72
  array $queue = null,
@@ -77,26 +56,26 @@ class MockHandler implements \Countable
77
  $this->onRejected = $onRejected;
78
 
79
  if ($queue) {
80
- \call_user_func_array([$this, 'append'], $queue);
81
  }
82
  }
83
 
84
- public function __invoke(RequestInterface $request, array $options): PromiseInterface
85
  {
86
  if (!$this->queue) {
87
  throw new \OutOfBoundsException('Mock queue is empty');
88
  }
89
 
90
- if (isset($options['delay']) && \is_numeric($options['delay'])) {
91
- \usleep((int) $options['delay'] * 1000);
92
  }
93
 
94
  $this->lastRequest = $request;
95
  $this->lastOptions = $options;
96
- $response = \array_shift($this->queue);
97
 
98
  if (isset($options['on_headers'])) {
99
- if (!\is_callable($options['on_headers'])) {
100
  throw new \InvalidArgumentException('on_headers must be callable');
101
  }
102
  try {
@@ -107,30 +86,29 @@ class MockHandler implements \Countable
107
  }
108
  }
109
 
110
- if (\is_callable($response)) {
111
- $response = $response($request, $options);
112
  }
113
 
114
- $response = $response instanceof \Throwable
115
  ? \GuzzleHttp\Promise\rejection_for($response)
116
  : \GuzzleHttp\Promise\promise_for($response);
117
 
118
  return $response->then(
119
- function (?ResponseInterface $value) use ($request, $options) {
120
  $this->invokeStats($request, $options, $value);
121
  if ($this->onFulfilled) {
122
- ($this->onFulfilled)($value);
123
  }
124
-
125
- if ($value !== null && isset($options['sink'])) {
126
  $contents = (string) $value->getBody();
127
  $sink = $options['sink'];
128
 
129
- if (\is_resource($sink)) {
130
- \fwrite($sink, $contents);
131
- } elseif (\is_string($sink)) {
132
- \file_put_contents($sink, $contents);
133
- } elseif ($sink instanceof StreamInterface) {
134
  $sink->write($contents);
135
  }
136
  }
@@ -140,7 +118,7 @@ class MockHandler implements \Countable
140
  function ($reason) use ($request, $options) {
141
  $this->invokeStats($request, $options, null, $reason);
142
  if ($this->onRejected) {
143
- ($this->onRejected)($reason);
144
  }
145
  return \GuzzleHttp\Promise\rejection_for($reason);
146
  }
@@ -150,66 +128,68 @@ class MockHandler implements \Countable
150
  /**
151
  * Adds one or more variadic requests, exceptions, callables, or promises
152
  * to the queue.
153
- *
154
- * @param mixed ...$values
155
  */
156
- public function append(...$values): void
157
  {
158
- foreach ($values as $value) {
159
  if ($value instanceof ResponseInterface
160
- || $value instanceof \Throwable
161
  || $value instanceof PromiseInterface
162
- || \is_callable($value)
163
  ) {
164
  $this->queue[] = $value;
165
  } else {
166
- throw new \TypeError('Expected a Response, Promise, Throwable or callable. Found ' . Utils::describeType($value));
 
167
  }
168
  }
169
  }
170
 
171
  /**
172
  * Get the last received request.
 
 
173
  */
174
- public function getLastRequest(): ?RequestInterface
175
  {
176
  return $this->lastRequest;
177
  }
178
 
179
  /**
180
  * Get the last received request options.
 
 
181
  */
182
- public function getLastOptions(): array
183
  {
184
  return $this->lastOptions;
185
  }
186
 
187
  /**
188
  * Returns the number of remaining items in the queue.
 
 
189
  */
190
- public function count(): int
191
  {
192
- return \count($this->queue);
193
  }
194
 
195
- public function reset(): void
196
  {
197
  $this->queue = [];
198
  }
199
 
200
- /**
201
- * @param mixed $reason Promise or reason.
202
- */
203
  private function invokeStats(
204
  RequestInterface $request,
205
  array $options,
206
  ResponseInterface $response = null,
207
  $reason = null
208
- ): void {
209
  if (isset($options['on_stats'])) {
210
- $transferTime = $options['transfer_time'] ?? 0;
211
  $stats = new TransferStats($request, $response, $transferTime, $reason);
212
- ($options['on_stats'])($stats);
213
  }
214
  }
215
  }
1
  <?php
 
2
  namespace GuzzleHttp\Handler;
3
 
4
  use GuzzleHttp\Exception\RequestException;
5
  use GuzzleHttp\HandlerStack;
6
  use GuzzleHttp\Promise\PromiseInterface;
7
+ use GuzzleHttp\Promise\RejectedPromise;
8
  use GuzzleHttp\TransferStats;
 
9
  use Psr\Http\Message\RequestInterface;
10
  use Psr\Http\Message\ResponseInterface;
 
11
 
12
  /**
13
  * Handler that returns responses or throw exceptions from a queue.
 
 
14
  */
15
  class MockHandler implements \Countable
16
  {
 
 
 
17
  private $queue = [];
 
 
 
 
18
  private $lastRequest;
19
+ private $lastOptions;
 
 
 
 
 
 
 
 
20
  private $onFulfilled;
 
 
 
 
21
  private $onRejected;
22
 
23
  /**
24
  * Creates a new MockHandler that uses the default handler stack list of
25
  * middlewares.
26
  *
27
+ * @param array $queue Array of responses, callables, or exceptions.
28
+ * @param callable $onFulfilled Callback to invoke when the return value is fulfilled.
29
+ * @param callable $onRejected Callback to invoke when the return value is rejected.
30
+ *
31
+ * @return HandlerStack
32
  */
33
  public static function createWithMiddleware(
34
  array $queue = null,
35
  callable $onFulfilled = null,
36
  callable $onRejected = null
37
+ ) {
38
  return HandlerStack::create(new self($queue, $onFulfilled, $onRejected));
39
  }
40
 
41
  /**
42
  * The passed in value must be an array of
43
+ * {@see Psr7\Http\Message\ResponseInterface} objects, Exceptions,
44
  * callables, or Promises.
45
  *
46
+ * @param array $queue
47
+ * @param callable $onFulfilled Callback to invoke when the return value is fulfilled.
48
+ * @param callable $onRejected Callback to invoke when the return value is rejected.
49
  */
50
  public function __construct(
51
  array $queue = null,
56
  $this->onRejected = $onRejected;
57
 
58
  if ($queue) {
59
+ call_user_func_array([$this, 'append'], $queue);
60
  }
61
  }
62
 
63
+ public function __invoke(RequestInterface $request, array $options)
64
  {
65
  if (!$this->queue) {
66
  throw new \OutOfBoundsException('Mock queue is empty');
67
  }
68
 
69
+ if (isset($options['delay']) && is_numeric($options['delay'])) {
70
+ usleep($options['delay'] * 1000);
71
  }
72
 
73
  $this->lastRequest = $request;
74
  $this->lastOptions = $options;
75
+ $response = array_shift($this->queue);
76
 
77
  if (isset($options['on_headers'])) {
78
+ if (!is_callable($options['on_headers'])) {
79
  throw new \InvalidArgumentException('on_headers must be callable');
80
  }
81
  try {
86
  }
87
  }
88
 
89
+ if (is_callable($response)) {
90
+ $response = call_user_func($response, $request, $options);
91
  }
92
 
93
+ $response = $response instanceof \Exception
94
  ? \GuzzleHttp\Promise\rejection_for($response)
95
  : \GuzzleHttp\Promise\promise_for($response);
96
 
97
  return $response->then(
98
+ function ($value) use ($request, $options) {
99
  $this->invokeStats($request, $options, $value);
100
  if ($this->onFulfilled) {
101
+ call_user_func($this->onFulfilled, $value);
102
  }
103
+ if (isset($options['sink'])) {
 
104
  $contents = (string) $value->getBody();
105
  $sink = $options['sink'];
106
 
107
+ if (is_resource($sink)) {
108
+ fwrite($sink, $contents);
109
+ } elseif (is_string($sink)) {
110
+ file_put_contents($sink, $contents);
111
+ } elseif ($sink instanceof \Psr\Http\Message\StreamInterface) {
112
  $sink->write($contents);
113
  }
114
  }
118
  function ($reason) use ($request, $options) {
119
  $this->invokeStats($request, $options, null, $reason);
120
  if ($this->onRejected) {
121
+ call_user_func($this->onRejected, $reason);
122
  }
123
  return \GuzzleHttp\Promise\rejection_for($reason);
124
  }
128
  /**
129
  * Adds one or more variadic requests, exceptions, callables, or promises
130
  * to the queue.
 
 
131
  */
132
+ public function append()
133
  {
134
+ foreach (func_get_args() as $value) {
135
  if ($value instanceof ResponseInterface
136
+ || $value instanceof \Exception
137
  || $value instanceof PromiseInterface
138
+ || is_callable($value)
139
  ) {
140
  $this->queue[] = $value;
141
  } else {
142
+ throw new \InvalidArgumentException('Expected a response or '
143
+ . 'exception. Found ' . \GuzzleHttp\describe_type($value));
144
  }
145
  }
146
  }
147
 
148
  /**
149
  * Get the last received request.
150
+ *
151
+ * @return RequestInterface
152
  */
153
+ public function getLastRequest()
154
  {
155
  return $this->lastRequest;
156
  }
157
 
158
  /**
159
  * Get the last received request options.
160
+ *
161
+ * @return array
162
  */
163
+ public function getLastOptions()
164
  {
165
  return $this->lastOptions;
166
  }
167
 
168
  /**
169
  * Returns the number of remaining items in the queue.
170
+ *
171
+ * @return int
172
  */
173
+ public function count()
174
  {
175
+ return count($this->queue);
176
  }
177
 
178
+ public function reset()
179
  {
180
  $this->queue = [];
181
  }
182
 
 
 
 
183
  private function invokeStats(
184
  RequestInterface $request,
185
  array $options,
186
  ResponseInterface $response = null,
187
  $reason = null
188
+ ) {
189
  if (isset($options['on_stats'])) {
190
+ $transferTime = isset($options['transfer_time']) ? $options['transfer_time'] : 0;
191
  $stats = new TransferStats($request, $response, $transferTime, $reason);
192
+ call_user_func($options['on_stats'], $stats);
193
  }
194
  }
195
  }
vendor/guzzlehttp/guzzle/src/Handler/Proxy.php CHANGED
@@ -1,15 +1,11 @@
1
  <?php
2
-
3
  namespace GuzzleHttp\Handler;
4
 
5
- use GuzzleHttp\Promise\PromiseInterface;
6
  use GuzzleHttp\RequestOptions;
7
  use Psr\Http\Message\RequestInterface;
8
 
9
  /**
10
  * Provides basic proxies for handlers.
11
- *
12
- * @final
13
  */
14
  class Proxy
15
  {
@@ -17,16 +13,16 @@ class Proxy
17
  * Sends synchronous requests to a specific handler while sending all other
18
  * requests to another handler.
19
  *
20
- * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $default Handler used for normal responses
21
- * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $sync Handler used for synchronous responses.
22
  *
23
- * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler.
24
  */
25
  public static function wrapSync(
26
  callable $default,
27
  callable $sync
28
- ): callable {
29
- return static function (RequestInterface $request, array $options) use ($default, $sync): PromiseInterface {
30
  return empty($options[RequestOptions::SYNCHRONOUS])
31
  ? $default($request, $options)
32
  : $sync($request, $options);
@@ -41,16 +37,16 @@ class Proxy
41
  * performance benefits of curl while still supporting true streaming
42
  * through the StreamHandler.
43
  *
44
- * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $default Handler used for non-streaming responses
45
- * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $streaming Handler used for streaming responses
46
  *
47
- * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler.
48
  */
49
  public static function wrapStreaming(
50
  callable $default,
51
  callable $streaming
52
- ): callable {
53
- return static function (RequestInterface $request, array $options) use ($default, $streaming): PromiseInterface {
54
  return empty($options['stream'])
55
  ? $default($request, $options)
56
  : $streaming($request, $options);
1
  <?php
 
2
  namespace GuzzleHttp\Handler;
3
 
 
4
  use GuzzleHttp\RequestOptions;
5
  use Psr\Http\Message\RequestInterface;
6
 
7
  /**
8
  * Provides basic proxies for handlers.
 
 
9
  */
10
  class Proxy
11
  {
13
  * Sends synchronous requests to a specific handler while sending all other
14
  * requests to another handler.
15
  *
16
+ * @param callable $default Handler used for normal responses
17
+ * @param callable $sync Handler used for synchronous responses.
18
  *
19
+ * @return callable Returns the composed handler.
20
  */
21
  public static function wrapSync(
22
  callable $default,
23
  callable $sync
24
+ ) {
25
+ return function (RequestInterface $request, array $options) use ($default, $sync) {
26
  return empty($options[RequestOptions::SYNCHRONOUS])
27
  ? $default($request, $options)
28
  : $sync($request, $options);
37
  * performance benefits of curl while still supporting true streaming
38
  * through the StreamHandler.
39
  *
40
+ * @param callable $default Handler used for non-streaming responses
41
+ * @param callable $streaming Handler used for streaming responses
42
  *
43
+ * @return callable Returns the composed handler.
44
  */
45
  public static function wrapStreaming(
46
  callable $default,
47
  callable $streaming
48
+ ) {
49
+ return function (RequestInterface $request, array $options) use ($default, $streaming) {
50
  return empty($options['stream'])
51
  ? $default($request, $options)
52
  : $streaming($request, $options);
vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  namespace GuzzleHttp\Handler;
4
 
5
  use GuzzleHttp\Exception\ConnectException;
@@ -12,18 +11,12 @@ use GuzzleHttp\Utils;
12
  use Psr\Http\Message\RequestInterface;
13
  use Psr\Http\Message\ResponseInterface;
14
  use Psr\Http\Message\StreamInterface;
15
- use Psr\Http\Message\UriInterface;
16
 
17
  /**
18
  * HTTP handler that uses PHP's HTTP stream wrapper.
19
- *
20
- * @final
21
  */
22
  class StreamHandler
23
  {
24
- /**
25
- * @var array
26
- */
27
  private $lastHeaders = [];
28
 
29
  /**
@@ -31,12 +24,14 @@ class StreamHandler
31
  *
32
  * @param RequestInterface $request Request to send.
33
  * @param array $options Request transfer options.
 
 
34
  */
35
- public function __invoke(RequestInterface $request, array $options): PromiseInterface
36
  {
37
  // Sleep if there is a delay specified.
38
  if (isset($options['delay'])) {
39
- \usleep($options['delay'] * 1000);
40
  }
41
 
42
  $startTime = isset($options['on_stats']) ? Utils::currentTime() : null;
@@ -63,15 +58,14 @@ class StreamHandler
63
  // Determine if the error was a networking error.
64
  $message = $e->getMessage();
65
  // This list can probably get more comprehensive.
66
- if (false !== \strpos($message, 'getaddrinfo') // DNS lookup failed
67
- || false !== \strpos($message, 'Connection refused')
68
- || false !== \strpos($message, "couldn't connect to host") // error on HHVM
69
- || false !== \strpos($message, "connection attempt failed")
70
  ) {
71
  $e = new ConnectException($e->getMessage(), $request, $e);
72
- } else {
73
- $e = RequestException::wrapException($request, $e);
74
  }
 
75
  $this->invokeStats($options, $request, $startTime, null, $e);
76
 
77
  return \GuzzleHttp\Promise\rejection_for($e);
@@ -81,10 +75,10 @@ class StreamHandler
81
  private function invokeStats(
82
  array $options,
83
  RequestInterface $request,
84
- ?float $startTime,
85
  ResponseInterface $response = null,
86
- \Throwable $error = null
87
- ): void {
88
  if (isset($options['on_stats'])) {
89
  $stats = new TransferStats(
90
  $request,
@@ -93,31 +87,28 @@ class StreamHandler
93
  $error,
94
  []
95
  );
96
- ($options['on_stats'])($stats);
97
  }
98
  }
99
 
100
- /**
101
- * @param resource $stream
102
- */
103
  private function createResponse(
104
  RequestInterface $request,
105
  array $options,
106
  $stream,
107
- ?float $startTime
108
- ): PromiseInterface {
109
  $hdrs = $this->lastHeaders;
110
  $this->lastHeaders = [];
111
- $parts = \explode(' ', \array_shift($hdrs), 3);
112
- $ver = \explode('/', $parts[0])[1];
113
- $status = (int) $parts[1];
114
- $reason = $parts[2] ?? null;
115
- $headers = Utils::headersFromLines($hdrs);
116
- [$stream, $headers] = $this->checkDecode($options, $headers, $stream);
117
  $stream = Psr7\stream_for($stream);
118
  $sink = $stream;
119
 
120
- if (\strcasecmp('HEAD', $request->getMethod())) {
121
  $sink = $this->createSink($stream, $options);
122
  }
123
 
@@ -148,28 +139,26 @@ class StreamHandler
148
  return new FulfilledPromise($response);
149
  }
150
 
151
- private function createSink(StreamInterface $stream, array $options): StreamInterface
152
  {
153
  if (!empty($options['stream'])) {
154
  return $stream;
155
  }
156
 
157
- $sink = $options['sink']
158
- ?? \fopen('php://temp', 'r+');
 
159
 
160
- return \is_string($sink)
161
  ? new Psr7\LazyOpenStream($sink, 'w+')
162
  : Psr7\stream_for($sink);
163
  }
164
 
165
- /**
166
- * @param resource $stream
167
- */
168
- private function checkDecode(array $options, array $headers, $stream): array
169
  {
170
  // Automatically decode responses when instructed.
171
  if (!empty($options['decode_content'])) {
172
- $normalizedKeys = Utils::normalizeHeaderKeys($headers);
173
  if (isset($normalizedKeys['content-encoding'])) {
174
  $encoding = $headers[$normalizedKeys['content-encoding']];
175
  if ($encoding[0] === 'gzip' || $encoding[0] === 'deflate') {
@@ -202,16 +191,19 @@ class StreamHandler
202
  /**
203
  * Drains the source stream into the "sink" client option.
204
  *
205
- * @param string $contentLength Header specifying the amount of
206
- * data to read.
 
 
207
  *
 
208
  * @throws \RuntimeException when the sink option is invalid.
209
  */
210
  private function drain(
211
  StreamInterface $source,
212
  StreamInterface $sink,
213
- string $contentLength
214
- ): StreamInterface {
215
  // If a content-length header is provided, then stop reading once
216
  // that number of bytes has been read. This can prevent infinitely
217
  // reading from a stream when dealing with servers that do not honor
@@ -219,7 +211,7 @@ class StreamHandler
219
  Psr7\copy_to_stream(
220
  $source,
221
  $sink,
222
- (\strlen($contentLength) > 0 && (int) $contentLength > 0) ? (int) $contentLength : -1
223
  );
224
 
225
  $sink->seek(0);
@@ -234,13 +226,12 @@ class StreamHandler
234
  * @param callable $callback Callable that returns stream resource
235
  *
236
  * @return resource
237
- *
238
  * @throws \RuntimeException on error
239
  */
240
  private function createResource(callable $callback)
241
  {
242
- $errors = [];
243
- \set_error_handler(static function ($_, $msg, $file, $line) use (&$errors): bool {
244
  $errors[] = [
245
  'message' => $msg,
246
  'file' => $file,
@@ -250,29 +241,26 @@ class StreamHandler
250
  });
251
 
252
  $resource = $callback();
253
- \restore_error_handler();
254
 
255
  if (!$resource) {
256
  $message = 'Error creating resource: ';
257
  foreach ($errors as $err) {
258
  foreach ($err as $key => $value) {
259
- $message .= "[$key] $value" . \PHP_EOL;
260
  }
261
  }
262
- throw new \RuntimeException(\trim($message));
263
  }
264
 
265
  return $resource;
266
  }
267
 
268
- /**
269
- * @return resource
270
- */
271
  private function createStream(RequestInterface $request, array $options)
272
  {
273
  static $methods;
274
  if (!$methods) {
275
- $methods = \array_flip(\get_class_methods(__CLASS__));
276
  }
277
 
278
  // HTTP/1.1 streams using the PHP stream wrapper require a
@@ -291,7 +279,7 @@ class StreamHandler
291
  $params = [];
292
  $context = $this->getDefaultContext($request);
293
 
294
- if (isset($options['on_headers']) && !\is_callable($options['on_headers'])) {
295
  throw new \InvalidArgumentException('on_headers must be callable');
296
  }
297
 
@@ -305,47 +293,42 @@ class StreamHandler
305
  }
306
 
307
  if (isset($options['stream_context'])) {
308
- if (!\is_array($options['stream_context'])) {
309
  throw new \InvalidArgumentException('stream_context must be an array');
310
  }
311
- $context = \array_replace_recursive(
312
  $context,
313
  $options['stream_context']
314
  );
315
  }
316
 
317
  // Microsoft NTLM authentication only supported with curl handler
318
- if (isset($options['auth'][2]) && 'ntlm' === $options['auth'][2]) {
 
 
 
 
319
  throw new \InvalidArgumentException('Microsoft NTLM authentication only supported with curl handler');
320
  }
321
 
322
  $uri = $this->resolveHost($request, $options);
323
 
324
- $contextResource = $this->createResource(
325
- static function () use ($context, $params) {
326
- return \stream_context_create($context, $params);
327
  }
328
  );
329
 
330
  return $this->createResource(
331
- function () use ($uri, &$http_response_header, $contextResource, $context, $options, $request) {
332
- $resource = \fopen((string) $uri, 'r', false, $contextResource);
333
  $this->lastHeaders = $http_response_header;
334
 
335
- if (false === $resource) {
336
- throw new ConnectException(
337
- sprintf('Connection refused for URI %s', $uri),
338
- $request,
339
- null,
340
- $context
341
- );
342
- }
343
-
344
  if (isset($options['read_timeout'])) {
345
  $readTimeout = $options['read_timeout'];
346
  $sec = (int) $readTimeout;
347
  $usec = ($readTimeout - $sec) * 100000;
348
- \stream_set_timeout($resource, $sec, $usec);
349
  }
350
 
351
  return $resource;
@@ -353,43 +336,42 @@ class StreamHandler
353
  );
354
  }
355
 
356
- private function resolveHost(RequestInterface $request, array $options): UriInterface
357
  {
358
  $uri = $request->getUri();
359
 
360
- if (isset($options['force_ip_resolve']) && !\filter_var($uri->getHost(), \FILTER_VALIDATE_IP)) {
361
  if ('v4' === $options['force_ip_resolve']) {
362
- $records = \dns_get_record($uri->getHost(), \DNS_A);
363
- if (false === $records || !isset($records[0]['ip'])) {
364
  throw new ConnectException(
365
- \sprintf(
366
  "Could not resolve IPv4 address for host '%s'",
367
  $uri->getHost()
368
  ),
369
  $request
370
  );
371
  }
372
- return $uri->withHost($records[0]['ip']);
373
- }
374
- if ('v6' === $options['force_ip_resolve']) {
375
- $records = \dns_get_record($uri->getHost(), \DNS_AAAA);
376
- if (false === $records || !isset($records[0]['ipv6'])) {
377
  throw new ConnectException(
378
- \sprintf(
379
  "Could not resolve IPv6 address for host '%s'",
380
  $uri->getHost()
381
  ),
382
  $request
383
  );
384
  }
385
- return $uri->withHost('[' . $records[0]['ipv6'] . ']');
386
  }
387
  }
388
 
389
  return $uri;
390
  }
391
 
392
- private function getDefaultContext(RequestInterface $request): array
393
  {
394
  $headers = '';
395
  foreach ($request->getHeaders() as $name => $value) {
@@ -418,23 +400,20 @@ class StreamHandler
418
  }
419
  }
420
 
421
- $context['http']['header'] = \rtrim($context['http']['header']);
422
 
423
  return $context;
424
  }
425
 
426
- /**
427
- * @param mixed $value as passed via Request transfer options.
428
- */
429
- private function add_proxy(RequestInterface $request, array &$options, $value, array &$params): void
430
  {
431
- if (!\is_array($value)) {
432
  $options['http']['proxy'] = $value;
433
  } else {
434
  $scheme = $request->getUri()->getScheme();
435
  if (isset($value[$scheme])) {
436
  if (!isset($value['no'])
437
- || !Utils::isHostInNoProxy(
438
  $request->getUri()->getHost(),
439
  $value['no']
440
  )
@@ -445,34 +424,31 @@ class StreamHandler
445
  }
446
  }
447
 
448
- /**
449
- * @param mixed $value as passed via Request transfer options.
450
- */
451
- private function add_timeout(RequestInterface $request, array &$options, $value, array &$params): void
452
  {
453
  if ($value > 0) {
454
  $options['http']['timeout'] = $value;
455
  }
456
  }
457
 
458
- /**
459
- * @param mixed $value as passed via Request transfer options.
460
- */
461
- private function add_verify(RequestInterface $request, array &$options, $value, array &$params): void
462
  {
463
- if ($value === false) {
464
- $options['ssl']['verify_peer'] = false;
465
- $options['ssl']['verify_peer_name'] = false;
466
-
467
- return;
468
- }
469
-
470
- if (\is_string($value)) {
471
  $options['ssl']['cafile'] = $value;
472
- if (!\file_exists($value)) {
473
  throw new \RuntimeException("SSL CA bundle not found: $value");
474
  }
475
- } elseif ($value !== true) {
 
 
 
 
476
  throw new \InvalidArgumentException('Invalid verify request option');
477
  }
478
 
@@ -481,79 +457,70 @@ class StreamHandler
481
  $options['ssl']['allow_self_signed'] = false;
482
  }
483
 
484
- /**
485
- * @param mixed $value as passed via Request transfer options.
486
- */
487
- private function add_cert(RequestInterface $request, array &$options, $value, array &$params): void
488
  {
489
- if (\is_array($value)) {
490
  $options['ssl']['passphrase'] = $value[1];
491
  $value = $value[0];
492
  }
493
 
494
- if (!\file_exists($value)) {
495
  throw new \RuntimeException("SSL certificate not found: {$value}");
496
  }
497
 
498
  $options['ssl']['local_cert'] = $value;
499
  }
500
 
501
- /**
502
- * @param mixed $value as passed via Request transfer options.
503
- */
504
- private function add_progress(RequestInterface $request, array &$options, $value, array &$params): void
505
  {
506
  $this->addNotification(
507
  $params,
508
- static function ($code, $a, $b, $c, $transferred, $total) use ($value) {
509
- if ($code == \STREAM_NOTIFY_PROGRESS) {
510
  $value($total, $transferred, null, null);
511
  }
512
  }
513
  );
514
  }
515
 
516
- /**
517
- * @param mixed $value as passed via Request transfer options.
518
- */
519
- private function add_debug(RequestInterface $request, array &$options, $value, array &$params): void
520
  {
521
  if ($value === false) {
522
  return;
523
  }
524
 
525
  static $map = [
526
- \STREAM_NOTIFY_CONNECT => 'CONNECT',
527
- \STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED',
528
- \STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT',
529
- \STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS',
530
- \STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS',
531
- \STREAM_NOTIFY_REDIRECTED => 'REDIRECTED',
532
- \STREAM_NOTIFY_PROGRESS => 'PROGRESS',
533
- \STREAM_NOTIFY_FAILURE => 'FAILURE',
534
- \STREAM_NOTIFY_COMPLETED => 'COMPLETED',
535
- \STREAM_NOTIFY_RESOLVE => 'RESOLVE',
536
  ];
537
  static $args = ['severity', 'message', 'message_code',
538
  'bytes_transferred', 'bytes_max'];
539
 
540
- $value = Utils::debugResource($value);
541
  $ident = $request->getMethod() . ' ' . $request->getUri()->withFragment('');
542
  $this->addNotification(
543
  $params,
544
- static function () use ($ident, $value, $map, $args): void {
545
- $passed = \func_get_args();
546
- $code = \array_shift($passed);
547
- \fprintf($value, '<%s> [%s] ', $ident, $map[$code]);
548
- foreach (\array_filter($passed) as $i => $v) {
549
- \fwrite($value, $args[$i] . ': "' . $v . '" ');
550
  }
551
- \fwrite($value, "\n");
552
  }
553
  );
554
  }
555
 
556
- private function addNotification(array &$params, callable $notify): void
557
  {
558
  // Wrap the existing function if needed.
559
  if (!isset($params['notification'])) {
@@ -566,12 +533,12 @@ class StreamHandler
566
  }
567
  }
568
 
569
- private function callArray(array $functions): callable
570
  {
571
- return static function () use ($functions) {
572
- $args = \func_get_args();
573
  foreach ($functions as $fn) {
574
- \call_user_func_array($fn, $args);
575
  }
576
  };
577
  }
1
  <?php
 
2
  namespace GuzzleHttp\Handler;
3
 
4
  use GuzzleHttp\Exception\ConnectException;
11
  use Psr\Http\Message\RequestInterface;
12
  use Psr\Http\Message\ResponseInterface;
13
  use Psr\Http\Message\StreamInterface;
 
14
 
15
  /**
16
  * HTTP handler that uses PHP's HTTP stream wrapper.
 
 
17
  */
18
  class StreamHandler
19
  {
 
 
 
20
  private $lastHeaders = [];
21
 
22
  /**
24
  *
25
  * @param RequestInterface $request Request to send.
26
  * @param array $options Request transfer options.
27
+ *
28
+ * @return PromiseInterface
29
  */
30
+ public function __invoke(RequestInterface $request, array $options)
31
  {
32
  // Sleep if there is a delay specified.
33
  if (isset($options['delay'])) {
34
+ usleep($options['delay'] * 1000);
35
  }
36
 
37
  $startTime = isset($options['on_stats']) ? Utils::currentTime() : null;
58
  // Determine if the error was a networking error.
59
  $message = $e->getMessage();
60
  // This list can probably get more comprehensive.
61
+ if (strpos($message, 'getaddrinfo') // DNS lookup failed
62
+ || strpos($message, 'Connection refused')
63
+ || strpos($message, "couldn't connect to host") // error on HHVM
64
+ || strpos($message, "connection attempt failed")
65
  ) {
66
  $e = new ConnectException($e->getMessage(), $request, $e);
 
 
67
  }
68
+ $e = RequestException::wrapException($request, $e);
69
  $this->invokeStats($options, $request, $startTime, null, $e);
70
 
71
  return \GuzzleHttp\Promise\rejection_for($e);
75
  private function invokeStats(
76
  array $options,
77
  RequestInterface $request,
78
+ $startTime,
79
  ResponseInterface $response = null,
80
+ $error = null
81
+ ) {
82
  if (isset($options['on_stats'])) {
83
  $stats = new TransferStats(
84
  $request,
87
  $error,
88
  []
89
  );
90
+ call_user_func($options['on_stats'], $stats);
91
  }
92
  }
93
 
 
 
 
94
  private function createResponse(
95
  RequestInterface $request,
96
  array $options,
97
  $stream,
98
+ $startTime
99
+ ) {
100
  $hdrs = $this->lastHeaders;
101
  $this->lastHeaders = [];
102
+ $parts = explode(' ', array_shift($hdrs), 3);
103
+ $ver = explode('/', $parts[0])[1];
104
+ $status = $parts[1];
105
+ $reason = isset($parts[2]) ? $parts[2] : null;
106
+ $headers = \GuzzleHttp\headers_from_lines($hdrs);
107
+ list($stream, $headers) = $this->checkDecode($options, $headers, $stream);
108
  $stream = Psr7\stream_for($stream);
109
  $sink = $stream;
110
 
111
+ if (strcasecmp('HEAD', $request->getMethod())) {
112
  $sink = $this->createSink($stream, $options);
113
  }
114
 
139
  return new FulfilledPromise($response);
140
  }
141
 
142
+ private function createSink(StreamInterface $stream, array $options)
143
  {
144
  if (!empty($options['stream'])) {
145
  return $stream;
146
  }
147
 
148
+ $sink = isset($options['sink'])
149
+ ? $options['sink']
150
+ : fopen('php://temp', 'r+');
151
 
152
+ return is_string($sink)
153
  ? new Psr7\LazyOpenStream($sink, 'w+')
154
  : Psr7\stream_for($sink);
155
  }
156
 
157
+ private function checkDecode(array $options, array $headers, $stream)
 
 
 
158
  {
159
  // Automatically decode responses when instructed.
160
  if (!empty($options['decode_content'])) {
161
+ $normalizedKeys = \GuzzleHttp\normalize_header_keys($headers);
162
  if (isset($normalizedKeys['content-encoding'])) {
163
  $encoding = $headers[$normalizedKeys['content-encoding']];
164
  if ($encoding[0] === 'gzip' || $encoding[0] === 'deflate') {
191
  /**
192
  * Drains the source stream into the "sink" client option.
193
  *
194
+ * @param StreamInterface $source
195
+ * @param StreamInterface $sink
196
+ * @param string $contentLength Header specifying the amount of
197
+ * data to read.
198
  *
199
+ * @return StreamInterface
200
  * @throws \RuntimeException when the sink option is invalid.
201
  */
202
  private function drain(
203
  StreamInterface $source,
204
  StreamInterface $sink,
205
+ $contentLength
206
+ ) {
207
  // If a content-length header is provided, then stop reading once
208
  // that number of bytes has been read. This can prevent infinitely
209
  // reading from a stream when dealing with servers that do not honor
211
  Psr7\copy_to_stream(
212
  $source,
213
  $sink,
214
+ (strlen($contentLength) > 0 && (int) $contentLength > 0) ? (int) $contentLength : -1
215
  );
216
 
217
  $sink->seek(0);
226
  * @param callable $callback Callable that returns stream resource
227
  *
228
  * @return resource
 
229
  * @throws \RuntimeException on error
230
  */
231
  private function createResource(callable $callback)
232
  {
233
+ $errors = null;
234
+ set_error_handler(function ($_, $msg, $file, $line) use (&$errors) {
235
  $errors[] = [
236
  'message' => $msg,
237
  'file' => $file,
241
  });
242
 
243
  $resource = $callback();
244
+ restore_error_handler();
245
 
246
  if (!$resource) {
247
  $message = 'Error creating resource: ';
248
  foreach ($errors as $err) {
249
  foreach ($err as $key => $value) {
250
+ $message .= "[$key] $value" . PHP_EOL;
251
  }
252
  }
253
+ throw new \RuntimeException(trim($message));
254
  }
255
 
256
  return $resource;
257
  }
258
 
 
 
 
259
  private function createStream(RequestInterface $request, array $options)
260
  {
261
  static $methods;
262
  if (!$methods) {
263
+ $methods = array_flip(get_class_methods(__CLASS__));
264
  }
265
 
266
  // HTTP/1.1 streams using the PHP stream wrapper require a
279
  $params = [];
280
  $context = $this->getDefaultContext($request);
281
 
282
+ if (isset($options['on_headers']) && !is_callable($options['on_headers'])) {
283
  throw new \InvalidArgumentException('on_headers must be callable');
284
  }
285
 
293
  }
294
 
295
  if (isset($options['stream_context'])) {
296
+ if (!is_array($options['stream_context'])) {
297
  throw new \InvalidArgumentException('stream_context must be an array');
298
  }
299
+ $context = array_replace_recursive(
300
  $context,
301
  $options['stream_context']
302
  );
303
  }
304
 
305
  // Microsoft NTLM authentication only supported with curl handler
306
+ if (isset($options['auth'])
307
+ && is_array($options['auth'])
308
+ && isset($options['auth'][2])
309
+ && 'ntlm' == $options['auth'][2]
310
+ ) {
311
  throw new \InvalidArgumentException('Microsoft NTLM authentication only supported with curl handler');
312
  }
313
 
314
  $uri = $this->resolveHost($request, $options);
315
 
316
+ $context = $this->createResource(
317
+ function () use ($context, $params) {
318
+ return stream_context_create($context, $params);
319
  }
320
  );
321
 
322
  return $this->createResource(
323
+ function () use ($uri, &$http_response_header, $context, $options) {
324
+ $resource = fopen((string) $uri, 'r', null, $context);
325
  $this->lastHeaders = $http_response_header;
326
 
 
 
 
 
 
 
 
 
 
327
  if (isset($options['read_timeout'])) {
328
  $readTimeout = $options['read_timeout'];
329
  $sec = (int) $readTimeout;
330
  $usec = ($readTimeout - $sec) * 100000;
331
+ stream_set_timeout($resource, $sec, $usec);
332
  }
333
 
334
  return $resource;
336
  );
337
  }
338
 
339
+ private function resolveHost(RequestInterface $request, array $options)
340
  {
341
  $uri = $request->getUri();
342
 
343
+ if (isset($options['force_ip_resolve']) && !filter_var($uri->getHost(), FILTER_VALIDATE_IP)) {
344
  if ('v4' === $options['force_ip_resolve']) {
345
+ $records = dns_get_record($uri->getHost(), DNS_A);
346
+ if (!isset($records[0]['ip'])) {
347
  throw new ConnectException(
348
+ sprintf(
349
  "Could not resolve IPv4 address for host '%s'",
350
  $uri->getHost()
351
  ),
352
  $request
353
  );
354
  }
355
+ $uri = $uri->withHost($records[0]['ip']);
356
+ } elseif ('v6' === $options['force_ip_resolve']) {
357
+ $records = dns_get_record($uri->getHost(), DNS_AAAA);
358
+ if (!isset($records[0]['ipv6'])) {
 
359
  throw new ConnectException(
360
+ sprintf(
361
  "Could not resolve IPv6 address for host '%s'",
362
  $uri->getHost()
363
  ),
364
  $request
365
  );
366
  }
367
+ $uri = $uri->withHost('[' . $records[0]['ipv6'] . ']');
368
  }
369
  }
370
 
371
  return $uri;
372
  }
373
 
374
+ private function getDefaultContext(RequestInterface $request)
375
  {
376
  $headers = '';
377
  foreach ($request->getHeaders() as $name => $value) {
400
  }
401
  }
402
 
403
+ $context['http']['header'] = rtrim($context['http']['header']);
404
 
405
  return $context;
406
  }
407
 
408
+ private function add_proxy(RequestInterface $request, &$options, $value, &$params)
 
 
 
409
  {
410
+ if (!is_array($value)) {
411
  $options['http']['proxy'] = $value;
412
  } else {
413
  $scheme = $request->getUri()->getScheme();
414
  if (isset($value[$scheme])) {
415
  if (!isset($value['no'])
416
+ || !\GuzzleHttp\is_host_in_noproxy(
417
  $request->getUri()->getHost(),
418
  $value['no']
419
  )
424
  }
425
  }
426
 
427
+ private function add_timeout(RequestInterface $request, &$options, $value, &$params)
 
 
 
428
  {
429
  if ($value > 0) {
430
  $options['http']['timeout'] = $value;
431
  }
432
  }
433
 
434
+ private function add_verify(RequestInterface $request, &$options, $value, &$params)
 
 
 
435
  {
436
+ if ($value === true) {
437
+ // PHP 5.6 or greater will find the system cert by default. When
438
+ // < 5.6, use the Guzzle bundled cacert.
439
+ if (PHP_VERSION_ID < 50600) {
440
+ $options['ssl']['cafile'] = \GuzzleHttp\default_ca_bundle();
441
+ }
442
+ } elseif (is_string($value)) {
 
443
  $options['ssl']['cafile'] = $value;
444
+ if (!file_exists($value)) {
445
  throw new \RuntimeException("SSL CA bundle not found: $value");
446
  }
447
+ } elseif ($value === false) {
448
+ $options['ssl']['verify_peer'] = false;
449
+ $options['ssl']['verify_peer_name'] = false;
450
+ return;
451
+ } else {
452
  throw new \InvalidArgumentException('Invalid verify request option');
453
  }
454
 
457
  $options['ssl']['allow_self_signed'] = false;
458
  }
459
 
460
+ private function add_cert(RequestInterface $request, &$options, $value, &$params)
 
 
 
461
  {
462
+ if (is_array($value)) {
463
  $options['ssl']['passphrase'] = $value[1];
464
  $value = $value[0];
465
  }
466
 
467
+ if (!file_exists($value)) {
468
  throw new \RuntimeException("SSL certificate not found: {$value}");
469
  }
470
 
471
  $options['ssl']['local_cert'] = $value;
472
  }
473
 
474
+ private function add_progress(RequestInterface $request, &$options, $value, &$params)
 
 
 
475
  {
476
  $this->addNotification(
477
  $params,
478
+ function ($code, $a, $b, $c, $transferred, $total) use ($value) {
479
+ if ($code == STREAM_NOTIFY_PROGRESS) {
480
  $value($total, $transferred, null, null);
481
  }
482
  }
483
  );
484
  }
485
 
486
+ private function add_debug(RequestInterface $request, &$options, $value, &$params)
 
 
 
487
  {
488
  if ($value === false) {
489
  return;
490
  }
491
 
492
  static $map = [
493
+ STREAM_NOTIFY_CONNECT => 'CONNECT',
494
+ STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED',
495
+ STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT',
496
+ STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS',
497
+ STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS',
498
+ STREAM_NOTIFY_REDIRECTED => 'REDIRECTED',
499
+ STREAM_NOTIFY_PROGRESS => 'PROGRESS',
500
+ STREAM_NOTIFY_FAILURE => 'FAILURE',
501
+ STREAM_NOTIFY_COMPLETED => 'COMPLETED',
502
+ STREAM_NOTIFY_RESOLVE => 'RESOLVE',
503
  ];
504
  static $args = ['severity', 'message', 'message_code',
505
  'bytes_transferred', 'bytes_max'];
506
 
507
+ $value = \GuzzleHttp\debug_resource($value);
508
  $ident = $request->getMethod() . ' ' . $request->getUri()->withFragment('');
509
  $this->addNotification(
510
  $params,
511
+ function () use ($ident, $value, $map, $args) {
512
+ $passed = func_get_args();
513
+ $code = array_shift($passed);
514
+ fprintf($value, '<%s> [%s] ', $ident, $map[$code]);
515
+ foreach (array_filter($passed) as $i => $v) {
516
+ fwrite($value, $args[$i] . ': "' . $v . '" ');
517
  }
518
+ fwrite($value, "\n");
519
  }
520
  );
521
  }
522
 
523
+ private function addNotification(array &$params, callable $notify)
524
  {
525
  // Wrap the existing function if needed.
526
  if (!isset($params['notification'])) {
533
  }
534
  }
535
 
536
+ private function callArray(array $functions)
537
  {
538
+ return function () use ($functions) {
539
+ $args = func_get_args();
540
  foreach ($functions as $fn) {
541
+ call_user_func_array($fn, $args);
542
  }
543
  };
544
  }
vendor/guzzlehttp/guzzle/src/HandlerStack.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  namespace GuzzleHttp;
4
 
5
  use GuzzleHttp\Promise\PromiseInterface;
@@ -9,24 +8,16 @@ use Psr\Http\Message\ResponseInterface;
9
  /**
10
  * Creates a composed Guzzle handler function by stacking middlewares on top of
11
  * an HTTP handler function.
12
- *
13
- * @final
14
  */
15
  class HandlerStack
16
  {
17
- /**
18
- * @var null|callable(RequestInterface, array): PromiseInterface
19
- */
20
  private $handler;
21
 
22
- /**
23
- * @var array{(callable(callable(RequestInterface, array): PromiseInterface): callable), (string|null)}[]
24
- */
25
  private $stack = [];
26
 
27
- /**
28
- * @var null|callable(RequestInterface, array): PromiseInterface
29
- */
30
  private $cached;
31
 
32
  /**
@@ -40,13 +31,15 @@ class HandlerStack
40
  * The returned handler stack can be passed to a client in the "handler"
41
  * option.
42
  *
43
- * @param null|callable(RequestInterface, array): PromiseInterface $handler HTTP handler function to use with the stack. If no
44
- * handler is provided, the best handler for your
45
- * system will be utilized.
 
 
46
  */
47
- public static function create(?callable $handler = null): self
48
  {
49
- $stack = new self($handler ?: Utils::chooseHandler());
50
  $stack->push(Middleware::httpErrors(), 'http_errors');
51
  $stack->push(Middleware::redirect(), 'allow_redirects');
52
  $stack->push(Middleware::cookies(), 'cookies');
@@ -56,7 +49,7 @@ class HandlerStack
56
  }
57
 
58
  /**
59
- * @param null|callable(RequestInterface, array): PromiseInterface $handler Underlying HTTP handler.
60
  */
61
  public function __construct(callable $handler = null)
62
  {
@@ -66,6 +59,9 @@ class HandlerStack
66
  /**
67
  * Invokes the handler stack as a composed handler
68
  *
 
 
 
69
  * @return ResponseInterface|PromiseInterface
70
  */
71
  public function __invoke(RequestInterface $request, array $options)
@@ -84,13 +80,12 @@ class HandlerStack
84
  {
85
  $depth = 0;
86
  $stack = [];
87
-
88
- if ($this->handler !== null) {
89
  $stack[] = "0) Handler: " . $this->debugCallable($this->handler);
90
  }
91
 
92
  $result = '';
93
- foreach (\array_reverse($this->stack) as $tuple) {
94
  $depth++;
95
  $str = "{$depth}) Name: '{$tuple[1]}', ";
96
  $str .= "Function: " . $this->debugCallable($tuple[0]);
@@ -98,7 +93,7 @@ class HandlerStack
98
  $stack[] = $str;
99
  }
100
 
101
- foreach (\array_keys($stack) as $k) {
102
  $result .= "< {$stack[$k]}\n";
103
  }
104
 
@@ -108,10 +103,10 @@ class HandlerStack
108
  /**
109
  * Set the HTTP handler that actually returns a promise.
110
  *
111
- * @param callable(RequestInterface, array): PromiseInterface $handler Accepts a request and array of options and
112
- * returns a Promise.
113
  */
114
- public function setHandler(callable $handler): void
115
  {
116
  $this->handler = $handler;
117
  $this->cached = null;
@@ -119,31 +114,33 @@ class HandlerStack
119
 
120
  /**
121
  * Returns true if the builder has a handler.
 
 
122
  */
123
- public function hasHandler(): bool
124
  {
125
- return $this->handler !== null ;
126
  }
127
 
128
  /**
129
  * Unshift a middleware to the bottom of the stack.
130
  *
131
- * @param callable(callable): callable $middleware Middleware function
132
- * @param string $name Name to register for this middleware.
133
  */
134
- public function unshift(callable $middleware, ?string $name = null): void
135
  {
136
- \array_unshift($this->stack, [$middleware, $name]);
137
  $this->cached = null;
138
  }
139
 
140
  /**
141
  * Push a middleware to the top of the stack.
142
  *
143
- * @param callable(callable): callable $middleware Middleware function
144
- * @param string $name Name to register for this middleware.
145
  */
146
- public function push(callable $middleware, string $name = ''): void
147
  {
148
  $this->stack[] = [$middleware, $name];
149
  $this->cached = null;
@@ -152,11 +149,11 @@ class HandlerStack
152
  /**
153
  * Add a middleware before another middleware by name.
154
  *
155
- * @param string $findName Middleware to find
156
- * @param callable(callable): callable $middleware Middleware function
157
- * @param string $withName Name to register for this middleware.
158
  */
159
- public function before(string $findName, callable $middleware, string $withName = ''): void
160
  {
161
  $this->splice($findName, $withName, $middleware, true);
162
  }
@@ -164,11 +161,11 @@ class HandlerStack
164
  /**
165
  * Add a middleware after another middleware by name.
166
  *
167
- * @param string $findName Middleware to find
168
- * @param callable(callable): callable $middleware Middleware function
169
- * @param string $withName Name to register for this middleware.
170
  */
171
- public function after(string $findName, callable $middleware, string $withName = ''): void
172
  {
173
  $this->splice($findName, $withName, $middleware, false);
174
  }
@@ -178,13 +175,13 @@ class HandlerStack
178
  *
179
  * @param callable|string $remove Middleware to remove by instance or name.
180
  */
181
- public function remove($remove): void
182
  {
183
  $this->cached = null;
184
- $idx = \is_callable($remove) ? 0 : 1;
185
- $this->stack = \array_values(\array_filter(
186
  $this->stack,
187
- static function ($tuple) use ($idx, $remove) {
188
  return $tuple[$idx] !== $remove;
189
  }
190
  ));
@@ -193,17 +190,16 @@ class HandlerStack
193
  /**
194
  * Compose the middleware and handler into a single callable function.
195
  *
196
- * @return callable(RequestInterface, array): PromiseInterface
197
  */
198
- public function resolve(): callable
199
  {
200
- if ($this->cached === null) {
201
- if (($prev = $this->handler) === null) {
202
  throw new \LogicException('No handler has been specified');
203
  }
204
 
205
- foreach (\array_reverse($this->stack) as $fn) {
206
- /** @var callable(RequestInterface, array): PromiseInterface $prev */
207
  $prev = $fn[0]($prev);
208
  }
209
 
@@ -213,7 +209,11 @@ class HandlerStack
213
  return $this->cached;
214
  }
215
 
216
- private function findByName(string $name): int
 
 
 
 
217
  {
218
  foreach ($this->stack as $k => $v) {
219
  if ($v[1] === $name) {
@@ -226,8 +226,13 @@ class HandlerStack
226
 
227
  /**
228
  * Splices a function into the middleware list at a specific position.
 
 
 
 
 
229
  */
230
- private function splice(string $findName, string $withName, callable $middleware, bool $before): void
231
  {
232
  $this->cached = null;
233
  $idx = $this->findByName($findName);
@@ -235,37 +240,38 @@ class HandlerStack
235
 
236
  if ($before) {
237
  if ($idx === 0) {
238
- \array_unshift($this->stack, $tuple);
239
  } else {
240
  $replacement = [$tuple, $this->stack[$idx]];
241
- \array_splice($this->stack, $idx, 1, $replacement);
242
  }
243
- } elseif ($idx === \count($this->stack) - 1) {
244
  $this->stack[] = $tuple;
245
  } else {
246
  $replacement = [$this->stack[$idx], $tuple];
247
- \array_splice($this->stack, $idx, 1, $replacement);
248
  }
249
  }
250
 
251
  /**
252
  * Provides a debug string for a given callable.
253
  *
254
- * @param callable $fn Function to write as a string.
 
 
255
  */
256
- private function debugCallable($fn): string
257
  {
258
- if (\is_string($fn)) {
259
  return "callable({$fn})";
260
  }
261
 
262
- if (\is_array($fn)) {
263
- return \is_string($fn[0])
264
  ? "callable({$fn[0]}::{$fn[1]})"
265
- : "callable(['" . \get_class($fn[0]) . "', '{$fn[1]}'])";
266
  }
267
 
268
- /** @var object $fn */
269
- return 'callable(' . \spl_object_hash($fn) . ')';
270
  }
271
  }
1
  <?php
 
2
  namespace GuzzleHttp;
3
 
4
  use GuzzleHttp\Promise\PromiseInterface;
8
  /**
9
  * Creates a composed Guzzle handler function by stacking middlewares on top of
10
  * an HTTP handler function.
 
 
11
  */
12
  class HandlerStack
13
  {
14
+ /** @var callable|null */
 
 
15
  private $handler;
16
 
17
+ /** @var array */
 
 
18
  private $stack = [];
19
 
20
+ /** @var callable|null */
 
 
21
  private $cached;
22
 
23
  /**
31
  * The returned handler stack can be passed to a client in the "handler"
32
  * option.
33
  *
34
+ * @param callable $handler HTTP handler function to use with the stack. If no
35
+ * handler is provided, the best handler for your
36
+ * system will be utilized.
37
+ *
38
+ * @return HandlerStack
39
  */
40
+ public static function create(callable $handler = null)
41
  {
42
+ $stack = new self($handler ?: choose_handler());
43
  $stack->push(Middleware::httpErrors(), 'http_errors');
44
  $stack->push(Middleware::redirect(), 'allow_redirects');
45
  $stack->push(Middleware::cookies(), 'cookies');
49
  }
50
 
51
  /**
52
+ * @param callable $handler Underlying HTTP handler.
53
  */
54
  public function __construct(callable $handler = null)
55
  {
59
  /**
60
  * Invokes the handler stack as a composed handler
61
  *
62
+ * @param RequestInterface $request
63
+ * @param array $options
64
+ *
65
  * @return ResponseInterface|PromiseInterface
66
  */
67
  public function __invoke(RequestInterface $request, array $options)
80
  {
81
  $depth = 0;
82
  $stack = [];
83
+ if ($this->handler) {
 
84
  $stack[] = "0) Handler: " . $this->debugCallable($this->handler);
85
  }
86
 
87
  $result = '';
88
+ foreach (array_reverse($this->stack) as $tuple) {
89
  $depth++;
90
  $str = "{$depth}) Name: '{$tuple[1]}', ";
91
  $str .= "Function: " . $this->debugCallable($tuple[0]);
93
  $stack[] = $str;
94
  }
95
 
96
+ foreach (array_keys($stack) as $k) {
97
  $result .= "< {$stack[$k]}\n";
98
  }
99
 
103
  /**
104
  * Set the HTTP handler that actually returns a promise.
105
  *
106
+ * @param callable $handler Accepts a request and array of options and
107
+ * returns a Promise.
108
  */
109
+ public function setHandler(callable $handler)
110
  {
111
  $this->handler = $handler;
112
  $this->cached = null;
114
 
115
  /**
116
  * Returns true if the builder has a handler.
117
+ *
118
+ * @return bool
119
  */
120
+ public function hasHandler()
121
  {
122
+ return (bool) $this->handler;
123
  }
124
 
125
  /**
126
  * Unshift a middleware to the bottom of the stack.
127
  *
128
+ * @param callable $middleware Middleware function
129
+ * @param string $name Name to register for this middleware.
130
  */
131
+ public function unshift(callable $middleware, $name = null)
132
  {
133
+ array_unshift($this->stack, [$middleware, $name]);
134
  $this->cached = null;
135
  }
136
 
137
  /**
138
  * Push a middleware to the top of the stack.
139
  *
140
+ * @param callable $middleware Middleware function
141
+ * @param string $name Name to register for this middleware.
142
  */
143
+ public function push(callable $middleware, $name = '')
144
  {
145
  $this->stack[] = [$middleware, $name];
146
  $this->cached = null;
149
  /**
150
  * Add a middleware before another middleware by name.
151
  *
152
+ * @param string $findName Middleware to find
153
+ * @param callable $middleware Middleware function
154
+ * @param string $withName Name to register for this middleware.
155
  */
156
+ public function before($findName, callable $middleware, $withName = '')
157
  {
158
  $this->splice($findName, $withName, $middleware, true);
159
  }
161
  /**
162
  * Add a middleware after another middleware by name.
163
  *
164
+ * @param string $findName Middleware to find
165
+ * @param callable $middleware Middleware function
166
+ * @param string $withName Name to register for this middleware.
167
  */
168
+ public function after($findName, callable $middleware, $withName = '')
169
  {
170
  $this->splice($findName, $withName, $middleware, false);
171
  }
175
  *
176
  * @param callable|string $remove Middleware to remove by instance or name.
177
  */
178
+ public function remove($remove)
179
  {
180
  $this->cached = null;
181
+ $idx = is_callable($remove) ? 0 : 1;
182
+ $this->stack = array_values(array_filter(
183
  $this->stack,
184
+ function ($tuple) use ($idx, $remove) {
185
  return $tuple[$idx] !== $remove;
186
  }
187
  ));
190
  /**
191
  * Compose the middleware and handler into a single callable function.
192
  *
193
+ * @return callable
194
  */
195
+ public function resolve()
196
  {
197
+ if (!$this->cached) {
198
+ if (!($prev = $this->handler)) {
199
  throw new \LogicException('No handler has been specified');
200
  }
201
 
202
+ foreach (array_reverse($this->stack) as $fn) {
 
203
  $prev = $fn[0]($prev);
204
  }
205
 
209
  return $this->cached;
210
  }
211
 
212
+ /**
213
+ * @param string $name
214
+ * @return int
215
+ */
216
+ private function findByName($name)
217
  {
218
  foreach ($this->stack as $k => $v) {
219
  if ($v[1] === $name) {
226
 
227
  /**
228
  * Splices a function into the middleware list at a specific position.
229
+ *
230
+ * @param string $findName
231
+ * @param string $withName
232
+ * @param callable $middleware
233
+ * @param bool $before
234
  */
235
+ private function splice($findName, $withName, callable $middleware, $before)
236
  {
237
  $this->cached = null;
238
  $idx = $this->findByName($findName);
240
 
241
  if ($before) {
242
  if ($idx === 0) {
243
+ array_unshift($this->stack, $tuple);
244
  } else {
245
  $replacement = [$tuple, $this->stack[$idx]];
246
+ array_splice($this->stack, $idx, 1, $replacement);
247
  }
248
+ } elseif ($idx === count($this->stack) - 1) {
249
  $this->stack[] = $tuple;
250
  } else {
251
  $replacement = [$this->stack[$idx], $tuple];
252
+ array_splice($this->stack, $idx, 1, $replacement);
253
  }
254
  }
255
 
256
  /**
257
  * Provides a debug string for a given callable.
258
  *
259
+ * @param array|callable $fn Function to write as a string.
260
+ *
261
+ * @return string
262
  */
263
+ private function debugCallable($fn)
264
  {
265
+ if (is_string($fn)) {
266
  return "callable({$fn})";
267
  }
268
 
269
+ if (is_array($fn)) {
270
+ return is_string($fn[0])
271
  ? "callable({$fn[0]}::{$fn[1]})"
272
+ : "callable(['" . get_class($fn[0]) . "', '{$fn[1]}'])";
273
  }
274
 
275
+ return 'callable(' . spl_object_hash($fn) . ')';
 
276
  }
277
  }
vendor/guzzlehttp/guzzle/src/MessageFormatter.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  namespace GuzzleHttp;
4
 
5
  use Psr\Http\Message\MessageInterface;
@@ -32,31 +31,25 @@ use Psr\Http\Message\ResponseInterface;
32
  * - {res_headers}: Response headers
33
  * - {req_body}: Request body
34
  * - {res_body}: Response body
35
- *
36
- * @final
37
  */
38
- class MessageFormatter implements MessageFormatterInterface
39
  {
40
  /**
41
  * Apache Common Log Format.
42
- *
43
- * @link https://httpd.apache.org/docs/2.4/logs.html#common
44
- *
45
  * @var string
46
  */
47
- public const CLF = "{hostname} {req_header_User-Agent} - [{date_common_log}] \"{method} {target} HTTP/{version}\" {code} {res_header_Content-Length}";
48
- public const DEBUG = ">>>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}";
49
- public const SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}';
50
 
51
- /**
52
- * @var string Template used to format log messages
53
- */
54
  private $template;
55
 
56
  /**
57
  * @param string $template Log message template
58
  */
59
- public function __construct(?string $template = self::CLF)
60
  {
61
  $this->template = $template ?: self::CLF;
62
  }
@@ -64,19 +57,20 @@ class MessageFormatter implements MessageFormatterInterface
64
  /**
65
  * Returns a formatted message string.
66
  *
67
- * @param RequestInterface $request Request that was sent
68
- * @param ResponseInterface|null $response Response that was received
69
- * @param \Throwable|null $error Exception that was received
 
 
70
  */
71
  public function format(
72
  RequestInterface $request,
73
- ?ResponseInterface $response = null,
74
- ?\Throwable $error = null
75
- ): string {
76
  $cache = [];
77
 
78
- /** @var string */
79
- return \preg_replace_callback(
80
  '/{\s*([A-Za-z_\-\.0-9]+)\s*}/',
81
  function (array $matches) use ($request, $response, $error, &$cache) {
82
  if (isset($cache[$matches[1]])) {
@@ -92,14 +86,14 @@ class MessageFormatter implements MessageFormatterInterface
92
  $result = $response ? Psr7\str($response) : '';
93
  break;
94
  case 'req_headers':
95
- $result = \trim($request->getMethod()
96
  . ' ' . $request->getRequestTarget())
97
  . ' HTTP/' . $request->getProtocolVersion() . "\r\n"
98
  . $this->headers($request);
99
  break;
100
  case 'res_headers':
101
  $result = $response ?
102
- \sprintf(
103
  'HTTP/%s %d %s',
104
  $response->getProtocolVersion(),
105
  $response->getStatusCode(),
@@ -108,29 +102,17 @@ class MessageFormatter implements MessageFormatterInterface
108
  : 'NULL';
109
  break;
110
  case 'req_body':
111
- $result = $request->getBody()->__toString();
112
  break;
113
  case 'res_body':
114
- if (!$response instanceof ResponseInterface) {
115
- $result = 'NULL';
116
- break;
117
- }
118
-
119
- $body = $response->getBody();
120
-
121
- if (!$body->isSeekable()) {
122
- $result = 'RESPONSE_NOT_LOGGEABLE';
123
- break;
124
- }
125
-
126
- $result = $response->getBody()->__toString();
127
  break;
128
  case 'ts':
129
  case 'date_iso_8601':
130
- $result = \gmdate('c');
131
  break;
132
  case 'date_common_log':
133
- $result = \date('d/M/Y:H:i:s O');
134
  break;
135
  case 'method':
136
  $result = $request->getMethod();
@@ -157,7 +139,7 @@ class MessageFormatter implements MessageFormatterInterface
157
  $result = $request->getHeaderLine('Host');
158
  break;
159
  case 'hostname':
160
- $result = \gethostname();
161
  break;
162
  case 'code':
163
  $result = $response ? $response->getStatusCode() : 'NULL';
@@ -170,11 +152,11 @@ class MessageFormatter implements MessageFormatterInterface
170
  break;
171
  default:
172
  // handle prefixed dynamic headers
173
- if (\strpos($matches[1], 'req_header_') === 0) {
174
- $result = $request->getHeaderLine(\substr($matches[1], 11));
175
- } elseif (\strpos($matches[1], 'res_header_') === 0) {
176
  $result = $response
177
- ? $response->getHeaderLine(\substr($matches[1], 11))
178
  : 'NULL';
179
  }
180
  }
@@ -188,14 +170,16 @@ class MessageFormatter implements MessageFormatterInterface
188
 
189
  /**
190
  * Get headers from message as string
 
 
191
  */
192
- private function headers(MessageInterface $message): string
193
  {
194
  $result = '';
195
  foreach ($message->getHeaders() as $name => $values) {
196
- $result .= $name . ': ' . \implode(', ', $values) . "\r\n";
197
  }
198
 
199
- return \trim($result);
200
  }
201
  }
1
  <?php
 
2
  namespace GuzzleHttp;
3
 
4
  use Psr\Http\Message\MessageInterface;
31
  * - {res_headers}: Response headers
32
  * - {req_body}: Request body
33
  * - {res_body}: Response body
 
 
34
  */
35
+ class MessageFormatter
36
  {
37
  /**
38
  * Apache Common Log Format.
39
+ * @link http://httpd.apache.org/docs/2.4/logs.html#common
 
 
40
  * @var string
41
  */
42
+ const CLF = "{hostname} {req_header_User-Agent} - [{date_common_log}] \"{method} {target} HTTP/{version}\" {code} {res_header_Content-Length}";
43
+ const DEBUG = ">>>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}";
44
+ const SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}';
45
 
46
+ /** @var string Template used to format log messages */
 
 
47
  private $template;
48
 
49
  /**
50
  * @param string $template Log message template
51
  */
52
+ public function __construct($template = self::CLF)
53
  {
54
  $this->template = $template ?: self::CLF;
55
  }
57
  /**
58
  * Returns a formatted message string.
59
  *
60
+ * @param RequestInterface $request Request that was sent
61
+ * @param ResponseInterface $response Response that was received
62
+ * @param \Exception $error Exception that was received
63
+ *
64
+ * @return string
65
  */
66
  public function format(
67
  RequestInterface $request,
68
+ ResponseInterface $response = null,
69
+ \Exception $error = null
70
+ ) {
71
  $cache = [];
72
 
73
+ return preg_replace_callback(
 
74
  '/{\s*([A-Za-z_\-\.0-9]+)\s*}/',
75
  function (array $matches) use ($request, $response, $error, &$cache) {
76
  if (isset($cache[$matches[1]])) {
86
  $result = $response ? Psr7\str($response) : '';
87
  break;
88
  case 'req_headers':
89
+ $result = trim($request->getMethod()
90
  . ' ' . $request->getRequestTarget())
91
  . ' HTTP/' . $request->getProtocolVersion() . "\r\n"
92
  . $this->headers($request);
93
  break;
94
  case 'res_headers':
95
  $result = $response ?
96
+ sprintf(
97
  'HTTP/%s %d %s',
98
  $response->getProtocolVersion(),
99
  $response->getStatusCode(),
102
  : 'NULL';
103
  break;
104
  case 'req_body':
105
+ $result = $request->getBody();
106
  break;
107
  case 'res_body':
108
+ $result = $response ? $response->getBody() : 'NULL';
 
 
 
 
 
 
 
 
 
 
 
 
109
  break;
110
  case 'ts':
111
  case 'date_iso_8601':
112
+ $result = gmdate('c');
113
  break;
114
  case 'date_common_log':
115
+ $result = date('d/M/Y:H:i:s O');
116
  break;
117
  case 'method':
118
  $result = $request->getMethod();
139
  $result = $request->getHeaderLine('Host');
140
  break;
141
  case 'hostname':
142
+ $result = gethostname();
143
  break;
144
  case 'code':
145
  $result = $response ? $response->getStatusCode() : 'NULL';
152
  break;
153
  default:
154
  // handle prefixed dynamic headers
155
+ if (strpos($matches[1], 'req_header_') === 0) {
156
+ $result = $request->getHeaderLine(substr($matches[1], 11));
157
+ } elseif (strpos($matches[1], 'res_header_') === 0) {
158
  $result = $response
159
+ ? $response->getHeaderLine(substr($matches[1], 11))
160
  : 'NULL';
161
  }
162
  }
170
 
171
  /**
172
  * Get headers from message as string
173
+ *
174
+ * @return string
175
  */
176
+ private function headers(MessageInterface $message)
177
  {
178
  $result = '';
179
  foreach ($message->getHeaders() as $name => $values) {
180
+ $result .= $name . ': ' . implode(', ', $values) . "\r\n";
181
  }
182
 
183
+ return trim($result);
184
  }
185
  }
vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php DELETED
@@ -1,22 +0,0 @@
1
- <?php
2
-
3
- namespace GuzzleHttp;
4
-
5
- use Psr\Http\Message\RequestInterface;
6
- use Psr\Http\Message\ResponseInterface;
7
-
8
- interface MessageFormatterInterface
9
- {
10
- /**
11
- * Returns a formatted message string.
12
- *
13
- * @param RequestInterface $request Request that was sent
14
- * @param ResponseInterface|null $response Response that was received
15
- * @param \Throwable|null $error Exception that was received
16
- */
17
- public function format(
18
- RequestInterface $request,
19
- ?ResponseInterface $response = null,
20
- ?\Throwable $error = null
21
- ): string;
22
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/guzzlehttp/guzzle/src/Middleware.php CHANGED
@@ -1,11 +1,10 @@
1
  <?php
2
-
3
  namespace GuzzleHttp;
4
 
5
  use GuzzleHttp\Cookie\CookieJarInterface;
6
  use GuzzleHttp\Exception\RequestException;
7
- use GuzzleHttp\Promise\PromiseInterface;
8
- use Psr\Http\Message\RequestInterface;
9
  use Psr\Http\Message\ResponseInterface;
10
  use Psr\Log\LoggerInterface;
11
 
@@ -22,10 +21,10 @@ final class Middleware
22
  *
23
  * @return callable Returns a function that accepts the next handler.
24
  */
25
- public static function cookies(): callable
26
  {
27
- return static function (callable $handler): callable {
28
- return static function ($request, array $options) use ($handler) {
29
  if (empty($options['cookies'])) {
30
  return $handler($request, $options);
31
  } elseif (!($options['cookies'] instanceof CookieJarInterface)) {
@@ -35,7 +34,7 @@ final class Middleware
35
  $request = $cookieJar->withCookieHeader($request);
36
  return $handler($request, $options)
37
  ->then(
38
- static function (ResponseInterface $response) use ($cookieJar, $request): ResponseInterface {
39
  $cookieJar->extractCookies($request, $response);
40
  return $response;
41
  }
@@ -48,17 +47,17 @@ final class Middleware
48
  * Middleware that throws exceptions for 4xx or 5xx responses when the
49
  * "http_error" request option is set to true.
50
  *
51
- * @return callable(callable): callable Returns a function that accepts the next handler.
52
  */
53
- public static function httpErrors(): callable
54
  {
55
- return static function (callable $handler): callable {
56
- return static function ($request, array $options) use ($handler) {
57
  if (empty($options['http_errors'])) {
58
  return $handler($request, $options);
59
  }
60
  return $handler($request, $options)->then(
61
- static function (ResponseInterface $response) use ($request) {
62
  $code = $response->getStatusCode();
63
  if ($code < 400) {
64
  return $response;
@@ -73,22 +72,21 @@ final class Middleware
73
  /**
74
  * Middleware that pushes history data to an ArrayAccess container.
75
  *
76
- * @param array|\ArrayAccess<int, array> $container Container to hold the history (by reference).
77
- *
78
- * @return callable(callable): callable Returns a function that accepts the next handler.
79
  *
 
80
  * @throws \InvalidArgumentException if container is not an array or ArrayAccess.
81
  */
82
- public static function history(&$container): callable
83
  {
84
- if (!\is_array($container) && !$container instanceof \ArrayAccess) {
85
  throw new \InvalidArgumentException('history container must be an array or object implementing ArrayAccess');
86
  }
87
 
88
- return static function (callable $handler) use (&$container): callable {
89
- return static function (RequestInterface $request, array $options) use ($handler, &$container) {
90
  return $handler($request, $options)->then(
91
- static function ($value) use ($request, &$container, $options) {
92
  $container[] = [
93
  'request' => $request,
94
  'response' => $value,
@@ -97,7 +95,7 @@ final class Middleware
97
  ];
98
  return $value;
99
  },
100
- static function ($reason) use ($request, &$container, $options) {
101
  $container[] = [
102
  'request' => $request,
103
  'response' => null,
@@ -124,10 +122,10 @@ final class Middleware
124
  *
125
  * @return callable Returns a function that accepts the next handler.
126
  */
127
- public static function tap(callable $before = null, callable $after = null): callable
128
  {
129
- return static function (callable $handler) use ($before, $after): callable {
130
- return static function (RequestInterface $request, array $options) use ($handler, $before, $after) {
131
  if ($before) {
132
  $before($request, $options);
133
  }
@@ -145,9 +143,9 @@ final class Middleware
145
  *
146
  * @return callable Returns a function that accepts the next handler.
147
  */
148
- public static function redirect(): callable
149
  {
150
- return static function (callable $handler): RedirectMiddleware {
151
  return new RedirectMiddleware($handler);
152
  };
153
  }
@@ -167,9 +165,9 @@ final class Middleware
167
  *
168
  * @return callable Returns a function that accepts the next handler.
169
  */
170
- public static function retry(callable $decider, callable $delay = null): callable
171
  {
172
- return static function (callable $handler) use ($decider, $delay): RetryMiddleware {
173
  return new RetryMiddleware($decider, $handler, $delay);
174
  };
175
  }
@@ -178,35 +176,28 @@ final class Middleware
178
  * Middleware that logs requests, responses, and errors using a message
179
  * formatter.
180
  *
181
- * @phpstan-param \Psr\Log\LogLevel::* $logLevel Level at which to log requests.
182
- *
183
- * @param LoggerInterface $logger Logs messages.
184
- * @param MessageFormatterInterface|MessageFormatter $formatter Formatter used to create message strings.
185
- * @param string $logLevel Level at which to log requests.
186
  *
187
  * @return callable Returns a function that accepts the next handler.
188
  */
189
- public static function log(LoggerInterface $logger, $formatter, string $logLevel = 'info'): callable
190
  {
191
- // To be compatible with Guzzle 7.1.x we need to allow users to pass a MessageFormatter
192
- if (!$formatter instanceof MessageFormatter && !$formatter instanceof MessageFormatterInterface) {
193
- throw new \LogicException(sprintf('Argument 2 to %s::log() must be of type %s', self::class, MessageFormatterInterface::class));
194
- }
195
-
196
- return static function (callable $handler) use ($logger, $formatter, $logLevel): callable {
197
- return static function (RequestInterface $request, array $options = []) use ($handler, $logger, $formatter, $logLevel) {
198
  return $handler($request, $options)->then(
199
- static function ($response) use ($logger, $request, $formatter, $logLevel): ResponseInterface {
200
  $message = $formatter->format($request, $response);
201
  $logger->log($logLevel, $message);
202
  return $response;
203
  },
204
- static function ($reason) use ($logger, $request, $formatter): PromiseInterface {
205
  $response = $reason instanceof RequestException
206
  ? $reason->getResponse()
207
  : null;
208
- $message = $formatter->format($request, $response, \GuzzleHttp\Promise\exception_for($reason));
209
- $logger->error($message);
210
  return \GuzzleHttp\Promise\rejection_for($reason);
211
  }
212
  );
@@ -217,10 +208,12 @@ final class Middleware
217
  /**
218
  * This middleware adds a default content-type if possible, a default
219
  * content-length or transfer-encoding header, and the expect header.
 
 
220
  */
221
- public static function prepareBody(): callable
222
  {
223
- return static function (callable $handler): PrepareBodyMiddleware {
224
  return new PrepareBodyMiddleware($handler);
225
  };
226
  }
@@ -231,11 +224,12 @@ final class Middleware
231
  *
232
  * @param callable $fn Function that accepts a RequestInterface and returns
233
  * a RequestInterface.
 
234
  */
235
- public static function mapRequest(callable $fn): callable
236
  {
237
- return static function (callable $handler) use ($fn): callable {
238
- return static function (RequestInterface $request, array $options) use ($handler, $fn) {
239
  return $handler($fn($request), $options);
240
  };
241
  };
@@ -247,11 +241,12 @@ final class Middleware
247
  *
248
  * @param callable $fn Function that accepts a ResponseInterface and
249
  * returns a ResponseInterface.
 
250
  */
251
- public static function mapResponse(callable $fn): callable
252
  {
253
- return static function (callable $handler) use ($fn): callable {
254
- return static function (RequestInterface $request, array $options) use ($handler, $fn) {
255
  return $handler($request, $options)->then($fn);
256
  };
257
  };
1
  <?php
 
2
  namespace GuzzleHttp;
3
 
4
  use GuzzleHttp\Cookie\CookieJarInterface;
5
  use GuzzleHttp\Exception\RequestException;
6
+ use GuzzleHttp\Promise\RejectedPromise;
7
+ use GuzzleHttp\Psr7;
8
  use Psr\Http\Message\ResponseInterface;
9
  use Psr\Log\LoggerInterface;
10
 
21
  *
22
  * @return callable Returns a function that accepts the next handler.
23
  */
24
+ public static function cookies()
25
  {
26
+ return function (callable $handler) {
27
+ return function ($request, array $options) use ($handler) {
28
  if (empty($options['cookies'])) {
29
  return $handler($request, $options);
30
  } elseif (!($options['cookies'] instanceof CookieJarInterface)) {
34
  $request = $cookieJar->withCookieHeader($request);
35
  return $handler($request, $options)
36
  ->then(
37
+ function ($response) use ($cookieJar, $request) {
38
  $cookieJar->extractCookies($request, $response);
39
  return $response;
40
  }
47
  * Middleware that throws exceptions for 4xx or 5xx responses when the
48
  * "http_error" request option is set to true.
49
  *
50
+ * @return callable Returns a function that accepts the next handler.
51
  */
52
+ public static function httpErrors()
53
  {
54
+ return function (callable $handler) {
55
+ return function ($request, array $options) use ($handler) {
56
  if (empty($options['http_errors'])) {
57
  return $handler($request, $options);
58
  }
59
  return $handler($request, $options)->then(
60
+ function (ResponseInterface $response) use ($request) {
61
  $code = $response->getStatusCode();
62
  if ($code < 400) {
63
  return $response;
72
  /**
73
  * Middleware that pushes history data to an ArrayAccess container.
74
  *
75
+ * @param array|\ArrayAccess $container Container to hold the history (by reference).
 
 
76
  *
77
+ * @return callable Returns a function that accepts the next handler.
78
  * @throws \InvalidArgumentException if container is not an array or ArrayAccess.
79
  */
80
+ public static function history(&$container)
81
  {
82
+ if (!is_array($container) && !$container instanceof \ArrayAccess) {
83
  throw new \InvalidArgumentException('history container must be an array or object implementing ArrayAccess');
84
  }
85
 
86
+ return function (callable $handler) use (&$container) {
87
+ return function ($request, array $options) use ($handler, &$container) {
88
  return $handler($request, $options)->then(
89
+ function ($value) use ($request, &$container, $options) {
90
  $container[] = [
91
  'request' => $request,
92
  'response' => $value,
95
  ];
96
  return $value;
97
  },
98
+ function ($reason) use ($request, &$container, $options) {
99
  $container[] = [
100
  'request' => $request,
101
  'response' => null,
122
  *
123
  * @return callable Returns a function that accepts the next handler.
124
  */
125
+ public static function tap(callable $before = null, callable $after = null)
126
  {
127
+ return function (callable $handler) use ($before, $after) {
128
+ return function ($request, array $options) use ($handler, $before, $after) {
129
  if ($before) {
130
  $before($request, $options);
131
  }
143
  *
144
  * @return callable Returns a function that accepts the next handler.
145
  */
146
+ public static function redirect()
147
  {
148
+ return function (callable $handler) {
149
  return new RedirectMiddleware($handler);
150
  };
151
  }
165
  *
166
  * @return callable Returns a function that accepts the next handler.
167
  */
168
+ public static function retry(callable $decider, callable $delay = null)
169
  {
170
+ return function (callable $handler) use ($decider, $delay) {
171
  return new RetryMiddleware($decider, $handler, $delay);
172
  };
173
  }
176
  * Middleware that logs requests, responses, and errors using a message
177
  * formatter.
178
  *
179
+ * @param LoggerInterface $logger Logs messages.
180
+ * @param MessageFormatter $formatter Formatter used to create message strings.
181
+ * @param string $logLevel Level at which to log requests.
 
 
182
  *
183
  * @return callable Returns a function that accepts the next handler.
184
  */
185
+ public static function log(LoggerInterface $logger, MessageFormatter $formatter, $logLevel = 'info' /* \Psr\Log\LogLevel::INFO */)
186
  {
187
+ return function (callable $handler) use ($logger, $formatter, $logLevel) {
188
+ return function ($request, array $options) use ($handler, $logger, $formatter, $logLevel) {
 
 
 
 
 
189
  return $handler($request, $options)->then(
190
+ function ($response) use ($logger, $request, $formatter, $logLevel) {
191
  $message = $formatter->format($request, $response);
192
  $logger->log($logLevel, $message);
193
  return $response;
194
  },
195
+ function ($reason) use ($logger, $request, $formatter) {
196
  $response = $reason instanceof RequestException
197
  ? $reason->getResponse()
198
  : null;
199
+ $message = $formatter->format($request, $response, $reason);
200
+ $logger->notice($message);
201
  return \GuzzleHttp\Promise\rejection_for($reason);
202
  }
203
  );
208
  /**
209
  * This middleware adds a default content-type if possible, a default
210
  * content-length or transfer-encoding header, and the expect header.
211
+ *
212
+ * @return callable
213
  */
214
+ public static function prepareBody()
215
  {
216
+ return function (callable $handler) {
217
  return new PrepareBodyMiddleware($handler);
218
  };
219
  }
224
  *
225
  * @param callable $fn Function that accepts a RequestInterface and returns
226
  * a RequestInterface.
227
+ * @return callable
228
  */
229
+ public static function mapRequest(callable $fn)
230
  {
231
+ return function (callable $handler) use ($fn) {
232
+ return function ($request, array $options) use ($handler, $fn) {
233
  return $handler($fn($request), $options);
234
  };
235
  };
241
  *
242
  * @param callable $fn Function that accepts a ResponseInterface and
243
  * returns a ResponseInterface.
244
+ * @return callable
245
  */
246
+ public static function mapResponse(callable $fn)
247
  {
248
+ return function (callable $handler) use ($fn) {
249
+ return function ($request, array $options) use ($handler, $fn) {
250
  return $handler($request, $options)->then($fn);
251
  };
252
  };
vendor/guzzlehttp/guzzle/src/Pool.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  namespace GuzzleHttp;
4
 
5
  use GuzzleHttp\Promise\EachPromise;
@@ -17,14 +16,10 @@ use Psr\Http\Message\RequestInterface;
17
  * When a function is yielded by the iterator, the function is provided the
18
  * "request_options" array that should be merged on top of any existing
19
  * options, and the function MUST then return a wait-able promise.
20
- *
21
- * @final
22
  */
23
  class Pool implements PromisorInterface
24
  {
25
- /**
26
- * @var EachPromise
27
- */
28
  private $each;
29
 
30
  /**
@@ -32,17 +27,20 @@ class Pool implements PromisorInterface
32
  * @param array|\Iterator $requests Requests or functions that return
33
  * requests to send concurrently.
34
  * @param array $config Associative array of options
35
- * - concurrency: (int) Maximum number of requests to send concurrently
36
- * - options: Array of request options to apply to each request.
37
- * - fulfilled: (callable) Function to invoke when a request completes.
38
- * - rejected: (callable) Function to invoke when a request is rejected.
39
  */
40
  public function __construct(
41
  ClientInterface $client,
42
  $requests,
43
  array $config = []
44
  ) {
45
- if (!isset($config['concurrency'])) {
 
 
 
46
  $config['concurrency'] = 25;
47
  }
48
 
@@ -54,11 +52,11 @@ class Pool implements PromisorInterface
54
  }
55
 
56
  $iterable = \GuzzleHttp\Promise\iter_for($requests);
57
- $requests = static function () use ($iterable, $client, $opts) {
58
  foreach ($iterable as $key => $rfn) {
59
  if ($rfn instanceof RequestInterface) {
60
  yield $key => $client->sendAsync($rfn, $opts);
61
- } elseif (\is_callable($rfn)) {
62
  yield $key => $rfn($opts);
63
  } else {
64
  throw new \InvalidArgumentException('Each value yielded by '
@@ -74,8 +72,10 @@ class Pool implements PromisorInterface
74
 
75
  /**
76
  * Get promise
 
 
77
  */
78
- public function promise(): PromiseInterface
79
  {
80
  return $this->each->promise();
81
  }
@@ -91,40 +91,41 @@ class Pool implements PromisorInterface
91
  * @param ClientInterface $client Client used to send the requests
92
  * @param array|\Iterator $requests Requests to send concurrently.
93
  * @param array $options Passes through the options available in
94
- * {@see \GuzzleHttp\Pool::__construct}
95
  *
96
  * @return array Returns an array containing the response or an exception
97
  * in the same order that the requests were sent.
98
- *
99
  * @throws \InvalidArgumentException if the event format is incorrect.
100
  */
101
  public static function batch(
102
  ClientInterface $client,
103
  $requests,
104
  array $options = []
105
- ): array {
106
  $res = [];
107
  self::cmpCallback($options, 'fulfilled', $res);
108
  self::cmpCallback($options, 'rejected', $res);
109
  $pool = new static($client, $requests, $options);
110
  $pool->promise()->wait();
111
- \ksort($res);
112
 
113
  return $res;
114
  }
115
 
116
  /**
117
  * Execute callback(s)
 
 
118
  */
119
- private static function cmpCallback(array &$options, string $name, array &$results): void
120
  {
121
  if (!isset($options[$name])) {
122
- $options[$name] = static function ($v, $k) use (&$results) {
123
  $results[$k] = $v;
124
  };
125
  } else {
126
  $currentFn = $options[$name];
127
- $options[$name] = static function ($v, $k) use (&$results, $currentFn) {
128
  $currentFn($v, $k);
129
  $results[$k] = $v;
130
  };
1
  <?php
 
2
  namespace GuzzleHttp;
3
 
4
  use GuzzleHttp\Promise\EachPromise;
16
  * When a function is yielded by the iterator, the function is provided the
17
  * "request_options" array that should be merged on top of any existing
18
  * options, and the function MUST then return a wait-able promise.
 
 
19
  */
20
  class Pool implements PromisorInterface
21
  {
22
+ /** @var EachPromise */
 
 
23
  private $each;
24
 
25
  /**
27
  * @param array|\Iterator $requests Requests or functions that return
28
  * requests to send concurrently.
29
  * @param array $config Associative array of options
30
+ * - concurrency: (int) Maximum number of requests to send concurrently
31
+ * - options: Array of request options to apply to each request.
32
+ * - fulfilled: (callable) Function to invoke when a request completes.
33
+ * - rejected: (callable) Function to invoke when a request is rejected.
34
  */
35
  public function __construct(
36
  ClientInterface $client,
37
  $requests,
38
  array $config = []
39
  ) {
40
+ // Backwards compatibility.
41
+ if (isset($config['pool_size'])) {
42
+ $config['concurrency'] = $config['pool_size'];
43
+ } elseif (!isset($config['concurrency'])) {
44
  $config['concurrency'] = 25;
45
  }
46
 
52
  }
53
 
54
  $iterable = \GuzzleHttp\Promise\iter_for($requests);
55
+ $requests = function () use ($iterable, $client, $opts) {
56
  foreach ($iterable as $key => $rfn) {
57
  if ($rfn instanceof RequestInterface) {
58
  yield $key => $client->sendAsync($rfn, $opts);
59
+ } elseif (is_callable($rfn)) {
60
  yield $key => $rfn($opts);
61
  } else {
62
  throw new \InvalidArgumentException('Each value yielded by '
72
 
73
  /**
74
  * Get promise
75
+ *
76
+ * @return PromiseInterface
77
  */
78
+ public function promise()
79
  {
80
  return $this->each->promise();
81
  }
91
  * @param ClientInterface $client Client used to send the requests
92
  * @param array|\Iterator $requests Requests to send concurrently.
93
  * @param array $options Passes through the options available in
94
+ * {@see GuzzleHttp\Pool::__construct}
95
  *
96
  * @return array Returns an array containing the response or an exception
97
  * in the same order that the requests were sent.
 
98
  * @throws \InvalidArgumentException if the event format is incorrect.
99
  */
100
  public static function batch(
101
  ClientInterface $client,
102
  $requests,
103
  array $options = []
104
+ ) {
105
  $res = [];
106
  self::cmpCallback($options, 'fulfilled', $res);
107
  self::cmpCallback($options, 'rejected', $res);
108
  $pool = new static($client, $requests, $options);
109
  $pool->promise()->wait();
110
+ ksort($res);
111
 
112
  return $res;
113
  }
114
 
115
  /**
116
  * Execute callback(s)
117
+ *
118
+ * @return void
119
  */
120
+ private static function cmpCallback(array &$options, $name, array &$results)
121
  {
122
  if (!isset($options[$name])) {
123
+ $options[$name] = function ($v, $k) use (&$results) {
124
  $results[$k] = $v;
125
  };
126
  } else {
127
  $currentFn = $options[$name];
128
+ $options[$name] = function ($v, $k) use (&$results, $currentFn) {
129
  $currentFn($v, $k);
130
  $results[$k] = $v;
131
  };
vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php CHANGED
@@ -1,32 +1,34 @@
1
  <?php
2
-
3
  namespace GuzzleHttp;
4
 
5
  use GuzzleHttp\Promise\PromiseInterface;
 
6
  use Psr\Http\Message\RequestInterface;
7
 
8
  /**
9
  * Prepares requests that contain a body, adding the Content-Length,
10
  * Content-Type, and Expect headers.
11
- *
12
- * @final
13
  */
14
  class PrepareBodyMiddleware
15
  {
16
- /**
17
- * @var callable(RequestInterface, array): PromiseInterface
18
- */
19
  private $nextHandler;
20
 
21
  /**
22
- * @param callable(RequestInterface, array): PromiseInterface $nextHandler Next handler to invoke.
23
  */
24
  public function __construct(callable $nextHandler)
25
  {
26
  $this->nextHandler = $nextHandler;
27
  }
28
 
29
- public function __invoke(RequestInterface $request, array $options): PromiseInterface
 
 
 
 
 
 
30
  {
31
  $fn = $this->nextHandler;
32
 
@@ -40,7 +42,7 @@ class PrepareBodyMiddleware
40
  // Add a default content-type if possible.
41
  if (!$request->hasHeader('Content-Type')) {
42
  if ($uri = $request->getBody()->getMetadata('uri')) {
43
- if (is_string($uri) && $type = Psr7\mimetype_from_filename($uri)) {
44
  $modify['set_headers']['Content-Type'] = $type;
45
  }
46
  }
@@ -66,18 +68,20 @@ class PrepareBodyMiddleware
66
 
67
  /**
68
  * Add expect header
 
 
69
  */
70
  private function addExpectHeader(
71
  RequestInterface $request,
72
  array $options,
73
  array &$modify
74
- ): void {
75
  // Determine if the Expect header should be used
76
  if ($request->hasHeader('Expect')) {
77
  return;
78
  }
79
 
80
- $expect = $options['expect'] ?? null;
81
 
82
  // Return if disabled or if you're not using HTTP/1.1 or HTTP/2.0
83
  if ($expect === false || $request->getProtocolVersion() < 1.1) {
1
  <?php
 
2
  namespace GuzzleHttp;
3
 
4
  use GuzzleHttp\Promise\PromiseInterface;
5
+ use GuzzleHttp\Psr7;
6
  use Psr\Http\Message\RequestInterface;
7
 
8
  /**
9
  * Prepares requests that contain a body, adding the Content-Length,
10
  * Content-Type, and Expect headers.
 
 
11
  */
12
  class PrepareBodyMiddleware
13
  {
14
+ /** @var callable */
 
 
15
  private $nextHandler;
16
 
17
  /**
18
+ * @param callable $nextHandler Next handler to invoke.
19
  */
20
  public function __construct(callable $nextHandler)
21
  {
22
  $this->nextHandler = $nextHandler;
23
  }
24
 
25
+ /**
26
+ * @param RequestInterface $request
27
+ * @param array $options
28
+ *
29
+ * @return PromiseInterface
30
+ */
31
+ public function __invoke(RequestInterface $request, array $options)
32
  {
33
  $fn = $this->nextHandler;
34
 
42
  // Add a default content-type if possible.
43
  if (!$request->hasHeader('Content-Type')) {
44
  if ($uri = $request->getBody()->getMetadata('uri')) {
45
+ if ($type = Psr7\mimetype_from_filename($uri)) {
46
  $modify['set_headers']['Content-Type'] = $type;
47
  }
48
  }
68
 
69
  /**
70
  * Add expect header
71
+ *
72
+ * @return void
73
  */
74
  private function addExpectHeader(
75
  RequestInterface $request,
76
  array $options,
77
  array &$modify
78
+ ) {
79
  // Determine if the Expect header should be used
80
  if ($request->hasHeader('Expect')) {
81
  return;
82
  }
83
 
84
+ $expect = isset($options['expect']) ? $options['expect'] : null;
85
 
86
  // Return if disabled or if you're not using HTTP/1.1 or HTTP/2.0
87
  if ($expect === false || $request->getProtocolVersion() < 1.1) {
vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
2
-
3
  namespace GuzzleHttp;
4
 
5
  use GuzzleHttp\Exception\BadResponseException;
6
  use GuzzleHttp\Exception\TooManyRedirectsException;
7
  use GuzzleHttp\Promise\PromiseInterface;
 
8
  use Psr\Http\Message\RequestInterface;
9
  use Psr\Http\Message\ResponseInterface;
10
  use Psr\Http\Message\UriInterface;
@@ -14,18 +14,13 @@ use Psr\Http\Message\UriInterface;
14
  *
15
  * Apply this middleware like other middleware using
16
  * {@see \GuzzleHttp\Middleware::redirect()}.
17
- *
18
- * @final
19
  */
20
  class RedirectMiddleware
21
  {
22
- public const HISTORY_HEADER = 'X-Guzzle-Redirect-History';
23
 
24
- public const STATUS_HISTORY_HEADER = 'X-Guzzle-Redirect-Status-History';
25
 
26
- /**
27
- * @var array
28
- */
29
  public static $defaultSettings = [
30
  'max' => 5,
31
  'protocols' => ['http', 'https'],
@@ -34,20 +29,24 @@ class RedirectMiddleware
34
  'track_redirects' => false,
35
  ];
36
 
37
- /**
38
- * @var callable(RequestInterface, array): PromiseInterface
39
- */
40
  private $nextHandler;
41
 
42
  /**
43
- * @param callable(RequestInterface, array): PromiseInterface $nextHandler Next handler to invoke.
44
  */
45
  public function __construct(callable $nextHandler)
46
  {
47
  $this->nextHandler = $nextHandler;
48
  }
49
 
50
- public function __invoke(RequestInterface $request, array $options): PromiseInterface
 
 
 
 
 
 
51
  {
52
  $fn = $this->nextHandler;
53
 
@@ -57,7 +56,7 @@ class RedirectMiddleware
57
 
58
  if ($options['allow_redirects'] === true) {
59
  $options['allow_redirects'] = self::$defaultSettings;
60
- } elseif (!\is_array($options['allow_redirects'])) {
61
  throw new \InvalidArgumentException('allow_redirects must be true, false, or array');
62
  } else {
63
  // Merge the default settings with the provided settings
@@ -75,6 +74,10 @@ class RedirectMiddleware
75
  }
76
 
77
  /**
 
 
 
 
78
  * @return ResponseInterface|PromiseInterface
79
  */
80
  public function checkRedirect(
@@ -82,7 +85,7 @@ class RedirectMiddleware
82
  array $options,
83
  ResponseInterface $response
84
  ) {
85
- if (\strpos((string) $response->getStatusCode(), '3') !== 0
86
  || !$response->hasHeader('Location')
87
  ) {
88
  return $response;
@@ -92,13 +95,15 @@ class RedirectMiddleware
92
  $nextRequest = $this->modifyRequest($request, $options, $response);
93
 
94
  if (isset($options['allow_redirects']['on_redirect'])) {
95
- ($options['allow_redirects']['on_redirect'])(
 
96
  $request,
97
  $response,
98
  $nextRequest->getUri()
99
  );
100
  }
101
 
 
102
  $promise = $this($nextRequest, $options);
103
 
104
  // Add headers to be able to track history of redirects.
@@ -115,19 +120,20 @@ class RedirectMiddleware
115
 
116
  /**
117
  * Enable tracking on promise.
 
 
118
  */
119
- private function withTracking(PromiseInterface $promise, string $uri, int $statusCode): PromiseInterface
120
  {
121
  return $promise->then(
122
- static function (ResponseInterface $response) use ($uri, $statusCode) {
123
  // Note that we are pushing to the front of the list as this
124
  // would be an earlier response than what is currently present
125
  // in the history header.
126
  $historyHeader = $response->getHeader(self::HISTORY_HEADER);
127
  $statusHeader = $response->getHeader(self::STATUS_HISTORY_HEADER);
128
- \array_unshift($historyHeader, $uri);
129
- \array_unshift($statusHeader, (string) $statusCode);
130
-
131
  return $response->withHeader(self::HISTORY_HEADER, $historyHeader)
132
  ->withHeader(self::STATUS_HISTORY_HEADER, $statusHeader);
133
  }
@@ -137,12 +143,15 @@ class RedirectMiddleware
137
  /**
138
  * Check for too many redirects
139
  *
 
 
140
  * @throws TooManyRedirectsException Too many redirects.
141
  */
142
- private function guardMax(RequestInterface $request, array &$options): void
143
  {
144
- $current = $options['__redirect_count']
145
- ?? 0;
 
146
  $options['__redirect_count'] = $current + 1;
147
  $max = $options['allow_redirects']['max'];
148
 
@@ -154,11 +163,18 @@ class RedirectMiddleware
154
  }
155
  }
156
 
 
 
 
 
 
 
 
157
  public function modifyRequest(
158
  RequestInterface $request,
159
  array $options,
160
  ResponseInterface $response
161
- ): RequestInterface {
162
  // Request modifications to apply.
163
  $modify = [];
164
  $protocols = $options['allow_redirects']['protocols'];
@@ -170,16 +186,13 @@ class RedirectMiddleware
170
  if ($statusCode == 303 ||
171
  ($statusCode <= 302 && !$options['allow_redirects']['strict'])
172
  ) {
173
- $safeMethods = ['GET', 'HEAD', 'OPTIONS'];
174
- $requestMethod = $request->getMethod();
175
-
176
- $modify['method'] = in_array($requestMethod, $safeMethods) ? $requestMethod : 'GET';
177
  $modify['body'] = '';
178
  }
179
 
180
  $uri = $this->redirectUri($request, $response, $protocols);
181
  if (isset($options['idn_conversion']) && ($options['idn_conversion'] !== false)) {
182
- $idnOptions = ($options['idn_conversion'] === true) ? \IDNA_DEFAULT : $options['idn_conversion'];
183
  $uri = Utils::idnUriConvert($uri, $idnOptions);
184
  }
185
 
@@ -207,24 +220,30 @@ class RedirectMiddleware
207
 
208
  /**
209
  * Set the appropriate URL on the request based on the location header
 
 
 
 
 
 
210
  */
211
  private function redirectUri(
212
  RequestInterface $request,
213
  ResponseInterface $response,
214
  array $protocols
215
- ): UriInterface {
216
  $location = Psr7\UriResolver::resolve(
217
  $request->getUri(),
218
  new Psr7\Uri($response->getHeaderLine('Location'))
219
  );
220
 
221
  // Ensure that the redirect URI is allowed based on the protocols.
222
- if (!\in_array($location->getScheme(), $protocols)) {
223
  throw new BadResponseException(
224
- \sprintf(
225
  'Redirect URI, %s, does not use one of the allowed redirect protocols: %s',
226
  $location,
227
- \implode(', ', $protocols)
228
  ),
229
  $request,
230
  $response
1
  <?php
 
2
  namespace GuzzleHttp;
3
 
4
  use GuzzleHttp\Exception\BadResponseException;
5
  use GuzzleHttp\Exception\TooManyRedirectsException;
6
  use GuzzleHttp\Promise\PromiseInterface;
7
+ use GuzzleHttp\Psr7;
8
  use Psr\Http\Message\RequestInterface;
9
  use Psr\Http\Message\ResponseInterface;
10
  use Psr\Http\Message\UriInterface;
14
  *
15
  * Apply this middleware like other middleware using
16
  * {@see \GuzzleHttp\Middleware::redirect()}.
 
 
17
  */
18
  class RedirectMiddleware
19
  {
20
+ const HISTORY_HEADER = 'X-Guzzle-Redirect-History';
21
 
22
+ const STATUS_HISTORY_HEADER = 'X-Guzzle-Redirect-Status-History';
23
 
 
 
 
24
  public static $defaultSettings = [
25
  'max' => 5,
26
  'protocols' => ['http', 'https'],
29
  'track_redirects' => false,
30
  ];
31
 
32
+ /** @var callable */
 
 
33
  private $nextHandler;
34
 
35
  /**
36
+ * @param callable $nextHandler Next handler to invoke.
37
  */
38
  public function __construct(callable $nextHandler)
39
  {
40
  $this->nextHandler = $nextHandler;
41
  }
42
 
43
+ /**
44
+ * @param RequestInterface $request
45
+ * @param array $options
46
+ *
47
+ * @return PromiseInterface
48
+ */
49
+ public function __invoke(RequestInterface $request, array $options)
50
  {
51
  $fn = $this->nextHandler;
52
 
56
 
57
  if ($options['allow_redirects'] === true) {
58
  $options['allow_redirects'] = self::$defaultSettings;
59
+ } elseif (!is_array($options['allow_redirects'])) {
60
  throw new \InvalidArgumentException('allow_redirects must be true, false, or array');
61
  } else {
62
  // Merge the default settings with the provided settings
74
  }
75
 
76
  /**
77
+ * @param RequestInterface $request
78
+ * @param array $options
79
+ * @param ResponseInterface $response
80
+ *
81
  * @return ResponseInterface|PromiseInterface
82
  */
83
  public function checkRedirect(
85
  array $options,
86
  ResponseInterface $response
87
  ) {
88
+ if (substr($response->getStatusCode(), 0, 1) != '3'
89
  || !$response->hasHeader('Location')
90
  ) {
91
  return $response;
95
  $nextRequest = $this->modifyRequest($request, $options, $response);
96
 
97
  if (isset($options['allow_redirects']['on_redirect'])) {
98
+ call_user_func(
99
+ $options['allow_redirects']['on_redirect'],
100
  $request,
101
  $response,
102
  $nextRequest->getUri()
103
  );
104
  }
105
 
106
+ /** @var PromiseInterface|ResponseInterface $promise */
107
  $promise = $this($nextRequest, $options);
108
 
109
  // Add headers to be able to track history of redirects.
120
 
121
  /**
122
  * Enable tracking on promise.
123
+ *
124
+ * @return PromiseInterface
125
  */
126
+ private function withTracking(PromiseInterface $promise, $uri, $statusCode)
127
  {
128
  return $promise->then(
129
+ function (ResponseInterface $response) use ($uri, $statusCode) {
130
  // Note that we are pushing to the front of the list as this
131
  // would be an earlier response than what is currently present
132
  // in the history header.
133
  $historyHeader = $response->getHeader(self::HISTORY_HEADER);
134
  $statusHeader = $response->getHeader(self::STATUS_HISTORY_HEADER);
135
+ array_unshift($historyHeader, $uri);
136
+ array_unshift($statusHeader, $statusCode);
 
137
  return $response->withHeader(self::HISTORY_HEADER, $historyHeader)
138
  ->withHeader(self::STATUS_HISTORY_HEADER, $statusHeader);
139
  }
143
  /**
144
  * Check for too many redirects
145
  *
146
+ * @return void
147
+ *
148
  * @throws TooManyRedirectsException Too many redirects.
149
  */
150
+ private function guardMax(RequestInterface $request, array &$options)
151
  {
152
+ $current = isset($options['__redirect_count'])
153
+ ? $options['__redirect_count']
154
+ : 0;
155
  $options['__redirect_count'] = $current + 1;
156
  $max = $options['allow_redirects']['max'];
157
 
163
  }
164
  }
165
 
166
+ /**
167
+ * @param RequestInterface $request
168
+ * @param array $options
169
+ * @param ResponseInterface $response
170
+ *
171
+ * @return RequestInterface
172
+ */
173
  public function modifyRequest(
174
  RequestInterface $request,
175
  array $options,
176
  ResponseInterface $response
177
+ ) {
178
  // Request modifications to apply.
179
  $modify = [];
180
  $protocols = $options['allow_redirects']['protocols'];
186
  if ($statusCode == 303 ||
187
  ($statusCode <= 302 && !$options['allow_redirects']['strict'])
188
  ) {
189
+ $modify['method'] = 'GET';
 
 
 
190
  $modify['body'] = '';
191
  }
192
 
193
  $uri = $this->redirectUri($request, $response, $protocols);
194
  if (isset($options['idn_conversion']) && ($options['idn_conversion'] !== false)) {
195
+ $idnOptions = ($options['idn_conversion'] === true) ? IDNA_DEFAULT : $options['idn_conversion'];
196
  $uri = Utils::idnUriConvert($uri, $idnOptions);
197
  }
198
 
220
 
221
  /**
222
  * Set the appropriate URL on the request based on the location header
223
+ *
224
+ * @param RequestInterface $request
225
+ * @param ResponseInterface $response
226
+ * @param array $protocols
227
+ *
228
+ * @return UriInterface
229
  */
230
  private function redirectUri(
231
  RequestInterface $request,
232
  ResponseInterface $response,
233
  array $protocols
234
+ ) {
235
  $location = Psr7\UriResolver::resolve(
236
  $request->getUri(),
237
  new Psr7\Uri($response->getHeaderLine('Location'))
238
  );
239
 
240
  // Ensure that the redirect URI is allowed based on the protocols.
241
+ if (!in_array($location->getScheme(), $protocols)) {
242
  throw new BadResponseException(
243
+ sprintf(
244
  'Redirect URI, %s, does not use one of the allowed redirect protocols: %s',
245
  $location,
246
+ implode(', ', $protocols)
247
  ),
248
  $request,
249
  $response
vendor/guzzlehttp/guzzle/src/RequestOptions.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  namespace GuzzleHttp;
4
 
5
  /**
@@ -32,7 +31,7 @@ final class RequestOptions
32
  * response that was received, and the effective URI. Any return value
33
  * from the on_redirect function is ignored.
34
  */
35
- public const ALLOW_REDIRECTS = 'allow_redirects';
36
 
37
  /**
38
  * auth: (array) Pass an array of HTTP authentication parameters to use
@@ -41,13 +40,13 @@ final class RequestOptions
41
  * authentication type in index [2]. Pass null to disable authentication
42
  * for a request.
43
  */
44
- public const AUTH = 'auth';
45
 
46
  /**
47
  * body: (resource|string|null|int|float|StreamInterface|callable|\Iterator)
48
  * Body to send in the request.
49
  */
50
- public const BODY = 'body';
51
 
52
  /**
53
  * cert: (string|array) Set to a string to specify the path to a file
@@ -56,42 +55,42 @@ final class RequestOptions
56
  * file in the first array element followed by the certificate password
57
  * in the second array element.
58
  */
59
- public const CERT = 'cert';
60
 
61
  /**
62
  * cookies: (bool|GuzzleHttp\Cookie\CookieJarInterface, default=false)
63
  * Specifies whether or not cookies are used in a request or what cookie
64
  * jar to use or what cookies to send. This option only works if your
65
  * handler has the `cookie` middleware. Valid values are `false` and
66
- * an instance of {@see \GuzzleHttp\Cookie\CookieJarInterface}.
67
  */
68
- public const COOKIES = 'cookies';
69
 
70
  /**
71
  * connect_timeout: (float, default=0) Float describing the number of
72
  * seconds to wait while trying to connect to a server. Use 0 to wait
73
  * indefinitely (the default behavior).
74
  */
75
- public const CONNECT_TIMEOUT = 'connect_timeout';
76
 
77
  /**
78
  * debug: (bool|resource) Set to true or set to a PHP stream returned by
79
  * fopen() enable debug output with the HTTP handler used to send a
80
  * request.
81
  */
82
- public const DEBUG = 'debug';
83
 
84
  /**
85
  * decode_content: (bool, default=true) Specify whether or not
86
  * Content-Encoding responses (gzip, deflate, etc.) are automatically
87
  * decoded.
88
  */
89
- public const DECODE_CONTENT = 'decode_content';
90
 
91
  /**
92
  * delay: (int) The amount of time to delay before sending in milliseconds.
93
  */
94
- public const DELAY = 'delay';
95
 
96
  /**
97
  * expect: (bool|integer) Controls the behavior of the
@@ -109,7 +108,7 @@ final class RequestOptions
109
  * size of the body of a request is greater than 1 MB and a request is
110
  * using HTTP/1.1.
111
  */
112
- public const EXPECT = 'expect';
113
 
114
  /**
115
  * form_params: (array) Associative array of form field names to values
@@ -117,13 +116,13 @@ final class RequestOptions
117
  * header to application/x-www-form-urlencoded when no Content-Type header
118
  * is already present.
119
  */
120
- public const FORM_PARAMS = 'form_params';
121
 
122
  /**
123
  * headers: (array) Associative array of HTTP headers. Each value MUST be
124
  * a string or array of strings.
125
  */
126
- public const HEADERS = 'headers';
127
 
128
  /**
129
  * http_errors: (bool, default=true) Set to false to disable exceptions
@@ -131,7 +130,7 @@ final class RequestOptions
131
  * exceptions will be thrown for 4xx and 5xx responses. This option only
132
  * works if your handler has the `httpErrors` middleware.
133
  */
134
- public const HTTP_ERRORS = 'http_errors';
135
 
136
  /**
137
  * idn: (bool|int, default=true) A combination of IDNA_* constants for
@@ -139,14 +138,14 @@ final class RequestOptions
139
  * disable IDN support completely, or to true to use the default
140
  * configuration (IDNA_DEFAULT constant).
141
  */
142
- public const IDN_CONVERSION = 'idn_conversion';
143
 
144
  /**
145
  * json: (mixed) Adds JSON data to a request. The provided value is JSON
146
  * encoded and a Content-Type header of application/json will be added to
147
  * the request if no Content-Type header is already present.
148
  */
149
- public const JSON = 'json';
150
 
151
  /**
152
  * multipart: (array) Array of associative arrays, each containing a
@@ -157,14 +156,14 @@ final class RequestOptions
157
  * the part. If no "filename" key is present, then no "filename" attribute
158
  * will be added to the part.
159
  */
160
- public const MULTIPART = 'multipart';
161
 
162
  /**
163
  * on_headers: (callable) A callable that is invoked when the HTTP headers
164
  * of the response have been received but the body has not yet begun to
165
  * download.
166
  */
167
- public const ON_HEADERS = 'on_headers';
168
 
169
  /**
170
  * on_stats: (callable) allows you to get access to transfer statistics of
@@ -175,7 +174,7 @@ final class RequestOptions
175
  * the error encountered. Included in the data is the total amount of time
176
  * taken to send the request.
177
  */
178
- public const ON_STATS = 'on_stats';
179
 
180
  /**
181
  * progress: (callable) Defines a function to invoke when transfer
@@ -184,14 +183,14 @@ final class RequestOptions
184
  * number of bytes downloaded so far, the number of bytes expected to be
185
  * uploaded, the number of bytes uploaded so far.
186
  */
187
- public const PROGRESS = 'progress';
188
 
189
  /**
190
  * proxy: (string|array) Pass a string to specify an HTTP proxy, or an
191
  * array to specify different proxies for different protocols (where the
192
  * key is the protocol and the value is a proxy string).
193
  */
194
- public const PROXY = 'proxy';
195
 
196
  /**
197
  * query: (array|string) Associative array of query string values to add
@@ -199,14 +198,14 @@ final class RequestOptions
199
  * the string representation. Pass a string value if you need more
200
  * control than what this method provides
201
  */
202
- public const QUERY = 'query';
203
 
204
  /**
205
  * sink: (resource|string|StreamInterface) Where the data of the
206
  * response is written to. Defaults to a PHP temp stream. Providing a
207
  * string will write data to a file by the given name.
208
  */
209
- public const SINK = 'sink';
210
 
211
  /**
212
  * synchronous: (bool) Set to true to inform HTTP handlers that you intend
@@ -214,7 +213,7 @@ final class RequestOptions
214
  * that a promise is still returned if you are using one of the async
215
  * client methods.
216
  */
217
- public const SYNCHRONOUS = 'synchronous';
218
 
219
  /**
220
  * ssl_key: (array|string) Specify the path to a file containing a private
@@ -222,13 +221,13 @@ final class RequestOptions
222
  * containing the path to the SSL key in the first array element followed
223
  * by the password required for the certificate in the second element.
224
  */
225
- public const SSL_KEY = 'ssl_key';
226
 
227
  /**
228
  * stream: Set to true to attempt to stream a response rather than
229
  * download it all up-front.
230
  */
231
- public const STREAM = 'stream';
232
 
233
  /**
234
  * verify: (bool|string, default=true) Describes the SSL certificate
@@ -238,27 +237,27 @@ final class RequestOptions
238
  * is insecure!). Set to a string to provide the path to a CA bundle on
239
  * disk to enable verification using a custom certificate.
240
  */
241
- public const VERIFY = 'verify';
242
 
243
  /**
244
  * timeout: (float, default=0) Float describing the timeout of the
245
  * request in seconds. Use 0 to wait indefinitely (the default behavior).
246
  */
247
- public const TIMEOUT = 'timeout';
248
 
249
  /**
250
  * read_timeout: (float, default=default_socket_timeout ini setting) Float describing
251
  * the body read timeout, for stream requests.
252
  */
253
- public const READ_TIMEOUT = 'read_timeout';
254
 
255
  /**
256
  * version: (float) Specifies the HTTP protocol version to attempt to use.
257
  */
258
- public const VERSION = 'version';
259
 
260
  /**
261
  * force_ip_resolve: (bool) Force client to use only ipv4 or ipv6 protocol
262
  */
263
- public const FORCE_IP_RESOLVE = 'force_ip_resolve';
264
  }
1
  <?php
 
2
  namespace GuzzleHttp;
3
 
4
  /**
31
  * response that was received, and the effective URI. Any return value
32
  * from the on_redirect function is ignored.
33
  */
34
+ const ALLOW_REDIRECTS = 'allow_redirects';
35
 
36
  /**
37
  * auth: (array) Pass an array of HTTP authentication parameters to use
40
  * authentication type in index [2]. Pass null to disable authentication
41
  * for a request.
42
  */
43
+ const AUTH = 'auth';
44
 
45
  /**
46
  * body: (resource|string|null|int|float|StreamInterface|callable|\Iterator)
47
  * Body to send in the request.
48
  */
49
+ const BODY = 'body';
50
 
51
  /**
52
  * cert: (string|array) Set to a string to specify the path to a file
55
  * file in the first array element followed by the certificate password
56
  * in the second array element.
57
  */
58
+ const CERT = 'cert';
59
 
60
  /**
61
  * cookies: (bool|GuzzleHttp\Cookie\CookieJarInterface, default=false)
62
  * Specifies whether or not cookies are used in a request or what cookie
63
  * jar to use or what cookies to send. This option only works if your
64
  * handler has the `cookie` middleware. Valid values are `false` and
65
+ * an instance of {@see GuzzleHttp\Cookie\CookieJarInterface}.
66
  */
67
+ const COOKIES = 'cookies';
68
 
69
  /**
70
  * connect_timeout: (float, default=0) Float describing the number of
71
  * seconds to wait while trying to connect to a server. Use 0 to wait
72
  * indefinitely (the default behavior).
73
  */
74
+ const CONNECT_TIMEOUT = 'connect_timeout';
75
 
76
  /**
77
  * debug: (bool|resource) Set to true or set to a PHP stream returned by
78
  * fopen() enable debug output with the HTTP handler used to send a
79
  * request.
80
  */
81
+ const DEBUG = 'debug';
82
 
83
  /**
84
  * decode_content: (bool, default=true) Specify whether or not
85
  * Content-Encoding responses (gzip, deflate, etc.) are automatically
86
  * decoded.
87
  */
88
+ const DECODE_CONTENT = 'decode_content';
89
 
90
  /**
91
  * delay: (int) The amount of time to delay before sending in milliseconds.
92
  */
93
+ const DELAY = 'delay';
94
 
95
  /**
96
  * expect: (bool|integer) Controls the behavior of the
108
  * size of the body of a request is greater than 1 MB and a request is
109
  * using HTTP/1.1.
110
  */
111
+ const EXPECT = 'expect';
112
 
113
  /**
114
  * form_params: (array) Associative array of form field names to values
116
  * header to application/x-www-form-urlencoded when no Content-Type header
117
  * is already present.
118
  */
119
+ const FORM_PARAMS = 'form_params';
120
 
121
  /**
122
  * headers: (array) Associative array of HTTP headers. Each value MUST be
123
  * a string or array of strings.
124
  */
125
+ const HEADERS = 'headers';
126
 
127
  /**
128
  * http_errors: (bool, default=true) Set to false to disable exceptions
130
  * exceptions will be thrown for 4xx and 5xx responses. This option only
131
  * works if your handler has the `httpErrors` middleware.
132
  */
133
+ const HTTP_ERRORS = 'http_errors';
134
 
135
  /**
136
  * idn: (bool|int, default=true) A combination of IDNA_* constants for
138
  * disable IDN support completely, or to true to use the default
139
  * configuration (IDNA_DEFAULT constant).
140
  */
141
+ const IDN_CONVERSION = 'idn_conversion';
142
 
143
  /**
144
  * json: (mixed) Adds JSON data to a request. The provided value is JSON
145
  * encoded and a Content-Type header of application/json will be added to
146
  * the request if no Content-Type header is already present.
147
  */
148
+ const JSON = 'json';
149
 
150
  /**
151
  * multipart: (array) Array of associative arrays, each containing a
156
  * the part. If no "filename" key is present, then no "filename" attribute
157
  * will be added to the part.
158
  */
159
+ const MULTIPART = 'multipart';
160
 
161
  /**
162
  * on_headers: (callable) A callable that is invoked when the HTTP headers
163
  * of the response have been received but the body has not yet begun to
164
  * download.
165
  */
166
+ const ON_HEADERS = 'on_headers';
167
 
168
  /**
169
  * on_stats: (callable) allows you to get access to transfer statistics of
174
  * the error encountered. Included in the data is the total amount of time
175
  * taken to send the request.
176
  */
177
+ const ON_STATS = 'on_stats';
178
 
179
  /**
180
  * progress: (callable) Defines a function to invoke when transfer
183
  * number of bytes downloaded so far, the number of bytes expected to be
184
  * uploaded, the number of bytes uploaded so far.
185
  */
186
+ const PROGRESS = 'progress';
187
 
188
  /**
189
  * proxy: (string|array) Pass a string to specify an HTTP proxy, or an
190
  * array to specify different proxies for different protocols (where the
191
  * key is the protocol and the value is a proxy string).
192
  */
193
+ const PROXY = 'proxy';
194
 
195
  /**
196
  * query: (array|string) Associative array of query string values to add
198
  * the string representation. Pass a string value if you need more
199
  * control than what this method provides
200
  */
201
+ const QUERY = 'query';
202
 
203
  /**
204
  * sink: (resource|string|StreamInterface) Where the data of the
205
  * response is written to. Defaults to a PHP temp stream. Providing a
206
  * string will write data to a file by the given name.
207
  */
208
+ const SINK = 'sink';
209
 
210
  /**
211
  * synchronous: (bool) Set to true to inform HTTP handlers that you intend
213
  * that a promise is still returned if you are using one of the async
214
  * client methods.
215
  */
216
+ const SYNCHRONOUS = 'synchronous';
217
 
218
  /**
219
  * ssl_key: (array|string) Specify the path to a file containing a private
221
  * containing the path to the SSL key in the first array element followed
222
  * by the password required for the certificate in the second element.
223
  */
224
+ const SSL_KEY = 'ssl_key';
225
 
226
  /**
227
  * stream: Set to true to attempt to stream a response rather than
228
  * download it all up-front.
229
  */
230
+ const STREAM = 'stream';
231
 
232
  /**
233
  * verify: (bool|string, default=true) Describes the SSL certificate
237
  * is insecure!). Set to a string to provide the path to a CA bundle on
238
  * disk to enable verification using a custom certificate.
239
  */
240
+ const VERIFY = 'verify';
241
 
242
  /**
243
  * timeout: (float, default=0) Float describing the timeout of the
244
  * request in seconds. Use 0 to wait indefinitely (the default behavior).
245
  */
246
+ const TIMEOUT = 'timeout';
247
 
248
  /**
249
  * read_timeout: (float, default=default_socket_timeout ini setting) Float describing
250
  * the body read timeout, for stream requests.
251
  */
252
+ const READ_TIMEOUT = 'read_timeout';
253
 
254
  /**
255
  * version: (float) Specifies the HTTP protocol version to attempt to use.
256
  */
257
+ const VERSION = 'version';
258
 
259
  /**
260
  * force_ip_resolve: (bool) Force client to use only ipv4 or ipv6 protocol
261
  */
262
+ const FORCE_IP_RESOLVE = 'force_ip_resolve';
263
  }
vendor/guzzlehttp/guzzle/src/RetryMiddleware.php CHANGED
@@ -1,43 +1,36 @@
1
  <?php
2
-
3
  namespace GuzzleHttp;
4
 
5
  use GuzzleHttp\Promise\PromiseInterface;
 
 
6
  use Psr\Http\Message\RequestInterface;
7
  use Psr\Http\Message\ResponseInterface;
8
 
9
  /**
10
  * Middleware that retries requests based on the boolean result of
11
  * invoking the provided "decider" function.
12
- *
13
- * @final
14
  */
15
  class RetryMiddleware
16
  {
17
- /**
18
- * @var callable(RequestInterface, array): PromiseInterface
19
- */
20
  private $nextHandler;
21
 
22
- /**
23
- * @var callable
24
- */
25
  private $decider;
26
 
27
- /**
28
- * @var callable(int)
29
- */
30
  private $delay;
31
 
32
  /**
33
- * @param callable $decider Function that accepts the number of retries,
34
- * a request, [response], and [exception] and
35
- * returns true if the request is to be
36
- * retried.
37
- * @param callable(RequestInterface, array): PromiseInterface $nextHandler Next handler to invoke.
38
- * @param null|callable(int): int $delay Function that accepts the number of retries
39
- * and returns the number of
40
- * milliseconds to delay.
41
  */
42
  public function __construct(
43
  callable $decider,
@@ -52,14 +45,22 @@ class RetryMiddleware
52
  /**
53
  * Default exponential backoff delay function.
54
  *
 
 
55
  * @return int milliseconds.
56
  */
57
- public static function exponentialDelay(int $retries): int
58
  {
59
- return (int) \pow(2, $retries - 1) * 1000;
60
  }
61
 
62
- public function __invoke(RequestInterface $request, array $options): PromiseInterface
 
 
 
 
 
 
63
  {
64
  if (!isset($options['retries'])) {
65
  $options['retries'] = 0;
@@ -75,29 +76,35 @@ class RetryMiddleware
75
 
76
  /**
77
  * Execute fulfilled closure
 
 
78
  */
79
- private function onFulfilled(RequestInterface $request, array $options): callable
80
  {
81
- return function ($value) use ($request, $options) {
82
- if (!($this->decider)(
 
83
  $options['retries'],
84
- $request,
85
  $value,
86
  null
87
  )) {
88
  return $value;
89
  }
90
- return $this->doRetry($request, $options, $value);
91
  };
92
  }
93
 
94
  /**
95
  * Execute rejected closure
 
 
96
  */
97
- private function onRejected(RequestInterface $req, array $options): callable
98
  {
99
  return function ($reason) use ($req, $options) {
100
- if (!($this->decider)(
 
101
  $options['retries'],
102
  $req,
103
  null,
@@ -109,9 +116,12 @@ class RetryMiddleware
109
  };
110
  }
111
 
112
- private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null): PromiseInterface
 
 
 
113
  {
114
- $options['delay'] = ($this->delay)(++$options['retries'], $response);
115
 
116
  return $this($request, $options);
117
  }
1
  <?php
 
2
  namespace GuzzleHttp;
3
 
4
  use GuzzleHttp\Promise\PromiseInterface;
5
+ use GuzzleHttp\Promise\RejectedPromise;
6
+ use GuzzleHttp\Psr7;
7
  use Psr\Http\Message\RequestInterface;
8
  use Psr\Http\Message\ResponseInterface;
9
 
10
  /**
11
  * Middleware that retries requests based on the boolean result of
12
  * invoking the provided "decider" function.
 
 
13
  */
14
  class RetryMiddleware
15
  {
16
+ /** @var callable */
 
 
17
  private $nextHandler;
18
 
19
+ /** @var callable */
 
 
20
  private $decider;
21
 
22
+ /** @var callable */
 
 
23
  private $delay;
24
 
25
  /**
26
+ * @param callable $decider Function that accepts the number of retries,
27
+ * a request, [response], and [exception] and
28
+ * returns true if the request is to be
29
+ * retried.
30
+ * @param callable $nextHandler Next handler to invoke.
31
+ * @param callable $delay Function that accepts the number of retries
32
+ * and [response] and returns the number of
33
+ * milliseconds to delay.
34
  */
35
  public function __construct(
36
  callable $decider,
45
  /**
46
  * Default exponential backoff delay function.
47
  *
48
+ * @param int $retries
49
+ *
50
  * @return int milliseconds.
51
  */
52
+ public static function exponentialDelay($retries)
53
  {
54
+ return (int) pow(2, $retries - 1) * 1000;
55
  }
56
 
57
+ /**
58
+ * @param RequestInterface $request
59
+ * @param array $options
60
+ *
61
+ * @return PromiseInterface
62
+ */
63
+ public function __invoke(RequestInterface $request, array $options)
64
  {
65
  if (!isset($options['retries'])) {
66
  $options['retries'] = 0;
76
 
77
  /**
78
  * Execute fulfilled closure
79
+ *
80
+ * @return mixed
81
  */
82
+ private function onFulfilled(RequestInterface $req, array $options)
83
  {
84
+ return function ($value) use ($req, $options) {
85
+ if (!call_user_func(
86
+ $this->decider,
87
  $options['retries'],
88
+ $req,
89
  $value,
90
  null
91
  )) {
92
  return $value;
93
  }
94
+ return $this->doRetry($req, $options, $value);
95
  };
96
  }
97
 
98
  /**
99
  * Execute rejected closure
100
+ *
101
+ * @return callable
102
  */
103
+ private function onRejected(RequestInterface $req, array $options)
104
  {
105
  return function ($reason) use ($req, $options) {
106
+ if (!call_user_func(
107
+ $this->decider,
108
  $options['retries'],
109
  $req,
110
  null,
116
  };
117
  }
118
 
119
+ /**
120
+ * @return self
121
+ */
122
+ private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null)
123
  {
124
+ $options['delay'] = call_user_func($this->delay, ++$options['retries'], $response);
125
 
126
  return $this($request, $options);
127
  }
vendor/guzzlehttp/guzzle/src/TransferStats.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  namespace GuzzleHttp;
4
 
5
  use Psr\Http\Message\RequestInterface;
@@ -12,29 +11,10 @@ use Psr\Http\Message\UriInterface;
12
  */
13
  final class TransferStats
14
  {
15
- /**
16
- * @var RequestInterface
17
- */
18
  private $request;
19
-
20
- /**
21
- * @var ResponseInterface|null
22
- */
23
  private $response;
24
-
25
- /**
26
- * @var float|null
27
- */
28
  private $transferTime;
29
-
30
- /**
31
- * @var array
32
- */
33
  private $handlerStats;
34
-
35
- /**
36
- * @var mixed|null
37
- */
38
  private $handlerErrorData;
39
 
40
  /**
@@ -46,10 +26,10 @@ final class TransferStats
46
  */
47
  public function __construct(
48
  RequestInterface $request,
49
- ?ResponseInterface $response = null,
50
- ?float $transferTime = null,
51
  $handlerErrorData = null,
52
- array $handlerStats = []
53
  ) {
54
  $this->request = $request;
55
  $this->response = $response;
@@ -58,23 +38,30 @@ final class TransferStats
58
  $this->handlerStats = $handlerStats;
59
  }
60
 
61
- public function getRequest(): RequestInterface
 
 
 
62
  {
63
  return $this->request;
64
  }
65
 
66
  /**
67
  * Returns the response that was received (if any).
 
 
68
  */
69
- public function getResponse(): ?ResponseInterface
70
  {
71
  return $this->response;
72
  }
73
 
74
  /**
75
  * Returns true if a response was received.
 
 
76
  */
77
- public function hasResponse(): bool
78
  {
79
  return $this->response !== null;
80
  }
@@ -95,8 +82,10 @@ final class TransferStats
95
 
96
  /**
97
  * Get the effective URI the request was sent to.
 
 
98
  */
99
- public function getEffectiveUri(): UriInterface
100
  {
101
  return $this->request->getUri();
102
  }
@@ -106,15 +95,17 @@ final class TransferStats
106
  *
107
  * @return float|null Time in seconds.
108
  */
109
- public function getTransferTime(): ?float
110
  {
111
  return $this->transferTime;
112
  }
113
 
114
  /**
115
  * Gets an array of all of the handler specific transfer data.
 
 
116
  */
117
- public function getHandlerStats(): array
118
  {
119
  return $this->handlerStats;
120
  }
@@ -126,7 +117,7 @@ final class TransferStats
126
  *
127
  * @return mixed|null
128
  */
129
- public function getHandlerStat(string $stat)
130
  {
131
  return isset($this->handlerStats[$stat])
132
  ? $this->handlerStats[$stat]
1
  <?php
 
2
  namespace GuzzleHttp;
3
 
4
  use Psr\Http\Message\RequestInterface;
11
  */
12
  final class TransferStats
13
  {
 
 
 
14
  private $request;
 
 
 
 
15
  private $response;
 
 
 
 
16
  private $transferTime;
 
 
 
 
17
  private $handlerStats;
 
 
 
 
18
  private $handlerErrorData;
19
 
20
  /**
26
  */
27
  public function __construct(
28
  RequestInterface $request,
29
+ ResponseInterface $response = null,
30
+ $transferTime = null,
31
  $handlerErrorData = null,
32
+ $handlerStats = []
33
  ) {
34
  $this->request = $request;
35
  $this->response = $response;
38
  $this->handlerStats = $handlerStats;
39
  }
40
 
41
+ /**
42
+ * @return RequestInterface
43
+ */
44
+ public function getRequest()
45
  {
46
  return $this->request;
47
  }
48
 
49
  /**
50
  * Returns the response that was received (if any).
51
+ *
52
+ * @return ResponseInterface|null
53
  */
54
+ public function getResponse()
55
  {
56
  return $this->response;
57
  }
58
 
59
  /**
60
  * Returns true if a response was received.
61
+ *
62
+ * @return bool
63
  */
64
+ public function hasResponse()
65
  {
66
  return $this->response !== null;
67
  }
82
 
83
  /**
84
  * Get the effective URI the request was sent to.
85
+ *
86
+ * @return UriInterface
87
  */
88
+ public function getEffectiveUri()
89
  {
90
  return $this->request->getUri();
91
  }
95
  *
96
  * @return float|null Time in seconds.
97
  */
98
+ public function getTransferTime()
99
  {
100
  return $this->transferTime;
101
  }
102
 
103
  /**
104
  * Gets an array of all of the handler specific transfer data.
105
+ *
106
+ * @return array
107
  */
108
+ public function getHandlerStats()
109
  {
110
  return $this->handlerStats;
111
  }
117
  *
118
  * @return mixed|null
119
  */
120
+ public function getHandlerStat($stat)
121
  {
122
  return isset($this->handlerStats[$stat])
123
  ? $this->handlerStats[$stat]
vendor/guzzlehttp/guzzle/src/UriTemplate.php ADDED
@@ -0,0 +1,237 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace GuzzleHttp;
3
+
4
+ /**
5
+ * Expands URI templates. Userland implementation of PECL uri_template.
6
+ *
7
+ * @link http://tools.ietf.org/html/rfc6570
8
+ */
9
+ class UriTemplate
10
+ {
11
+ /** @var string URI template */
12
+ private $template;
13
+
14
+ /** @var array Variables to use in the template expansion */
15
+ private $variables;
16
+
17
+ /** @var array Hash for quick operator lookups */
18
+ private static $operatorHash = [
19
+ '' => ['prefix' => '', 'joiner' => ',', 'query' => false],
20
+ '+' => ['prefix' => '', 'joiner' => ',', 'query' => false],
21
+ '#' => ['prefix' => '#', 'joiner' => ',', 'query' => false],
22
+ '.' => ['prefix' => '.', 'joiner' => '.', 'query' => false],
23
+ '/' => ['prefix' => '/', 'joiner' => '/', 'query' => false],
24
+ ';' => ['prefix' => ';', 'joiner' => ';', 'query' => true],
25
+ '?' => ['prefix' => '?', 'joiner' => '&', 'query' => true],
26
+ '&' => ['prefix' => '&', 'joiner' => '&', 'query' => true]
27
+ ];
28
+
29
+ /** @var array Delimiters */
30
+ private static $delims = [':', '/', '?', '#', '[', ']', '@', '!', '$',
31
+ '&', '\'', '(', ')', '*', '+', ',', ';', '='];
32
+
33
+ /** @var array Percent encoded delimiters */
34
+ private static $delimsPct = ['%3A', '%2F', '%3F', '%23', '%5B', '%5D',
35
+ '%40', '%21', '%24', '%26', '%27', '%28', '%29', '%2A', '%2B', '%2C',
36
+ '%3B', '%3D'];
37
+
38
+ public function expand($template, array $variables)
39
+ {
40
+ if (false === strpos($template, '{')) {
41
+ return $template;
42
+ }
43
+
44
+ $this->template = $template;
45
+ $this->variables = $variables;
46
+
47
+ return preg_replace_callback(
48
+ '/\{([^\}]+)\}/',
49
+ [$this, 'expandMatch'],
50
+ $this->template
51
+ );
52
+ }
53
+
54
+ /**
55
+ * Parse an expression into parts
56
+ *
57
+ * @param string $expression Expression to parse
58
+ *
59
+ * @return array Returns an associative array of parts
60
+ */
61
+ private function parseExpression($expression)
62
+ {
63
+ $result = [];
64
+
65
+ if (isset(self::$operatorHash[$expression[0]])) {
66
+ $result['operator'] = $expression[0];
67
+ $expression = substr($expression, 1);
68
+ } else {
69
+ $result['operator'] = '';
70
+ }
71
+
72
+ foreach (explode(',', $expression) as $value) {
73
+ $value = trim($value);
74
+ $varspec = [];
75
+ if ($colonPos = strpos($value, ':')) {
76
+ $varspec['value'] = substr($value, 0, $colonPos);
77
+ $varspec['modifier'] = ':';
78
+ $varspec['position'] = (int) substr($value, $colonPos + 1);
79
+ } elseif (substr($value, -1) === '*') {
80
+ $varspec['modifier'] = '*';
81
+ $varspec['value'] = substr($value, 0, -1);
82
+ } else {
83
+ $varspec['value'] = (string) $value;
84
+ $varspec['modifier'] = '';
85
+ }
86
+ $result['values'][] = $varspec;
87
+ }
88
+
89
+ return $result;
90
+ }
91
+
92
+ /**
93
+ * Process an expansion
94
+ *
95
+ * @param array $matches Matches met in the preg_replace_callback
96
+ *
97
+ * @return string Returns the replacement string
98
+ */
99
+ private function expandMatch(array $matches)
100
+ {
101
+ static $rfc1738to3986 = ['+' => '%20', '%7e' => '~'];
102
+
103
+ $replacements = [];
104
+ $parsed = self::parseExpression($matches[1]);
105
+ $prefix = self::$operatorHash[$parsed['operator']]['prefix'];
106
+ $joiner = self::$operatorHash[$parsed['operator']]['joiner'];
107
+ $useQuery = self::$operatorHash[$parsed['operator']]['query'];
108
+
109
+ foreach ($parsed['values'] as $value) {
110
+ if (!isset($this->variables[$value['value']])) {
111
+ continue;
112
+ }
113
+
114
+ $variable = $this->variables[$value['value']];
115
+ $actuallyUseQuery = $useQuery;
116
+ $expanded = '';
117
+
118
+ if (is_array($variable)) {
119
+ $isAssoc = $this->isAssoc($variable);
120
+ $kvp = [];
121
+ foreach ($variable as $key => $var) {
122
+ if ($isAssoc) {
123
+ $key = rawurlencode($key);
124
+ $isNestedArray = is_array($var);
125
+ } else {
126
+ $isNestedArray = false;
127
+ }
128
+
129
+ if (!$isNestedArray) {
130
+ $var = rawurlencode($var);
131
+ if ($parsed['operator'] === '+' ||
132
+ $parsed['operator'] === '#'
133
+ ) {
134
+ $var = $this->decodeReserved($var);
135
+ }
136
+ }
137
+
138
+ if ($value['modifier'] === '*') {
139
+ if ($isAssoc) {
140
+ if ($isNestedArray) {
141
+ // Nested arrays must allow for deeply nested
142
+ // structures.
143
+ $var = strtr(
144
+ http_build_query([$key => $var]),
145
+ $rfc1738to3986
146
+ );
147
+ } else {
148
+ $var = $key . '=' . $var;
149
+ }
150
+ } elseif ($key > 0 && $actuallyUseQuery) {
151
+ $var = $value['value'] . '=' . $var;
152
+ }
153
+ }
154
+
155
+ $kvp[$key] = $var;
156
+ }
157
+
158
+ if (empty($variable)) {
159
+ $actuallyUseQuery = false;
160
+ } elseif ($value['modifier'] === '*') {
161
+ $expanded = implode($joiner, $kvp);
162
+ if ($isAssoc) {
163
+ // Don't prepend the value name when using the explode
164
+ // modifier with an associative array.
165
+ $actuallyUseQuery = false;
166
+ }
167
+ } else {
168
+ if ($isAssoc) {
169
+ // When an associative array is encountered and the
170
+ // explode modifier is not set, then the result must be
171
+ // a comma separated list of keys followed by their
172
+ // respective values.
173
+ foreach ($kvp as $k => &$v) {
174
+ $v = $k . ',' . $v;
175
+ }
176
+ }
177
+ $expanded = implode(',', $kvp);
178
+ }
179
+ } else {
180
+ if ($value['modifier'] === ':') {
181
+ $variable = substr($variable, 0, $value['position']);
182
+ }
183
+ $expanded = rawurlencode($variable);
184
+ if ($parsed['operator'] === '+' || $parsed['operator'] === '#') {
185
+ $expanded = $this->decodeReserved($expanded);
186
+ }
187
+ }
188
+
189
+ if ($actuallyUseQuery) {
190
+ if (!$expanded && $joiner !== '&') {
191
+ $expanded = $value['value'];
192
+ } else {
193
+ $expanded = $value['value'] . '=' . $expanded;
194
+ }
195
+ }
196
+
197
+ $replacements[] = $expanded;
198
+ }
199
+
200
+ $ret = implode($joiner, $replacements);
201
+ if ($ret && $prefix) {
202
+ return $prefix . $ret;
203
+ }
204
+
205
+ return $ret;
206
+ }
207
+
208
+ /**
209
+ * Determines if an array is associative.
210
+ *
211
+ * This makes the assumption that input arrays are sequences or hashes.
212
+ * This assumption is a tradeoff for accuracy in favor of speed, but it
213
+ * should work in almost every case where input is supplied for a URI
214
+ * template.
215
+ *
216
+ * @param array $array Array to check
217
+ *
218
+ * @return bool
219
+ */
220
+ private function isAssoc(array $array)
221
+ {
222
+ return $array && array_keys($array)[0] !== 0;
223
+ }
224
+
225
+ /**
226
+ * Removes percent encoding on reserved characters (used with + and #
227
+ * modifiers).
228
+ *
229
+ * @param string $string String to fix
230
+ *
231
+ * @return string
232
+ */
233
+ private function decodeReserved($string)
234
+ {
235
+ return str_replace(self::$delimsPct, self::$delims, $string);
236
+ }
237
+ }
vendor/guzzlehttp/guzzle/src/Utils.php CHANGED
@@ -1,343 +1,41 @@
1
  <?php
2
-
3
  namespace GuzzleHttp;
4
 
5
  use GuzzleHttp\Exception\InvalidArgumentException;
6
- use GuzzleHttp\Handler\CurlHandler;
7
- use GuzzleHttp\Handler\CurlMultiHandler;
8
- use GuzzleHttp\Handler\Proxy;
9
- use GuzzleHttp\Handler\StreamHandler;
10
  use Psr\Http\Message\UriInterface;
 
11
 
12
  final class Utils
13
  {
14
- /**
15
- * Debug function used to describe the provided value type and class.
16
- *
17
- * @param mixed $input
18
- *
19
- * @return string Returns a string containing the type of the variable and
20
- * if a class is provided, the class name.
21
- */
22
- public static function describeType($input): string
23
- {
24
- switch (\gettype($input)) {
25
- case 'object':
26
- return 'object(' . \get_class($input) . ')';
27
- case 'array':
28
- return 'array(' . \count($input) . ')';
29
- default:
30
- \ob_start();
31
- \var_dump($input);
32
- // normalize float vs double
33
- /** @var string $varDumpContent */
34
- $varDumpContent = \ob_get_clean();
35
-
36
- return \str_replace('double(', 'float(', \rtrim($varDumpContent));
37
- }
38
- }
39
-
40
- /**
41
- * Parses an array of header lines into an associative array of headers.
42
- *
43
- * @param iterable $lines Header lines array of strings in the following
44
- * format: "Name: Value"
45
- */
46
- public static function headersFromLines(iterable $lines): array
47
- {
48
- $headers = [];
49
-
50
- foreach ($lines as $line) {
51
- $parts = \explode(':', $line, 2);
52
- $headers[\trim($parts[0])][] = isset($parts[1])
53
- ? \trim($parts[1])
54
- : null;
55
- }
56
-
57
- return $headers;
58
- }
59
-
60
- /**
61
- * Returns a debug stream based on the provided variable.
62
- *
63
- * @param mixed $value Optional value
64
- *
65
- * @return resource
66
- */
67
- public static function debugResource($value = null)
68
- {
69
- if (\is_resource($value)) {
70
- return $value;
71
- }
72
- if (\defined('STDOUT')) {
73
- return \STDOUT;
74
- }
75
-
76
- $resource = \fopen('php://output', 'w');
77
- if (false === $resource) {
78
- throw new \RuntimeException('Can not open php output for writing to debug the resource.');
79
- }
80
-
81
- return $resource;
82
- }
83
-
84
- /**
85
- * Chooses and creates a default handler to use based on the environment.
86
- *
87
- * The returned handler is not wrapped by any default middlewares.
88
- *
89
- * @throws \RuntimeException if no viable Handler is available.
90
- *
91
- * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system.
92
- */
93
- public static function chooseHandler(): callable
94
- {
95
- $handler = null;
96
- if (\function_exists('curl_multi_exec') && \function_exists('curl_exec')) {
97
- $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler());
98
- } elseif (\function_exists('curl_exec')) {
99
- $handler = new CurlHandler();
100
- } elseif (\function_exists('curl_multi_exec')) {
101
- $handler = new CurlMultiHandler();
102
- }
103
-
104
- if (\ini_get('allow_url_fopen')) {
105
- $handler = $handler
106
- ? Proxy::wrapStreaming($handler, new StreamHandler())
107
- : new StreamHandler();
108
- } elseif (!$handler) {
109
- throw new \RuntimeException('GuzzleHttp requires cURL, the '
110
- . 'allow_url_fopen ini setting, or a custom HTTP handler.');
111
- }
112
-
113
- return $handler;
114
- }
115
-
116
- /**
117
- * Get the default User-Agent string to use with Guzzle.
118
- */
119
- public static function defaultUserAgent(): string
120
- {
121
- return sprintf('GuzzleHttp/%d', ClientInterface::MAJOR_VERSION);
122
- }
123
-
124
- /**
125
- * Returns the default cacert bundle for the current system.
126
- *
127
- * First, the openssl.cafile and curl.cainfo php.ini settings are checked.
128
- * If those settings are not configured, then the common locations for
129
- * bundles found on Red Hat, CentOS, Fedora, Ubuntu, Debian, FreeBSD, OS X
130
- * and Windows are checked. If any of these file locations are found on
131
- * disk, they will be utilized.
132
- *
133
- * Note: the result of this function is cached for subsequent calls.
134
- *
135
- * @throws \RuntimeException if no bundle can be found.
136
- *
137
- * @deprecated Utils::defaultCaBundle will be removed in guzzlehttp/guzzle:8.0. This method is not needed in PHP 5.6+.
138
- */
139
- public static function defaultCaBundle(): string
140
- {
141
- static $cached = null;
142
- static $cafiles = [
143
- // Red Hat, CentOS, Fedora (provided by the ca-certificates package)
144
- '/etc/pki/tls/certs/ca-bundle.crt',
145
- // Ubuntu, Debian (provided by the ca-certificates package)
146
- '/etc/ssl/certs/ca-certificates.crt',
147
- // FreeBSD (provided by the ca_root_nss package)
148
- '/usr/local/share/certs/ca-root-nss.crt',
149
- // SLES 12 (provided by the ca-certificates package)
150
- '/var/lib/ca-certificates/ca-bundle.pem',
151
- // OS X provided by homebrew (using the default path)
152
- '/usr/local/etc/openssl/cert.pem',
153
- // Google app engine
154
- '/etc/ca-certificates.crt',
155
- // Windows?
156
- 'C:\\windows\\system32\\curl-ca-bundle.crt',
157
- 'C:\\windows\\curl-ca-bundle.crt',
158
- ];
159
-
160
- if ($cached) {
161
- return $cached;
162
- }
163
-
164
- if ($ca = \ini_get('openssl.cafile')) {
165
- return $cached = $ca;
166
- }
167
-
168
- if ($ca = \ini_get('curl.cainfo')) {
169
- return $cached = $ca;
170
- }
171
-
172
- foreach ($cafiles as $filename) {
173
- if (\file_exists($filename)) {
174
- return $cached = $filename;
175
- }
176
- }
177
-
178
- throw new \RuntimeException(
179
- <<< EOT
180
- No system CA bundle could be found in any of the the common system locations.
181
- PHP versions earlier than 5.6 are not properly configured to use the system's
182
- CA bundle by default. In order to verify peer certificates, you will need to
183
- supply the path on disk to a certificate bundle to the 'verify' request
184
- option: http://docs.guzzlephp.org/en/latest/clients.html#verify. If you do not
185
- need a specific certificate bundle, then Mozilla provides a commonly used CA
186
- bundle which can be downloaded here (provided by the maintainer of cURL):
187
- https://curl.haxx.se/ca/cacert.pem. Once
188
- you have a CA bundle available on disk, you can set the 'openssl.cafile' PHP
189
- ini setting to point to the path to the file, allowing you to omit the 'verify'
190
- request option. See https://curl.haxx.se/docs/sslcerts.html for more
191
- information.
192
- EOT
193
- );
194
- }
195
-
196
- /**
197
- * Creates an associative array of lowercase header names to the actual
198
- * header casing.
199
- */
200
- public static function normalizeHeaderKeys(array $headers): array
201
- {
202
- $result = [];
203
- foreach (\array_keys($headers) as $key) {
204
- $result[\strtolower($key)] = $key;
205
- }
206
-
207
- return $result;
208
- }
209
-
210
- /**
211
- * Returns true if the provided host matches any of the no proxy areas.
212
- *
213
- * This method will strip a port from the host if it is present. Each pattern
214
- * can be matched with an exact match (e.g., "foo.com" == "foo.com") or a
215
- * partial match: (e.g., "foo.com" == "baz.foo.com" and ".foo.com" ==
216
- * "baz.foo.com", but ".foo.com" != "foo.com").
217
- *
218
- * Areas are matched in the following cases:
219
- * 1. "*" (without quotes) always matches any hosts.
220
- * 2. An exact match.
221
- * 3. The area starts with "." and the area is the last part of the host. e.g.
222
- * '.mit.edu' will match any host that ends with '.mit.edu'.
223
- *
224
- * @param string $host Host to check against the patterns.
225
- * @param string[] $noProxyArray An array of host patterns.
226
- *
227
- * @throws InvalidArgumentException
228
- */
229
- public static function isHostInNoProxy(string $host, array $noProxyArray): bool
230
- {
231
- if (\strlen($host) === 0) {
232
- throw new InvalidArgumentException('Empty host provided');
233
- }
234
-
235
- // Strip port if present.
236
- if (\strpos($host, ':')) {
237
- /** @var string[] $hostParts will never be false because of the checks above */
238
- $hostParts = \explode($host, ':', 2);
239
- $host = $hostParts[0];
240
- }
241
-
242
- foreach ($noProxyArray as $area) {
243
- // Always match on wildcards.
244
- if ($area === '*') {
245
- return true;
246
- } elseif (empty($area)) {
247
- // Don't match on empty values.
248
- continue;
249
- } elseif ($area === $host) {
250
- // Exact matches.
251
- return true;
252
- }
253
- // Special match if the area when prefixed with ".". Remove any
254
- // existing leading "." and add a new leading ".".
255
- $area = '.' . \ltrim($area, '.');
256
- if (\substr($host, -(\strlen($area))) === $area) {
257
- return true;
258
- }
259
- }
260
-
261
- return false;
262
- }
263
-
264
- /**
265
- * Wrapper for json_decode that throws when an error occurs.
266
- *
267
- * @param string $json JSON data to parse
268
- * @param bool $assoc When true, returned objects will be converted
269
- * into associative arrays.
270
- * @param int $depth User specified recursion depth.
271
- * @param int $options Bitmask of JSON decode options.
272
- *
273
- * @return object|array|string|int|float|bool|null
274
- *
275
- * @throws InvalidArgumentException if the JSON cannot be decoded.
276
- *
277
- * @link https://www.php.net/manual/en/function.json-decode.php
278
- */
279
- public static function jsonDecode(string $json, bool $assoc = false, int $depth = 512, int $options = 0)
280
- {
281
- $data = \json_decode($json, $assoc, $depth, $options);
282
- if (\JSON_ERROR_NONE !== \json_last_error()) {
283
- throw new InvalidArgumentException(
284
- 'json_decode error: ' . \json_last_error_msg()
285
- );
286
- }
287
-
288
- return $data;
289
- }
290
-
291
- /**
292
- * Wrapper for JSON encoding that throws when an error occurs.
293
- *
294
- * @param mixed $value The value being encoded
295
- * @param int $options JSON encode option bitmask
296
- * @param int $depth Set the maximum depth. Must be greater than zero.
297
- *
298
- * @throws InvalidArgumentException if the JSON cannot be encoded.
299
- *
300
- * @link https://www.php.net/manual/en/function.json-encode.php
301
- */
302
- public static function jsonEncode($value, int $options = 0, int $depth = 512): string
303
- {
304
- $json = \json_encode($value, $options, $depth);
305
- if (\JSON_ERROR_NONE !== \json_last_error()) {
306
- throw new InvalidArgumentException(
307
- 'json_encode error: ' . \json_last_error_msg()
308
- );
309
- }
310
-
311
- /** @var string */
312
- return $json;
313
- }
314
-
315
  /**
316
  * Wrapper for the hrtime() or microtime() functions
317
  * (depending on the PHP version, one of the two is used)
318
  *
319
- * @return float UNIX timestamp
320
  *
321
  * @internal
322
  */
323
- public static function currentTime(): float
324
  {
325
- return (float) \function_exists('hrtime') ? \hrtime(true) / 1e9 : \microtime(true);
326
  }
327
 
328
  /**
 
 
 
329
  * @throws InvalidArgumentException
330
  *
331
  * @internal
332
  */
333
- public static function idnUriConvert(UriInterface $uri, int $options = 0): UriInterface
334
  {
335
  if ($uri->getHost()) {
336
  $asciiHost = self::idnToAsci($uri->getHost(), $options, $info);
337
  if ($asciiHost === false) {
338
- $errorBitSet = $info['errors'] ?? 0;
339
 
340
- $errorConstants = array_filter(array_keys(get_defined_constants()), static function ($name) {
341
  return substr($name, 0, 11) === 'IDNA_ERROR_';
342
  });
343
 
@@ -354,10 +52,11 @@ EOT
354
  }
355
 
356
  throw new InvalidArgumentException($errorMessage);
357
- }
358
- if ($uri->getHost() !== $asciiHost) {
359
- // Replace URI only if the ASCII version is different
360
- $uri = $uri->withHost($asciiHost);
 
361
  }
362
  }
363
 
@@ -365,30 +64,29 @@ EOT
365
  }
366
 
367
  /**
368
- * @internal
 
 
 
 
369
  */
370
- public static function getenv(string $name): ?string
371
  {
372
- if (isset($_SERVER[$name])) {
373
- return (string) $_SERVER[$name];
374
  }
375
 
376
- if (\PHP_SAPI === 'cli' && ($value = \getenv($name)) !== false && $value !== null) {
377
- return (string) $value;
378
  }
379
 
380
- return null;
381
- }
382
-
383
- /**
384
- * @return string|false
385
- */
386
- private static function idnToAsci(string $domain, int $options, ?array &$info = [])
387
- {
388
- if (\function_exists('idn_to_ascii') && \defined('INTL_IDNA_VARIANT_UTS46')) {
389
- return \idn_to_ascii($domain, $options, \INTL_IDNA_VARIANT_UTS46, $info);
390
  }
391
 
392
- throw new \Error('ext-idn or symfony/polyfill-intl-idn not loaded or too old');
393
  }
394
  }
1
  <?php
 
2
  namespace GuzzleHttp;
3
 
4
  use GuzzleHttp\Exception\InvalidArgumentException;
 
 
 
 
5
  use Psr\Http\Message\UriInterface;
6
+ use Symfony\Polyfill\Intl\Idn\Idn;
7
 
8
  final class Utils
9
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  /**
11
  * Wrapper for the hrtime() or microtime() functions
12
  * (depending on the PHP version, one of the two is used)
13
  *
14
+ * @return float|mixed UNIX timestamp
15
  *
16
  * @internal
17
  */
18
+ public static function currentTime()
19
  {
20
+ return function_exists('hrtime') ? hrtime(true) / 1e9 : microtime(true);
21
  }
22
 
23
  /**
24
+ * @param int $options
25
+ *
26
+ * @return UriInterface
27
  * @throws InvalidArgumentException
28
  *
29
  * @internal
30
  */
31
+ public static function idnUriConvert(UriInterface $uri, $options = 0)
32
  {
33
  if ($uri->getHost()) {
34
  $asciiHost = self::idnToAsci($uri->getHost(), $options, $info);
35
  if ($asciiHost === false) {
36
+ $errorBitSet = isset($info['errors']) ? $info['errors'] : 0;
37
 
38
+ $errorConstants = array_filter(array_keys(get_defined_constants()), function ($name) {
39
  return substr($name, 0, 11) === 'IDNA_ERROR_';
40
  });
41
 
52
  }
53
 
54
  throw new InvalidArgumentException($errorMessage);
55
+ } else {
56
+ if ($uri->getHost() !== $asciiHost) {
57
+ // Replace URI only if the ASCII version is different
58
+ $uri = $uri->withHost($asciiHost);
59
+ }
60
  }
61
  }
62
 
64
  }
65
 
66
  /**
67
+ * @param string $domain
68
+ * @param int $options
69
+ * @param array $info
70
+ *
71
+ * @return string|false
72
  */
73
+ private static function idnToAsci($domain, $options, &$info = [])
74
  {
75
+ if (\preg_match('%^[ -~]+$%', $domain) === 1) {
76
+ return $domain;
77
  }
78
 
79
+ if (\extension_loaded('intl') && defined('INTL_IDNA_VARIANT_UTS46')) {
80
+ return \idn_to_ascii($domain, $options, INTL_IDNA_VARIANT_UTS46, $info);
81
  }
82
 
83
+ /*
84
+ * The Idn class is marked as @internal. Verify that class and method exists.
85
+ */
86
+ if (method_exists(Idn::class, 'idn_to_ascii')) {
87
+ return Idn::idn_to_ascii($domain, $options, Idn::INTL_IDNA_VARIANT_UTS46, $info);
 
 
 
 
 
88
  }
89
 
90
+ throw new \RuntimeException('ext-intl or symfony/polyfill-intl-idn not loaded or too old');
91
  }
92
  }
vendor/guzzlehttp/guzzle/src/functions.php CHANGED
@@ -1,34 +1,77 @@
1
  <?php
2
-
3
  namespace GuzzleHttp;
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  /**
6
  * Debug function used to describe the provided value type and class.
7
  *
8
- * @param mixed $input Any type of variable to describe the type of. This
9
- * parameter misses a typehint because of that.
10
  *
11
  * @return string Returns a string containing the type of the variable and
12
  * if a class is provided, the class name.
13
- *
14
- * @deprecated describe_type will be removed in guzzlehttp/guzzle:8.0. Use Utils::describeType instead.
15
  */
16
- function describe_type($input): string
17
  {
18
- return Utils::describeType($input);
 
 
 
 
 
 
 
 
 
 
19
  }
20
 
21
  /**
22
  * Parses an array of header lines into an associative array of headers.
23
  *
24
  * @param iterable $lines Header lines array of strings in the following
25
- * format: "Name: Value"
26
- *
27
- * @deprecated headers_from_lines will be removed in guzzlehttp/guzzle:8.0. Use Utils::headersFromLines instead.
28
  */
29
- function headers_from_lines(iterable $lines): array
30
  {
31
- return Utils::headersFromLines($lines);
 
 
 
 
 
 
 
 
 
32
  }
33
 
34
  /**
@@ -37,12 +80,16 @@ function headers_from_lines(iterable $lines): array
37
  * @param mixed $value Optional value
38
  *
39
  * @return resource
40
- *
41
- * @deprecated debug_resource will be removed in guzzlehttp/guzzle:8.0. Use Utils::debugResource instead.
42
  */
43
  function debug_resource($value = null)
44
  {
45
- return Utils::debugResource($value);
 
 
 
 
 
 
46
  }
47
 
48
  /**
@@ -50,25 +97,50 @@ function debug_resource($value = null)
50
  *
51
  * The returned handler is not wrapped by any default middlewares.
52
  *
 
53
  * @throws \RuntimeException if no viable Handler is available.
54
- *
55
- * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system.
56
- *
57
- * @deprecated choose_handler will be removed in guzzlehttp/guzzle:8.0. Use Utils::chooseHandler instead.
58
  */
59
- function choose_handler(): callable
60
  {
61
- return Utils::chooseHandler();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  }
63
 
64
  /**
65
- * Get the default User-Agent string to use with Guzzle.
66
  *
67
- * @deprecated default_user_agent will be removed in guzzlehttp/guzzle:8.0. Use Utils::defaultUserAgent instead.
68
  */
69
- function default_user_agent(): string
70
  {
71
- return Utils::defaultUserAgent();
 
 
 
 
 
 
 
 
 
 
72
  }
73
 
74
  /**
@@ -82,24 +154,82 @@ function default_user_agent(): string
82
  *
83
  * Note: the result of this function is cached for subsequent calls.
84
  *
 
85
  * @throws \RuntimeException if no bundle can be found.
86
- *
87
- * @deprecated default_ca_bundle will be removed in guzzlehttp/guzzle:8.0. This function is not needed in PHP 5.6+.
88
  */
89
- function default_ca_bundle(): string
90
  {
91
- return Utils::defaultCaBundle();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  }
93
 
94
  /**
95
  * Creates an associative array of lowercase header names to the actual
96
  * header casing.
97
  *
98
- * @deprecated normalize_header_keys will be removed in guzzlehttp/guzzle:8.0. Use Utils::normalizeHeaderKeys instead.
 
 
99
  */
100
- function normalize_header_keys(array $headers): array
101
  {
102
- return Utils::normalizeHeaderKeys($headers);
 
 
 
 
 
103
  }
104
 
105
  /**
@@ -116,52 +246,89 @@ function normalize_header_keys(array $headers): array
116
  * 3. The area starts with "." and the area is the last part of the host. e.g.
117
  * '.mit.edu' will match any host that ends with '.mit.edu'.
118
  *
119
- * @param string $host Host to check against the patterns.
120
- * @param string[] $noProxyArray An array of host patterns.
121
- *
122
- * @throws Exception\InvalidArgumentException
123
  *
124
- * @deprecated is_host_in_noproxy will be removed in guzzlehttp/guzzle:8.0. Use Utils::isHostInNoProxy instead.
125
  */
126
- function is_host_in_noproxy(string $host, array $noProxyArray): bool
127
  {
128
- return Utils::isHostInNoProxy($host, $noProxyArray);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  }
130
 
131
  /**
132
  * Wrapper for json_decode that throws when an error occurs.
133
  *
134
  * @param string $json JSON data to parse
135
- * @param bool $assoc When true, returned objects will be converted
136
  * into associative arrays.
137
  * @param int $depth User specified recursion depth.
138
  * @param int $options Bitmask of JSON decode options.
139
  *
140
- * @return object|array|string|int|float|bool|null
141
- *
142
  * @throws Exception\InvalidArgumentException if the JSON cannot be decoded.
143
- *
144
- * @link https://www.php.net/manual/en/function.json-decode.php
145
- * @deprecated json_decode will be removed in guzzlehttp/guzzle:8.0. Use Utils::jsonDecode instead.
146
  */
147
- function json_decode(string $json, bool $assoc = false, int $depth = 512, int $options = 0)
148
  {
149
- return Utils::jsonDecode($json, $assoc, $depth, $options);
 
 
 
 
 
 
 
150
  }
151
 
152
  /**
153
  * Wrapper for JSON encoding that throws when an error occurs.
154
  *
155
  * @param mixed $value The value being encoded
156
- * @param int $options JSON encode option bitmask
157
- * @param int $depth Set the maximum depth. Must be greater than zero.
158
  *
 
159
  * @throws Exception\InvalidArgumentException if the JSON cannot be encoded.
160
- *
161
- * @link https://www.php.net/manual/en/function.json-encode.php
162
- * @deprecated json_encode will be removed in guzzlehttp/guzzle:8.0. Use Utils::jsonEncode instead.
163
  */
164
- function json_encode($value, int $options = 0, int $depth = 512): string
165
  {
166
- return Utils::jsonEncode($value, $options, $depth);
 
 
 
 
 
 
 
167
  }
1
  <?php
 
2
  namespace GuzzleHttp;
3
 
4
+ use GuzzleHttp\Handler\CurlHandler;
5
+ use GuzzleHttp\Handler\CurlMultiHandler;
6
+ use GuzzleHttp\Handler\Proxy;
7
+ use GuzzleHttp\Handler\StreamHandler;
8
+
9
+ /**
10
+ * Expands a URI template
11
+ *
12
+ * @param string $template URI template
13
+ * @param array $variables Template variables
14
+ *
15
+ * @return string
16
+ */
17
+ function uri_template($template, array $variables)
18
+ {
19
+ if (extension_loaded('uri_template')) {
20
+ // @codeCoverageIgnoreStart
21
+ return \uri_template($template, $variables);
22
+ // @codeCoverageIgnoreEnd
23
+ }
24
+
25
+ static $uriTemplate;
26
+ if (!$uriTemplate) {
27
+ $uriTemplate = new UriTemplate();
28
+ }
29
+
30
+ return $uriTemplate->expand($template, $variables);
31
+ }
32
+
33
  /**
34
  * Debug function used to describe the provided value type and class.
35
  *
36
+ * @param mixed $input
 
37
  *
38
  * @return string Returns a string containing the type of the variable and
39
  * if a class is provided, the class name.
 
 
40
  */
41
+ function describe_type($input)
42
  {
43
+ switch (gettype($input)) {
44
+ case 'object':
45
+ return 'object(' . get_class($input) . ')';
46
+ case 'array':
47
+ return 'array(' . count($input) . ')';
48
+ default:
49
+ ob_start();
50
+ var_dump($input);
51
+ // normalize float vs double
52
+ return str_replace('double(', 'float(', rtrim(ob_get_clean()));
53
+ }
54
  }
55
 
56
  /**
57
  * Parses an array of header lines into an associative array of headers.
58
  *
59
  * @param iterable $lines Header lines array of strings in the following
60
+ * format: "Name: Value"
61
+ * @return array
 
62
  */
63
+ function headers_from_lines($lines)
64
  {
65
+ $headers = [];
66
+
67
+ foreach ($lines as $line) {
68
+ $parts = explode(':', $line, 2);
69
+ $headers[trim($parts[0])][] = isset($parts[1])
70
+ ? trim($parts[1])
71
+ : null;
72
+ }
73
+
74
+ return $headers;
75
  }
76
 
77
  /**
80
  * @param mixed $value Optional value
81
  *
82
  * @return resource
 
 
83
  */
84
  function debug_resource($value = null)
85
  {
86
+ if (is_resource($value)) {
87
+ return $value;
88
+ } elseif (defined('STDOUT')) {
89
+ return STDOUT;
90
+ }
91
+
92
+ return fopen('php://output', 'w');
93
  }
94
 
95
  /**
97
  *
98
  * The returned handler is not wrapped by any default middlewares.
99
  *
100
+ * @return callable Returns the best handler for the given system.
101
  * @throws \RuntimeException if no viable Handler is available.
 
 
 
 
102
  */
103
+ function choose_handler()
104
  {
105
+ $handler = null;
106
+ if (function_exists('curl_multi_exec') && function_exists('curl_exec')) {
107
+ $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler());
108
+ } elseif (function_exists('curl_exec')) {
109
+ $handler = new CurlHandler();
110
+ } elseif (function_exists('curl_multi_exec')) {
111
+ $handler = new CurlMultiHandler();
112
+ }
113
+
114
+ if (ini_get('allow_url_fopen')) {
115
+ $handler = $handler
116
+ ? Proxy::wrapStreaming($handler, new StreamHandler())
117
+ : new StreamHandler();
118
+ } elseif (!$handler) {
119
+ throw new \RuntimeException('GuzzleHttp requires cURL, the '
120
+ . 'allow_url_fopen ini setting, or a custom HTTP handler.');
121
+ }
122
+
123
+ return $handler;
124
  }
125
 
126
  /**
127
+ * Get the default User-Agent string to use with Guzzle
128
  *
129
+ * @return string
130
  */
131
+ function default_user_agent()
132
  {
133
+ static $defaultAgent = '';
134
+
135
+ if (!$defaultAgent) {
136
+ $defaultAgent = 'GuzzleHttp/' . Client::VERSION;
137
+ if (extension_loaded('curl') && function_exists('curl_version')) {
138
+ $defaultAgent .= ' curl/' . \curl_version()['version'];
139
+ }
140
+ $defaultAgent .= ' PHP/' . PHP_VERSION;
141
+ }
142
+
143
+ return $defaultAgent;
144
  }
145
 
146
  /**
154
  *
155
  * Note: the result of this function is cached for subsequent calls.
156
  *
157
+ * @return string
158
  * @throws \RuntimeException if no bundle can be found.
 
 
159
  */
160
+ function default_ca_bundle()
161
  {
162
+ static $cached = null;
163
+ static $cafiles = [
164
+ // Red Hat, CentOS, Fedora (provided by the ca-certificates package)
165
+ '/etc/pki/tls/certs/ca-bundle.crt',
166
+ // Ubuntu, Debian (provided by the ca-certificates package)
167
+ '/etc/ssl/certs/ca-certificates.crt',
168
+ // FreeBSD (provided by the ca_root_nss package)
169
+ '/usr/local/share/certs/ca-root-nss.crt',
170
+ // SLES 12 (provided by the ca-certificates package)
171
+ '/var/lib/ca-certificates/ca-bundle.pem',
172
+ // OS X provided by homebrew (using the default path)
173
+ '/usr/local/etc/openssl/cert.pem',
174
+ // Google app engine
175
+ '/etc/ca-certificates.crt',
176
+ // Windows?
177
+ 'C:\\windows\\system32\\curl-ca-bundle.crt',
178
+ 'C:\\windows\\curl-ca-bundle.crt',
179
+ ];
180
+
181
+ if ($cached) {
182
+ return $cached;
183
+ }
184
+
185
+ if ($ca = ini_get('openssl.cafile')) {
186
+ return $cached = $ca;
187
+ }
188
+
189
+ if ($ca = ini_get('curl.cainfo')) {
190
+ return $cached = $ca;
191
+ }
192
+
193
+ foreach ($cafiles as $filename) {
194
+ if (file_exists($filename)) {
195
+ return $cached = $filename;
196
+ }
197
+ }
198
+
199
+ throw new \RuntimeException(
200
+ <<< EOT
201
+ No system CA bundle could be found in any of the the common system locations.
202
+ PHP versions earlier than 5.6 are not properly configured to use the system's
203
+ CA bundle by default. In order to verify peer certificates, you will need to
204
+ supply the path on disk to a certificate bundle to the 'verify' request
205
+ option: http://docs.guzzlephp.org/en/latest/clients.html#verify. If you do not
206
+ need a specific certificate bundle, then Mozilla provides a commonly used CA
207
+ bundle which can be downloaded here (provided by the maintainer of cURL):
208
+ https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt. Once
209
+ you have a CA bundle available on disk, you can set the 'openssl.cafile' PHP
210
+ ini setting to point to the path to the file, allowing you to omit the 'verify'
211
+ request option. See http://curl.haxx.se/docs/sslcerts.html for more
212
+ information.
213
+ EOT
214
+ );
215
  }
216
 
217
  /**
218
  * Creates an associative array of lowercase header names to the actual
219
  * header casing.
220
  *
221
+ * @param array $headers
222
+ *
223
+ * @return array
224
  */
225
+ function normalize_header_keys(array $headers)
226
  {
227
+ $result = [];
228
+ foreach (array_keys($headers) as $key) {
229
+ $result[strtolower($key)] = $key;
230
+ }
231
+
232
+ return $result;
233
  }
234
 
235
  /**
246
  * 3. The area starts with "." and the area is the last part of the host. e.g.
247
  * '.mit.edu' will match any host that ends with '.mit.edu'.
248
  *
249
+ * @param string $host Host to check against the patterns.
250
+ * @param array $noProxyArray An array of host patterns.
 
 
251
  *
252
+ * @return bool
253
  */
254
+ function is_host_in_noproxy($host, array $noProxyArray)
255
  {
256
+ if (strlen($host) === 0) {
257
+ throw new \InvalidArgumentException('Empty host provided');
258
+ }
259
+
260
+ // Strip port if present.
261
+ if (strpos($host, ':')) {
262
+ $host = explode($host, ':', 2)[0];
263
+ }
264
+
265
+ foreach ($noProxyArray as $area) {
266
+ // Always match on wildcards.
267
+ if ($area === '*') {
268
+ return true;
269
+ } elseif (empty($area)) {
270
+ // Don't match on empty values.
271
+ continue;
272
+ } elseif ($area === $host) {
273
+ // Exact matches.
274
+ return true;
275
+ } else {
276
+ // Special match if the area when prefixed with ".". Remove any
277
+ // existing leading "." and add a new leading ".".
278
+ $area = '.' . ltrim($area, '.');
279
+ if (substr($host, -(strlen($area))) === $area) {
280
+ return true;
281
+ }
282
+ }
283
+ }
284
+
285
+ return false;
286
  }
287
 
288
  /**
289
  * Wrapper for json_decode that throws when an error occurs.
290
  *
291
  * @param string $json JSON data to parse
292
+ * @param bool $assoc When true, returned objects will be converted
293
  * into associative arrays.
294
  * @param int $depth User specified recursion depth.
295
  * @param int $options Bitmask of JSON decode options.
296
  *
297
+ * @return mixed
 
298
  * @throws Exception\InvalidArgumentException if the JSON cannot be decoded.
299
+ * @link http://www.php.net/manual/en/function.json-decode.php
 
 
300
  */
301
+ function json_decode($json, $assoc = false, $depth = 512, $options = 0)
302
  {
303
+ $data = \json_decode($json, $assoc, $depth, $options);
304
+ if (JSON_ERROR_NONE !== json_last_error()) {
305
+ throw new Exception\InvalidArgumentException(
306
+ 'json_decode error: ' . json_last_error_msg()
307
+ );
308
+ }
309
+
310
+ return $data;
311
  }
312
 
313
  /**
314
  * Wrapper for JSON encoding that throws when an error occurs.
315
  *
316
  * @param mixed $value The value being encoded
317
+ * @param int $options JSON encode option bitmask
318
+ * @param int $depth Set the maximum depth. Must be greater than zero.
319
  *
320
+ * @return string
321
  * @throws Exception\InvalidArgumentException if the JSON cannot be encoded.
322
+ * @link http://www.php.net/manual/en/function.json-encode.php
 
 
323
  */
324
+ function json_encode($value, $options = 0, $depth = 512)
325
  {
326
+ $json = \json_encode($value, $options, $depth);
327
+ if (JSON_ERROR_NONE !== json_last_error()) {
328
+ throw new Exception\InvalidArgumentException(
329
+ 'json_encode error: ' . json_last_error_msg()
330
+ );
331
+ }
332
+
333
+ return $json;
334
  }
vendor/guzzlehttp/guzzle/src/functions_include.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
  // Don't redefine the functions if included multiple times.
4
- if (!\function_exists('GuzzleHttp\describe_type')) {
5
  require __DIR__ . '/functions.php';
6
  }
1
  <?php
2
 
3
  // Don't redefine the functions if included multiple times.
4
+ if (!function_exists('GuzzleHttp\uri_template')) {
5
  require __DIR__ . '/functions.php';
6
  }
vendor/guzzlehttp/promises/CHANGELOG.md CHANGED
@@ -1,6 +1,22 @@
1
  # CHANGELOG
2
 
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  ## 1.3.1 - 2016-12-20
5
 
6
  ### Fixed
1
  # CHANGELOG
2
 
3
 
4
+ ## 1.4.0 - 2020-09-30
5
+
6
+ ### Added
7
+
8
+ - Support for PHP 8
9
+ - Optional `$recursive` flag to `all`
10
+ - Replaced functions by static methods
11
+
12
+ ### Fixed
13
+
14
+ - Fix empty `each` processing
15
+ - Fix promise handling for Iterators of non-unique keys
16
+ - Fixed `method_exists` crashes on PHP 8
17
+ - Memory leak on exceptions
18
+
19
+
20
  ## 1.3.1 - 2016-12-20
21
 
22
  ### Fixed
vendor/guzzlehttp/promises/README.md CHANGED
@@ -26,7 +26,7 @@ for a general introduction to promises.
26
  - Promises can be cancelled.
27
  - Works with any object that has a `then` function.
28
  - C# style async/await coroutine promises using
29
- `GuzzleHttp\Promise\coroutine()`.
30
 
31
 
32
  # Quick start
@@ -88,7 +88,7 @@ $promise
88
  });
89
 
90
  // Resolving the promise triggers the $onFulfilled callbacks and outputs
91
- // "Hello, reader".
92
  $promise->resolve('reader.');
93
  ```
94
 
@@ -150,7 +150,7 @@ use GuzzleHttp\Promise\Promise;
150
 
151
  $promise = new Promise();
152
  $promise->then(null, function ($reason) {
153
- throw new \Exception($reason);
154
  })->then(null, function ($reason) {
155
  assert($reason->getMessage() === 'Error!');
156
  });
@@ -182,7 +182,6 @@ invoked using the value returned from the `$onRejected` callback.
182
 
183
  ```php
184
  use GuzzleHttp\Promise\Promise;
185
- use GuzzleHttp\Promise\RejectedPromise;
186
 
187
  $promise = new Promise();
188
  $promise
@@ -220,7 +219,7 @@ the promise is rejected with the exception and the exception is thrown.
220
 
221
  ```php
222
  $promise = new Promise(function () use (&$promise) {
223
- throw new \Exception('foo');
224
  });
225
 
226
  $promise->wait(); // throws the exception.
@@ -397,7 +396,7 @@ $deferred = new React\Promise\Deferred();
397
  $reactPromise = $deferred->promise();
398
 
399
  // Create a Guzzle promise that is fulfilled with a React promise.
400
- $guzzlePromise = new \GuzzleHttp\Promise\Promise();
401
  $guzzlePromise->then(function ($value) use ($reactPromise) {
402
  // Do something something with the value...
403
  // Return the React promise
@@ -424,7 +423,7 @@ instance.
424
 
425
  ```php
426
  // Get the global task queue
427
- $queue = \GuzzleHttp\Promise\queue();
428
  $queue->run();
429
  ```
430
 
@@ -502,3 +501,32 @@ $promise->then(function ($value) { echo $value; });
502
  $promise->resolve('foo');
503
  // prints "foo"
504
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  - Promises can be cancelled.
27
  - Works with any object that has a `then` function.
28
  - C# style async/await coroutine promises using
29
+ `GuzzleHttp\Promise\Coroutine::of()`.
30
 
31
 
32
  # Quick start
88
  });
89
 
90
  // Resolving the promise triggers the $onFulfilled callbacks and outputs
91
+ // "Hello, reader."
92
  $promise->resolve('reader.');
93
  ```
94
 
150
 
151
  $promise = new Promise();
152
  $promise->then(null, function ($reason) {
153
+ throw new Exception($reason);
154
  })->then(null, function ($reason) {
155
  assert($reason->getMessage() === 'Error!');
156
  });
182
 
183
  ```php
184
  use GuzzleHttp\Promise\Promise;
 
185
 
186
  $promise = new Promise();
187
  $promise
219
 
220
  ```php
221
  $promise = new Promise(function () use (&$promise) {
222
+ throw new Exception('foo');
223
  });
224
 
225
  $promise->wait(); // throws the exception.
396
  $reactPromise = $deferred->promise();
397
 
398
  // Create a Guzzle promise that is fulfilled with a React promise.
399
+ $guzzlePromise = new GuzzleHttp\Promise\Promise();
400
  $guzzlePromise->then(function ($value) use ($reactPromise) {
401
  // Do something something with the value...
402
  // Return the React promise
423
 
424
  ```php
425
  // Get the global task queue
426
+ $queue = GuzzleHttp\Promise\Utils::queue();
427
  $queue->run();
428
  ```
429
 
501
  $promise->resolve('foo');
502
  // prints "foo"
503
  ```
504
+
505
+
506
+ ## Upgrading from Function API
507
+
508
+ A static API was first introduced in 1.4.0, in order to mitigate problems with functions conflicting between global and local copies of the package. The function API will be removed in 2.0.0. A migration table has been provided here for your convenience:
509
+
510
+ | Original Function | Replacement Method |
511
+ |----------------|----------------|
512
+ | `queue` | `Utils::queue` |
513
+ | `task` | `Utils::task` |
514
+ | `promise_for` | `Create::promiseFor` |
515
+ | `rejection_for` | `Create::rejectionFor` |
516
+ | `exception_for` | `Create::exceptionFor` |
517
+ | `iter_for` | `Create::iterFor` |
518
+ | `inspect` | `Utils::inspect` |
519
+ | `inspect_all` | `Utils::inspectAll` |
520
+ | `unwrap` | `Utils::unwrap` |
521
+ | `all` | `Utils::all` |
522
+ | `some` | `Utils::some` |
523
+ | `any` | `Utils::any` |
524
+ | `settle` | `Utils::settle` |
525
+ | `each` | `Each::of` |
526
+ | `each_limit` | `Each::ofLimit` |
527
+ | `each_limit_all` | `Each::ofLimitAll` |
528
+ | `!is_fulfilled` | `Is::pending` |
529
+ | `is_fulfilled` | `Is::fulfilled` |
530
+ | `is_rejected` | `Is::rejected` |
531
+ | `is_settled` | `Is::settled` |
532
+ | `coroutine` | `Coroutine::of` |
vendor/guzzlehttp/promises/composer.json CHANGED
@@ -11,10 +11,10 @@
11
  }
12
  ],
13
  "require": {
14
- "php": ">=5.5.0"
15
  },
16
  "require-dev": {
17
- "phpunit/phpunit": "^4.0"
18
  },
19
  "autoload": {
20
  "psr-4": {
@@ -22,9 +22,14 @@
22
  },
23
  "files": ["src/functions_include.php"]
24
  },
 
 
 
 
 
25
  "scripts": {
26
- "test": "vendor/bin/phpunit",
27
- "test-ci": "vendor/bin/phpunit --coverage-text"
28
  },
29
  "extra": {
30
  "branch-alias": {
11
  }
12
  ],
13
  "require": {
14
+ "php": ">=5.5"
15
  },
16
  "require-dev": {
17
+ "symfony/phpunit-bridge": "^4.4 || ^5.1"
18
  },
19
  "autoload": {
20
  "psr-4": {
22
  },
23
  "files": ["src/functions_include.php"]
24
  },
25
+ "autoload-dev": {
26
+ "psr-4": {
27
+ "GuzzleHttp\\Promise\\Tests\\": "tests/"
28
+ }
29
+ },
30
  "scripts": {
31
+ "test": "vendor/bin/simple-phpunit",
32
+ "test-ci": "vendor/bin/simple-phpunit --coverage-text"
33
  },
34
  "extra": {
35
  "branch-alias": {
vendor/guzzlehttp/promises/phpstan-baseline.neon ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ parameters:
2
+ ignoreErrors:
3
+ -
4
+ message: "#^Parameter \\#1 \\$function of function register_shutdown_function expects callable\\(\\)\\: void, Closure\\(\\)\\: mixed given\\.$#"
5
+ count: 1
6
+ path: src/TaskQueue.php
7
+
vendor/guzzlehttp/promises/phpstan.neon.dist ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ includes:
2
+ - phpstan-baseline.neon
3
+
4
+ parameters:
5
+ level: 5
6
+ paths:
7
+ - src
8
+
9
+ ignoreErrors:
10
+ - "#^Dead catch - Exception is already caught by Throwable above\\.$#"
vendor/guzzlehttp/{guzzle → promises}/psalm.xml RENAMED
@@ -1,11 +1,10 @@
1
  <?xml version="1.0"?>
2
  <psalm
3
- errorLevel="3"
4
  resolveFromConfigFile="true"
5
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6
  xmlns="https://getpsalm.org/schema/config"
7
  xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
8
- errorBaseline="psalm.baseline.xml"
9
  >
10
  <projectFiles>
11
  <directory name="src" />
1
  <?xml version="1.0"?>
2
  <psalm
3
+ errorLevel="4"
4
  resolveFromConfigFile="true"
5
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6
  xmlns="https://getpsalm.org/schema/config"
7
  xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
 
8
  >
9
  <projectFiles>
10
  <directory name="src" />
vendor/guzzlehttp/promises/src/AggregateException.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  /**
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  /**
vendor/guzzlehttp/promises/src/CancellationException.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  /**
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  /**
vendor/guzzlehttp/promises/src/Coroutine.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  use Exception;
@@ -9,7 +10,7 @@ use Throwable;
9
  * Creates a promise that is resolved using a generator that yields values or
10
  * promises (somewhat similar to C#'s async keyword).
11
  *
12
- * When called, the coroutine function will start an instance of the generator
13
  * and returns a promise that is fulfilled with its final yielded value.
14
  *
15
  * Control is returned back to the generator when the yielded promise settles.
@@ -22,7 +23,7 @@ use Throwable;
22
  * return new Promise\FulfilledPromise($value);
23
  * }
24
  *
25
- * $promise = Promise\coroutine(function () {
26
  * $value = (yield createPromise('a'));
27
  * try {
28
  * $value = (yield createPromise($value . 'b'));
@@ -38,6 +39,7 @@ use Throwable;
38
  * @param callable $generatorFn Generator function to wrap into a promise.
39
  *
40
  * @return Promise
 
41
  * @link https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration
42
  */
43
  final class Coroutine implements PromiseInterface
@@ -65,7 +67,23 @@ final class Coroutine implements PromiseInterface
65
  $this->currentPromise->wait();
66
  }
67
  });
68
- $this->nextCoroutine($this->generator->current());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  }
70
 
71
  public function then(
@@ -108,7 +126,7 @@ final class Coroutine implements PromiseInterface
108
 
109
  private function nextCoroutine($yielded)
110
  {
111
- $this->currentPromise = promise_for($yielded)
112
  ->then([$this, '_handleSuccess'], [$this, '_handleFailure']);
113
  }
114
 
@@ -139,7 +157,7 @@ final class Coroutine implements PromiseInterface
139
  {
140
  unset($this->currentPromise);
141
  try {
142
- $nextYield = $this->generator->throw(exception_for($reason));
143
  // The throw was caught, so keep iterating on the coroutine
144
  $this->nextCoroutine($nextYield);
145
  } catch (Exception $exception) {
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  use Exception;
10
  * Creates a promise that is resolved using a generator that yields values or
11
  * promises (somewhat similar to C#'s async keyword).
12
  *
13
+ * When called, the Coroutine::of method will start an instance of the generator
14
  * and returns a promise that is fulfilled with its final yielded value.
15
  *
16
  * Control is returned back to the generator when the yielded promise settles.
23
  * return new Promise\FulfilledPromise($value);
24
  * }
25
  *
26
+ * $promise = Promise\Coroutine::of(function () {
27
  * $value = (yield createPromise('a'));
28
  * try {
29
  * $value = (yield createPromise($value . 'b'));
39
  * @param callable $generatorFn Generator function to wrap into a promise.
40
  *
41
  * @return Promise
42
+ *
43
  * @link https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration
44
  */
45
  final class Coroutine implements PromiseInterface
67
  $this->currentPromise->wait();
68
  }
69
  });
70
+ try {
71
+ $this->nextCoroutine($this->generator->current());
72
+ } catch (\Exception $exception) {
73
+ $this->result->reject($exception);
74
+ } catch (Throwable $throwable) {
75
+ $this->result->reject($throwable);
76
+ }
77
+ }
78
+
79
+ /**
80
+ * Create a new coroutine.
81
+ *
82
+ * @return self
83
+ */
84
+ public static function of(callable $generatorFn)
85
+ {
86
+ return new self($generatorFn);
87
  }
88
 
89
  public function then(
126
 
127
  private function nextCoroutine($yielded)
128
  {
129
+ $this->currentPromise = Create::promiseFor($yielded)
130
  ->then([$this, '_handleSuccess'], [$this, '_handleFailure']);
131
  }
132
 
157
  {
158
  unset($this->currentPromise);
159
  try {
160
+ $nextYield = $this->generator->throw(Create::exceptionFor($reason));
161
  // The throw was caught, so keep iterating on the coroutine
162
  $this->nextCoroutine($nextYield);
163
  } catch (Exception $exception) {
vendor/guzzlehttp/promises/src/Create.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Promise;
4
+
5
+ final class Create
6
+ {
7
+ /**
8
+ * Creates a promise for a value if the value is not a promise.
9
+ *
10
+ * @param mixed $value Promise or value.
11
+ *
12
+ * @return PromiseInterface
13
+ */
14
+ public static function promiseFor($value)
15
+ {
16
+ if ($value instanceof PromiseInterface) {
17
+ return $value;
18
+ }
19
+
20
+ // Return a Guzzle promise that shadows the given promise.
21
+ if (is_object($value) && method_exists($value, 'then')) {
22
+ $wfn = method_exists($value, 'wait') ? [$value, 'wait'] : null;
23
+ $cfn = method_exists($value, 'cancel') ? [$value, 'cancel'] : null;
24
+ $promise = new Promise($wfn, $cfn);
25
+ $value->then([$promise, 'resolve'], [$promise, 'reject']);
26
+ return $promise;
27
+ }
28
+
29
+ return new FulfilledPromise($value);
30
+ }
31
+
32
+ /**
33
+ * Creates a rejected promise for a reason if the reason is not a promise.
34
+ * If the provided reason is a promise, then it is returned as-is.
35
+ *
36
+ * @param mixed $reason Promise or reason.
37
+ *
38
+ * @return PromiseInterface
39
+ */
40
+ public static function rejectionFor($reason)
41
+ {
42
+ if ($reason instanceof PromiseInterface) {
43
+ return $reason;
44
+ }
45
+
46
+ return new RejectedPromise($reason);
47
+ }
48
+
49
+ /**
50
+ * Create an exception for a rejected promise value.
51
+ *
52
+ * @param mixed $reason
53
+ *
54
+ * @return \Exception|\Throwable
55
+ */
56
+ public static function exceptionFor($reason)
57
+ {
58
+ if ($reason instanceof \Exception || $reason instanceof \Throwable) {
59
+ return $reason;
60
+ }
61
+
62
+ return new RejectionException($reason);
63
+ }
64
+
65
+ /**
66
+ * Returns an iterator for the given value.
67
+ *
68
+ * @param mixed $value
69
+ *
70
+ * @return \Iterator
71
+ */
72
+ public static function iterFor($value)
73
+ {
74
+ if ($value instanceof \Iterator) {
75
+ return $value;
76
+ }
77
+
78
+ if (is_array($value)) {
79
+ return new \ArrayIterator($value);
80
+ }
81
+
82
+ return new \ArrayIterator([$value]);
83
+ }
84
+ }
vendor/guzzlehttp/promises/src/Each.php ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Promise;
4
+
5
+ final class Each
6
+ {
7
+ /**
8
+ * Given an iterator that yields promises or values, returns a promise that
9
+ * is fulfilled with a null value when the iterator has been consumed or
10
+ * the aggregate promise has been fulfilled or rejected.
11
+ *
12
+ * $onFulfilled is a function that accepts the fulfilled value, iterator
13
+ * index, and the aggregate promise. The callback can invoke any necessary
14
+ * side effects and choose to resolve or reject the aggregate if needed.
15
+ *
16
+ * $onRejected is a function that accepts the rejection reason, iterator
17
+ * index, and the aggregate promise. The callback can invoke any necessary
18
+ * side effects and choose to resolve or reject the aggregate if needed.
19
+ *
20
+ * @param mixed $iterable Iterator or array to iterate over.
21
+ * @param callable $onFulfilled
22
+ * @param callable $onRejected
23
+ *
24
+ * @return PromiseInterface
25
+ */
26
+ public static function of(
27
+ $iterable,
28
+ callable $onFulfilled = null,
29
+ callable $onRejected = null
30
+ ) {
31
+ return (new EachPromise($iterable, [
32
+ 'fulfilled' => $onFulfilled,
33
+ 'rejected' => $onRejected
34
+ ]))->promise();
35
+ }
36
+
37
+ /**
38
+ * Like of, but only allows a certain number of outstanding promises at any
39
+ * given time.
40
+ *
41
+ * $concurrency may be an integer or a function that accepts the number of
42
+ * pending promises and returns a numeric concurrency limit value to allow
43
+ * for dynamic a concurrency size.
44
+ *
45
+ * @param mixed $iterable
46
+ * @param int|callable $concurrency
47
+ * @param callable $onFulfilled
48
+ * @param callable $onRejected
49
+ *
50
+ * @return PromiseInterface
51
+ */
52
+ public static function ofLimit(
53
+ $iterable,
54
+ $concurrency,
55
+ callable $onFulfilled = null,
56
+ callable $onRejected = null
57
+ ) {
58
+ return (new EachPromise($iterable, [
59
+ 'fulfilled' => $onFulfilled,
60
+ 'rejected' => $onRejected,
61
+ 'concurrency' => $concurrency
62
+ ]))->promise();
63
+ }
64
+
65
+ /**
66
+ * Like limit, but ensures that no promise in the given $iterable argument
67
+ * is rejected. If any promise is rejected, then the aggregate promise is
68
+ * rejected with the encountered rejection.
69
+ *
70
+ * @param mixed $iterable
71
+ * @param int|callable $concurrency
72
+ * @param callable $onFulfilled
73
+ *
74
+ * @return PromiseInterface
75
+ */
76
+ public static function ofLimitAll(
77
+ $iterable,
78
+ $concurrency,
79
+ callable $onFulfilled = null
80
+ ) {
81
+ return each_limit(
82
+ $iterable,
83
+ $concurrency,
84
+ $onFulfilled,
85
+ function ($reason, $idx, PromiseInterface $aggregate) {
86
+ $aggregate->reject($reason);
87
+ }
88
+ );
89
+ }
90
+ }
vendor/guzzlehttp/promises/src/EachPromise.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  /**
@@ -9,22 +10,22 @@ class EachPromise implements PromisorInterface
9
  {
10
  private $pending = [];
11
 
12
- /** @var \Iterator */
13
  private $iterable;
14
 
15
- /** @var callable|int */
16
  private $concurrency;
17
 
18
- /** @var callable */
19
  private $onFulfilled;
20
 
21
- /** @var callable */
22
  private $onRejected;
23
 
24
- /** @var Promise */
25
  private $aggregate;
26
 
27
- /** @var bool */
28
  private $mutex;
29
 
30
  /**
@@ -45,12 +46,12 @@ class EachPromise implements PromisorInterface
45
  * allowed number of outstanding concurrently executing promises,
46
  * creating a capped pool of promises. There is no limit by default.
47
  *
48
- * @param mixed $iterable Promises or values to iterate.
49
- * @param array $config Configuration options
50
  */
51
  public function __construct($iterable, array $config = [])
52
  {
53
- $this->iterable = iter_for($iterable);
54
 
55
  if (isset($config['concurrency'])) {
56
  $this->concurrency = $config['concurrency'];
@@ -65,6 +66,7 @@ class EachPromise implements PromisorInterface
65
  }
66
  }
67
 
 
68
  public function promise()
69
  {
70
  if ($this->aggregate) {
@@ -73,14 +75,29 @@ class EachPromise implements PromisorInterface
73
 
74
  try {
75
  $this->createPromise();
 
76
  $this->iterable->rewind();
77
- $this->refillPending();
 
 
78
  } catch (\Throwable $e) {
 
 
 
 
79
  $this->aggregate->reject($e);
80
  } catch (\Exception $e) {
 
 
 
 
81
  $this->aggregate->reject($e);
82
  }
83
 
 
 
 
 
84
  return $this->aggregate;
85
  }
86
 
@@ -89,17 +106,12 @@ class EachPromise implements PromisorInterface
89
  $this->mutex = false;
90
  $this->aggregate = new Promise(function () {
91
  reset($this->pending);
92
- if (empty($this->pending) && !$this->iterable->valid()) {
93
- $this->aggregate->resolve(null);
94
- return;
95
- }
96
-
97
  // Consume a potentially fluctuating list of promises while
98
  // ensuring that indexes are maintained (precluding array_shift).
99
  while ($promise = current($this->pending)) {
100
  next($this->pending);
101
  $promise->wait();
102
- if ($this->aggregate->getState() !== PromiseInterface::PENDING) {
103
  return;
104
  }
105
  }
@@ -148,22 +160,34 @@ class EachPromise implements PromisorInterface
148
  return false;
149
  }
150
 
151
- $promise = promise_for($this->iterable->current());
152
- $idx = $this->iterable->key();
 
 
 
 
 
 
153
 
154
  $this->pending[$idx] = $promise->then(
155
- function ($value) use ($idx) {
156
  if ($this->onFulfilled) {
157
  call_user_func(
158
- $this->onFulfilled, $value, $idx, $this->aggregate
 
 
 
159
  );
160
  }
161
  $this->step($idx);
162
  },
163
- function ($reason) use ($idx) {
164
  if ($this->onRejected) {
165
  call_user_func(
166
- $this->onRejected, $reason, $idx, $this->aggregate
 
 
 
167
  );
168
  }
169
  $this->step($idx);
@@ -201,7 +225,7 @@ class EachPromise implements PromisorInterface
201
  private function step($idx)
202
  {
203
  // If the promise was already resolved, then ignore this step.
204
- if ($this->aggregate->getState() !== PromiseInterface::PENDING) {
205
  return;
206
  }
207
 
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  /**
10
  {
11
  private $pending = [];
12
 
13
+ /** @var \Iterator|null */
14
  private $iterable;
15
 
16
+ /** @var callable|int|null */
17
  private $concurrency;
18
 
19
+ /** @var callable|null */
20
  private $onFulfilled;
21
 
22
+ /** @var callable|null */
23
  private $onRejected;
24
 
25
+ /** @var Promise|null */
26
  private $aggregate;
27
 
28
+ /** @var bool|null */
29
  private $mutex;
30
 
31
  /**
46
  * allowed number of outstanding concurrently executing promises,
47
  * creating a capped pool of promises. There is no limit by default.
48
  *
49
+ * @param mixed $iterable Promises or values to iterate.
50
+ * @param array $config Configuration options
51
  */
52
  public function __construct($iterable, array $config = [])
53
  {
54
+ $this->iterable = Create::iterFor($iterable);
55
 
56
  if (isset($config['concurrency'])) {
57
  $this->concurrency = $config['concurrency'];
66
  }
67
  }
68
 
69
+ /** @psalm-suppress InvalidNullableReturnType */
70
  public function promise()
71
  {
72
  if ($this->aggregate) {
75
 
76
  try {
77
  $this->createPromise();
78
+ /** @psalm-assert Promise $this->aggregate */
79
  $this->iterable->rewind();
80
+ if (!$this->checkIfFinished()) {
81
+ $this->refillPending();
82
+ }
83
  } catch (\Throwable $e) {
84
+ /**
85
+ * @psalm-suppress NullReference
86
+ * @phpstan-ignore-next-line
87
+ */
88
  $this->aggregate->reject($e);
89
  } catch (\Exception $e) {
90
+ /**
91
+ * @psalm-suppress NullReference
92
+ * @phpstan-ignore-next-line
93
+ */
94
  $this->aggregate->reject($e);
95
  }
96
 
97
+ /**
98
+ * @psalm-suppress NullableReturnStatement
99
+ * @phpstan-ignore-next-line
100
+ */
101
  return $this->aggregate;
102
  }
103
 
106
  $this->mutex = false;
107
  $this->aggregate = new Promise(function () {
108
  reset($this->pending);
 
 
 
 
 
109
  // Consume a potentially fluctuating list of promises while
110
  // ensuring that indexes are maintained (precluding array_shift).
111
  while ($promise = current($this->pending)) {
112
  next($this->pending);
113
  $promise->wait();
114
+ if (Is::settled($this->aggregate)) {
115
  return;
116
  }
117
  }
160
  return false;
161
  }
162
 
163
+ $promise = Create::promiseFor($this->iterable->current());
164
+ $key = $this->iterable->key();
165
+
166
+ // Iterable keys may not be unique, so we add the promises at the end
167
+ // of the pending array and retrieve the array index being used
168
+ $this->pending[] = null;
169
+ end($this->pending);
170
+ $idx = key($this->pending);
171
 
172
  $this->pending[$idx] = $promise->then(
173
+ function ($value) use ($idx, $key) {
174
  if ($this->onFulfilled) {
175
  call_user_func(
176
+ $this->onFulfilled,
177
+ $value,
178
+ $key,
179
+ $this->aggregate
180
  );
181
  }
182
  $this->step($idx);
183
  },
184
+ function ($reason) use ($idx, $key) {
185
  if ($this->onRejected) {
186
  call_user_func(
187
+ $this->onRejected,
188
+ $reason,
189
+ $key,
190
+ $this->aggregate
191
  );
192
  }
193
  $this->step($idx);
225
  private function step($idx)
226
  {
227
  // If the promise was already resolved, then ignore this step.
228
+ if (Is::settled($this->aggregate)) {
229
  return;
230
  }
231
 
vendor/guzzlehttp/promises/src/FulfilledPromise.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  /**
@@ -13,9 +14,10 @@ class FulfilledPromise implements PromiseInterface
13
 
14
  public function __construct($value)
15
  {
16
- if (method_exists($value, 'then')) {
17
  throw new \InvalidArgumentException(
18
- 'You cannot create a FulfilledPromise with a promise.');
 
19
  }
20
 
21
  $this->value = $value;
@@ -30,11 +32,11 @@ class FulfilledPromise implements PromiseInterface
30
  return $this;
31
  }
32
 
33
- $queue = queue();
34
  $p = new Promise([$queue, 'run']);
35
  $value = $this->value;
36
  $queue->add(static function () use ($p, $value, $onFulfilled) {
37
- if ($p->getState() === self::PENDING) {
38
  try {
39
  $p->resolve($onFulfilled($value));
40
  } catch (\Throwable $e) {
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  /**
14
 
15
  public function __construct($value)
16
  {
17
+ if (is_object($value) && method_exists($value, 'then')) {
18
  throw new \InvalidArgumentException(
19
+ 'You cannot create a FulfilledPromise with a promise.'
20
+ );
21
  }
22
 
23
  $this->value = $value;
32
  return $this;
33
  }
34
 
35
+ $queue = Utils::queue();
36
  $p = new Promise([$queue, 'run']);
37
  $value = $this->value;
38
  $queue->add(static function () use ($p, $value, $onFulfilled) {
39
+ if (Is::pending($p)) {
40
  try {
41
  $p->resolve($onFulfilled($value));
42
  } catch (\Throwable $e) {
vendor/guzzlehttp/promises/src/Is.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Promise;
4
+
5
+ final class Is
6
+ {
7
+ /**
8
+ * Returns true if a promise is pending.
9
+ *
10
+ * @return bool
11
+ */
12
+ public static function pending(PromiseInterface $promise)
13
+ {
14
+ return $promise->getState() === PromiseInterface::PENDING;
15
+ }
16
+
17
+ /**
18
+ * Returns true if a promise is fulfilled or rejected.
19
+ *
20
+ * @return bool
21
+ */
22
+ public static function settled(PromiseInterface $promise)
23
+ {
24
+ return $promise->getState() !== PromiseInterface::PENDING;
25
+ }
26
+
27
+ /**
28
+ * Returns true if a promise is fulfilled.
29
+ *
30
+ * @return bool
31
+ */
32
+ public static function fulfilled(PromiseInterface $promise)
33
+ {
34
+ return $promise->getState() === PromiseInterface::FULFILLED;
35
+ }
36
+
37
+ /**
38
+ * Returns true if a promise is rejected.
39
+ *
40
+ * @return bool
41
+ */
42
+ public static function rejected(PromiseInterface $promise)
43
+ {
44
+ return $promise->getState() === PromiseInterface::REJECTED;
45
+ }
46
+ }
vendor/guzzlehttp/promises/src/Promise.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  /**
@@ -41,14 +42,13 @@ class Promise implements PromiseInterface
41
 
42
  // Return a fulfilled promise and immediately invoke any callbacks.
43
  if ($this->state === self::FULFILLED) {
44
- return $onFulfilled
45
- ? promise_for($this->result)->then($onFulfilled)
46
- : promise_for($this->result);
47
  }
48
 
49
  // It's either cancelled or rejected, so return a rejected promise
50
  // and immediately invoke any callbacks.
51
- $rejection = rejection_for($this->result);
52
  return $onRejected ? $rejection->then(null, $onRejected) : $rejection;
53
  }
54
 
@@ -61,19 +61,15 @@ class Promise implements PromiseInterface
61
  {
62
  $this->waitIfPending();
63
 
64
- $inner = $this->result instanceof PromiseInterface
65
- ? $this->result->wait($unwrap)
66
- : $this->result;
67
-
68
  if ($unwrap) {
69
- if ($this->result instanceof PromiseInterface
70
- || $this->state === self::FULFILLED
71
- ) {
72
- return $inner;
73
- } else {
74
- // It's rejected so "unwrap" and throw an exception.
75
- throw exception_for($inner);
76
  }
 
 
77
  }
78
  }
79
 
@@ -103,6 +99,7 @@ class Promise implements PromiseInterface
103
  }
104
 
105
  // Reject the promise only if it wasn't rejected in a then callback.
 
106
  if ($this->state === self::PENDING) {
107
  $this->reject(new CancellationException('Promise has been cancelled'));
108
  }
@@ -148,17 +145,15 @@ class Promise implements PromiseInterface
148
 
149
  // If the value was not a settled promise or a thenable, then resolve
150
  // it in the task queue using the correct ID.
151
- if (!method_exists($value, 'then')) {
152
  $id = $state === self::FULFILLED ? 1 : 2;
153
  // It's a success, so resolve the handlers in the queue.
154
- queue()->add(static function () use ($id, $value, $handlers) {
155
  foreach ($handlers as $handler) {
156
  self::callHandler($id, $value, $handler);
157
  }
158
  });
159
- } elseif ($value instanceof Promise
160
- && $value->getState() === self::PENDING
161
- ) {
162
  // We can just merge our handlers onto the next promise.
163
  $value->handlers = array_merge($value->handlers, $handlers);
164
  } else {
@@ -184,8 +179,6 @@ class Promise implements PromiseInterface
184
  * @param int $index 1 (resolve) or 2 (reject).
185
  * @param mixed $value Value to pass to the callback.
186
  * @param array $handler Array of handler data (promise and callbacks).
187
- *
188
- * @return array Returns the next group to resolve.
189
  */
190
  private static function callHandler($index, $value, array $handler)
191
  {
@@ -194,13 +187,21 @@ class Promise implements PromiseInterface
194
 
195
  // The promise may have been cancelled or resolved before placing
196
  // this thunk in the queue.
197
- if ($promise->getState() !== self::PENDING) {
198
  return;
199
  }
200
 
201
  try {
202
  if (isset($handler[$index])) {
203
- $promise->resolve($handler[$index]($value));
 
 
 
 
 
 
 
 
204
  } elseif ($index === 1) {
205
  // Forward resolution values as-is.
206
  $promise->resolve($value);
@@ -224,15 +225,16 @@ class Promise implements PromiseInterface
224
  } elseif ($this->waitList) {
225
  $this->invokeWaitList();
226
  } else {
227
- // If there's not wait function, then reject the promise.
228
  $this->reject('Cannot wait on a promise that has '
229
  . 'no internal wait function. You must provide a wait '
230
  . 'function when constructing the promise to be able to '
231
  . 'wait on a promise.');
232
  }
233
 
234
- queue()->run();
235
 
 
236
  if ($this->state === self::PENDING) {
237
  $this->reject('Invoking the wait callback did not resolve the promise');
238
  }
@@ -263,17 +265,13 @@ class Promise implements PromiseInterface
263
  $this->waitList = null;
264
 
265
  foreach ($waitList as $result) {
266
- while (true) {
267
  $result->waitIfPending();
 
 
268
 
269
- if ($result->result instanceof Promise) {
270
- $result = $result->result;
271
- } else {
272
- if ($result->result instanceof PromiseInterface) {
273
- $result->result->wait(false);
274
- }
275
- break;
276
- }
277
  }
278
  }
279
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  /**
42
 
43
  // Return a fulfilled promise and immediately invoke any callbacks.
44
  if ($this->state === self::FULFILLED) {
45
+ $promise = Create::promiseFor($this->result);
46
+ return $onFulfilled ? $promise->then($onFulfilled) : $promise;
 
47
  }
48
 
49
  // It's either cancelled or rejected, so return a rejected promise
50
  // and immediately invoke any callbacks.
51
+ $rejection = Create::rejectionFor($this->result);
52
  return $onRejected ? $rejection->then(null, $onRejected) : $rejection;
53
  }
54
 
61
  {
62
  $this->waitIfPending();
63
 
64
+ if ($this->result instanceof PromiseInterface) {
65
+ return $this->result->wait($unwrap);
66
+ }
 
67
  if ($unwrap) {
68
+ if ($this->state === self::FULFILLED) {
69
+ return $this->result;
 
 
 
 
 
70
  }
71
+ // It's rejected so "unwrap" and throw an exception.
72
+ throw Create::exceptionFor($this->result);
73
  }
74
  }
75
 
99
  }
100
 
101
  // Reject the promise only if it wasn't rejected in a then callback.
102
+ /** @psalm-suppress RedundantCondition */
103
  if ($this->state === self::PENDING) {
104
  $this->reject(new CancellationException('Promise has been cancelled'));
105
  }
145
 
146
  // If the value was not a settled promise or a thenable, then resolve
147
  // it in the task queue using the correct ID.
148
+ if (!is_object($value) || !method_exists($value, 'then')) {
149
  $id = $state === self::FULFILLED ? 1 : 2;
150
  // It's a success, so resolve the handlers in the queue.
151
+ Utils::queue()->add(static function () use ($id, $value, $handlers) {
152
  foreach ($handlers as $handler) {
153
  self::callHandler($id, $value, $handler);
154
  }
155
  });
156
+ } elseif ($value instanceof Promise && Is::pending($value)) {
 
 
157
  // We can just merge our handlers onto the next promise.
158
  $value->handlers = array_merge($value->handlers, $handlers);
159
  } else {
179
  * @param int $index 1 (resolve) or 2 (reject).
180
  * @param mixed $value Value to pass to the callback.
181
  * @param array $handler Array of handler data (promise and callbacks).
 
 
182
  */
183
  private static function callHandler($index, $value, array $handler)
184
  {
187
 
188
  // The promise may have been cancelled or resolved before placing
189
  // this thunk in the queue.
190
+ if (Is::settled($promise)) {
191
  return;
192
  }
193
 
194
  try {
195
  if (isset($handler[$index])) {
196
+ /*
197
+ * If $f throws an exception, then $handler will be in the exception
198
+ * stack trace. Since $handler contains a reference to the callable
199
+ * itself we get a circular reference. We clear the $handler
200
+ * here to avoid that memory leak.
201
+ */
202
+ $f = $handler[$index];
203
+ unset($handler);
204
+ $promise->resolve($f($value));
205
  } elseif ($index === 1) {
206
  // Forward resolution values as-is.
207
  $promise->resolve($value);
225
  } elseif ($this->waitList) {
226
  $this->invokeWaitList();
227
  } else {
228
+ // If there's no wait function, then reject the promise.
229
  $this->reject('Cannot wait on a promise that has '
230
  . 'no internal wait function. You must provide a wait '
231
  . 'function when constructing the promise to be able to '
232
  . 'wait on a promise.');
233
  }
234
 
235
+ Utils::queue()->run();
236
 
237
+ /** @psalm-suppress RedundantCondition */
238
  if ($this->state === self::PENDING) {
239
  $this->reject('Invoking the wait callback did not resolve the promise');
240
  }
265
  $this->waitList = null;
266
 
267
  foreach ($waitList as $result) {
268
+ do {
269
  $result->waitIfPending();
270
+ $result = $result->result;
271
+ } while ($result instanceof Promise);
272
 
273
+ if ($result instanceof PromiseInterface) {
274
+ $result->wait(false);
 
 
 
 
 
 
275
  }
276
  }
277
  }
vendor/guzzlehttp/promises/src/PromiseInterface.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  /**
@@ -56,6 +57,7 @@ interface PromiseInterface
56
  * Resolve the promise with the given value.
57
  *
58
  * @param mixed $value
 
59
  * @throws \RuntimeException if the promise is already resolved.
60
  */
61
  public function resolve($value);
@@ -64,6 +66,7 @@ interface PromiseInterface
64
  * Reject the promise with the given reason.
65
  *
66
  * @param mixed $reason
 
67
  * @throws \RuntimeException if the promise is already resolved.
68
  */
69
  public function reject($reason);
@@ -86,6 +89,7 @@ interface PromiseInterface
86
  * @param bool $unwrap
87
  *
88
  * @return mixed
 
89
  * @throws \LogicException if the promise has no wait function or if the
90
  * promise does not settle after waiting.
91
  */
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  /**
57
  * Resolve the promise with the given value.
58
  *
59
  * @param mixed $value
60
+ *
61
  * @throws \RuntimeException if the promise is already resolved.
62
  */
63
  public function resolve($value);
66
  * Reject the promise with the given reason.
67
  *
68
  * @param mixed $reason
69
+ *
70
  * @throws \RuntimeException if the promise is already resolved.
71
  */
72
  public function reject($reason);
89
  * @param bool $unwrap
90
  *
91
  * @return mixed
92
+ *
93
  * @throws \LogicException if the promise has no wait function or if the
94
  * promise does not settle after waiting.
95
  */
vendor/guzzlehttp/promises/src/PromisorInterface.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  /**
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  /**
vendor/guzzlehttp/promises/src/RejectedPromise.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  /**
@@ -13,9 +14,10 @@ class RejectedPromise implements PromiseInterface
13
 
14
  public function __construct($reason)
15
  {
16
- if (method_exists($reason, 'then')) {
17
  throw new \InvalidArgumentException(
18
- 'You cannot create a RejectedPromise with a promise.');
 
19
  }
20
 
21
  $this->reason = $reason;
@@ -30,11 +32,11 @@ class RejectedPromise implements PromiseInterface
30
  return $this;
31
  }
32
 
33
- $queue = queue();
34
  $reason = $this->reason;
35
  $p = new Promise([$queue, 'run']);
36
  $queue->add(static function () use ($p, $reason, $onRejected) {
37
- if ($p->getState() === self::PENDING) {
38
  try {
39
  // Return a resolved promise if onRejected does not throw.
40
  $p->resolve($onRejected($reason));
@@ -59,8 +61,10 @@ class RejectedPromise implements PromiseInterface
59
  public function wait($unwrap = true, $defaultDelivery = null)
60
  {
61
  if ($unwrap) {
62
- throw exception_for($this->reason);
63
  }
 
 
64
  }
65
 
66
  public function getState()
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  /**
14
 
15
  public function __construct($reason)
16
  {
17
+ if (is_object($reason) && method_exists($reason, 'then')) {
18
  throw new \InvalidArgumentException(
19
+ 'You cannot create a RejectedPromise with a promise.'
20
+ );
21
  }
22
 
23
  $this->reason = $reason;
32
  return $this;
33
  }
34
 
35
+ $queue = Utils::queue();
36
  $reason = $this->reason;
37
  $p = new Promise([$queue, 'run']);
38
  $queue->add(static function () use ($p, $reason, $onRejected) {
39
+ if (Is::pending($p)) {
40
  try {
41
  // Return a resolved promise if onRejected does not throw.
42
  $p->resolve($onRejected($reason));
61
  public function wait($unwrap = true, $defaultDelivery = null)
62
  {
63
  if ($unwrap) {
64
+ throw Create::exceptionFor($this->reason);
65
  }
66
+
67
+ return null;
68
  }
69
 
70
  public function getState()
vendor/guzzlehttp/promises/src/RejectionException.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  /**
@@ -12,7 +13,7 @@ class RejectionException extends \RuntimeException
12
  private $reason;
13
 
14
  /**
15
- * @param mixed $reason Rejection reason.
16
  * @param string $description Optional description
17
  */
18
  public function __construct($reason, $description = null)
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  /**
13
  private $reason;
14
 
15
  /**
16
+ * @param mixed $reason Rejection reason.
17
  * @param string $description Optional description
18
  */
19
  public function __construct($reason, $description = null)
vendor/guzzlehttp/promises/src/TaskQueue.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  /**
@@ -8,7 +9,7 @@ namespace GuzzleHttp\Promise;
8
  * maintains a constant stack size. You can use the task queue asynchronously
9
  * by calling the `run()` function of the global task queue in an event loop.
10
  *
11
- * GuzzleHttp\Promise\queue()->run();
12
  */
13
  class TaskQueue implements TaskQueueInterface
14
  {
@@ -42,8 +43,8 @@ class TaskQueue implements TaskQueueInterface
42
 
43
  public function run()
44
  {
45
- /** @var callable $task */
46
  while ($task = array_shift($this->queue)) {
 
47
  $task();
48
  }
49
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  /**
9
  * maintains a constant stack size. You can use the task queue asynchronously
10
  * by calling the `run()` function of the global task queue in an event loop.
11
  *
12
+ * GuzzleHttp\Promise\Utils::queue()->run();
13
  */
14
  class TaskQueue implements TaskQueueInterface
15
  {
43
 
44
  public function run()
45
  {
 
46
  while ($task = array_shift($this->queue)) {
47
+ /** @var callable $task */
48
  $task();
49
  }
50
  }
vendor/guzzlehttp/promises/src/TaskQueueInterface.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  interface TaskQueueInterface
@@ -13,8 +14,6 @@ interface TaskQueueInterface
13
  /**
14
  * Adds a task to the queue that will be executed the next time run is
15
  * called.
16
- *
17
- * @param callable $task
18
  */
19
  public function add(callable $task);
20
 
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  interface TaskQueueInterface
14
  /**
15
  * Adds a task to the queue that will be executed the next time run is
16
  * called.
 
 
17
  */
18
  public function add(callable $task);
19
 
vendor/guzzlehttp/promises/src/Utils.php ADDED
@@ -0,0 +1,274 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Promise;
4
+
5
+ final class Utils
6
+ {
7
+ /**
8
+ * Get the global task queue used for promise resolution.
9
+ *
10
+ * This task queue MUST be run in an event loop in order for promises to be
11
+ * settled asynchronously. It will be automatically run when synchronously
12
+ * waiting on a promise.
13
+ *
14
+ * <code>
15
+ * while ($eventLoop->isRunning()) {
16
+ * GuzzleHttp\Promise\Utils::queue()->run();
17
+ * }
18
+ * </code>
19
+ *
20
+ * @param TaskQueueInterface $assign Optionally specify a new queue instance.
21
+ *
22
+ * @return TaskQueueInterface
23
+ */
24
+ public static function queue(TaskQueueInterface $assign = null)
25
+ {
26
+ static $queue;
27
+
28
+ if ($assign) {
29
+ $queue = $assign;
30
+ } elseif (!$queue) {
31
+ $queue = new TaskQueue();
32
+ }
33
+
34
+ return $queue;
35
+ }
36
+
37
+ /**
38
+ * Adds a function to run in the task queue when it is next `run()` and
39
+ * returns a promise that is fulfilled or rejected with the result.
40
+ *
41
+ * @param callable $task Task function to run.
42
+ *
43
+ * @return PromiseInterface
44
+ */
45
+ public static function task(callable $task)
46
+ {
47
+ $queue = self::queue();
48
+ $promise = new Promise([$queue, 'run']);
49
+ $queue->add(function () use ($task, $promise) {
50
+ try {
51
+ $promise->resolve($task());
52
+ } catch (\Throwable $e) {
53
+ $promise->reject($e);
54
+ } catch (\Exception $e) {
55
+ $promise->reject($e);
56
+ }
57
+ });
58
+
59
+ return $promise;
60
+ }
61
+
62
+ /**
63
+ * Synchronously waits on a promise to resolve and returns an inspection
64
+ * state array.
65
+ *
66
+ * Returns a state associative array containing a "state" key mapping to a
67
+ * valid promise state. If the state of the promise is "fulfilled", the
68
+ * array will contain a "value" key mapping to the fulfilled value of the
69
+ * promise. If the promise is rejected, the array will contain a "reason"
70
+ * key mapping to the rejection reason of the promise.
71
+ *
72
+ * @param PromiseInterface $promise Promise or value.
73
+ *
74
+ * @return array
75
+ */
76
+ public static function inspect(PromiseInterface $promise)
77
+ {
78
+ try {
79
+ return [
80
+ 'state' => PromiseInterface::FULFILLED,
81
+ 'value' => $promise->wait()
82
+ ];
83
+ } catch (RejectionException $e) {
84
+ return ['state' => PromiseInterface::REJECTED, 'reason' => $e->getReason()];
85
+ } catch (\Throwable $e) {
86
+ return ['state' => PromiseInterface::REJECTED, 'reason' => $e];
87
+ } catch (\Exception $e) {
88
+ return ['state' => PromiseInterface::REJECTED, 'reason' => $e];
89
+ }
90
+ }
91
+
92
+ /**
93
+ * Waits on all of the provided promises, but does not unwrap rejected
94
+ * promises as thrown exception.
95
+ *
96
+ * Returns an array of inspection state arrays.
97
+ *
98
+ * @see inspect for the inspection state array format.
99
+ *
100
+ * @param PromiseInterface[] $promises Traversable of promises to wait upon.
101
+ *
102
+ * @return array
103
+ */
104
+ public static function inspectAll($promises)
105
+ {
106
+ $results = [];
107
+ foreach ($promises as $key => $promise) {
108
+ $results[$key] = inspect($promise);
109
+ }
110
+
111
+ return $results;
112
+ }
113
+
114
+ /**
115
+ * Waits on all of the provided promises and returns the fulfilled values.
116
+ *
117
+ * Returns an array that contains the value of each promise (in the same
118
+ * order the promises were provided). An exception is thrown if any of the
119
+ * promises are rejected.
120
+ *
121
+ * @param iterable<PromiseInterface> $promises Iterable of PromiseInterface objects to wait on.
122
+ *
123
+ * @return array
124
+ *
125
+ * @throws \Exception on error
126
+ * @throws \Throwable on error in PHP >=7
127
+ */
128
+ public static function unwrap($promises)
129
+ {
130
+ $results = [];
131
+ foreach ($promises as $key => $promise) {
132
+ $results[$key] = $promise->wait();
133
+ }
134
+
135
+ return $results;
136
+ }
137
+
138
+ /**
139
+ * Given an array of promises, return a promise that is fulfilled when all
140
+ * the items in the array are fulfilled.
141
+ *
142
+ * The promise's fulfillment value is an array with fulfillment values at
143
+ * respective positions to the original array. If any promise in the array
144
+ * rejects, the returned promise is rejected with the rejection reason.
145
+ *
146
+ * @param mixed $promises Promises or values.
147
+ * @param bool $recursive If true, resolves new promises that might have been added to the stack during its own resolution.
148
+ *
149
+ * @return PromiseInterface
150
+ */
151
+ public static function all($promises, $recursive = false)
152
+ {
153
+ $results = [];
154
+ $promise = Each::of(
155
+ $promises,
156
+ function ($value, $idx) use (&$results) {
157
+ $results[$idx] = $value;
158
+ },
159
+ function ($reason, $idx, Promise $aggregate) {
160
+ $aggregate->reject($reason);
161
+ }
162
+ )->then(function () use (&$results) {
163
+ ksort($results);
164
+ return $results;
165
+ });
166
+
167
+ if (true === $recursive) {
168
+ $promise = $promise->then(function ($results) use ($recursive, &$promises) {
169
+ foreach ($promises as $promise) {
170
+ if (Is::pending($promise)) {
171
+ return self::all($promises, $recursive);
172
+ }
173
+ }
174
+ return $results;
175
+ });
176
+ }
177
+
178
+ return $promise;
179
+ }
180
+
181
+ /**
182
+ * Initiate a competitive race between multiple promises or values (values
183
+ * will become immediately fulfilled promises).
184
+ *
185
+ * When count amount of promises have been fulfilled, the returned promise
186
+ * is fulfilled with an array that contains the fulfillment values of the
187
+ * winners in order of resolution.
188
+ *
189
+ * This promise is rejected with a {@see AggregateException} if the number
190
+ * of fulfilled promises is less than the desired $count.
191
+ *
192
+ * @param int $count Total number of promises.
193
+ * @param mixed $promises Promises or values.
194
+ *
195
+ * @return PromiseInterface
196
+ */
197
+ public static function some($count, $promises)
198
+ {
199
+ $results = [];
200
+ $rejections = [];
201
+
202
+ return Each::of(
203
+ $promises,
204
+ function ($value, $idx, PromiseInterface $p) use (&$results, $count) {
205
+ if (Is::settled($p)) {
206
+ return;
207
+ }
208
+ $results[$idx] = $value;
209
+ if (count($results) >= $count) {
210
+ $p->resolve(null);
211
+ }
212
+ },
213
+ function ($reason) use (&$rejections) {
214
+ $rejections[] = $reason;
215
+ }
216
+ )->then(
217
+ function () use (&$results, &$rejections, $count) {
218
+ if (count($results) !== $count) {
219
+ throw new AggregateException(
220
+ 'Not enough promises to fulfill count',
221
+ $rejections
222
+ );
223
+ }
224
+ ksort($results);
225
+ return array_values($results);
226
+ }
227
+ );
228
+ }
229
+
230
+ /**
231
+ * Like some(), with 1 as count. However, if the promise fulfills, the
232
+ * fulfillment value is not an array of 1 but the value directly.
233
+ *
234
+ * @param mixed $promises Promises or values.
235
+ *
236
+ * @return PromiseInterface
237
+ */
238
+ public static function any($promises)
239
+ {
240
+ return self::some(1, $promises)->then(function ($values) {
241
+ return $values[0];
242
+ });
243
+ }
244
+
245
+ /**
246
+ * Returns a promise that is fulfilled when all of the provided promises have
247
+ * been fulfilled or rejected.
248
+ *
249
+ * The returned promise is fulfilled with an array of inspection state arrays.
250
+ *
251
+ * @see inspect for the inspection state array format.
252
+ *
253
+ * @param mixed $promises Promises or values.
254
+ *
255
+ * @return PromiseInterface
256
+ */
257
+ public static function settle($promises)
258
+ {
259
+ $results = [];
260
+
261
+ return Each::of(
262
+ $promises,
263
+ function ($value, $idx) use (&$results) {
264
+ $results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value];
265
+ },
266
+ function ($reason, $idx) use (&$results) {
267
+ $results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason];
268
+ }
269
+ )->then(function () use (&$results) {
270
+ ksort($results);
271
+ return $results;
272
+ });
273
+ }
274
+ }
vendor/guzzlehttp/promises/src/functions.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Promise;
3
 
4
  /**
@@ -17,18 +18,12 @@ namespace GuzzleHttp\Promise;
17
  * @param TaskQueueInterface $assign Optionally specify a new queue instance.
18
  *
19
  * @return TaskQueueInterface
 
 
20
  */
21
  function queue(TaskQueueInterface $assign = null)
22
  {
23
- static $queue;
24
-
25
- if ($assign) {
26
- $queue = $assign;
27
- } elseif (!$queue) {
28
- $queue = new TaskQueue();
29
- }
30
-
31
- return $queue;
32
  }
33
 
34
  /**
@@ -38,22 +33,12 @@ function queue(TaskQueueInterface $assign = null)
38
  * @param callable $task Task function to run.
39
  *
40
  * @return PromiseInterface
 
 
41
  */
42
  function task(callable $task)
43
  {
44
- $queue = queue();
45
- $promise = new Promise([$queue, 'run']);
46
- $queue->add(function () use ($task, $promise) {
47
- try {
48
- $promise->resolve($task());
49
- } catch (\Throwable $e) {
50
- $promise->reject($e);
51
- } catch (\Exception $e) {
52
- $promise->reject($e);
53
- }
54
- });
55
-
56
- return $promise;
57
  }
58
 
59
  /**
@@ -62,23 +47,12 @@ function task(callable $task)
62
  * @param mixed $value Promise or value.
63
  *
64
  * @return PromiseInterface
 
 
65
  */
66
  function promise_for($value)
67
  {
68
- if ($value instanceof PromiseInterface) {
69
- return $value;
70
- }
71
-
72
- // Return a Guzzle promise that shadows the given promise.
73
- if (method_exists($value, 'then')) {
74
- $wfn = method_exists($value, 'wait') ? [$value, 'wait'] : null;
75
- $cfn = method_exists($value, 'cancel') ? [$value, 'cancel'] : null;
76
- $promise = new Promise($wfn, $cfn);
77
- $value->then([$promise, 'resolve'], [$promise, 'reject']);
78
- return $promise;
79
- }
80
-
81
- return new FulfilledPromise($value);
82
  }
83
 
84
  /**
@@ -88,14 +62,12 @@ function promise_for($value)
88
  * @param mixed $reason Promise or reason.
89
  *
90
  * @return PromiseInterface
 
 
91
  */
92
  function rejection_for($reason)
93
  {
94
- if ($reason instanceof PromiseInterface) {
95
- return $reason;
96
- }
97
-
98
- return new RejectedPromise($reason);
99
  }
100
 
101
  /**
@@ -104,12 +76,12 @@ function rejection_for($reason)
104
  * @param mixed $reason
105
  *
106
  * @return \Exception|\Throwable
 
 
107
  */
108
  function exception_for($reason)
109
  {
110
- return $reason instanceof \Exception || $reason instanceof \Throwable
111
- ? $reason
112
- : new RejectionException($reason);
113
  }
114
 
115
  /**
@@ -118,16 +90,12 @@ function exception_for($reason)
118
  * @param mixed $value
119
  *
120
  * @return \Iterator
 
 
121
  */
122
  function iter_for($value)
123
  {
124
- if ($value instanceof \Iterator) {
125
- return $value;
126
- } elseif (is_array($value)) {
127
- return new \ArrayIterator($value);
128
- } else {
129
- return new \ArrayIterator([$value]);
130
- }
131
  }
132
 
133
  /**
@@ -143,21 +111,12 @@ function iter_for($value)
143
  * @param PromiseInterface $promise Promise or value.
144
  *
145
  * @return array
 
 
146
  */
147
  function inspect(PromiseInterface $promise)
148
  {
149
- try {
150
- return [
151
- 'state' => PromiseInterface::FULFILLED,
152
- 'value' => $promise->wait()
153
- ];
154
- } catch (RejectionException $e) {
155
- return ['state' => PromiseInterface::REJECTED, 'reason' => $e->getReason()];
156
- } catch (\Throwable $e) {
157
- return ['state' => PromiseInterface::REJECTED, 'reason' => $e];
158
- } catch (\Exception $e) {
159
- return ['state' => PromiseInterface::REJECTED, 'reason' => $e];
160
- }
161
  }
162
 
163
  /**
@@ -166,19 +125,17 @@ function inspect(PromiseInterface $promise)
166
  *
167
  * Returns an array of inspection state arrays.
168
  *
 
 
169
  * @param PromiseInterface[] $promises Traversable of promises to wait upon.
170
  *
171
  * @return array
172
- * @see GuzzleHttp\Promise\inspect for the inspection state array format.
 
173
  */
174
  function inspect_all($promises)
175
  {
176
- $results = [];
177
- foreach ($promises as $key => $promise) {
178
- $results[$key] = inspect($promise);
179
- }
180
-
181
- return $results;
182
  }
183
 
184
  /**
@@ -188,20 +145,18 @@ function inspect_all($promises)
188
  * the promises were provided). An exception is thrown if any of the promises
189
  * are rejected.
190
  *
191
- * @param mixed $promises Iterable of PromiseInterface objects to wait on.
192
  *
193
  * @return array
 
194
  * @throws \Exception on error
195
  * @throws \Throwable on error in PHP >=7
 
 
196
  */
197
  function unwrap($promises)
198
  {
199
- $results = [];
200
- foreach ($promises as $key => $promise) {
201
- $results[$key] = $promise->wait();
202
- }
203
-
204
- return $results;
205
  }
206
 
207
  /**
@@ -212,25 +167,16 @@ function unwrap($promises)
212
  * respective positions to the original array. If any promise in the array
213
  * rejects, the returned promise is rejected with the rejection reason.
214
  *
215
- * @param mixed $promises Promises or values.
 
216
  *
217
  * @return PromiseInterface
 
 
218
  */
219
- function all($promises)
220
  {
221
- $results = [];
222
- return each(
223
- $promises,
224
- function ($value, $idx) use (&$results) {
225
- $results[$idx] = $value;
226
- },
227
- function ($reason, $idx, Promise $aggregate) {
228
- $aggregate->reject($reason);
229
- }
230
- )->then(function () use (&$results) {
231
- ksort($results);
232
- return $results;
233
- });
234
  }
235
 
236
  /**
@@ -241,45 +187,19 @@ function all($promises)
241
  * fulfilled with an array that contains the fulfillment values of the winners
242
  * in order of resolution.
243
  *
244
- * This prommise is rejected with a {@see GuzzleHttp\Promise\AggregateException}
245
- * if the number of fulfilled promises is less than the desired $count.
246
  *
247
  * @param int $count Total number of promises.
248
  * @param mixed $promises Promises or values.
249
  *
250
  * @return PromiseInterface
 
 
251
  */
252
  function some($count, $promises)
253
  {
254
- $results = [];
255
- $rejections = [];
256
-
257
- return each(
258
- $promises,
259
- function ($value, $idx, PromiseInterface $p) use (&$results, $count) {
260
- if ($p->getState() !== PromiseInterface::PENDING) {
261
- return;
262
- }
263
- $results[$idx] = $value;
264
- if (count($results) >= $count) {
265
- $p->resolve(null);
266
- }
267
- },
268
- function ($reason) use (&$rejections) {
269
- $rejections[] = $reason;
270
- }
271
- )->then(
272
- function () use (&$results, &$rejections, $count) {
273
- if (count($results) !== $count) {
274
- throw new AggregateException(
275
- 'Not enough promises to fulfill count',
276
- $rejections
277
- );
278
- }
279
- ksort($results);
280
- return array_values($results);
281
- }
282
- );
283
  }
284
 
285
  /**
@@ -289,10 +209,12 @@ function some($count, $promises)
289
  * @param mixed $promises Promises or values.
290
  *
291
  * @return PromiseInterface
 
 
292
  */
293
  function any($promises)
294
  {
295
- return some(1, $promises)->then(function ($values) { return $values[0]; });
296
  }
297
 
298
  /**
@@ -301,27 +223,17 @@ function any($promises)
301
  *
302
  * The returned promise is fulfilled with an array of inspection state arrays.
303
  *
 
 
304
  * @param mixed $promises Promises or values.
305
  *
306
  * @return PromiseInterface
307
- * @see GuzzleHttp\Promise\inspect for the inspection state array format.
 
308
  */
309
  function settle($promises)
310
  {
311
- $results = [];
312
-
313
- return each(
314
- $promises,
315
- function ($value, $idx) use (&$results) {
316
- $results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value];
317
- },
318
- function ($reason, $idx) use (&$results) {
319
- $results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason];
320
- }
321
- )->then(function () use (&$results) {
322
- ksort($results);
323
- return $results;
324
- });
325
  }
326
 
327
  /**
@@ -329,29 +241,28 @@ function settle($promises)
329
  * fulfilled with a null value when the iterator has been consumed or the
330
  * aggregate promise has been fulfilled or rejected.
331
  *
332
- * $onFulfilled is a function that accepts the fulfilled value, iterator
333
- * index, and the aggregate promise. The callback can invoke any necessary side
334
- * effects and choose to resolve or reject the aggregate promise if needed.
335
  *
336
- * $onRejected is a function that accepts the rejection reason, iterator
337
- * index, and the aggregate promise. The callback can invoke any necessary side
338
- * effects and choose to resolve or reject the aggregate promise if needed.
339
  *
340
  * @param mixed $iterable Iterator or array to iterate over.
341
  * @param callable $onFulfilled
342
  * @param callable $onRejected
343
  *
344
  * @return PromiseInterface
 
 
345
  */
346
  function each(
347
  $iterable,
348
  callable $onFulfilled = null,
349
  callable $onRejected = null
350
  ) {
351
- return (new EachPromise($iterable, [
352
- 'fulfilled' => $onFulfilled,
353
- 'rejected' => $onRejected
354
- ]))->promise();
355
  }
356
 
357
  /**
@@ -368,6 +279,8 @@ function each(
368
  * @param callable $onRejected
369
  *
370
  * @return PromiseInterface
 
 
371
  */
372
  function each_limit(
373
  $iterable,
@@ -375,11 +288,7 @@ function each_limit(
375
  callable $onFulfilled = null,
376
  callable $onRejected = null
377
  ) {
378
- return (new EachPromise($iterable, [
379
- 'fulfilled' => $onFulfilled,
380
- 'rejected' => $onRejected,
381
- 'concurrency' => $concurrency
382
- ]))->promise();
383
  }
384
 
385
  /**
@@ -392,66 +301,63 @@ function each_limit(
392
  * @param callable $onFulfilled
393
  *
394
  * @return PromiseInterface
 
 
395
  */
396
  function each_limit_all(
397
  $iterable,
398
  $concurrency,
399
  callable $onFulfilled = null
400
  ) {
401
- return each_limit(
402
- $iterable,
403
- $concurrency,
404
- $onFulfilled,
405
- function ($reason, $idx, PromiseInterface $aggregate) {
406
- $aggregate->reject($reason);
407
- }
408
- );
409
  }
410
 
411
  /**
412
  * Returns true if a promise is fulfilled.
413
  *
414
- * @param PromiseInterface $promise
415
- *
416
  * @return bool
 
 
417
  */
418
  function is_fulfilled(PromiseInterface $promise)
419
  {
420
- return $promise->getState() === PromiseInterface::FULFILLED;
421
  }
422
 
423
  /**
424
  * Returns true if a promise is rejected.
425
  *
426
- * @param PromiseInterface $promise
427
- *
428
  * @return bool
 
 
429
  */
430
  function is_rejected(PromiseInterface $promise)
431
  {
432
- return $promise->getState() === PromiseInterface::REJECTED;
433
  }
434
 
435
  /**
436
  * Returns true if a promise is fulfilled or rejected.
437
  *
438
- * @param PromiseInterface $promise
439
- *
440
  * @return bool
 
 
441
  */
442
  function is_settled(PromiseInterface $promise)
443
  {
444
- return $promise->getState() !== PromiseInterface::PENDING;
445
  }
446
 
447
  /**
448
- * @see Coroutine
449
  *
450
- * @param callable $generatorFn
451
  *
452
  * @return PromiseInterface
 
 
453
  */
454
  function coroutine(callable $generatorFn)
455
  {
456
- return new Coroutine($generatorFn);
457
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Promise;
4
 
5
  /**
18
  * @param TaskQueueInterface $assign Optionally specify a new queue instance.
19
  *
20
  * @return TaskQueueInterface
21
+ *
22
+ * @deprecated queue will be removed in guzzlehttp/promises:2.0. Use Utils::queue instead.
23
  */
24
  function queue(TaskQueueInterface $assign = null)
25
  {
26
+ return Utils::queue($assign);
 
 
 
 
 
 
 
 
27
  }
28
 
29
  /**
33
  * @param callable $task Task function to run.
34
  *
35
  * @return PromiseInterface
36
+ *
37
+ * @deprecated task will be removed in guzzlehttp/promises:2.0. Use Utils::task instead.
38
  */
39
  function task(callable $task)
40
  {
41
+ return Utils::task($task);
 
 
 
 
 
 
 
 
 
 
 
 
42
  }
43
 
44
  /**
47
  * @param mixed $value Promise or value.
48
  *
49
  * @return PromiseInterface
50
+ *
51
+ * @deprecated promise_for will be removed in guzzlehttp/promises:2.0. Use Create::promiseFor instead.
52
  */
53
  function promise_for($value)
54
  {
55
+ return Create::promiseFor($value);
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  }
57
 
58
  /**
62
  * @param mixed $reason Promise or reason.
63
  *
64
  * @return PromiseInterface
65
+ *
66
+ * @deprecated rejection_for will be removed in guzzlehttp/promises:2.0. Use Create::rejectionFor instead.
67
  */
68
  function rejection_for($reason)
69
  {
70
+ return Create::rejectionFor($reason);
 
 
 
 
71
  }
72
 
73
  /**
76
  * @param mixed $reason
77
  *
78
  * @return \Exception|\Throwable
79
+ *
80
+ * @deprecated exception_for will be removed in guzzlehttp/promises:2.0. Use Create::exceptionFor instead.
81
  */
82
  function exception_for($reason)
83
  {
84
+ return Create::exceptionFor($reason);
 
 
85
  }
86
 
87
  /**
90
  * @param mixed $value
91
  *
92
  * @return \Iterator
93
+ *
94
+ * @deprecated iter_for will be removed in guzzlehttp/promises:2.0. Use Create::iterFor instead.
95
  */
96
  function iter_for($value)
97
  {
98
+ return Create::iterFor($value);
 
 
 
 
 
 
99
  }
100
 
101
  /**
111
  * @param PromiseInterface $promise Promise or value.
112
  *
113
  * @return array
114
+ *
115
+ * @deprecated inspect will be removed in guzzlehttp/promises:2.0. Use Utils::inspect instead.
116
  */
117
  function inspect(PromiseInterface $promise)
118
  {
119
+ return Utils::inspect($promise);
 
 
 
 
 
 
 
 
 
 
 
120
  }
121
 
122
  /**
125
  *
126
  * Returns an array of inspection state arrays.
127
  *
128
+ * @see inspect for the inspection state array format.
129
+ *
130
  * @param PromiseInterface[] $promises Traversable of promises to wait upon.
131
  *
132
  * @return array
133
+ *
134
+ * @deprecated inspect will be removed in guzzlehttp/promises:2.0. Use Utils::inspectAll instead.
135
  */
136
  function inspect_all($promises)
137
  {
138
+ return Utils::inspectAll($promises);
 
 
 
 
 
139
  }
140
 
141
  /**
145
  * the promises were provided). An exception is thrown if any of the promises
146
  * are rejected.
147
  *
148
+ * @param iterable<PromiseInterface> $promises Iterable of PromiseInterface objects to wait on.
149
  *
150
  * @return array
151
+ *
152
  * @throws \Exception on error
153
  * @throws \Throwable on error in PHP >=7
154
+ *
155
+ * @deprecated unwrap will be removed in guzzlehttp/promises:2.0. Use Utils::unwrap instead.
156
  */
157
  function unwrap($promises)
158
  {
159
+ return Utils::unwrap($promises);
 
 
 
 
 
160
  }
161
 
162
  /**
167
  * respective positions to the original array. If any promise in the array
168
  * rejects, the returned promise is rejected with the rejection reason.
169
  *
170
+ * @param mixed $promises Promises or values.
171
+ * @param bool $recursive If true, resolves new promises that might have been added to the stack during its own resolution.
172
  *
173
  * @return PromiseInterface
174
+ *
175
+ * @deprecated all will be removed in guzzlehttp/promises:2.0. Use Utils::all instead.
176
  */
177
+ function all($promises, $recursive = false)
178
  {
179
+ return Utils::all($promises, $recursive);
 
 
 
 
 
 
 
 
 
 
 
 
180
  }
181
 
182
  /**
187
  * fulfilled with an array that contains the fulfillment values of the winners
188
  * in order of resolution.
189
  *
190
+ * This promise is rejected with a {@see AggregateException} if the number of
191
+ * fulfilled promises is less than the desired $count.
192
  *
193
  * @param int $count Total number of promises.
194
  * @param mixed $promises Promises or values.
195
  *
196
  * @return PromiseInterface
197
+ *
198
+ * @deprecated some will be removed in guzzlehttp/promises:2.0. Use Utils::some instead.
199
  */
200
  function some($count, $promises)
201
  {
202
+ return Utils::some($count, $promises);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
203
  }
204
 
205
  /**
209
  * @param mixed $promises Promises or values.
210
  *
211
  * @return PromiseInterface
212
+ *
213
+ * @deprecated any will be removed in guzzlehttp/promises:2.0. Use Utils::any instead.
214
  */
215
  function any($promises)
216
  {
217
+ return Utils::any($promises);
218
  }
219
 
220
  /**
223
  *
224
  * The returned promise is fulfilled with an array of inspection state arrays.
225
  *
226
+ * @see inspect for the inspection state array format.
227
+ *
228
  * @param mixed $promises Promises or values.
229
  *
230
  * @return PromiseInterface
231
+ *
232
+ * @deprecated settle will be removed in guzzlehttp/promises:2.0. Use Utils::settle instead.
233
  */
234
  function settle($promises)
235
  {
236
+ return Utils::settle($promises);
 
 
 
 
 
 
 
 
 
 
 
 
 
237
  }
238
 
239
  /**
241
  * fulfilled with a null value when the iterator has been consumed or the
242
  * aggregate promise has been fulfilled or rejected.
243
  *
244
+ * $onFulfilled is a function that accepts the fulfilled value, iterator index,
245
+ * and the aggregate promise. The callback can invoke any necessary side
246
+ * effects and choose to resolve or reject the aggregate if needed.
247
  *
248
+ * $onRejected is a function that accepts the rejection reason, iterator index,
249
+ * and the aggregate promise. The callback can invoke any necessary side
250
+ * effects and choose to resolve or reject the aggregate if needed.
251
  *
252
  * @param mixed $iterable Iterator or array to iterate over.
253
  * @param callable $onFulfilled
254
  * @param callable $onRejected
255
  *
256
  * @return PromiseInterface
257
+ *
258
+ * @deprecated each will be removed in guzzlehttp/promises:2.0. Use Each::of instead.
259
  */
260
  function each(
261
  $iterable,
262
  callable $onFulfilled = null,
263
  callable $onRejected = null
264
  ) {
265
+ return Each::of($iterable, $onFulfilled, $onRejected);
 
 
 
266
  }
267
 
268
  /**
279
  * @param callable $onRejected
280
  *
281
  * @return PromiseInterface
282
+ *
283
+ * @deprecated each_limit will be removed in guzzlehttp/promises:2.0. Use Each::ofLimit instead.
284
  */
285
  function each_limit(
286
  $iterable,
288
  callable $onFulfilled = null,
289
  callable $onRejected = null
290
  ) {
291
+ return Each::ofLimit($iterable, $concurrency, $onFulfilled, $onRejected);
 
 
 
 
292
  }
293
 
294
  /**
301
  * @param callable $onFulfilled
302
  *
303
  * @return PromiseInterface
304
+ *
305
+ * @deprecated each_limit_all will be removed in guzzlehttp/promises:2.0. Use Each::ofLimitAll instead.
306
  */
307
  function each_limit_all(
308
  $iterable,
309
  $concurrency,
310
  callable $onFulfilled = null
311
  ) {
312
+ return Each::ofLimitAll($iterable, $concurrency, $onFulfilled);
 
 
 
 
 
 
 
313
  }
314
 
315
  /**
316
  * Returns true if a promise is fulfilled.
317
  *
 
 
318
  * @return bool
319
+ *
320
+ * @deprecated is_fulfilled will be removed in guzzlehttp/promises:2.0. Use Is::fulfilled instead.
321
  */
322
  function is_fulfilled(PromiseInterface $promise)
323
  {
324
+ return Is::fulfilled($promise);
325
  }
326
 
327
  /**
328
  * Returns true if a promise is rejected.
329
  *
 
 
330
  * @return bool
331
+ *
332
+ * @deprecated is_rejected will be removed in guzzlehttp/promises:2.0. Use Is::rejected instead.
333
  */
334
  function is_rejected(PromiseInterface $promise)
335
  {
336
+ return Is::rejected($promise);
337
  }
338
 
339
  /**
340
  * Returns true if a promise is fulfilled or rejected.
341
  *
 
 
342
  * @return bool
343
+ *
344
+ * @deprecated is_settled will be removed in guzzlehttp/promises:2.0. Use Is::settled instead.
345
  */
346
  function is_settled(PromiseInterface $promise)
347
  {
348
+ return Is::settled($promise);
349
  }
350
 
351
  /**
352
+ * Create a new coroutine.
353
  *
354
+ * @see Coroutine
355
  *
356
  * @return PromiseInterface
357
+ *
358
+ * @deprecated coroutine will be removed in guzzlehttp/promises:2.0. Use Coroutine::of instead.
359
  */
360
  function coroutine(callable $generatorFn)
361
  {
362
+ return Coroutine::of($generatorFn);
363
  }
vendor/guzzlehttp/psr7/CHANGELOG.md CHANGED
@@ -9,8 +9,32 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
9
 
10
  ## [Unreleased]
11
 
 
12
 
13
- ## [1.6.0]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
  ### Added
16
 
9
 
10
  ## [Unreleased]
11
 
12
+ ## [1.7.0] - 2020-09-30
13
 
14
+ ### Added
15
+
16
+ - Replaced functions by static methods
17
+
18
+ ### Fixed
19
+
20
+ - Converting a non-seekable stream to a string
21
+ - Handle multiple Set-Cookie correctly
22
+ - Ignore array keys in header values when merging
23
+ - Allow multibyte characters to be parsed in `Message:bodySummary()`
24
+
25
+ ### Changed
26
+
27
+ - Restored partial HHVM 3 support
28
+
29
+
30
+ ## [1.6.1] - 2019-07-02
31
+
32
+ ### Fixed
33
+
34
+ - Accept null and bool header values again
35
+
36
+
37
+ ## [1.6.0] - 2019-06-30
38
 
39
  ### Added
40
 
vendor/guzzlehttp/psr7/README.md CHANGED
@@ -23,11 +23,11 @@ Reads from multiple streams, one after the other.
23
  ```php
24
  use GuzzleHttp\Psr7;
25
 
26
- $a = Psr7\stream_for('abc, ');
27
- $b = Psr7\stream_for('123.');
28
  $composed = new Psr7\AppendStream([$a, $b]);
29
 
30
- $composed->addStream(Psr7\stream_for(' Above all listen to me'));
31
 
32
  echo $composed; // abc, 123. Above all listen to me.
33
  ```
@@ -65,7 +65,7 @@ then on disk.
65
  ```php
66
  use GuzzleHttp\Psr7;
67
 
68
- $original = Psr7\stream_for(fopen('http://www.google.com', 'r'));
69
  $stream = new Psr7\CachingStream($original);
70
 
71
  $stream->read(1024);
@@ -89,7 +89,7 @@ stream becomes too full.
89
  use GuzzleHttp\Psr7;
90
 
91
  // Create an empty stream
92
- $stream = Psr7\stream_for();
93
 
94
  // Start dropping data when the stream has more than 10 bytes
95
  $dropping = new Psr7\DroppingStream($stream, 10);
@@ -112,7 +112,7 @@ to create a concrete class for a simple extension point.
112
 
113
  use GuzzleHttp\Psr7;
114
 
115
- $stream = Psr7\stream_for('hi');
116
  $fnStream = Psr7\FnStream::decorate($stream, [
117
  'rewind' => function () use ($stream) {
118
  echo 'About to rewind - ';
@@ -167,7 +167,7 @@ chunks (e.g. Amazon S3's multipart upload API).
167
  ```php
168
  use GuzzleHttp\Psr7;
169
 
170
- $original = Psr7\stream_for(fopen('/tmp/test.txt', 'r+'));
171
  echo $original->getSize();
172
  // >>> 1048576
173
 
@@ -197,7 +197,7 @@ NoSeekStream wraps a stream and does not allow seeking.
197
  ```php
198
  use GuzzleHttp\Psr7;
199
 
200
- $original = Psr7\stream_for('foo');
201
  $noSeek = new Psr7\NoSeekStream($original);
202
 
203
  echo $noSeek->read(3);
@@ -271,7 +271,7 @@ This decorator could be added to any existing stream and used like so:
271
  ```php
272
  use GuzzleHttp\Psr7;
273
 
274
- $original = Psr7\stream_for('foo');
275
 
276
  $eofStream = new EofCallbackStream($original, function () {
277
  echo 'EOF!';
@@ -297,228 +297,292 @@ stream from a PSR-7 stream.
297
  ```php
298
  use GuzzleHttp\Psr7\StreamWrapper;
299
 
300
- $stream = GuzzleHttp\Psr7\stream_for('hello!');
301
  $resource = StreamWrapper::getResource($stream);
302
  echo fread($resource, 6); // outputs hello!
303
  ```
304
 
305
 
306
- # Function API
307
 
308
- There are various functions available under the `GuzzleHttp\Psr7` namespace.
309
 
310
 
311
- ## `function str`
312
 
313
- `function str(MessageInterface $message)`
314
 
315
  Returns the string representation of an HTTP message.
316
 
317
  ```php
318
  $request = new GuzzleHttp\Psr7\Request('GET', 'http://example.com');
319
- echo GuzzleHttp\Psr7\str($request);
320
  ```
321
 
322
 
323
- ## `function uri_for`
324
 
325
- `function uri_for($uri)`
326
 
327
- This function accepts a string or `Psr\Http\Message\UriInterface` and returns a
328
- UriInterface for the given value. If the value is already a `UriInterface`, it
329
- is returned as-is.
330
 
331
- ```php
332
- $uri = GuzzleHttp\Psr7\uri_for('http://example.com');
333
- assert($uri === GuzzleHttp\Psr7\uri_for($uri));
334
- ```
335
 
336
 
337
- ## `function stream_for`
338
 
339
- `function stream_for($resource = '', array $options = [])`
340
 
341
- Create a new stream based on the input type.
342
 
343
- Options is an associative array that can contain the following keys:
 
344
 
345
- * - metadata: Array of custom metadata.
346
- * - size: Size of the stream.
347
 
348
- This method accepts the following `$resource` types:
349
 
350
- - `Psr\Http\Message\StreamInterface`: Returns the value as-is.
351
- - `string`: Creates a stream object that uses the given string as the contents.
352
- - `resource`: Creates a stream object that wraps the given PHP stream resource.
353
- - `Iterator`: If the provided value implements `Iterator`, then a read-only
354
- stream object will be created that wraps the given iterable. Each time the
355
- stream is read from, data from the iterator will fill a buffer and will be
356
- continuously called until the buffer is equal to the requested read size.
357
- Subsequent read calls will first read from the buffer and then call `next`
358
- on the underlying iterator until it is exhausted.
359
- - `object` with `__toString()`: If the object has the `__toString()` method,
360
- the object will be cast to a string and then a stream will be returned that
361
- uses the string value.
362
- - `NULL`: When `null` is passed, an empty stream object is returned.
363
- - `callable` When a callable is passed, a read-only stream object will be
364
- created that invokes the given callable. The callable is invoked with the
365
- number of suggested bytes to read. The callable can return any number of
366
- bytes, but MUST return `false` when there is no more data to return. The
367
- stream object that wraps the callable will invoke the callable until the
368
- number of requested bytes are available. Any additional bytes will be
369
- buffered and used in subsequent reads.
370
 
371
- ```php
372
- $stream = GuzzleHttp\Psr7\stream_for('foo');
373
- $stream = GuzzleHttp\Psr7\stream_for(fopen('/path/to/file', 'r'));
374
 
375
- $generator = function ($bytes) {
376
- for ($i = 0; $i < $bytes; $i++) {
377
- yield ' ';
378
- }
379
- }
380
 
381
- $stream = GuzzleHttp\Psr7\stream_for($generator(100));
382
- ```
383
 
 
384
 
385
- ## `function parse_header`
386
 
387
- `function parse_header($header)`
388
 
389
- Parse an array of header values containing ";" separated data into an array of
390
- associative arrays representing the header key value pair data of the header.
391
- When a parameter does not contain a value, but just contains a key, this
392
- function will inject a key with a '' string value.
393
 
 
394
 
395
- ## `function normalize_header`
396
 
397
- `function normalize_header($header)`
398
 
399
- Converts an array of header values that may contain comma separated headers
400
- into an array of headers with no comma separated values.
401
 
 
402
 
403
- ## `function modify_request`
404
 
405
- `function modify_request(RequestInterface $request, array $changes)`
406
 
407
- Clone and modify a request with the given changes. This method is useful for
408
- reducing the number of clones needed to mutate a message.
409
 
410
- The changes can be one of:
411
 
412
- - method: (string) Changes the HTTP method.
413
- - set_headers: (array) Sets the given headers.
414
- - remove_headers: (array) Remove the given headers.
415
- - body: (mixed) Sets the given body.
416
- - uri: (UriInterface) Set the URI.
417
- - query: (string) Set the query string value of the URI.
418
- - version: (string) Set the protocol version.
419
 
 
 
 
 
420
 
421
- ## `function rewind_body`
422
 
423
- `function rewind_body(MessageInterface $message)`
424
 
425
- Attempts to rewind a message body and throws an exception on failure. The body
426
- of the message will only be rewound if a call to `tell()` returns a value other
427
- than `0`.
428
 
 
 
429
 
430
- ## `function try_fopen`
431
 
432
- `function try_fopen($filename, $mode)`
433
 
434
- Safely opens a PHP stream resource using a filename.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
435
 
436
- When fopen fails, PHP normally raises a warning. This function adds an error
437
- handler that checks for errors and throws an exception instead.
438
 
439
 
440
- ## `function copy_to_string`
441
 
442
- `function copy_to_string(StreamInterface $stream, $maxLen = -1)`
443
 
444
- Copy the contents of a stream into a string until the given number of bytes
445
- have been read.
446
 
447
 
448
- ## `function copy_to_stream`
449
 
450
- `function copy_to_stream(StreamInterface $source, StreamInterface $dest, $maxLen = -1)`
451
 
452
- Copy the contents of a stream into another stream until the given number of
453
  bytes have been read.
454
 
455
 
456
- ## `function hash`
457
 
458
- `function hash(StreamInterface $stream, $algo, $rawOutput = false)`
459
 
460
- Calculate a hash of a Stream. This method reads the entire stream to calculate
461
- a rolling hash (based on PHP's hash_init functions).
462
 
 
 
463
 
464
- ## `function readline`
465
 
466
- `function readline(StreamInterface $stream, $maxLength = null)`
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
467
 
468
  Read a line from the stream up to the maximum allowed buffer length.
469
 
470
 
471
- ## `function parse_request`
472
 
473
- `function parse_request($message)`
474
 
475
- Parses a request message string into a request object.
476
 
 
477
 
478
- ## `function parse_response`
 
479
 
480
- `function parse_response($message)`
481
 
482
- Parses a response message string into a response object.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
483
 
 
 
 
484
 
485
- ## `function parse_query`
 
 
 
 
486
 
487
- `function parse_query($str, $urlEncoding = true)`
 
488
 
489
- Parse a query string into an associative array.
490
 
491
- If multiple values are found for the same key, the value of that key value pair
492
- will become an array. This function does not parse nested PHP style arrays into
493
- an associative array (e.g., `foo[a]=1&foo[b]=2` will be parsed into
494
- `['foo[a]' => '1', 'foo[b]' => '2']`).
495
 
 
496
 
497
- ## `function build_query`
498
 
499
- `function build_query(array $params, $encoding = PHP_QUERY_RFC3986)`
 
500
 
501
- Build a query string from an array of key value pairs.
502
 
503
- This function can use the return value of parse_query() to build a query string.
504
- This function does not modify the provided keys when an array is encountered
505
- (like http_build_query would).
 
 
506
 
 
 
 
507
 
508
- ## `function mimetype_from_filename`
509
 
510
- `function mimetype_from_filename($filename)`
 
 
511
 
512
  Determines the mimetype of a file by looking at its extension.
513
 
514
 
515
- ## `function mimetype_from_extension`
516
 
517
- `function mimetype_from_extension($extension)`
518
 
519
  Maps a file extensions to a mimetype.
520
 
521
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
522
  # Additional URI Methods
523
 
524
  Aside from the standard `Psr\Http\Message\UriInterface` implementation in form of the `GuzzleHttp\Psr7\Uri` class,
23
  ```php
24
  use GuzzleHttp\Psr7;
25
 
26
+ $a = Psr7\Utils::streamFor('abc, ');
27
+ $b = Psr7\Utils::streamFor('123.');
28
  $composed = new Psr7\AppendStream([$a, $b]);
29
 
30
+ $composed->addStream(Psr7\Utils::streamFor(' Above all listen to me'));
31
 
32
  echo $composed; // abc, 123. Above all listen to me.
33
  ```
65
  ```php
66
  use GuzzleHttp\Psr7;
67
 
68
+ $original = Psr7\Utils::streamFor(fopen('http://www.google.com', 'r'));
69
  $stream = new Psr7\CachingStream($original);
70
 
71
  $stream->read(1024);
89
  use GuzzleHttp\Psr7;
90
 
91
  // Create an empty stream
92
+ $stream = Psr7\Utils::streamFor();
93
 
94
  // Start dropping data when the stream has more than 10 bytes
95
  $dropping = new Psr7\DroppingStream($stream, 10);
112
 
113
  use GuzzleHttp\Psr7;
114
 
115
+ $stream = Psr7\Utils::streamFor('hi');
116
  $fnStream = Psr7\FnStream::decorate($stream, [
117
  'rewind' => function () use ($stream) {
118
  echo 'About to rewind - ';
167
  ```php
168
  use GuzzleHttp\Psr7;
169
 
170
+ $original = Psr7\Utils::streamFor(fopen('/tmp/test.txt', 'r+'));
171
  echo $original->getSize();
172
  // >>> 1048576
173
 
197
  ```php
198
  use GuzzleHttp\Psr7;
199
 
200
+ $original = Psr7\Utils::streamFor('foo');
201
  $noSeek = new Psr7\NoSeekStream($original);
202
 
203
  echo $noSeek->read(3);
271
  ```php
272
  use GuzzleHttp\Psr7;
273
 
274
+ $original = Psr7\Utils::streamFor('foo');
275
 
276
  $eofStream = new EofCallbackStream($original, function () {
277
  echo 'EOF!';
297
  ```php
298
  use GuzzleHttp\Psr7\StreamWrapper;
299
 
300
+ $stream = GuzzleHttp\Psr7\Utils::streamFor('hello!');
301
  $resource = StreamWrapper::getResource($stream);
302
  echo fread($resource, 6); // outputs hello!
303
  ```
304
 
305
 
306
+ # Static API
307
 
308
+ There are various static methods available under the `GuzzleHttp\Psr7` namespace.
309
 
310
 
311
+ ## `GuzzleHttp\Psr7\Message::toString`
312
 
313
+ `public static function toString(MessageInterface $message): string`
314
 
315
  Returns the string representation of an HTTP message.
316
 
317
  ```php
318
  $request = new GuzzleHttp\Psr7\Request('GET', 'http://example.com');
319
+ echo GuzzleHttp\Psr7\Message::toString($request);
320
  ```
321
 
322
 
323
+ ## `GuzzleHttp\Psr7\Message::bodySummary`
324
 
325
+ `public static function bodySummary(MessageInterface $message, int $truncateAt = 120): string|null`
326
 
327
+ Get a short summary of the message body.
 
 
328
 
329
+ Will return `null` if the response is not printable.
 
 
 
330
 
331
 
332
+ ## `GuzzleHttp\Psr7\Message::rewindBody`
333
 
334
+ `public static function rewindBody(MessageInterface $message): void`
335
 
336
+ Attempts to rewind a message body and throws an exception on failure.
337
 
338
+ The body of the message will only be rewound if a call to `tell()`
339
+ returns a value other than `0`.
340
 
 
 
341
 
342
+ ## `GuzzleHttp\Psr7\Message::parseMessage`
343
 
344
+ `public static function parseMessage(string $message): array`
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
345
 
346
+ Parses an HTTP message into an associative array.
 
 
347
 
348
+ The array contains the "start-line" key containing the start line of
349
+ the message, "headers" key containing an associative array of header
350
+ array values, and a "body" key containing the body of the message.
 
 
351
 
 
 
352
 
353
+ ## `GuzzleHttp\Psr7\Message::parseRequestUri`
354
 
355
+ `public static function parseRequestUri(string $path, array $headers): string`
356
 
357
+ Constructs a URI for an HTTP request message.
358
 
 
 
 
 
359
 
360
+ ## `GuzzleHttp\Psr7\Message::parseRequest`
361
 
362
+ `public static function parseRequest(string $message): Request`
363
 
364
+ Parses a request message string into a request object.
365
 
 
 
366
 
367
+ ## `GuzzleHttp\Psr7\Message::parseResponse`
368
 
369
+ `public static function parseResponse(string $message): Response`
370
 
371
+ Parses a response message string into a response object.
372
 
 
 
373
 
374
+ ## `GuzzleHttp\Psr7\Header::parse`
375
 
376
+ `public static function parse(string|array $header): array`
 
 
 
 
 
 
377
 
378
+ Parse an array of header values containing ";" separated data into an
379
+ array of associative arrays representing the header key value pair data
380
+ of the header. When a parameter does not contain a value, but just
381
+ contains a key, this function will inject a key with a '' string value.
382
 
 
383
 
384
+ ## `GuzzleHttp\Psr7\Header::normalize`
385
 
386
+ `public static function normalize(string|array $header): array`
 
 
387
 
388
+ Converts an array of header values that may contain comma separated
389
+ headers into an array of headers with no comma separated values.
390
 
 
391
 
392
+ ## `GuzzleHttp\Psr7\Query::parse`
393
 
394
+ `public static function parse(string $str, int|bool $urlEncoding = true): array`
395
+
396
+ Parse a query string into an associative array.
397
+
398
+ If multiple values are found for the same key, the value of that key
399
+ value pair will become an array. This function does not parse nested
400
+ PHP style arrays into an associative array (e.g., `foo[a]=1&foo[b]=2`
401
+ will be parsed into `['foo[a]' => '1', 'foo[b]' => '2'])`.
402
+
403
+
404
+ ## `GuzzleHttp\Psr7\Query::build`
405
+
406
+ `public static function build(array $params, int|false $encoding = PHP_QUERY_RFC3986): string`
407
+
408
+ Build a query string from an array of key value pairs.
409
+
410
+ This function can use the return value of `parse()` to build a query
411
+ string. This function does not modify the provided keys when an array is
412
+ encountered (like `http_build_query()` would).
413
+
414
+
415
+ ## `GuzzleHttp\Psr7\Utils::caselessRemove`
416
+
417
+ `public static function caselessRemove(iterable<string> $keys, $keys, array $data): array`
418
 
419
+ Remove the items given by the keys, case insensitively from the data.
 
420
 
421
 
422
+ ## `GuzzleHttp\Psr7\Utils::copyToStream`
423
 
424
+ `public static function copyToStream(StreamInterface $source, StreamInterface $dest, int $maxLen = -1): void`
425
 
426
+ Copy the contents of a stream into another stream until the given number
427
+ of bytes have been read.
428
 
429
 
430
+ ## `GuzzleHttp\Psr7\Utils::copyToString`
431
 
432
+ `public static function copyToString(StreamInterface $stream, int $maxLen = -1): string`
433
 
434
+ Copy the contents of a stream into a string until the given number of
435
  bytes have been read.
436
 
437
 
438
+ ## `GuzzleHttp\Psr7\Utils::hash`
439
 
440
+ `public static function hash(StreamInterface $stream, string $algo, bool $rawOutput = false): string`
441
 
442
+ Calculate a hash of a stream.
 
443
 
444
+ This method reads the entire stream to calculate a rolling hash, based on
445
+ PHP's `hash_init` functions.
446
 
 
447
 
448
+ ## `GuzzleHttp\Psr7\Utils::modifyRequest`
449
+
450
+ `public static function modifyRequest(RequestInterface $request, array $changes): RequestInterface`
451
+
452
+ Clone and modify a request with the given changes.
453
+
454
+ This method is useful for reducing the number of clones needed to mutate
455
+ a message.
456
+
457
+ - method: (string) Changes the HTTP method.
458
+ - set_headers: (array) Sets the given headers.
459
+ - remove_headers: (array) Remove the given headers.
460
+ - body: (mixed) Sets the given body.
461
+ - uri: (UriInterface) Set the URI.
462
+ - query: (string) Set the query string value of the URI.
463
+ - version: (string) Set the protocol version.
464
+
465
+
466
+ ## `GuzzleHttp\Psr7\Utils::readLine`
467
+
468
+ `public static function readLine(StreamInterface $stream, int $maxLength = null): string`
469
 
470
  Read a line from the stream up to the maximum allowed buffer length.
471
 
472
 
473
+ ## `GuzzleHttp\Psr7\Utils::streamFor`
474
 
475
+ `public static function streamFor(resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource = '', array $options = []): StreamInterface`
476
 
477
+ Create a new stream based on the input type.
478
 
479
+ Options is an associative array that can contain the following keys:
480
 
481
+ - metadata: Array of custom metadata.
482
+ - size: Size of the stream.
483
 
484
+ This method accepts the following `$resource` types:
485
 
486
+ - `Psr\Http\Message\StreamInterface`: Returns the value as-is.
487
+ - `string`: Creates a stream object that uses the given string as the contents.
488
+ - `resource`: Creates a stream object that wraps the given PHP stream resource.
489
+ - `Iterator`: If the provided value implements `Iterator`, then a read-only
490
+ stream object will be created that wraps the given iterable. Each time the
491
+ stream is read from, data from the iterator will fill a buffer and will be
492
+ continuously called until the buffer is equal to the requested read size.
493
+ Subsequent read calls will first read from the buffer and then call `next`
494
+ on the underlying iterator until it is exhausted.
495
+ - `object` with `__toString()`: If the object has the `__toString()` method,
496
+ the object will be cast to a string and then a stream will be returned that
497
+ uses the string value.
498
+ - `NULL`: When `null` is passed, an empty stream object is returned.
499
+ - `callable` When a callable is passed, a read-only stream object will be
500
+ created that invokes the given callable. The callable is invoked with the
501
+ number of suggested bytes to read. The callable can return any number of
502
+ bytes, but MUST return `false` when there is no more data to return. The
503
+ stream object that wraps the callable will invoke the callable until the
504
+ number of requested bytes are available. Any additional bytes will be
505
+ buffered and used in subsequent reads.
506
 
507
+ ```php
508
+ $stream = GuzzleHttp\Psr7\Utils::streamFor('foo');
509
+ $stream = GuzzleHttp\Psr7\Utils::streamFor(fopen('/path/to/file', 'r'));
510
 
511
+ $generator = function ($bytes) {
512
+ for ($i = 0; $i < $bytes; $i++) {
513
+ yield ' ';
514
+ }
515
+ }
516
 
517
+ $stream = GuzzleHttp\Psr7\Utils::streamFor($generator(100));
518
+ ```
519
 
 
520
 
521
+ ## `GuzzleHttp\Psr7\Utils::tryFopen`
 
 
 
522
 
523
+ `public static function tryFopen(string $filename, string $mode): resource`
524
 
525
+ Safely opens a PHP stream resource using a filename.
526
 
527
+ When fopen fails, PHP normally raises a warning. This function adds an
528
+ error handler that checks for errors and throws an exception instead.
529
 
 
530
 
531
+ ## `GuzzleHttp\Psr7\Utils::uriFor`
532
+
533
+ `public static function uriFor(string|UriInterface $uri): UriInterface`
534
+
535
+ Returns a UriInterface for the given value.
536
 
537
+ This function accepts a string or UriInterface and returns a
538
+ UriInterface for the given value. If the value is already a
539
+ UriInterface, it is returned as-is.
540
 
 
541
 
542
+ ## `GuzzleHttp\Psr7\MimeType::fromFilename`
543
+
544
+ `public static function fromFilename(string $filename): string|null`
545
 
546
  Determines the mimetype of a file by looking at its extension.
547
 
548
 
549
+ ## `GuzzleHttp\Psr7\MimeType::fromExtension`
550
 
551
+ `public static function fromExtension(string $extension): string|null`
552
 
553
  Maps a file extensions to a mimetype.
554
 
555
 
556
+ ## Upgrading from Function API
557
+
558
+ The static API was first introduced in 1.7.0, in order to mitigate problems with functions conflicting between global and local copies of the package. The function API will be removed in 2.0.0. A migration table has been provided here for your convenience:
559
+
560
+ | Original Function | Replacement Method |
561
+ |----------------|----------------|
562
+ | `str` | `Message::toString` |
563
+ | `uri_for` | `Utils::uriFor` |
564
+ | `stream_for` | `Utils::streamFor` |
565
+ | `parse_header` | `Header::parse` |
566
+ | `normalize_header` | `Header::normalize` |
567
+ | `modify_request` | `Utils::modifyRequest` |
568
+ | `rewind_body` | `Message::rewindBody` |
569
+ | `try_fopen` | `Utils::tryFopen` |
570
+ | `copy_to_string` | `Utils::copyToString` |
571
+ | `copy_to_stream` | `Utils::copyToStream` |
572
+ | `hash` | `Utils::hash` |
573
+ | `readline` | `Utils::readLine` |
574
+ | `parse_request` | `Message::parseRequest` |
575
+ | `parse_response` | `Message::parseResponse` |
576
+ | `parse_query` | `Query::parse` |
577
+ | `build_query` | `Query::build` |
578
+ | `mimetype_from_filename` | `MimeType::fromFilename` |
579
+ | `mimetype_from_extension` | `MimeType::fromExtension` |
580
+ | `_parse_message` | `Message::parseMessage` |
581
+ | `_parse_request_uri` | `Message::parseRequestUri` |
582
+ | `get_message_body_summary` | `Message::bodySummary` |
583
+ | `_caseless_remove` | `Utils::caselessRemove` |
584
+
585
+
586
  # Additional URI Methods
587
 
588
  Aside from the standard `Psr\Http\Message\UriInterface` implementation in form of the `GuzzleHttp\Psr7\Uri` class,
vendor/guzzlehttp/psr7/composer.json CHANGED
@@ -21,14 +21,14 @@
21
  "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
22
  },
23
  "require-dev": {
24
- "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8",
25
  "ext-zlib": "*"
26
  },
27
  "provide": {
28
  "psr/http-message-implementation": "1.0"
29
  },
30
  "suggest": {
31
- "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
32
  },
33
  "autoload": {
34
  "psr-4": {
@@ -43,7 +43,7 @@
43
  },
44
  "extra": {
45
  "branch-alias": {
46
- "dev-master": "1.6-dev"
47
  }
48
  }
49
  }
21
  "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
22
  },
23
  "require-dev": {
24
+ "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10",
25
  "ext-zlib": "*"
26
  },
27
  "provide": {
28
  "psr/http-message-implementation": "1.0"
29
  },
30
  "suggest": {
31
+ "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
32
  },
33
  "autoload": {
34
  "psr-4": {
43
  },
44
  "extra": {
45
  "branch-alias": {
46
+ "dev-master": "1.7-dev"
47
  }
48
  }
49
  }
vendor/guzzlehttp/psr7/src/AppendStream.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
@@ -61,7 +62,7 @@ class AppendStream implements StreamInterface
61
 
62
  public function getContents()
63
  {
64
- return copy_to_string($this);
65
  }
66
 
67
  /**
@@ -98,6 +99,8 @@ class AppendStream implements StreamInterface
98
  }
99
 
100
  $this->streams = [];
 
 
101
  }
102
 
103
  public function tell()
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
62
 
63
  public function getContents()
64
  {
65
+ return Utils::copyToString($this);
66
  }
67
 
68
  /**
99
  }
100
 
101
  $this->streams = [];
102
+
103
+ return null;
104
  }
105
 
106
  public function tell()
vendor/guzzlehttp/psr7/src/BufferStream.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
@@ -49,6 +50,8 @@ class BufferStream implements StreamInterface
49
  public function detach()
50
  {
51
  $this->close();
 
 
52
  }
53
 
54
  public function getSize()
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
50
  public function detach()
51
  {
52
  $this->close();
53
+
54
+ return null;
55
  }
56
 
57
  public function getSize()
vendor/guzzlehttp/psr7/src/CachingStream.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
@@ -131,7 +132,7 @@ class CachingStream implements StreamInterface
131
  private function cacheEntireStream()
132
  {
133
  $target = new FnStream(['write' => 'strlen']);
134
- copy_to_stream($this, $target);
135
 
136
  return $this->tell();
137
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
132
  private function cacheEntireStream()
133
  {
134
  $target = new FnStream(['write' => 'strlen']);
135
+ Utils::copyToStream($this, $target);
136
 
137
  return $this->tell();
138
  }
vendor/guzzlehttp/psr7/src/DroppingStream.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
vendor/guzzlehttp/psr7/src/FnStream.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
@@ -34,6 +35,7 @@ class FnStream implements StreamInterface
34
 
35
  /**
36
  * Lazily determine which methods are not implemented.
 
37
  * @throws \BadMethodCallException
38
  */
39
  public function __get($name)
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
35
 
36
  /**
37
  * Lazily determine which methods are not implemented.
38
+ *
39
  * @throws \BadMethodCallException
40
  */
41
  public function __get($name)
vendor/guzzlehttp/psr7/src/Header.php ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ final class Header
6
+ {
7
+ /**
8
+ * Parse an array of header values containing ";" separated data into an
9
+ * array of associative arrays representing the header key value pair data
10
+ * of the header. When a parameter does not contain a value, but just
11
+ * contains a key, this function will inject a key with a '' string value.
12
+ *
13
+ * @param string|array $header Header to parse into components.
14
+ *
15
+ * @return array Returns the parsed header values.
16
+ */
17
+ public static function parse($header)
18
+ {
19
+ static $trimmed = "\"' \n\t\r";
20
+ $params = $matches = [];
21
+
22
+ foreach (self::normalize($header) as $val) {
23
+ $part = [];
24
+ foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) {
25
+ if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) {
26
+ $m = $matches[0];
27
+ if (isset($m[1])) {
28
+ $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed);
29
+ } else {
30
+ $part[] = trim($m[0], $trimmed);
31
+ }
32
+ }
33
+ }
34
+ if ($part) {
35
+ $params[] = $part;
36
+ }
37
+ }
38
+
39
+ return $params;
40
+ }
41
+
42
+ /**
43
+ * Converts an array of header values that may contain comma separated
44
+ * headers into an array of headers with no comma separated values.
45
+ *
46
+ * @param string|array $header Header to normalize.
47
+ *
48
+ * @return array Returns the normalized header field values.
49
+ */
50
+ public static function normalize($header)
51
+ {
52
+ if (!is_array($header)) {
53
+ return array_map('trim', explode(',', $header));
54
+ }
55
+
56
+ $result = [];
57
+ foreach ($header as $value) {
58
+ foreach ((array) $value as $v) {
59
+ if (strpos($v, ',') === false) {
60
+ $result[] = $v;
61
+ continue;
62
+ }
63
+ foreach (preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $v) as $vv) {
64
+ $result[] = trim($vv);
65
+ }
66
+ }
67
+ }
68
+
69
+ return $result;
70
+ }
71
+ }
vendor/guzzlehttp/psr7/src/InflateStream.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
vendor/guzzlehttp/psr7/src/LazyOpenStream.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
@@ -34,6 +35,6 @@ class LazyOpenStream implements StreamInterface
34
  */
35
  protected function createStream()
36
  {
37
- return stream_for(try_fopen($this->filename, $this->mode));
38
  }
39
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
35
  */
36
  protected function createStream()
37
  {
38
+ return Utils::streamFor(Utils::tryFopen($this->filename, $this->mode));
39
  }
40
  }
vendor/guzzlehttp/psr7/src/LimitStream.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
vendor/guzzlehttp/psr7/src/Message.php ADDED
@@ -0,0 +1,252 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\MessageInterface;
6
+ use Psr\Http\Message\RequestInterface;
7
+ use Psr\Http\Message\ResponseInterface;
8
+
9
+ final class Message
10
+ {
11
+ /**
12
+ * Returns the string representation of an HTTP message.
13
+ *
14
+ * @param MessageInterface $message Message to convert to a string.
15
+ *
16
+ * @return string
17
+ */
18
+ public static function toString(MessageInterface $message)
19
+ {
20
+ if ($message instanceof RequestInterface) {
21
+ $msg = trim($message->getMethod() . ' '
22
+ . $message->getRequestTarget())
23
+ . ' HTTP/' . $message->getProtocolVersion();
24
+ if (!$message->hasHeader('host')) {
25
+ $msg .= "\r\nHost: " . $message->getUri()->getHost();
26
+ }
27
+ } elseif ($message instanceof ResponseInterface) {
28
+ $msg = 'HTTP/' . $message->getProtocolVersion() . ' '
29
+ . $message->getStatusCode() . ' '
30
+ . $message->getReasonPhrase();
31
+ } else {
32
+ throw new \InvalidArgumentException('Unknown message type');
33
+ }
34
+
35
+ foreach ($message->getHeaders() as $name => $values) {
36
+ if (strtolower($name) === 'set-cookie') {
37
+ foreach ($values as $value) {
38
+ $msg .= "\r\n{$name}: " . $value;
39
+ }
40
+ } else {
41
+ $msg .= "\r\n{$name}: " . implode(', ', $values);
42
+ }
43
+ }
44
+
45
+ return "{$msg}\r\n\r\n" . $message->getBody();
46
+ }
47
+
48
+ /**
49
+ * Get a short summary of the message body.
50
+ *
51
+ * Will return `null` if the response is not printable.
52
+ *
53
+ * @param MessageInterface $message The message to get the body summary
54
+ * @param int $truncateAt The maximum allowed size of the summary
55
+ *
56
+ * @return string|null
57
+ */
58
+ public static function bodySummary(MessageInterface $message, $truncateAt = 120)
59
+ {
60
+ $body = $message->getBody();
61
+
62
+ if (!$body->isSeekable() || !$body->isReadable()) {
63
+ return null;
64
+ }
65
+
66
+ $size = $body->getSize();
67
+
68
+ if ($size === 0) {
69
+ return null;
70
+ }
71
+
72
+ $summary = $body->read($truncateAt);
73
+ $body->rewind();
74
+
75
+ if ($size > $truncateAt) {
76
+ $summary .= ' (truncated...)';
77
+ }
78
+
79
+ // Matches any printable character, including unicode characters:
80
+ // letters, marks, numbers, punctuation, spacing, and separators.
81
+ if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/u', $summary)) {
82
+ return null;
83
+ }
84
+
85
+ return $summary;
86
+ }
87
+
88
+ /**
89
+ * Attempts to rewind a message body and throws an exception on failure.
90
+ *
91
+ * The body of the message will only be rewound if a call to `tell()`
92
+ * returns a value other than `0`.
93
+ *
94
+ * @param MessageInterface $message Message to rewind
95
+ *
96
+ * @throws \RuntimeException
97
+ */
98
+ public static function rewindBody(MessageInterface $message)
99
+ {
100
+ $body = $message->getBody();
101
+
102
+ if ($body->tell()) {
103
+ $body->rewind();
104
+ }
105
+ }
106
+
107
+ /**
108
+ * Parses an HTTP message into an associative array.
109
+ *
110
+ * The array contains the "start-line" key containing the start line of
111
+ * the message, "headers" key containing an associative array of header
112
+ * array values, and a "body" key containing the body of the message.
113
+ *
114
+ * @param string $message HTTP request or response to parse.
115
+ *
116
+ * @return array
117
+ */
118
+ public static function parseMessage($message)
119
+ {
120
+ if (!$message) {
121
+ throw new \InvalidArgumentException('Invalid message');
122
+ }
123
+
124
+ $message = ltrim($message, "\r\n");
125
+
126
+ $messageParts = preg_split("/\r?\n\r?\n/", $message, 2);
127
+
128
+ if ($messageParts === false || count($messageParts) !== 2) {
129
+ throw new \InvalidArgumentException('Invalid message: Missing header delimiter');
130
+ }
131
+
132
+ list($rawHeaders, $body) = $messageParts;
133
+ $rawHeaders .= "\r\n"; // Put back the delimiter we split previously
134
+ $headerParts = preg_split("/\r?\n/", $rawHeaders, 2);
135
+
136
+ if ($headerParts === false || count($headerParts) !== 2) {
137
+ throw new \InvalidArgumentException('Invalid message: Missing status line');
138
+ }
139
+
140
+ list($startLine, $rawHeaders) = $headerParts;
141
+
142
+ if (preg_match("/(?:^HTTP\/|^[A-Z]+ \S+ HTTP\/)(\d+(?:\.\d+)?)/i", $startLine, $matches) && $matches[1] === '1.0') {
143
+ // Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0
144
+ $rawHeaders = preg_replace(Rfc7230::HEADER_FOLD_REGEX, ' ', $rawHeaders);
145
+ }
146
+
147
+ /** @var array[] $headerLines */
148
+ $count = preg_match_all(Rfc7230::HEADER_REGEX, $rawHeaders, $headerLines, PREG_SET_ORDER);
149
+
150
+ // If these aren't the same, then one line didn't match and there's an invalid header.
151
+ if ($count !== substr_count($rawHeaders, "\n")) {
152
+ // Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4
153
+ if (preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) {
154
+ throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding');
155
+ }
156
+
157
+ throw new \InvalidArgumentException('Invalid header syntax');
158
+ }
159
+
160
+ $headers = [];
161
+
162
+ foreach ($headerLines as $headerLine) {
163
+ $headers[$headerLine[1]][] = $headerLine[2];
164
+ }
165
+
166
+ return [
167
+ 'start-line' => $startLine,
168
+ 'headers' => $headers,
169
+ 'body' => $body,
170
+ ];
171
+ }
172
+
173
+ /**
174
+ * Constructs a URI for an HTTP request message.
175
+ *
176
+ * @param string $path Path from the start-line
177
+ * @param array $headers Array of headers (each value an array).
178
+ *
179
+ * @return string
180
+ */
181
+ public static function parseRequestUri($path, array $headers)
182
+ {
183
+ $hostKey = array_filter(array_keys($headers), function ($k) {
184
+ return strtolower($k) === 'host';
185
+ });
186
+
187
+ // If no host is found, then a full URI cannot be constructed.
188
+ if (!$hostKey) {
189
+ return $path;
190
+ }
191
+
192
+ $host = $headers[reset($hostKey)][0];
193
+ $scheme = substr($host, -4) === ':443' ? 'https' : 'http';
194
+
195
+ return $scheme . '://' . $host . '/' . ltrim($path, '/');
196
+ }
197
+
198
+ /**
199
+ * Parses a request message string into a request object.
200
+ *
201
+ * @param string $message Request message string.
202
+ *
203
+ * @return Request
204
+ */
205
+ public static function parseRequest($message)
206
+ {
207
+ $data = self::parseMessage($message);
208
+ $matches = [];
209
+ if (!preg_match('/^[\S]+\s+([a-zA-Z]+:\/\/|\/).*/', $data['start-line'], $matches)) {
210
+ throw new \InvalidArgumentException('Invalid request string');
211
+ }
212
+ $parts = explode(' ', $data['start-line'], 3);
213
+ $version = isset($parts[2]) ? explode('/', $parts[2])[1] : '1.1';
214
+
215
+ $request = new Request(
216
+ $parts[0],
217
+ $matches[1] === '/' ? self::parseRequestUri($parts[1], $data['headers']) : $parts[1],
218
+ $data['headers'],
219
+ $data['body'],
220
+ $version
221
+ );
222
+
223
+ return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]);
224
+ }
225
+
226
+ /**
227
+ * Parses a response message string into a response object.
228
+ *
229
+ * @param string $message Response message string.
230
+ *
231
+ * @return Response
232
+ */
233
+ public static function parseResponse($message)
234
+ {
235
+ $data = self::parseMessage($message);
236
+ // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space
237
+ // between status-code and reason-phrase is required. But browsers accept
238
+ // responses without space and reason as well.
239
+ if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) {
240
+ throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']);
241
+ }
242
+ $parts = explode(' ', $data['start-line'], 3);
243
+
244
+ return new Response(
245
+ (int) $parts[1],
246
+ $data['headers'],
247
+ $data['body'],
248
+ explode('/', $parts[0])[1],
249
+ isset($parts[2]) ? $parts[2] : null
250
+ );
251
+ }
252
+ }
vendor/guzzlehttp/psr7/src/MessageTrait.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
@@ -17,7 +18,7 @@ trait MessageTrait
17
  /** @var string */
18
  private $protocol = '1.1';
19
 
20
- /** @var StreamInterface */
21
  private $stream;
22
 
23
  public function getProtocolVersion()
@@ -117,7 +118,7 @@ trait MessageTrait
117
  public function getBody()
118
  {
119
  if (!$this->stream) {
120
- $this->stream = stream_for('');
121
  }
122
 
123
  return $this->stream;
@@ -194,7 +195,7 @@ trait MessageTrait
194
  }
195
 
196
  return trim((string) $value, " \t");
197
- }, $values);
198
  }
199
 
200
  private function assertHeader($header)
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
18
  /** @var string */
19
  private $protocol = '1.1';
20
 
21
+ /** @var StreamInterface|null */
22
  private $stream;
23
 
24
  public function getProtocolVersion()
118
  public function getBody()
119
  {
120
  if (!$this->stream) {
121
+ $this->stream = Utils::streamFor('');
122
  }
123
 
124
  return $this->stream;
195
  }
196
 
197
  return trim((string) $value, " \t");
198
+ }, array_values($values));
199
  }
200
 
201
  private function assertHeader($header)
vendor/guzzlehttp/psr7/src/MimeType.php ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ final class MimeType
6
+ {
7
+ /**
8
+ * Determines the mimetype of a file by looking at its extension.
9
+ *
10
+ * @param string $filename
11
+ *
12
+ * @return string|null
13
+ */
14
+ public static function fromFilename($filename)
15
+ {
16
+ return self::fromExtension(pathinfo($filename, PATHINFO_EXTENSION));
17
+ }
18
+
19
+ /**
20
+ * Maps a file extensions to a mimetype.
21
+ *
22
+ * @param string $extension string The file extension.
23
+ *
24
+ * @return string|null
25
+ *
26
+ * @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types
27
+ */
28
+ public static function fromExtension($extension)
29
+ {
30
+ static $mimetypes = [
31
+ '3gp' => 'video/3gpp',
32
+ '7z' => 'application/x-7z-compressed',
33
+ 'aac' => 'audio/x-aac',
34
+ 'ai' => 'application/postscript',
35
+ 'aif' => 'audio/x-aiff',
36
+ 'asc' => 'text/plain',
37
+ 'asf' => 'video/x-ms-asf',
38
+ 'atom' => 'application/atom+xml',
39
+ 'avi' => 'video/x-msvideo',
40
+ 'bmp' => 'image/bmp',
41
+ 'bz2' => 'application/x-bzip2',
42
+ 'cer' => 'application/pkix-cert',
43
+ 'crl' => 'application/pkix-crl',
44
+ 'crt' => 'application/x-x509-ca-cert',
45
+ 'css' => 'text/css',
46
+ 'csv' => 'text/csv',
47
+ 'cu' => 'application/cu-seeme',
48
+ 'deb' => 'application/x-debian-package',
49
+ 'doc' => 'application/msword',
50
+ 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
51
+ 'dvi' => 'application/x-dvi',
52
+ 'eot' => 'application/vnd.ms-fontobject',
53
+ 'eps' => 'application/postscript',
54
+ 'epub' => 'application/epub+zip',
55
+ 'etx' => 'text/x-setext',
56
+ 'flac' => 'audio/flac',
57
+ 'flv' => 'video/x-flv',
58
+ 'gif' => 'image/gif',
59
+ 'gz' => 'application/gzip',
60
+ 'htm' => 'text/html',
61
+ 'html' => 'text/html',
62
+ 'ico' => 'image/x-icon',
63
+ 'ics' => 'text/calendar',
64
+ 'ini' => 'text/plain',
65
+ 'iso' => 'application/x-iso9660-image',
66
+ 'jar' => 'application/java-archive',
67
+ 'jpe' => 'image/jpeg',
68
+ 'jpeg' => 'image/jpeg',
69
+ 'jpg' => 'image/jpeg',
70
+ 'js' => 'text/javascript',
71
+ 'json' => 'application/json',
72
+ 'latex' => 'application/x-latex',
73
+ 'log' => 'text/plain',
74
+ 'm4a' => 'audio/mp4',
75
+ 'm4v' => 'video/mp4',
76
+ 'mid' => 'audio/midi',
77
+ 'midi' => 'audio/midi',
78
+ 'mov' => 'video/quicktime',
79
+ 'mkv' => 'video/x-matroska',
80
+ 'mp3' => 'audio/mpeg',
81
+ 'mp4' => 'video/mp4',
82
+ 'mp4a' => 'audio/mp4',
83
+ 'mp4v' => 'video/mp4',
84
+ 'mpe' => 'video/mpeg',
85
+ 'mpeg' => 'video/mpeg',
86
+ 'mpg' => 'video/mpeg',
87
+ 'mpg4' => 'video/mp4',
88
+ 'oga' => 'audio/ogg',
89
+ 'ogg' => 'audio/ogg',
90
+ 'ogv' => 'video/ogg',
91
+ 'ogx' => 'application/ogg',
92
+ 'pbm' => 'image/x-portable-bitmap',
93
+ 'pdf' => 'application/pdf',
94
+ 'pgm' => 'image/x-portable-graymap',
95
+ 'png' => 'image/png',
96
+ 'pnm' => 'image/x-portable-anymap',
97
+ 'ppm' => 'image/x-portable-pixmap',
98
+ 'ppt' => 'application/vnd.ms-powerpoint',
99
+ 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
100
+ 'ps' => 'application/postscript',
101
+ 'qt' => 'video/quicktime',
102
+ 'rar' => 'application/x-rar-compressed',
103
+ 'ras' => 'image/x-cmu-raster',
104
+ 'rss' => 'application/rss+xml',
105
+ 'rtf' => 'application/rtf',
106
+ 'sgm' => 'text/sgml',
107
+ 'sgml' => 'text/sgml',
108
+ 'svg' => 'image/svg+xml',
109
+ 'swf' => 'application/x-shockwave-flash',
110
+ 'tar' => 'application/x-tar',
111
+ 'tif' => 'image/tiff',
112
+ 'tiff' => 'image/tiff',
113
+ 'torrent' => 'application/x-bittorrent',
114
+ 'ttf' => 'application/x-font-ttf',
115
+ 'txt' => 'text/plain',
116
+ 'wav' => 'audio/x-wav',
117
+ 'webm' => 'video/webm',
118
+ 'webp' => 'image/webp',
119
+ 'wma' => 'audio/x-ms-wma',
120
+ 'wmv' => 'video/x-ms-wmv',
121
+ 'woff' => 'application/x-font-woff',
122
+ 'wsdl' => 'application/wsdl+xml',
123
+ 'xbm' => 'image/x-xbitmap',
124
+ 'xls' => 'application/vnd.ms-excel',
125
+ 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
126
+ 'xml' => 'application/xml',
127
+ 'xpm' => 'image/x-xpixmap',
128
+ 'xwd' => 'image/x-xwindowdump',
129
+ 'yaml' => 'text/yaml',
130
+ 'yml' => 'text/yaml',
131
+ 'zip' => 'application/zip',
132
+ ];
133
+
134
+ $extension = strtolower($extension);
135
+
136
+ return isset($mimetypes[$extension])
137
+ ? $mimetypes[$extension]
138
+ : null;
139
+ }
140
+ }
vendor/guzzlehttp/psr7/src/MultipartStream.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
@@ -71,7 +72,7 @@ class MultipartStream implements StreamInterface
71
  }
72
 
73
  // Add the trailing boundary with CRLF
74
- $stream->addStream(stream_for("--{$this->boundary}--\r\n"));
75
 
76
  return $stream;
77
  }
@@ -84,7 +85,7 @@ class MultipartStream implements StreamInterface
84
  }
85
  }
86
 
87
- $element['contents'] = stream_for($element['contents']);
88
 
89
  if (empty($element['filename'])) {
90
  $uri = $element['contents']->getMetadata('uri');
@@ -100,9 +101,9 @@ class MultipartStream implements StreamInterface
100
  isset($element['headers']) ? $element['headers'] : []
101
  );
102
 
103
- $stream->addStream(stream_for($this->getHeaders($headers)));
104
  $stream->addStream($body);
105
- $stream->addStream(stream_for("\r\n"));
106
  }
107
 
108
  /**
@@ -131,7 +132,7 @@ class MultipartStream implements StreamInterface
131
  // Set a default Content-Type if one was not supplied
132
  $type = $this->getHeader($headers, 'content-type');
133
  if (!$type && ($filename === '0' || $filename)) {
134
- if ($type = mimetype_from_filename($filename)) {
135
  $headers['Content-Type'] = $type;
136
  }
137
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
72
  }
73
 
74
  // Add the trailing boundary with CRLF
75
+ $stream->addStream(Utils::streamFor("--{$this->boundary}--\r\n"));
76
 
77
  return $stream;
78
  }
85
  }
86
  }
87
 
88
+ $element['contents'] = Utils::streamFor($element['contents']);
89
 
90
  if (empty($element['filename'])) {
91
  $uri = $element['contents']->getMetadata('uri');
101
  isset($element['headers']) ? $element['headers'] : []
102
  );
103
 
104
+ $stream->addStream(Utils::streamFor($this->getHeaders($headers)));
105
  $stream->addStream($body);
106
+ $stream->addStream(Utils::streamFor("\r\n"));
107
  }
108
 
109
  /**
132
  // Set a default Content-Type if one was not supplied
133
  $type = $this->getHeader($headers, 'content-type');
134
  if (!$type && ($filename === '0' || $filename)) {
135
+ if ($type = MimeType::fromFilename($filename)) {
136
  $headers['Content-Type'] = $type;
137
  }
138
  }
vendor/guzzlehttp/psr7/src/NoSeekStream.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
vendor/guzzlehttp/psr7/src/PumpStream.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
@@ -51,7 +52,7 @@ class PumpStream implements StreamInterface
51
  public function __toString()
52
  {
53
  try {
54
- return copy_to_string($this);
55
  } catch (\Exception $e) {
56
  return '';
57
  }
@@ -66,6 +67,8 @@ class PumpStream implements StreamInterface
66
  {
67
  $this->tellPos = false;
68
  $this->source = null;
 
 
69
  }
70
 
71
  public function getSize()
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
52
  public function __toString()
53
  {
54
  try {
55
+ return Utils::copyToString($this);
56
  } catch (\Exception $e) {
57
  return '';
58
  }
67
  {
68
  $this->tellPos = false;
69
  $this->source = null;
70
+
71
+ return null;
72
  }
73
 
74
  public function getSize()
vendor/guzzlehttp/psr7/src/Query.php ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ final class Query
6
+ {
7
+ /**
8
+ * Parse a query string into an associative array.
9
+ *
10
+ * If multiple values are found for the same key, the value of that key
11
+ * value pair will become an array. This function does not parse nested
12
+ * PHP style arrays into an associative array (e.g., `foo[a]=1&foo[b]=2`
13
+ * will be parsed into `['foo[a]' => '1', 'foo[b]' => '2'])`.
14
+ *
15
+ * @param string $str Query string to parse
16
+ * @param int|bool $urlEncoding How the query string is encoded
17
+ *
18
+ * @return array
19
+ */
20
+ public static function parse($str, $urlEncoding = true)
21
+ {
22
+ $result = [];
23
+
24
+ if ($str === '') {
25
+ return $result;
26
+ }
27
+
28
+ if ($urlEncoding === true) {
29
+ $decoder = function ($value) {
30
+ return rawurldecode(str_replace('+', ' ', $value));
31
+ };
32
+ } elseif ($urlEncoding === PHP_QUERY_RFC3986) {
33
+ $decoder = 'rawurldecode';
34
+ } elseif ($urlEncoding === PHP_QUERY_RFC1738) {
35
+ $decoder = 'urldecode';
36
+ } else {
37
+ $decoder = function ($str) { return $str; };
38
+ }
39
+
40
+ foreach (explode('&', $str) as $kvp) {
41
+ $parts = explode('=', $kvp, 2);
42
+ $key = $decoder($parts[0]);
43
+ $value = isset($parts[1]) ? $decoder($parts[1]) : null;
44
+ if (!isset($result[$key])) {
45
+ $result[$key] = $value;
46
+ } else {
47
+ if (!is_array($result[$key])) {
48
+ $result[$key] = [$result[$key]];
49
+ }
50
+ $result[$key][] = $value;
51
+ }
52
+ }
53
+
54
+ return $result;
55
+ }
56
+
57
+ /**
58
+ * Build a query string from an array of key value pairs.
59
+ *
60
+ * This function can use the return value of `parse()` to build a query
61
+ * string. This function does not modify the provided keys when an array is
62
+ * encountered (like `http_build_query()` would).
63
+ *
64
+ * @param array $params Query string parameters.
65
+ * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
66
+ * to encode using RFC3986, or PHP_QUERY_RFC1738
67
+ * to encode using RFC1738.
68
+ * @return string
69
+ */
70
+ public static function build(array $params, $encoding = PHP_QUERY_RFC3986)
71
+ {
72
+ if (!$params) {
73
+ return '';
74
+ }
75
+
76
+ if ($encoding === false) {
77
+ $encoder = function ($str) { return $str; };
78
+ } elseif ($encoding === PHP_QUERY_RFC3986) {
79
+ $encoder = 'rawurlencode';
80
+ } elseif ($encoding === PHP_QUERY_RFC1738) {
81
+ $encoder = 'urlencode';
82
+ } else {
83
+ throw new \InvalidArgumentException('Invalid type');
84
+ }
85
+
86
+ $qs = '';
87
+ foreach ($params as $k => $v) {
88
+ $k = $encoder($k);
89
+ if (!is_array($v)) {
90
+ $qs .= $k;
91
+ if ($v !== null) {
92
+ $qs .= '=' . $encoder($v);
93
+ }
94
+ $qs .= '&';
95
+ } else {
96
+ foreach ($v as $vv) {
97
+ $qs .= $k;
98
+ if ($vv !== null) {
99
+ $qs .= '=' . $encoder($vv);
100
+ }
101
+ $qs .= '&';
102
+ }
103
+ }
104
+ }
105
+
106
+ return $qs ? (string) substr($qs, 0, -1) : '';
107
+ }
108
+ }
vendor/guzzlehttp/psr7/src/Request.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use InvalidArgumentException;
@@ -51,7 +52,7 @@ class Request implements RequestInterface
51
  }
52
 
53
  if ($body !== '' && $body !== null) {
54
- $this->stream = stream_for($body);
55
  }
56
  }
57
 
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use InvalidArgumentException;
52
  }
53
 
54
  if ($body !== '' && $body !== null) {
55
+ $this->stream = Utils::streamFor($body);
56
  }
57
  }
58
 
vendor/guzzlehttp/psr7/src/Response.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\ResponseInterface;
@@ -100,7 +101,7 @@ class Response implements ResponseInterface
100
  $this->statusCode = $status;
101
 
102
  if ($body !== '' && $body !== null) {
103
- $this->stream = stream_for($body);
104
  }
105
 
106
  $this->setHeaders($headers);
@@ -134,7 +135,7 @@ class Response implements ResponseInterface
134
  if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) {
135
  $reasonPhrase = self::$phrases[$new->statusCode];
136
  }
137
- $new->reasonPhrase = $reasonPhrase;
138
  return $new;
139
  }
140
 
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\ResponseInterface;
101
  $this->statusCode = $status;
102
 
103
  if ($body !== '' && $body !== null) {
104
+ $this->stream = Utils::streamFor($body);
105
  }
106
 
107
  $this->setHeaders($headers);
135
  if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) {
136
  $reasonPhrase = self::$phrases[$new->statusCode];
137
  }
138
+ $new->reasonPhrase = (string) $reasonPhrase;
139
  return $new;
140
  }
141
 
vendor/guzzlehttp/psr7/src/ServerRequest.php CHANGED
@@ -79,8 +79,10 @@ class ServerRequest extends Request implements ServerRequestInterface
79
  * Return an UploadedFile instance array.
80
  *
81
  * @param array $files A array which respect $_FILES structure
82
- * @throws InvalidArgumentException for unrecognized values
83
  * @return array
 
 
84
  */
85
  public static function normalizeFiles(array $files)
86
  {
79
  * Return an UploadedFile instance array.
80
  *
81
  * @param array $files A array which respect $_FILES structure
82
+ *
83
  * @return array
84
+ *
85
+ * @throws InvalidArgumentException for unrecognized values
86
  */
87
  public static function normalizeFiles(array $files)
88
  {
vendor/guzzlehttp/psr7/src/Stream.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
@@ -76,8 +77,10 @@ class Stream implements StreamInterface
76
  public function __toString()
77
  {
78
  try {
79
- $this->seek(0);
80
- return (string) stream_get_contents($this->stream);
 
 
81
  } catch (\Exception $e) {
82
  return '';
83
  }
@@ -193,7 +196,7 @@ class Stream implements StreamInterface
193
  public function seek($offset, $whence = SEEK_SET)
194
  {
195
  $whence = (int) $whence;
196
-
197
  if (!isset($this->stream)) {
198
  throw new \RuntimeException('Stream is detached');
199
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
77
  public function __toString()
78
  {
79
  try {
80
+ if ($this->isSeekable()) {
81
+ $this->seek(0);
82
+ }
83
+ return $this->getContents();
84
  } catch (\Exception $e) {
85
  return '';
86
  }
196
  public function seek($offset, $whence = SEEK_SET)
197
  {
198
  $whence = (int) $whence;
199
+
200
  if (!isset($this->stream)) {
201
  throw new \RuntimeException('Stream is detached');
202
  }
vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
@@ -52,7 +53,7 @@ trait StreamDecoratorTrait
52
 
53
  public function getContents()
54
  {
55
- return copy_to_string($this);
56
  }
57
 
58
  /**
@@ -140,6 +141,7 @@ trait StreamDecoratorTrait
140
  * Implement in subclasses to dynamically create streams when requested.
141
  *
142
  * @return StreamInterface
 
143
  * @throws \BadMethodCallException
144
  */
145
  protected function createStream()
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
53
 
54
  public function getContents()
55
  {
56
+ return Utils::copyToString($this);
57
  }
58
 
59
  /**
141
  * Implement in subclasses to dynamically create streams when requested.
142
  *
143
  * @return StreamInterface
144
+ *
145
  * @throws \BadMethodCallException
146
  */
147
  protected function createStream()
vendor/guzzlehttp/psr7/src/StreamWrapper.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\StreamInterface;
@@ -23,6 +24,7 @@ class StreamWrapper
23
  * @param StreamInterface $stream The stream to get a resource for
24
  *
25
  * @return resource
 
26
  * @throws \InvalidArgumentException if stream is not readable or writable
27
  */
28
  public static function getResource(StreamInterface $stream)
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\StreamInterface;
24
  * @param StreamInterface $stream The stream to get a resource for
25
  *
26
  * @return resource
27
+ *
28
  * @throws \InvalidArgumentException if stream is not readable or writable
29
  */
30
  public static function getResource(StreamInterface $stream)
vendor/guzzlehttp/psr7/src/UploadedFile.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use InvalidArgumentException;
@@ -85,6 +86,7 @@ class UploadedFile implements UploadedFileInterface
85
  * Depending on the value set file or stream variable
86
  *
87
  * @param mixed $streamOrFile
 
88
  * @throws InvalidArgumentException
89
  */
90
  private function setStreamOrFile($streamOrFile)
@@ -104,6 +106,7 @@ class UploadedFile implements UploadedFileInterface
104
 
105
  /**
106
  * @param int $error
 
107
  * @throws InvalidArgumentException
108
  */
109
  private function setError($error)
@@ -125,6 +128,7 @@ class UploadedFile implements UploadedFileInterface
125
 
126
  /**
127
  * @param int $size
 
128
  * @throws InvalidArgumentException
129
  */
130
  private function setSize($size)
@@ -158,6 +162,7 @@ class UploadedFile implements UploadedFileInterface
158
 
159
  /**
160
  * @param string|null $clientFilename
 
161
  * @throws InvalidArgumentException
162
  */
163
  private function setClientFilename($clientFilename)
@@ -173,6 +178,7 @@ class UploadedFile implements UploadedFileInterface
173
 
174
  /**
175
  * @param string|null $clientMediaType
 
176
  * @throws InvalidArgumentException
177
  */
178
  private function setClientMediaType($clientMediaType)
@@ -220,6 +226,7 @@ class UploadedFile implements UploadedFileInterface
220
 
221
  /**
222
  * {@inheritdoc}
 
223
  * @throws RuntimeException if the upload was not successful.
224
  */
225
  public function getStream()
@@ -238,7 +245,9 @@ class UploadedFile implements UploadedFileInterface
238
  *
239
  * @see http://php.net/is_uploaded_file
240
  * @see http://php.net/move_uploaded_file
 
241
  * @param string $targetPath Path to which to move the uploaded file.
 
242
  * @throws RuntimeException if the upload was not successful.
243
  * @throws InvalidArgumentException if the $path specified is invalid.
244
  * @throws RuntimeException on any error during the move operation, or on
@@ -259,7 +268,7 @@ class UploadedFile implements UploadedFileInterface
259
  ? rename($this->file, $targetPath)
260
  : move_uploaded_file($this->file, $targetPath);
261
  } else {
262
- copy_to_stream(
263
  $this->getStream(),
264
  new LazyOpenStream($targetPath, 'w')
265
  );
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use InvalidArgumentException;
86
  * Depending on the value set file or stream variable
87
  *
88
  * @param mixed $streamOrFile
89
+ *
90
  * @throws InvalidArgumentException
91
  */
92
  private function setStreamOrFile($streamOrFile)
106
 
107
  /**
108
  * @param int $error
109
+ *
110
  * @throws InvalidArgumentException
111
  */
112
  private function setError($error)
128
 
129
  /**
130
  * @param int $size
131
+ *
132
  * @throws InvalidArgumentException
133
  */
134
  private function setSize($size)
162
 
163
  /**
164
  * @param string|null $clientFilename
165
+ *
166
  * @throws InvalidArgumentException
167
  */
168
  private function setClientFilename($clientFilename)
178
 
179
  /**
180
  * @param string|null $clientMediaType
181
+ *
182
  * @throws InvalidArgumentException
183
  */
184
  private function setClientMediaType($clientMediaType)
226
 
227
  /**
228
  * {@inheritdoc}
229
+ *
230
  * @throws RuntimeException if the upload was not successful.
231
  */
232
  public function getStream()
245
  *
246
  * @see http://php.net/is_uploaded_file
247
  * @see http://php.net/move_uploaded_file
248
+ *
249
  * @param string $targetPath Path to which to move the uploaded file.
250
+ *
251
  * @throws RuntimeException if the upload was not successful.
252
  * @throws InvalidArgumentException if the $path specified is invalid.
253
  * @throws RuntimeException on any error during the move operation, or on
268
  ? rename($this->file, $targetPath)
269
  : move_uploaded_file($this->file, $targetPath);
270
  } else {
271
+ Utils::copyToStream(
272
  $this->getStream(),
273
  new LazyOpenStream($targetPath, 'w')
274
  );
vendor/guzzlehttp/psr7/src/Uri.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\UriInterface;
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\UriInterface;
vendor/guzzlehttp/psr7/src/UriNormalizer.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\UriInterface;
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\UriInterface;
vendor/guzzlehttp/psr7/src/UriResolver.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\UriInterface;
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\UriInterface;
vendor/guzzlehttp/psr7/src/Utils.php ADDED
@@ -0,0 +1,398 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace GuzzleHttp\Psr7;
4
+
5
+ use Psr\Http\Message\RequestInterface;
6
+ use Psr\Http\Message\ServerRequestInterface;
7
+ use Psr\Http\Message\StreamInterface;
8
+ use Psr\Http\Message\UriInterface;
9
+
10
+ final class Utils
11
+ {
12
+ /**
13
+ * Remove the items given by the keys, case insensitively from the data.
14
+ *
15
+ * @param iterable<string> $keys
16
+ *
17
+ * @return array
18
+ */
19
+ public static function caselessRemove($keys, array $data)
20
+ {
21
+ $result = [];
22
+
23
+ foreach ($keys as &$key) {
24
+ $key = strtolower($key);
25
+ }
26
+
27
+ foreach ($data as $k => $v) {
28
+ if (!in_array(strtolower($k), $keys)) {
29
+ $result[$k] = $v;
30
+ }
31
+ }
32
+
33
+ return $result;
34
+ }
35
+
36
+ /**
37
+ * Copy the contents of a stream into another stream until the given number
38
+ * of bytes have been read.
39
+ *
40
+ * @param StreamInterface $source Stream to read from
41
+ * @param StreamInterface $dest Stream to write to
42
+ * @param int $maxLen Maximum number of bytes to read. Pass -1
43
+ * to read the entire stream.
44
+ *
45
+ * @throws \RuntimeException on error.
46
+ */
47
+ public static function copyToStream(StreamInterface $source, StreamInterface $dest, $maxLen = -1)
48
+ {
49
+ $bufferSize = 8192;
50
+
51
+ if ($maxLen === -1) {
52
+ while (!$source->eof()) {
53
+ if (!$dest->write($source->read($bufferSize))) {
54
+ break;
55
+ }
56
+ }
57
+ } else {
58
+ $remaining = $maxLen;
59
+ while ($remaining > 0 && !$source->eof()) {
60
+ $buf = $source->read(min($bufferSize, $remaining));
61
+ $len = strlen($buf);
62
+ if (!$len) {
63
+ break;
64
+ }
65
+ $remaining -= $len;
66
+ $dest->write($buf);
67
+ }
68
+ }
69
+ }
70
+
71
+ /**
72
+ * Copy the contents of a stream into a string until the given number of
73
+ * bytes have been read.
74
+ *
75
+ * @param StreamInterface $stream Stream to read
76
+ * @param int $maxLen Maximum number of bytes to read. Pass -1
77
+ * to read the entire stream.
78
+ * @return string
79
+ *
80
+ * @throws \RuntimeException on error.
81
+ */
82
+ public static function copyToString(StreamInterface $stream, $maxLen = -1)
83
+ {
84
+ $buffer = '';
85
+
86
+ if ($maxLen === -1) {
87
+ while (!$stream->eof()) {
88
+ $buf = $stream->read(1048576);
89
+ // Using a loose equality here to match on '' and false.
90
+ if ($buf == null) {
91
+ break;
92
+ }
93
+ $buffer .= $buf;
94
+ }
95
+ return $buffer;
96
+ }
97
+
98
+ $len = 0;
99
+ while (!$stream->eof() && $len < $maxLen) {
100
+ $buf = $stream->read($maxLen - $len);
101
+ // Using a loose equality here to match on '' and false.
102
+ if ($buf == null) {
103
+ break;
104
+ }
105
+ $buffer .= $buf;
106
+ $len = strlen($buffer);
107
+ }
108
+
109
+ return $buffer;
110
+ }
111
+
112
+ /**
113
+ * Calculate a hash of a stream.
114
+ *
115
+ * This method reads the entire stream to calculate a rolling hash, based
116
+ * on PHP's `hash_init` functions.
117
+ *
118
+ * @param StreamInterface $stream Stream to calculate the hash for
119
+ * @param string $algo Hash algorithm (e.g. md5, crc32, etc)
120
+ * @param bool $rawOutput Whether or not to use raw output
121
+ *
122
+ * @return string Returns the hash of the stream
123
+ *
124
+ * @throws \RuntimeException on error.
125
+ */
126
+ public static function hash(StreamInterface $stream, $algo, $rawOutput = false)
127
+ {
128
+ $pos = $stream->tell();
129
+
130
+ if ($pos > 0) {
131
+ $stream->rewind();
132
+ }
133
+
134
+ $ctx = hash_init($algo);
135
+ while (!$stream->eof()) {
136
+ hash_update($ctx, $stream->read(1048576));
137
+ }
138
+
139
+ $out = hash_final($ctx, (bool) $rawOutput);
140
+ $stream->seek($pos);
141
+
142
+ return $out;
143
+ }
144
+
145
+ /**
146
+ * Clone and modify a request with the given changes.
147
+ *
148
+ * This method is useful for reducing the number of clones needed to mutate
149
+ * a message.
150
+ *
151
+ * The changes can be one of:
152
+ * - method: (string) Changes the HTTP method.
153
+ * - set_headers: (array) Sets the given headers.
154
+ * - remove_headers: (array) Remove the given headers.
155
+ * - body: (mixed) Sets the given body.
156
+ * - uri: (UriInterface) Set the URI.
157
+ * - query: (string) Set the query string value of the URI.
158
+ * - version: (string) Set the protocol version.
159
+ *
160
+ * @param RequestInterface $request Request to clone and modify.
161
+ * @param array $changes Changes to apply.
162
+ *
163
+ * @return RequestInterface
164
+ */
165
+ public static function modifyRequest(RequestInterface $request, array $changes)
166
+ {
167
+ if (!$changes) {
168
+ return $request;
169
+ }
170
+
171
+ $headers = $request->getHeaders();
172
+
173
+ if (!isset($changes['uri'])) {
174
+ $uri = $request->getUri();
175
+ } else {
176
+ // Remove the host header if one is on the URI
177
+ if ($host = $changes['uri']->getHost()) {
178
+ $changes['set_headers']['Host'] = $host;
179
+
180
+ if ($port = $changes['uri']->getPort()) {
181
+ $standardPorts = ['http' => 80, 'https' => 443];
182
+ $scheme = $changes['uri']->getScheme();
183
+ if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) {
184
+ $changes['set_headers']['Host'] .= ':'.$port;
185
+ }
186
+ }
187
+ }
188
+ $uri = $changes['uri'];
189
+ }
190
+
191
+ if (!empty($changes['remove_headers'])) {
192
+ $headers = self::caselessRemove($changes['remove_headers'], $headers);
193
+ }
194
+
195
+ if (!empty($changes['set_headers'])) {
196
+ $headers = self::caselessRemove(array_keys($changes['set_headers']), $headers);
197
+ $headers = $changes['set_headers'] + $headers;
198
+ }
199
+
200
+ if (isset($changes['query'])) {
201
+ $uri = $uri->withQuery($changes['query']);
202
+ }
203
+
204
+ if ($request instanceof ServerRequestInterface) {
205
+ return (new ServerRequest(
206
+ isset($changes['method']) ? $changes['method'] : $request->getMethod(),
207
+ $uri,
208
+ $headers,
209
+ isset($changes['body']) ? $changes['body'] : $request->getBody(),
210
+ isset($changes['version'])
211
+ ? $changes['version']
212
+ : $request->getProtocolVersion(),
213
+ $request->getServerParams()
214
+ ))
215
+ ->withParsedBody($request->getParsedBody())
216
+ ->withQueryParams($request->getQueryParams())
217
+ ->withCookieParams($request->getCookieParams())
218
+ ->withUploadedFiles($request->getUploadedFiles());
219
+ }
220
+
221
+ return new Request(
222
+ isset($changes['method']) ? $changes['method'] : $request->getMethod(),
223
+ $uri,
224
+ $headers,
225
+ isset($changes['body']) ? $changes['body'] : $request->getBody(),
226
+ isset($changes['version'])
227
+ ? $changes['version']
228
+ : $request->getProtocolVersion()
229
+ );
230
+ }
231
+
232
+ /**
233
+ * Read a line from the stream up to the maximum allowed buffer length.
234
+ *
235
+ * @param StreamInterface $stream Stream to read from
236
+ * @param int|null $maxLength Maximum buffer length
237
+ *
238
+ * @return string
239
+ */
240
+ public static function readLine(StreamInterface $stream, $maxLength = null)
241
+ {
242
+ $buffer = '';
243
+ $size = 0;
244
+
245
+ while (!$stream->eof()) {
246
+ // Using a loose equality here to match on '' and false.
247
+ if (null == ($byte = $stream->read(1))) {
248
+ return $buffer;
249
+ }
250
+ $buffer .= $byte;
251
+ // Break when a new line is found or the max length - 1 is reached
252
+ if ($byte === "\n" || ++$size === $maxLength - 1) {
253
+ break;
254
+ }
255
+ }
256
+
257
+ return $buffer;
258
+ }
259
+
260
+ /**
261
+ * Create a new stream based on the input type.
262
+ *
263
+ * Options is an associative array that can contain the following keys:
264
+ * - metadata: Array of custom metadata.
265
+ * - size: Size of the stream.
266
+ *
267
+ * This method accepts the following `$resource` types:
268
+ * - `Psr\Http\Message\StreamInterface`: Returns the value as-is.
269
+ * - `string`: Creates a stream object that uses the given string as the contents.
270
+ * - `resource`: Creates a stream object that wraps the given PHP stream resource.
271
+ * - `Iterator`: If the provided value implements `Iterator`, then a read-only
272
+ * stream object will be created that wraps the given iterable. Each time the
273
+ * stream is read from, data from the iterator will fill a buffer and will be
274
+ * continuously called until the buffer is equal to the requested read size.
275
+ * Subsequent read calls will first read from the buffer and then call `next`
276
+ * on the underlying iterator until it is exhausted.
277
+ * - `object` with `__toString()`: If the object has the `__toString()` method,
278
+ * the object will be cast to a string and then a stream will be returned that
279
+ * uses the string value.
280
+ * - `NULL`: When `null` is passed, an empty stream object is returned.
281
+ * - `callable` When a callable is passed, a read-only stream object will be
282
+ * created that invokes the given callable. The callable is invoked with the
283
+ * number of suggested bytes to read. The callable can return any number of
284
+ * bytes, but MUST return `false` when there is no more data to return. The
285
+ * stream object that wraps the callable will invoke the callable until the
286
+ * number of requested bytes are available. Any additional bytes will be
287
+ * buffered and used in subsequent reads.
288
+ *
289
+ * @param resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource Entity body data
290
+ * @param array $options Additional options
291
+ *
292
+ * @return StreamInterface
293
+ *
294
+ * @throws \InvalidArgumentException if the $resource arg is not valid.
295
+ */
296
+ public static function streamFor($resource = '', array $options = [])
297
+ {
298
+ if (is_scalar($resource)) {
299
+ $stream = fopen('php://temp', 'r+');
300
+ if ($resource !== '') {
301
+ fwrite($stream, $resource);
302
+ fseek($stream, 0);
303
+ }
304
+ return new Stream($stream, $options);
305
+ }
306
+
307
+ switch (gettype($resource)) {
308
+ case 'resource':
309
+ return new Stream($resource, $options);
310
+ case 'object':
311
+ if ($resource instanceof StreamInterface) {
312
+ return $resource;
313
+ } elseif ($resource instanceof \Iterator) {
314
+ return new PumpStream(function () use ($resource) {
315
+ if (!$resource->valid()) {
316
+ return false;
317
+ }
318
+ $result = $resource->current();
319
+ $resource->next();
320
+ return $result;
321
+ }, $options);
322
+ } elseif (method_exists($resource, '__toString')) {
323
+ return Utils::streamFor((string) $resource, $options);
324
+ }
325
+ break;
326
+ case 'NULL':
327
+ return new Stream(fopen('php://temp', 'r+'), $options);
328
+ }
329
+
330
+ if (is_callable($resource)) {
331
+ return new PumpStream($resource, $options);
332
+ }
333
+
334
+ throw new \InvalidArgumentException('Invalid resource type: ' . gettype($resource));
335
+ }
336
+
337
+ /**
338
+ * Safely opens a PHP stream resource using a filename.
339
+ *
340
+ * When fopen fails, PHP normally raises a warning. This function adds an
341
+ * error handler that checks for errors and throws an exception instead.
342
+ *
343
+ * @param string $filename File to open
344
+ * @param string $mode Mode used to open the file
345
+ *
346
+ * @return resource
347
+ *
348
+ * @throws \RuntimeException if the file cannot be opened
349
+ */
350
+ public static function tryFopen($filename, $mode)
351
+ {
352
+ $ex = null;
353
+ set_error_handler(function () use ($filename, $mode, &$ex) {
354
+ $ex = new \RuntimeException(sprintf(
355
+ 'Unable to open %s using mode %s: %s',
356
+ $filename,
357
+ $mode,
358
+ func_get_args()[1]
359
+ ));
360
+ });
361
+
362
+ $handle = fopen($filename, $mode);
363
+ restore_error_handler();
364
+
365
+ if ($ex) {
366
+ /** @var $ex \RuntimeException */
367
+ throw $ex;
368
+ }
369
+
370
+ return $handle;
371
+ }
372
+
373
+ /**
374
+ * Returns a UriInterface for the given value.
375
+ *
376
+ * This function accepts a string or UriInterface and returns a
377
+ * UriInterface for the given value. If the value is already a
378
+ * UriInterface, it is returned as-is.
379
+ *
380
+ * @param string|UriInterface $uri
381
+ *
382
+ * @return UriInterface
383
+ *
384
+ * @throws \InvalidArgumentException
385
+ */
386
+ public static function uriFor($uri)
387
+ {
388
+ if ($uri instanceof UriInterface) {
389
+ return $uri;
390
+ }
391
+
392
+ if (is_string($uri)) {
393
+ return new Uri($uri);
394
+ }
395
+
396
+ throw new \InvalidArgumentException('URI must be a string or UriInterface');
397
+ }
398
+ }
vendor/guzzlehttp/psr7/src/functions.php CHANGED
@@ -1,10 +1,9 @@
1
  <?php
 
2
  namespace GuzzleHttp\Psr7;
3
 
4
  use Psr\Http\Message\MessageInterface;
5
  use Psr\Http\Message\RequestInterface;
6
- use Psr\Http\Message\ResponseInterface;
7
- use Psr\Http\Message\ServerRequestInterface;
8
  use Psr\Http\Message\StreamInterface;
9
  use Psr\Http\Message\UriInterface;
10
 
@@ -14,52 +13,32 @@ use Psr\Http\Message\UriInterface;
14
  * @param MessageInterface $message Message to convert to a string.
15
  *
16
  * @return string
 
 
17
  */
18
  function str(MessageInterface $message)
19
  {
20
- if ($message instanceof RequestInterface) {
21
- $msg = trim($message->getMethod() . ' '
22
- . $message->getRequestTarget())
23
- . ' HTTP/' . $message->getProtocolVersion();
24
- if (!$message->hasHeader('host')) {
25
- $msg .= "\r\nHost: " . $message->getUri()->getHost();
26
- }
27
- } elseif ($message instanceof ResponseInterface) {
28
- $msg = 'HTTP/' . $message->getProtocolVersion() . ' '
29
- . $message->getStatusCode() . ' '
30
- . $message->getReasonPhrase();
31
- } else {
32
- throw new \InvalidArgumentException('Unknown message type');
33
- }
34
-
35
- foreach ($message->getHeaders() as $name => $values) {
36
- $msg .= "\r\n{$name}: " . implode(', ', $values);
37
- }
38
-
39
- return "{$msg}\r\n\r\n" . $message->getBody();
40
  }
41
 
42
  /**
43
  * Returns a UriInterface for the given value.
44
  *
45
- * This function accepts a string or {@see Psr\Http\Message\UriInterface} and
46
- * returns a UriInterface for the given value. If the value is already a
47
- * `UriInterface`, it is returned as-is.
48
  *
49
  * @param string|UriInterface $uri
50
  *
51
  * @return UriInterface
 
52
  * @throws \InvalidArgumentException
 
 
53
  */
54
  function uri_for($uri)
55
  {
56
- if ($uri instanceof UriInterface) {
57
- return $uri;
58
- } elseif (is_string($uri)) {
59
- return new Uri($uri);
60
- }
61
-
62
- throw new \InvalidArgumentException('URI must be a string or UriInterface');
63
  }
64
 
65
  /**
@@ -69,86 +48,57 @@ function uri_for($uri)
69
  * - metadata: Array of custom metadata.
70
  * - size: Size of the stream.
71
  *
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  * @param resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource Entity body data
73
  * @param array $options Additional options
74
  *
75
  * @return StreamInterface
 
76
  * @throws \InvalidArgumentException if the $resource arg is not valid.
 
 
77
  */
78
  function stream_for($resource = '', array $options = [])
79
  {
80
- if (is_scalar($resource)) {
81
- $stream = fopen('php://temp', 'r+');
82
- if ($resource !== '') {
83
- fwrite($stream, $resource);
84
- fseek($stream, 0);
85
- }
86
- return new Stream($stream, $options);
87
- }
88
-
89
- switch (gettype($resource)) {
90
- case 'resource':
91
- return new Stream($resource, $options);
92
- case 'object':
93
- if ($resource instanceof StreamInterface) {
94
- return $resource;
95
- } elseif ($resource instanceof \Iterator) {
96
- return new PumpStream(function () use ($resource) {
97
- if (!$resource->valid()) {
98
- return false;
99
- }
100
- $result = $resource->current();
101
- $resource->next();
102
- return $result;
103
- }, $options);
104
- } elseif (method_exists($resource, '__toString')) {
105
- return stream_for((string) $resource, $options);
106
- }
107
- break;
108
- case 'NULL':
109
- return new Stream(fopen('php://temp', 'r+'), $options);
110
- }
111
-
112
- if (is_callable($resource)) {
113
- return new PumpStream($resource, $options);
114
- }
115
-
116
- throw new \InvalidArgumentException('Invalid resource type: ' . gettype($resource));
117
  }
118
 
119
  /**
120
  * Parse an array of header values containing ";" separated data into an
121
- * array of associative arrays representing the header key value pair
122
- * data of the header. When a parameter does not contain a value, but just
123
  * contains a key, this function will inject a key with a '' string value.
124
  *
125
  * @param string|array $header Header to parse into components.
126
  *
127
  * @return array Returns the parsed header values.
 
 
128
  */
129
  function parse_header($header)
130
  {
131
- static $trimmed = "\"' \n\t\r";
132
- $params = $matches = [];
133
-
134
- foreach (normalize_header($header) as $val) {
135
- $part = [];
136
- foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) {
137
- if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) {
138
- $m = $matches[0];
139
- if (isset($m[1])) {
140
- $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed);
141
- } else {
142
- $part[] = trim($m[0], $trimmed);
143
- }
144
- }
145
- }
146
- if ($part) {
147
- $params[] = $part;
148
- }
149
- }
150
-
151
- return $params;
152
  }
153
 
154
  /**
@@ -158,32 +108,20 @@ function parse_header($header)
158
  * @param string|array $header Header to normalize.
159
  *
160
  * @return array Returns the normalized header field values.
 
 
161
  */
162
  function normalize_header($header)
163
  {
164
- if (!is_array($header)) {
165
- return array_map('trim', explode(',', $header));
166
- }
167
-
168
- $result = [];
169
- foreach ($header as $value) {
170
- foreach ((array) $value as $v) {
171
- if (strpos($v, ',') === false) {
172
- $result[] = $v;
173
- continue;
174
- }
175
- foreach (preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $v) as $vv) {
176
- $result[] = trim($vv);
177
- }
178
- }
179
- }
180
-
181
- return $result;
182
  }
183
 
184
  /**
185
  * Clone and modify a request with the given changes.
186
  *
 
 
 
187
  * The changes can be one of:
188
  * - method: (string) Changes the HTTP method.
189
  * - set_headers: (array) Sets the given headers.
@@ -197,72 +135,12 @@ function normalize_header($header)
197
  * @param array $changes Changes to apply.
198
  *
199
  * @return RequestInterface
 
 
200
  */
201
  function modify_request(RequestInterface $request, array $changes)
202
  {
203
- if (!$changes) {
204
- return $request;
205
- }
206
-
207
- $headers = $request->getHeaders();
208
-
209
- if (!isset($changes['uri'])) {
210
- $uri = $request->getUri();
211
- } else {
212
- // Remove the host header if one is on the URI
213
- if ($host = $changes['uri']->getHost()) {
214
- $changes['set_headers']['Host'] = $host;
215
-
216
- if ($port = $changes['uri']->getPort()) {
217
- $standardPorts = ['http' => 80, 'https' => 443];
218
- $scheme = $changes['uri']->getScheme();
219
- if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) {
220
- $changes['set_headers']['Host'] .= ':'.$port;
221
- }
222
- }
223
- }
224
- $uri = $changes['uri'];
225
- }
226
-
227
- if (!empty($changes['remove_headers'])) {
228
- $headers = _caseless_remove($changes['remove_headers'], $headers);
229
- }
230
-
231
- if (!empty($changes['set_headers'])) {
232
- $headers = _caseless_remove(array_keys($changes['set_headers']), $headers);
233
- $headers = $changes['set_headers'] + $headers;
234
- }
235
-
236
- if (isset($changes['query'])) {
237
- $uri = $uri->withQuery($changes['query']);
238
- }
239
-
240
- if ($request instanceof ServerRequestInterface) {
241
- return (new ServerRequest(
242
- isset($changes['method']) ? $changes['method'] : $request->getMethod(),
243
- $uri,
244
- $headers,
245
- isset($changes['body']) ? $changes['body'] : $request->getBody(),
246
- isset($changes['version'])
247
- ? $changes['version']
248
- : $request->getProtocolVersion(),
249
- $request->getServerParams()
250
- ))
251
- ->withParsedBody($request->getParsedBody())
252
- ->withQueryParams($request->getQueryParams())
253
- ->withCookieParams($request->getCookieParams())
254
- ->withUploadedFiles($request->getUploadedFiles());
255
- }
256
-
257
- return new Request(
258
- isset($changes['method']) ? $changes['method'] : $request->getMethod(),
259
- $uri,
260
- $headers,
261
- isset($changes['body']) ? $changes['body'] : $request->getBody(),
262
- isset($changes['version'])
263
- ? $changes['version']
264
- : $request->getProtocolVersion()
265
- );
266
  }
267
 
268
  /**
@@ -274,14 +152,12 @@ function modify_request(RequestInterface $request, array $changes)
274
  * @param MessageInterface $message Message to rewind
275
  *
276
  * @throws \RuntimeException
 
 
277
  */
278
  function rewind_body(MessageInterface $message)
279
  {
280
- $body = $message->getBody();
281
-
282
- if ($body->tell()) {
283
- $body->rewind();
284
- }
285
  }
286
 
287
  /**
@@ -294,29 +170,14 @@ function rewind_body(MessageInterface $message)
294
  * @param string $mode Mode used to open the file
295
  *
296
  * @return resource
 
297
  * @throws \RuntimeException if the file cannot be opened
 
 
298
  */
299
  function try_fopen($filename, $mode)
300
  {
301
- $ex = null;
302
- set_error_handler(function () use ($filename, $mode, &$ex) {
303
- $ex = new \RuntimeException(sprintf(
304
- 'Unable to open %s using mode %s: %s',
305
- $filename,
306
- $mode,
307
- func_get_args()[1]
308
- ));
309
- });
310
-
311
- $handle = fopen($filename, $mode);
312
- restore_error_handler();
313
-
314
- if ($ex) {
315
- /** @var $ex \RuntimeException */
316
- throw $ex;
317
- }
318
-
319
- return $handle;
320
  }
321
 
322
  /**
@@ -327,36 +188,14 @@ function try_fopen($filename, $mode)
327
  * @param int $maxLen Maximum number of bytes to read. Pass -1
328
  * to read the entire stream.
329
  * @return string
 
330
  * @throws \RuntimeException on error.
 
 
331
  */
332
  function copy_to_string(StreamInterface $stream, $maxLen = -1)
333
  {
334
- $buffer = '';
335
-
336
- if ($maxLen === -1) {
337
- while (!$stream->eof()) {
338
- $buf = $stream->read(1048576);
339
- // Using a loose equality here to match on '' and false.
340
- if ($buf == null) {
341
- break;
342
- }
343
- $buffer .= $buf;
344
- }
345
- return $buffer;
346
- }
347
-
348
- $len = 0;
349
- while (!$stream->eof() && $len < $maxLen) {
350
- $buf = $stream->read($maxLen - $len);
351
- // Using a loose equality here to match on '' and false.
352
- if ($buf == null) {
353
- break;
354
- }
355
- $buffer .= $buf;
356
- $len = strlen($buffer);
357
- }
358
-
359
- return $buffer;
360
  }
361
 
362
  /**
@@ -369,92 +208,48 @@ function copy_to_string(StreamInterface $stream, $maxLen = -1)
369
  * to read the entire stream.
370
  *
371
  * @throws \RuntimeException on error.
 
 
372
  */
373
- function copy_to_stream(
374
- StreamInterface $source,
375
- StreamInterface $dest,
376
- $maxLen = -1
377
- ) {
378
- $bufferSize = 8192;
379
-
380
- if ($maxLen === -1) {
381
- while (!$source->eof()) {
382
- if (!$dest->write($source->read($bufferSize))) {
383
- break;
384
- }
385
- }
386
- } else {
387
- $remaining = $maxLen;
388
- while ($remaining > 0 && !$source->eof()) {
389
- $buf = $source->read(min($bufferSize, $remaining));
390
- $len = strlen($buf);
391
- if (!$len) {
392
- break;
393
- }
394
- $remaining -= $len;
395
- $dest->write($buf);
396
- }
397
- }
398
  }
399
 
400
  /**
401
- * Calculate a hash of a Stream
 
 
 
402
  *
403
  * @param StreamInterface $stream Stream to calculate the hash for
404
  * @param string $algo Hash algorithm (e.g. md5, crc32, etc)
405
  * @param bool $rawOutput Whether or not to use raw output
406
  *
407
  * @return string Returns the hash of the stream
 
408
  * @throws \RuntimeException on error.
 
 
409
  */
410
- function hash(
411
- StreamInterface $stream,
412
- $algo,
413
- $rawOutput = false
414
- ) {
415
- $pos = $stream->tell();
416
-
417
- if ($pos > 0) {
418
- $stream->rewind();
419
- }
420
-
421
- $ctx = hash_init($algo);
422
- while (!$stream->eof()) {
423
- hash_update($ctx, $stream->read(1048576));
424
- }
425
-
426
- $out = hash_final($ctx, (bool) $rawOutput);
427
- $stream->seek($pos);
428
-
429
- return $out;
430
  }
431
 
432
  /**
433
- * Read a line from the stream up to the maximum allowed buffer length
434
  *
435
  * @param StreamInterface $stream Stream to read from
436
- * @param int $maxLength Maximum buffer length
437
  *
438
  * @return string
 
 
439
  */
440
  function readline(StreamInterface $stream, $maxLength = null)
441
  {
442
- $buffer = '';
443
- $size = 0;
444
-
445
- while (!$stream->eof()) {
446
- // Using a loose equality here to match on '' and false.
447
- if (null == ($byte = $stream->read(1))) {
448
- return $buffer;
449
- }
450
- $buffer .= $byte;
451
- // Break when a new line is found or the max length - 1 is reached
452
- if ($byte === "\n" || ++$size === $maxLength - 1) {
453
- break;
454
- }
455
- }
456
-
457
- return $buffer;
458
  }
459
 
460
  /**
@@ -463,26 +258,12 @@ function readline(StreamInterface $stream, $maxLength = null)
463
  * @param string $message Request message string.
464
  *
465
  * @return Request
 
 
466
  */
467
  function parse_request($message)
468
  {
469
- $data = _parse_message($message);
470
- $matches = [];
471
- if (!preg_match('/^[\S]+\s+([a-zA-Z]+:\/\/|\/).*/', $data['start-line'], $matches)) {
472
- throw new \InvalidArgumentException('Invalid request string');
473
- }
474
- $parts = explode(' ', $data['start-line'], 3);
475
- $version = isset($parts[2]) ? explode('/', $parts[2])[1] : '1.1';
476
-
477
- $request = new Request(
478
- $parts[0],
479
- $matches[1] === '/' ? _parse_request_uri($parts[1], $data['headers']) : $parts[1],
480
- $data['headers'],
481
- $data['body'],
482
- $version
483
- );
484
-
485
- return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]);
486
  }
487
 
488
  /**
@@ -491,139 +272,66 @@ function parse_request($message)
491
  * @param string $message Response message string.
492
  *
493
  * @return Response
 
 
494
  */
495
  function parse_response($message)
496
  {
497
- $data = _parse_message($message);
498
- // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space
499
- // between status-code and reason-phrase is required. But browsers accept
500
- // responses without space and reason as well.
501
- if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) {
502
- throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']);
503
- }
504
- $parts = explode(' ', $data['start-line'], 3);
505
-
506
- return new Response(
507
- $parts[1],
508
- $data['headers'],
509
- $data['body'],
510
- explode('/', $parts[0])[1],
511
- isset($parts[2]) ? $parts[2] : null
512
- );
513
  }
514
 
515
  /**
516
  * Parse a query string into an associative array.
517
  *
518
- * If multiple values are found for the same key, the value of that key
519
- * value pair will become an array. This function does not parse nested
520
- * PHP style arrays into an associative array (e.g., foo[a]=1&foo[b]=2 will
521
- * be parsed into ['foo[a]' => '1', 'foo[b]' => '2']).
522
  *
523
  * @param string $str Query string to parse
524
  * @param int|bool $urlEncoding How the query string is encoded
525
  *
526
  * @return array
 
 
527
  */
528
  function parse_query($str, $urlEncoding = true)
529
  {
530
- $result = [];
531
-
532
- if ($str === '') {
533
- return $result;
534
- }
535
-
536
- if ($urlEncoding === true) {
537
- $decoder = function ($value) {
538
- return rawurldecode(str_replace('+', ' ', $value));
539
- };
540
- } elseif ($urlEncoding === PHP_QUERY_RFC3986) {
541
- $decoder = 'rawurldecode';
542
- } elseif ($urlEncoding === PHP_QUERY_RFC1738) {
543
- $decoder = 'urldecode';
544
- } else {
545
- $decoder = function ($str) { return $str; };
546
- }
547
-
548
- foreach (explode('&', $str) as $kvp) {
549
- $parts = explode('=', $kvp, 2);
550
- $key = $decoder($parts[0]);
551
- $value = isset($parts[1]) ? $decoder($parts[1]) : null;
552
- if (!isset($result[$key])) {
553
- $result[$key] = $value;
554
- } else {
555
- if (!is_array($result[$key])) {
556
- $result[$key] = [$result[$key]];
557
- }
558
- $result[$key][] = $value;
559
- }
560
- }
561
-
562
- return $result;
563
  }
564
 
565
  /**
566
  * Build a query string from an array of key value pairs.
567
  *
568
- * This function can use the return value of parse_query() to build a query
569
  * string. This function does not modify the provided keys when an array is
570
- * encountered (like http_build_query would).
571
  *
572
  * @param array $params Query string parameters.
573
  * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
574
  * to encode using RFC3986, or PHP_QUERY_RFC1738
575
  * to encode using RFC1738.
576
  * @return string
 
 
577
  */
578
  function build_query(array $params, $encoding = PHP_QUERY_RFC3986)
579
  {
580
- if (!$params) {
581
- return '';
582
- }
583
-
584
- if ($encoding === false) {
585
- $encoder = function ($str) { return $str; };
586
- } elseif ($encoding === PHP_QUERY_RFC3986) {
587
- $encoder = 'rawurlencode';
588
- } elseif ($encoding === PHP_QUERY_RFC1738) {
589
- $encoder = 'urlencode';
590
- } else {
591
- throw new \InvalidArgumentException('Invalid type');
592
- }
593
-
594
- $qs = '';
595
- foreach ($params as $k => $v) {
596
- $k = $encoder($k);
597
- if (!is_array($v)) {
598
- $qs .= $k;
599
- if ($v !== null) {
600
- $qs .= '=' . $encoder($v);
601
- }
602
- $qs .= '&';
603
- } else {
604
- foreach ($v as $vv) {
605
- $qs .= $k;
606
- if ($vv !== null) {
607
- $qs .= '=' . $encoder($vv);
608
- }
609
- $qs .= '&';
610
- }
611
- }
612
- }
613
-
614
- return $qs ? (string) substr($qs, 0, -1) : '';
615
  }
616
 
617
  /**
618
  * Determines the mimetype of a file by looking at its extension.
619
  *
620
- * @param $filename
 
 
621
  *
622
- * @return null|string
623
  */
624
  function mimetype_from_filename($filename)
625
  {
626
- return mimetype_from_extension(pathinfo($filename, PATHINFO_EXTENSION));
627
  }
628
 
629
  /**
@@ -632,119 +340,13 @@ function mimetype_from_filename($filename)
632
  * @param $extension string The file extension.
633
  *
634
  * @return string|null
 
635
  * @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types
 
636
  */
637
  function mimetype_from_extension($extension)
638
  {
639
- static $mimetypes = [
640
- '3gp' => 'video/3gpp',
641
- '7z' => 'application/x-7z-compressed',
642
- 'aac' => 'audio/x-aac',
643
- 'ai' => 'application/postscript',
644
- 'aif' => 'audio/x-aiff',
645
- 'asc' => 'text/plain',
646
- 'asf' => 'video/x-ms-asf',
647
- 'atom' => 'application/atom+xml',
648
- 'avi' => 'video/x-msvideo',
649
- 'bmp' => 'image/bmp',
650
- 'bz2' => 'application/x-bzip2',
651
- 'cer' => 'application/pkix-cert',
652
- 'crl' => 'application/pkix-crl',
653
- 'crt' => 'application/x-x509-ca-cert',
654
- 'css' => 'text/css',
655
- 'csv' => 'text/csv',
656
- 'cu' => 'application/cu-seeme',
657
- 'deb' => 'application/x-debian-package',
658
- 'doc' => 'application/msword',
659
- 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
660
- 'dvi' => 'application/x-dvi',
661
- 'eot' => 'application/vnd.ms-fontobject',
662
- 'eps' => 'application/postscript',
663
- 'epub' => 'application/epub+zip',
664
- 'etx' => 'text/x-setext',
665
- 'flac' => 'audio/flac',
666
- 'flv' => 'video/x-flv',
667
- 'gif' => 'image/gif',
668
- 'gz' => 'application/gzip',
669
- 'htm' => 'text/html',
670
- 'html' => 'text/html',
671
- 'ico' => 'image/x-icon',
672
- 'ics' => 'text/calendar',
673
- 'ini' => 'text/plain',
674
- 'iso' => 'application/x-iso9660-image',
675
- 'jar' => 'application/java-archive',
676
- 'jpe' => 'image/jpeg',
677
- 'jpeg' => 'image/jpeg',
678
- 'jpg' => 'image/jpeg',
679
- 'js' => 'text/javascript',
680
- 'json' => 'application/json',
681
- 'latex' => 'application/x-latex',
682
- 'log' => 'text/plain',
683
- 'm4a' => 'audio/mp4',
684
- 'm4v' => 'video/mp4',
685
- 'mid' => 'audio/midi',
686
- 'midi' => 'audio/midi',
687
- 'mov' => 'video/quicktime',
688
- 'mkv' => 'video/x-matroska',
689
- 'mp3' => 'audio/mpeg',
690
- 'mp4' => 'video/mp4',
691
- 'mp4a' => 'audio/mp4',
692
- 'mp4v' => 'video/mp4',
693
- 'mpe' => 'video/mpeg',
694
- 'mpeg' => 'video/mpeg',
695
- 'mpg' => 'video/mpeg',
696
- 'mpg4' => 'video/mp4',
697
- 'oga' => 'audio/ogg',
698
- 'ogg' => 'audio/ogg',
699
- 'ogv' => 'video/ogg',
700
- 'ogx' => 'application/ogg',
701
- 'pbm' => 'image/x-portable-bitmap',
702
- 'pdf' => 'application/pdf',
703
- 'pgm' => 'image/x-portable-graymap',
704
- 'png' => 'image/png',
705
- 'pnm' => 'image/x-portable-anymap',
706
- 'ppm' => 'image/x-portable-pixmap',
707
- 'ppt' => 'application/vnd.ms-powerpoint',
708
- 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
709
- 'ps' => 'application/postscript',
710
- 'qt' => 'video/quicktime',
711
- 'rar' => 'application/x-rar-compressed',
712
- 'ras' => 'image/x-cmu-raster',
713
- 'rss' => 'application/rss+xml',
714
- 'rtf' => 'application/rtf',
715
- 'sgm' => 'text/sgml',
716
- 'sgml' => 'text/sgml',
717
- 'svg' => 'image/svg+xml',
718
- 'swf' => 'application/x-shockwave-flash',
719
- 'tar' => 'application/x-tar',
720
- 'tif' => 'image/tiff',
721
- 'tiff' => 'image/tiff',
722
- 'torrent' => 'application/x-bittorrent',
723
- 'ttf' => 'application/x-font-ttf',
724
- 'txt' => 'text/plain',
725
- 'wav' => 'audio/x-wav',
726
- 'webm' => 'video/webm',
727
- 'webp' => 'image/webp',
728
- 'wma' => 'audio/x-ms-wma',
729
- 'wmv' => 'video/x-ms-wmv',
730
- 'woff' => 'application/x-font-woff',
731
- 'wsdl' => 'application/wsdl+xml',
732
- 'xbm' => 'image/x-xbitmap',
733
- 'xls' => 'application/vnd.ms-excel',
734
- 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
735
- 'xml' => 'application/xml',
736
- 'xpm' => 'image/x-xpixmap',
737
- 'xwd' => 'image/x-xwindowdump',
738
- 'yaml' => 'text/yaml',
739
- 'yml' => 'text/yaml',
740
- 'zip' => 'application/zip',
741
- ];
742
-
743
- $extension = strtolower($extension);
744
-
745
- return isset($mimetypes[$extension])
746
- ? $mimetypes[$extension]
747
- : null;
748
  }
749
 
750
  /**
@@ -757,61 +359,13 @@ function mimetype_from_extension($extension)
757
  * @param string $message HTTP request or response to parse.
758
  *
759
  * @return array
 
760
  * @internal
 
761
  */
762
  function _parse_message($message)
763
  {
764
- if (!$message) {
765
- throw new \InvalidArgumentException('Invalid message');
766
- }
767
-
768
- $message = ltrim($message, "\r\n");
769
-
770
- $messageParts = preg_split("/\r?\n\r?\n/", $message, 2);
771
-
772
- if ($messageParts === false || count($messageParts) !== 2) {
773
- throw new \InvalidArgumentException('Invalid message: Missing header delimiter');
774
- }
775
-
776
- list($rawHeaders, $body) = $messageParts;
777
- $rawHeaders .= "\r\n"; // Put back the delimiter we split previously
778
- $headerParts = preg_split("/\r?\n/", $rawHeaders, 2);
779
-
780
- if ($headerParts === false || count($headerParts) !== 2) {
781
- throw new \InvalidArgumentException('Invalid message: Missing status line');
782
- }
783
-
784
- list($startLine, $rawHeaders) = $headerParts;
785
-
786
- if (preg_match("/(?:^HTTP\/|^[A-Z]+ \S+ HTTP\/)(\d+(?:\.\d+)?)/i", $startLine, $matches) && $matches[1] === '1.0') {
787
- // Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0
788
- $rawHeaders = preg_replace(Rfc7230::HEADER_FOLD_REGEX, ' ', $rawHeaders);
789
- }
790
-
791
- /** @var array[] $headerLines */
792
- $count = preg_match_all(Rfc7230::HEADER_REGEX, $rawHeaders, $headerLines, PREG_SET_ORDER);
793
-
794
- // If these aren't the same, then one line didn't match and there's an invalid header.
795
- if ($count !== substr_count($rawHeaders, "\n")) {
796
- // Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4
797
- if (preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) {
798
- throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding');
799
- }
800
-
801
- throw new \InvalidArgumentException('Invalid header syntax');
802
- }
803
-
804
- $headers = [];
805
-
806
- foreach ($headerLines as $headerLine) {
807
- $headers[$headerLine[1]][] = $headerLine[2];
808
- }
809
-
810
- return [
811
- 'start-line' => $startLine,
812
- 'headers' => $headers,
813
- 'body' => $body,
814
- ];
815
  }
816
 
817
  /**
@@ -821,79 +375,43 @@ function _parse_message($message)
821
  * @param array $headers Array of headers (each value an array).
822
  *
823
  * @return string
 
824
  * @internal
 
825
  */
826
  function _parse_request_uri($path, array $headers)
827
  {
828
- $hostKey = array_filter(array_keys($headers), function ($k) {
829
- return strtolower($k) === 'host';
830
- });
831
-
832
- // If no host is found, then a full URI cannot be constructed.
833
- if (!$hostKey) {
834
- return $path;
835
- }
836
-
837
- $host = $headers[reset($hostKey)][0];
838
- $scheme = substr($host, -4) === ':443' ? 'https' : 'http';
839
-
840
- return $scheme . '://' . $host . '/' . ltrim($path, '/');
841
  }
842
 
843
  /**
844
- * Get a short summary of the message body
845
  *
846
  * Will return `null` if the response is not printable.
847
  *
848
  * @param MessageInterface $message The message to get the body summary
849
  * @param int $truncateAt The maximum allowed size of the summary
850
  *
851
- * @return null|string
 
 
852
  */
853
  function get_message_body_summary(MessageInterface $message, $truncateAt = 120)
854
  {
855
- $body = $message->getBody();
856
-
857
- if (!$body->isSeekable() || !$body->isReadable()) {
858
- return null;
859
- }
860
-
861
- $size = $body->getSize();
862
-
863
- if ($size === 0) {
864
- return null;
865
- }
866
-
867
- $summary = $body->read($truncateAt);
868
- $body->rewind();
869
-
870
- if ($size > $truncateAt) {
871
- $summary .= ' (truncated...)';
872
- }
873
-
874
- // Matches any printable character, including unicode characters:
875
- // letters, marks, numbers, punctuation, spacing, and separators.
876
- if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/', $summary)) {
877
- return null;
878
- }
879
-
880
- return $summary;
881
  }
882
 
883
- /** @internal */
 
 
 
 
 
 
 
 
 
884
  function _caseless_remove($keys, array $data)
885
  {
886
- $result = [];
887
-
888
- foreach ($keys as &$key) {
889
- $key = strtolower($key);
890
- }
891
-
892
- foreach ($data as $k => $v) {
893
- if (!in_array(strtolower($k), $keys)) {
894
- $result[$k] = $v;
895
- }
896
- }
897
-
898
- return $result;
899
  }
1
  <?php
2
+
3
  namespace GuzzleHttp\Psr7;
4
 
5
  use Psr\Http\Message\MessageInterface;
6
  use Psr\Http\Message\RequestInterface;
 
 
7
  use Psr\Http\Message\StreamInterface;
8
  use Psr\Http\Message\UriInterface;
9
 
13
  * @param MessageInterface $message Message to convert to a string.
14
  *
15
  * @return string
16
+ *
17
+ * @deprecated str will be removed in guzzlehttp/psr7:2.0. Use Message::toString instead.
18
  */
19
  function str(MessageInterface $message)
20
  {
21
+ return Message::toString($message);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  }
23
 
24
  /**
25
  * Returns a UriInterface for the given value.
26
  *
27
+ * This function accepts a string or UriInterface and returns a
28
+ * UriInterface for the given value. If the value is already a
29
+ * UriInterface, it is returned as-is.
30
  *
31
  * @param string|UriInterface $uri
32
  *
33
  * @return UriInterface
34
+ *
35
  * @throws \InvalidArgumentException
36
+ *
37
+ * @deprecated uri_for will be removed in guzzlehttp/psr7:2.0. Use Utils::uriFor instead.
38
  */
39
  function uri_for($uri)
40
  {
41
+ return Utils::uriFor($uri);
 
 
 
 
 
 
42
  }
43
 
44
  /**
48
  * - metadata: Array of custom metadata.
49
  * - size: Size of the stream.
50
  *
51
+ * This method accepts the following `$resource` types:
52
+ * - `Psr\Http\Message\StreamInterface`: Returns the value as-is.
53
+ * - `string`: Creates a stream object that uses the given string as the contents.
54
+ * - `resource`: Creates a stream object that wraps the given PHP stream resource.
55
+ * - `Iterator`: If the provided value implements `Iterator`, then a read-only
56
+ * stream object will be created that wraps the given iterable. Each time the
57
+ * stream is read from, data from the iterator will fill a buffer and will be
58
+ * continuously called until the buffer is equal to the requested read size.
59
+ * Subsequent read calls will first read from the buffer and then call `next`
60
+ * on the underlying iterator until it is exhausted.
61
+ * - `object` with `__toString()`: If the object has the `__toString()` method,
62
+ * the object will be cast to a string and then a stream will be returned that
63
+ * uses the string value.
64
+ * - `NULL`: When `null` is passed, an empty stream object is returned.
65
+ * - `callable` When a callable is passed, a read-only stream object will be
66
+ * created that invokes the given callable. The callable is invoked with the
67
+ * number of suggested bytes to read. The callable can return any number of
68
+ * bytes, but MUST return `false` when there is no more data to return. The
69
+ * stream object that wraps the callable will invoke the callable until the
70
+ * number of requested bytes are available. Any additional bytes will be
71
+ * buffered and used in subsequent reads.
72
+ *
73
  * @param resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource Entity body data
74
  * @param array $options Additional options
75
  *
76
  * @return StreamInterface
77
+ *
78
  * @throws \InvalidArgumentException if the $resource arg is not valid.
79
+ *
80
+ * @deprecated stream_for will be removed in guzzlehttp/psr7:2.0. Use Utils::streamFor instead.
81
  */
82
  function stream_for($resource = '', array $options = [])
83
  {
84
+ return Utils::streamFor($resource, $options);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  }
86
 
87
  /**
88
  * Parse an array of header values containing ";" separated data into an
89
+ * array of associative arrays representing the header key value pair data
90
+ * of the header. When a parameter does not contain a value, but just
91
  * contains a key, this function will inject a key with a '' string value.
92
  *
93
  * @param string|array $header Header to parse into components.
94
  *
95
  * @return array Returns the parsed header values.
96
+ *
97
+ * @deprecated parse_header will be removed in guzzlehttp/psr7:2.0. Use Header::parse instead.
98
  */
99
  function parse_header($header)
100
  {
101
+ return Header::parse($header);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  }
103
 
104
  /**
108
  * @param string|array $header Header to normalize.
109
  *
110
  * @return array Returns the normalized header field values.
111
+ *
112
+ * @deprecated normalize_header will be removed in guzzlehttp/psr7:2.0. Use Header::normalize instead.
113
  */
114
  function normalize_header($header)
115
  {
116
+ return Header::normalize($header);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  }
118
 
119
  /**
120
  * Clone and modify a request with the given changes.
121
  *
122
+ * This method is useful for reducing the number of clones needed to mutate a
123
+ * message.
124
+ *
125
  * The changes can be one of:
126
  * - method: (string) Changes the HTTP method.
127
  * - set_headers: (array) Sets the given headers.
135
  * @param array $changes Changes to apply.
136
  *
137
  * @return RequestInterface
138
+ *
139
+ * @deprecated modify_request will be removed in guzzlehttp/psr7:2.0. Use Utils::modifyRequest instead.
140
  */
141
  function modify_request(RequestInterface $request, array $changes)
142
  {
143
+ return Utils::modifyRequest($request, $changes);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  }
145
 
146
  /**
152
  * @param MessageInterface $message Message to rewind
153
  *
154
  * @throws \RuntimeException
155
+ *
156
+ * @deprecated rewind_body will be removed in guzzlehttp/psr7:2.0. Use Message::rewindBody instead.
157
  */
158
  function rewind_body(MessageInterface $message)
159
  {
160
+ Message::rewindBody($message);
 
 
 
 
161
  }
162
 
163
  /**
170
  * @param string $mode Mode used to open the file
171
  *
172
  * @return resource
173
+ *
174
  * @throws \RuntimeException if the file cannot be opened
175
+ *
176
+ * @deprecated try_fopen will be removed in guzzlehttp/psr7:2.0. Use Utils::tryFopen instead.
177
  */
178
  function try_fopen($filename, $mode)
179
  {
180
+ return Utils::tryFopen($filename, $mode);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
  }
182
 
183
  /**
188
  * @param int $maxLen Maximum number of bytes to read. Pass -1
189
  * to read the entire stream.
190
  * @return string
191
+ *
192
  * @throws \RuntimeException on error.
193
+ *
194
+ * @deprecated copy_to_string will be removed in guzzlehttp/psr7:2.0. Use Utils::copyToString instead.
195
  */
196
  function copy_to_string(StreamInterface $stream, $maxLen = -1)
197
  {
198
+ return Utils::copyToString($stream, $maxLen);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
199
  }
200
 
201
  /**
208
  * to read the entire stream.
209
  *
210
  * @throws \RuntimeException on error.
211
+ *
212
+ * @deprecated copy_to_stream will be removed in guzzlehttp/psr7:2.0. Use Utils::copyToStream instead.
213
  */
214
+ function copy_to_stream(StreamInterface $source, StreamInterface $dest, $maxLen = -1)
215
+ {
216
+ return Utils::copyToStream($source, $dest, $maxLen);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  }
218
 
219
  /**
220
+ * Calculate a hash of a stream.
221
+ *
222
+ * This method reads the entire stream to calculate a rolling hash, based on
223
+ * PHP's `hash_init` functions.
224
  *
225
  * @param StreamInterface $stream Stream to calculate the hash for
226
  * @param string $algo Hash algorithm (e.g. md5, crc32, etc)
227
  * @param bool $rawOutput Whether or not to use raw output
228
  *
229
  * @return string Returns the hash of the stream
230
+ *
231
  * @throws \RuntimeException on error.
232
+ *
233
+ * @deprecated hash will be removed in guzzlehttp/psr7:2.0. Use Utils::hash instead.
234
  */
235
+ function hash(StreamInterface $stream, $algo, $rawOutput = false)
236
+ {
237
+ return Utils::hash($stream, $algo, $rawOutput);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
238
  }
239
 
240
  /**
241
+ * Read a line from the stream up to the maximum allowed buffer length.
242
  *
243
  * @param StreamInterface $stream Stream to read from
244
+ * @param int|null $maxLength Maximum buffer length
245
  *
246
  * @return string
247
+ *
248
+ * @deprecated readline will be removed in guzzlehttp/psr7:2.0. Use Utils::readLine instead.
249
  */
250
  function readline(StreamInterface $stream, $maxLength = null)
251
  {
252
+ return Utils::readLine($stream, $maxLength);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
253
  }
254
 
255
  /**
258
  * @param string $message Request message string.
259
  *
260
  * @return Request
261
+ *
262
+ * @deprecated parse_request will be removed in guzzlehttp/psr7:2.0. Use Message::parseRequest instead.
263
  */
264
  function parse_request($message)
265
  {
266
+ return Message::parseRequest($message);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
267
  }
268
 
269
  /**
272
  * @param string $message Response message string.
273
  *
274
  * @return Response
275
+ *
276
+ * @deprecated parse_response will be removed in guzzlehttp/psr7:2.0. Use Message::parseResponse instead.
277
  */
278
  function parse_response($message)
279
  {
280
+ return Message::parseResponse($message);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
281
  }
282
 
283
  /**
284
  * Parse a query string into an associative array.
285
  *
286
+ * If multiple values are found for the same key, the value of that key value
287
+ * pair will become an array. This function does not parse nested PHP style
288
+ * arrays into an associative array (e.g., `foo[a]=1&foo[b]=2` will be parsed
289
+ * into `['foo[a]' => '1', 'foo[b]' => '2'])`.
290
  *
291
  * @param string $str Query string to parse
292
  * @param int|bool $urlEncoding How the query string is encoded
293
  *
294
  * @return array
295
+ *
296
+ * @deprecated parse_query will be removed in guzzlehttp/psr7:2.0. Use Query::parse instead.
297
  */
298
  function parse_query($str, $urlEncoding = true)
299
  {
300
+ return Query::parse($str, $urlEncoding);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
301
  }
302
 
303
  /**
304
  * Build a query string from an array of key value pairs.
305
  *
306
+ * This function can use the return value of `parse_query()` to build a query
307
  * string. This function does not modify the provided keys when an array is
308
+ * encountered (like `http_build_query()` would).
309
  *
310
  * @param array $params Query string parameters.
311
  * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
312
  * to encode using RFC3986, or PHP_QUERY_RFC1738
313
  * to encode using RFC1738.
314
  * @return string
315
+ *
316
+ * @deprecated build_query will be removed in guzzlehttp/psr7:2.0. Use Query::build instead.
317
  */
318
  function build_query(array $params, $encoding = PHP_QUERY_RFC3986)
319
  {
320
+ return Query::build($params, $encoding);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
321
  }
322
 
323
  /**
324
  * Determines the mimetype of a file by looking at its extension.
325
  *
326
+ * @param string $filename
327
+ *
328
+ * @return string|null
329
  *
330
+ * @deprecated mimetype_from_filename will be removed in guzzlehttp/psr7:2.0. Use MimeType::fromFilename instead.
331
  */
332
  function mimetype_from_filename($filename)
333
  {
334
+ return MimeType::fromFilename($filename);
335
  }
336
 
337
  /**
340
  * @param $extension string The file extension.
341
  *
342
  * @return string|null
343
+ *
344
  * @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types
345
+ * @deprecated mimetype_from_extension will be removed in guzzlehttp/psr7:2.0. Use MimeType::fromExtension instead.
346
  */
347
  function mimetype_from_extension($extension)
348
  {
349
+ return MimeType::fromExtension($extension);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
350
  }
351
 
352
  /**
359
  * @param string $message HTTP request or response to parse.
360
  *
361
  * @return array
362
+ *
363
  * @internal
364
+ * @deprecated _parse_message will be removed in guzzlehttp/psr7:2.0. Use Message::parseMessage instead.
365
  */
366
  function _parse_message($message)
367
  {
368
+ return Message::parseMessage($message);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
369
  }
370
 
371
  /**
375
  * @param array $headers Array of headers (each value an array).
376
  *
377
  * @return string
378
+ *
379
  * @internal
380
+ * @deprecated _parse_request_uri will be removed in guzzlehttp/psr7:2.0. Use Message::parseRequestUri instead.
381
  */
382
  function _parse_request_uri($path, array $headers)
383
  {
384
+ return Message::parseRequestUri($path, $headers);
 
 
 
 
 
 
 
 
 
 
 
 
385
  }
386
 
387
  /**
388
+ * Get a short summary of the message body.
389
  *
390
  * Will return `null` if the response is not printable.
391
  *
392
  * @param MessageInterface $message The message to get the body summary
393
  * @param int $truncateAt The maximum allowed size of the summary
394
  *
395
+ * @return string|null
396
+ *
397
+ * @deprecated get_message_body_summary will be removed in guzzlehttp/psr7:2.0. Use Message::bodySummary instead.
398
  */
399
  function get_message_body_summary(MessageInterface $message, $truncateAt = 120)
400
  {
401
+ return Message::bodySummary($message, $truncateAt);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
402
  }
403
 
404
+ /**
405
+ * Remove the items given by the keys, case insensitively from the data.
406
+ *
407
+ * @param iterable<string> $keys
408
+ *
409
+ * @return array
410
+ *
411
+ * @internal
412
+ * @deprecated _caseless_remove will be removed in guzzlehttp/psr7:2.0. Use Utils::caselessRemove instead.
413
+ */
414
  function _caseless_remove($keys, array $data)
415
  {
416
+ return Utils::caselessRemove($keys, $data);
 
 
 
 
 
 
 
 
 
 
 
 
417
  }
vendor/mexitek/phpcolors/README.md CHANGED
@@ -167,6 +167,7 @@ echo $myBlue->getCssGradient(10, TRUE);
167
  - primozcigler
168
  - thedavidmeister
169
  - tylercd100
 
170
 
171
  # License
172
  See LICENSE file or [arlo.mit-license.org](http://arlo.mit-license.org)
167
  - primozcigler
168
  - thedavidmeister
169
  - tylercd100
170
+ - Braunson
171
 
172
  # License
173
  See LICENSE file or [arlo.mit-license.org](http://arlo.mit-license.org)
vendor/mexitek/phpcolors/src/Mexitek/PHPColors/Color.php CHANGED
@@ -232,6 +232,171 @@ class Color
232
  $rgb['B'] . ')';
233
  }
234
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
235
 
236
  /**
237
  * Given a HEX value, returns a darker color. If no desired amount provided, then the color halfway between
232
  $rgb['B'] . ')';
233
  }
234
 
235
+ /**
236
+ * Given a standard color name, return hex code
237
+ *
238
+ * @param string $color_name
239
+ * @return string
240
+ */
241
+ public static function nameToHex(string $color_name): string
242
+ {
243
+ $colors = array(
244
+ 'aliceblue' => 'F0F8FF',
245
+ 'antiquewhite' => 'FAEBD7',
246
+ 'aqua' => '00FFFF',
247
+ 'aquamarine' => '7FFFD4',
248
+ 'azure' => 'F0FFFF',
249
+ 'beige' => 'F5F5DC',
250
+ 'bisque' => 'FFE4C4',
251
+ 'black' => '000000',
252
+ 'blanchedalmond' => 'FFEBCD',
253
+ 'blue' => '0000FF',
254
+ 'blueviolet' => '8A2BE2',
255
+ 'brown' => 'A52A2A',
256
+ 'burlywood' => 'DEB887',
257
+ 'cadetblue' => '5F9EA0',
258
+ 'chartreuse' => '7FFF00',
259
+ 'chocolate' => 'D2691E',
260
+ 'coral' => 'FF7F50',
261
+ 'cornflowerblue' => '6495ED',
262
+ 'cornsilk' => 'FFF8DC',
263
+ 'crimson' => 'DC143C',
264
+ 'cyan' => '00FFFF',
265
+ 'darkblue' => '00008B',
266
+ 'darkcyan' => '008B8B',
267
+ 'darkgoldenrod' => 'B8860B',
268
+ 'darkgray' => 'A9A9A9',
269
+ 'darkgreen' => '006400',
270
+ 'darkgrey' => 'A9A9A9',
271
+ 'darkkhaki' => 'BDB76B',
272
+ 'darkmagenta' => '8B008B',
273
+ 'darkolivegreen' => '556B2F',
274
+ 'darkorange' => 'FF8C00',
275
+ 'darkorchid' => '9932CC',
276
+ 'darkred' => '8B0000',
277
+ 'darksalmon' => 'E9967A',
278
+ 'darkseagreen' => '8FBC8F',
279
+ 'darkslateblue' => '483D8B',
280
+ 'darkslategray' => '2F4F4F',
281
+ 'darkslategrey' => '2F4F4F',
282
+ 'darkturquoise' => '00CED1',
283
+ 'darkviolet' => '9400D3',
284
+ 'deeppink' => 'FF1493',
285
+ 'deepskyblue' => '00BFFF',
286
+ 'dimgray' => '696969',
287
+ 'dimgrey' => '696969',
288
+ 'dodgerblue' => '1E90FF',
289
+ 'firebrick' => 'B22222',
290
+ 'floralwhite' => 'FFFAF0',
291
+ 'forestgreen' => '228B22',
292
+ 'fuchsia' => 'FF00FF',
293
+ 'gainsboro' => 'DCDCDC',
294
+ 'ghostwhite' => 'F8F8FF',
295
+ 'gold' => 'FFD700',
296
+ 'goldenrod' => 'DAA520',
297
+ 'gray' => '808080',
298
+ 'green' => '008000',
299
+ 'greenyellow' => 'ADFF2F',
300
+ 'grey' => '808080',
301
+ 'honeydew' => 'F0FFF0',
302
+ 'hotpink' => 'FF69B4',
303
+ 'indianred' => 'CD5C5C',
304
+ 'indigo' => '4B0082',
305
+ 'ivory' => 'FFFFF0',
306
+ 'khaki' => 'F0E68C',
307
+ 'lavender' => 'E6E6FA',
308
+ 'lavenderblush' => 'FFF0F5',
309
+ 'lawngreen' => '7CFC00',
310
+ 'lemonchiffon' => 'FFFACD',
311
+ 'lightblue' => 'ADD8E6',
312
+ 'lightcoral' => 'F08080',
313
+ 'lightcyan' => 'E0FFFF',
314
+ 'lightgoldenrodyellow' => 'FAFAD2',
315
+ 'lightgray' => 'D3D3D3',
316
+ 'lightgreen' => '90EE90',
317
+ 'lightgrey' => 'D3D3D3',
318
+ 'lightpink' => 'FFB6C1',
319
+ 'lightsalmon' => 'FFA07A',
320
+ 'lightseagreen' => '20B2AA',
321
+ 'lightskyblue' => '87CEFA',
322
+ 'lightslategray' => '778899',
323
+ 'lightslategrey' => '778899',
324
+ 'lightsteelblue' => 'B0C4DE',
325
+ 'lightyellow' => 'FFFFE0',
326
+ 'lime' => '00FF00',
327
+ 'limegreen' => '32CD32',
328
+ 'linen' => 'FAF0E6',
329
+ 'magenta' => 'FF00FF',
330
+ 'maroon' => '800000',
331
+ 'mediumaquamarine' => '66CDAA',
332
+ 'mediumblue' => '0000CD',
333
+ 'mediumorchid' => 'BA55D3',
334
+ 'mediumpurple' => '9370D0',
335
+ 'mediumseagreen' => '3CB371',
336
+ 'mediumslateblue' => '7B68EE',
337
+ 'mediumspringgreen' => '00FA9A',
338
+ 'mediumturquoise' => '48D1CC',
339
+ 'mediumvioletred' => 'C71585',
340
+ 'midnightblue' => '191970',
341
+ 'mintcream' => 'F5FFFA',
342
+ 'mistyrose' => 'FFE4E1',
343
+ 'moccasin' => 'FFE4B5',
344
+ 'navajowhite' => 'FFDEAD',
345
+ 'navy' => '000080',
346
+ 'oldlace' => 'FDF5E6',
347
+ 'olive' => '808000',
348
+ 'olivedrab' => '6B8E23',
349
+ 'orange' => 'FFA500',
350
+ 'orangered' => 'FF4500',
351
+ 'orchid' => 'DA70D6',
352
+ 'palegoldenrod' => 'EEE8AA',
353
+ 'palegreen' => '98FB98',
354
+ 'paleturquoise' => 'AFEEEE',
355
+ 'palevioletred' => 'DB7093',
356
+ 'papayawhip' => 'FFEFD5',
357
+ 'peachpuff' => 'FFDAB9',
358
+ 'peru' => 'CD853F',
359
+ 'pink' => 'FFC0CB',
360
+ 'plum' => 'DDA0DD',
361
+ 'powderblue' => 'B0E0E6',
362
+ 'purple' => '800080',
363
+ 'red' => 'FF0000',
364
+ 'rosybrown' => 'BC8F8F',
365
+ 'royalblue' => '4169E1',
366
+ 'saddlebrown' => '8B4513',
367
+ 'salmon' => 'FA8072',
368
+ 'sandybrown' => 'F4A460',
369
+ 'seagreen' => '2E8B57',
370
+ 'seashell' => 'FFF5EE',
371
+ 'sienna' => 'A0522D',
372
+ 'silver' => 'C0C0C0',
373
+ 'skyblue' => '87CEEB',
374
+ 'slateblue' => '6A5ACD',
375
+ 'slategray' => '708090',
376
+ 'slategrey' => '708090',
377
+ 'snow' => 'FFFAFA',
378
+ 'springgreen' => '00FF7F',
379
+ 'steelblue' => '4682B4',
380
+ 'tan' => 'D2B48C',
381
+ 'teal' => '008080',
382
+ 'thistle' => 'D8BFD8',
383
+ 'tomato' => 'FF6347',
384
+ 'turquoise' => '40E0D0',
385
+ 'violet' => 'EE82EE',
386
+ 'wheat' => 'F5DEB3',
387
+ 'white' => 'FFFFFF',
388
+ 'whitesmoke' => 'F5F5F5',
389
+ 'yellow' => 'FFFF00',
390
+ 'yellowgreen' => '9ACD32'
391
+ );
392
+
393
+ $color_name = strtolower($color_name);
394
+ if (isset($colors[$color_name])) {
395
+ return '#' . $colors[$color_name];
396
+ }
397
+
398
+ return $color_name;
399
+ }
400
 
401
  /**
402
  * Given a HEX value, returns a darker color. If no desired amount provided, then the color halfway between
vendor/mexitek/phpcolors/tests/colorConvertHex.phpt ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require __DIR__ . '/bootstrap.php';
4
+
5
+ use Mexitek\PHPColors\Color;
6
+ use Tester\Assert;
7
+
8
+ // Test cases.
9
+ $colorsToConvert = array(
10
+ 'aliceblue' => 'F0F8FF',
11
+ 'antiquewhite' => 'FAEBD7',
12
+ 'aqua' => '00FFFF',
13
+ 'aquamarine' => '7FFFD4',
14
+ 'azure' => 'F0FFFF',
15
+ 'beige' => 'F5F5DC',
16
+ 'bisque' => 'FFE4C4',
17
+ 'black' => '000000',
18
+ 'blanchedalmond' => 'FFEBCD',
19
+ 'blue' => '0000FF',
20
+ 'blueviolet' => '8A2BE2',
21
+ 'brown' => 'A52A2A',
22
+ 'burlywood' => 'DEB887',
23
+ 'cadetblue' => '5F9EA0',
24
+ 'chartreuse' => '7FFF00',
25
+ 'chocolate' => 'D2691E',
26
+ 'coral' => 'FF7F50',
27
+ 'cornflowerblue' => '6495ED',
28
+ 'cornsilk' => 'FFF8DC',
29
+ 'crimson' => 'DC143C',
30
+ 'cyan' => '00FFFF',
31
+ 'darkblue' => '00008B',
32
+ 'darkcyan' => '008B8B',
33
+ 'darkgoldenrod' => 'B8860B',
34
+ 'darkgray' => 'A9A9A9',
35
+ 'darkgreen' => '006400',
36
+ 'darkgrey' => 'A9A9A9',
37
+ 'darkkhaki' => 'BDB76B',
38
+ 'darkmagenta' => '8B008B',
39
+ 'darkolivegreen' => '556B2F',
40
+ 'darkorange' => 'FF8C00',
41
+ 'darkorchid' => '9932CC',
42
+ 'darkred' => '8B0000',
43
+ 'darksalmon' => 'E9967A',
44
+ 'darkseagreen' => '8FBC8F',
45
+ 'darkslateblue' => '483D8B',
46
+ 'darkslategray' => '2F4F4F',
47
+ 'darkslategrey' => '2F4F4F',
48
+ 'darkturquoise' => '00CED1',
49
+ 'darkviolet' => '9400D3',
50
+ 'deeppink' => 'FF1493',
51
+ 'deepskyblue' => '00BFFF',
52
+ 'dimgray' => '696969',
53
+ 'dimgrey' => '696969',
54
+ 'dodgerblue' => '1E90FF',
55
+ 'firebrick' => 'B22222',
56
+ 'floralwhite' => 'FFFAF0',
57
+ 'forestgreen' => '228B22',
58
+ 'fuchsia' => 'FF00FF',
59
+ 'gainsboro' => 'DCDCDC',
60
+ 'ghostwhite' => 'F8F8FF',
61
+ 'gold' => 'FFD700',
62
+ 'goldenrod' => 'DAA520',
63
+ 'gray' => '808080',
64
+ 'green' => '008000',
65
+ 'greenyellow' => 'ADFF2F',
66
+ 'grey' => '808080',
67
+ 'honeydew' => 'F0FFF0',
68
+ 'hotpink' => 'FF69B4',
69
+ 'indianred' => 'CD5C5C',
70
+ 'indigo' => '4B0082',
71
+ 'ivory' => 'FFFFF0',
72
+ 'khaki' => 'F0E68C',
73
+ 'lavender' => 'E6E6FA',
74
+ 'lavenderblush' => 'FFF0F5',
75
+ 'lawngreen' => '7CFC00',
76
+ 'lemonchiffon' => 'FFFACD',
77
+ 'lightblue' => 'ADD8E6',
78
+ 'lightcoral' => 'F08080',
79
+ 'lightcyan' => 'E0FFFF',
80
+ 'lightgoldenrodyellow' => 'FAFAD2',
81
+ 'lightgray' => 'D3D3D3',
82
+ 'lightgreen' => '90EE90',
83
+ 'lightgrey' => 'D3D3D3',
84
+ 'lightpink' => 'FFB6C1',
85
+ 'lightsalmon' => 'FFA07A',
86
+ 'lightseagreen' => '20B2AA',
87
+ 'lightskyblue' => '87CEFA',
88
+ 'lightslategray' => '778899',
89
+ 'lightslategrey' => '778899',
90
+ 'lightsteelblue' => 'B0C4DE',
91
+ 'lightyellow' => 'FFFFE0',
92
+ 'lime' => '00FF00',
93
+ 'limegreen' => '32CD32',
94
+ 'linen' => 'FAF0E6',
95
+ 'magenta' => 'FF00FF',
96
+ 'maroon' => '800000',
97
+ 'mediumaquamarine' => '66CDAA',
98
+ 'mediumblue' => '0000CD',
99
+ 'mediumorchid' => 'BA55D3',
100
+ 'mediumpurple' => '9370D0',
101
+ 'mediumseagreen' => '3CB371',
102
+ 'mediumslateblue' => '7B68EE',
103
+ 'mediumspringgreen' => '00FA9A',
104
+ 'mediumturquoise' => '48D1CC',
105
+ 'mediumvioletred' => 'C71585',
106
+ 'midnightblue' => '191970',
107
+ 'mintcream' => 'F5FFFA',
108
+ 'mistyrose' => 'FFE4E1',
109
+ 'moccasin' => 'FFE4B5',
110
+ 'navajowhite' => 'FFDEAD',
111
+ 'navy' => '000080',
112
+ 'oldlace' => 'FDF5E6',
113
+ 'olive' => '808000',
114
+ 'olivedrab' => '6B8E23',
115
+ 'orange' => 'FFA500',
116
+ 'orangered' => 'FF4500',
117
+ 'orchid' => 'DA70D6',
118
+ 'palegoldenrod' => 'EEE8AA',
119
+ 'palegreen' => '98FB98',
120
+ 'paleturquoise' => 'AFEEEE',
121
+ 'palevioletred' => 'DB7093',
122
+ 'papayawhip' => 'FFEFD5',
123
+ 'peachpuff' => 'FFDAB9',
124
+ 'peru' => 'CD853F',
125
+ 'pink' => 'FFC0CB',
126
+ 'plum' => 'DDA0DD',
127
+ 'powderblue' => 'B0E0E6',
128
+ 'purple' => '800080',
129
+ 'red' => 'FF0000',
130
+ 'rosybrown' => 'BC8F8F',
131
+ 'royalblue' => '4169E1',
132
+ 'saddlebrown' => '8B4513',
133
+ 'salmon' => 'FA8072',
134
+ 'sandybrown' => 'F4A460',
135
+ 'seagreen' => '2E8B57',
136
+ 'seashell' => 'FFF5EE',
137
+ 'sienna' => 'A0522D',
138
+ 'silver' => 'C0C0C0',
139
+ 'skyblue' => '87CEEB',
140
+ 'slateblue' => '6A5ACD',
141
+ 'slategray' => '708090',
142
+ 'slategrey' => '708090',
143
+ 'snow' => 'FFFAFA',
144
+ 'springgreen' => '00FF7F',
145
+ 'steelblue' => '4682B4',
146
+ 'tan' => 'D2B48C',
147
+ 'teal' => '008080',
148
+ 'thistle' => 'D8BFD8',
149
+ 'tomato' => 'FF6347',
150
+ 'turquoise' => '40E0D0',
151
+ 'violet' => 'EE82EE',
152
+ 'wheat' => 'F5DEB3',
153
+ 'white' => 'FFFFFF',
154
+ 'whitesmoke' => 'F5F5F5',
155
+ 'yellow' => 'FFFF00',
156
+ 'yellowgreen' => '9ACD32'
157
+ );
158
+
159
+ foreach ($colorsToConvert as $name => $hex) {
160
+ $hex = '#' . $hex;
161
+
162
+ $answer = Color::nameToHex($name);
163
+ Assert::same(
164
+ $hex,
165
+ $answer,
166
+ 'Incorrect hex result: "' . Color::nameToHex($name) .
167
+ '" should convert to "' . $hex .
168
+ '", but output was: "' . $answer . '".'
169
+ );
170
+ }
vendor/monolog/monolog/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ### 2.1.1 (2020-07-23)
2
 
3
  * Fixed removing of json encoding options
@@ -86,6 +101,10 @@
86
  * Added support for the PHP 7.x `mongodb` extension in the MongoDBHandler
87
  * Fixed many minor issues in various handlers, and probably added a few regressions too
88
 
 
 
 
 
89
  ### 1.25.5 (2020-07-23)
90
 
91
  * Fixed array access on null in RavenHandler
1
+ ### 2.2.0 (2020-12-14)
2
+
3
+ * Added JSON_PARTIAL_OUTPUT_ON_ERROR to default json encoding flags, to avoid dropping entire context data or even records due to an invalid subset of it somewhere
4
+ * Added setDateFormat to NormalizerFormatter (and Line/Json formatters by extension) to allow changing this after object creation
5
+ * Added RedisPubSubHandler to log records to a Redis channel using PUBLISH
6
+ * Added support for Elastica 7, and deprecated the $type argument of ElasticaFormatter which is not in use anymore as of Elastica 7
7
+ * Added support for millisecond write timeouts in SocketHandler, you can now pass floats to setWritingTimeout, e.g. 0.2 is 200ms
8
+ * Added support for unix sockets in SyslogUdpHandler (set $port to 0 to make the $host a unix socket)
9
+ * Added handleBatch support for TelegramBotHandler
10
+ * Added RFC5424e extended date format including milliseconds to SyslogUdpHandler
11
+ * Added support for configuring handlers with numeric level values in strings (coming from e.g. env vars)
12
+ * Fixed Wildfire/FirePHP/ChromePHP handling of unicode characters
13
+ * Fixed PHP 8 issues in SyslogUdpHandler
14
+ * Fixed internal type error when mbstring is missing
15
+
16
  ### 2.1.1 (2020-07-23)
17
 
18
  * Fixed removing of json encoding options
101
  * Added support for the PHP 7.x `mongodb` extension in the MongoDBHandler
102
  * Fixed many minor issues in various handlers, and probably added a few regressions too
103
 
104
+ ### 1.26.0 (2020-12-14)
105
+
106
+ * Added $dateFormat and $removeUsedContextFields arguments to PsrLogMessageProcessor (backport from 2.x)
107
+
108
  ### 1.25.5 (2020-07-23)
109
 
110
  * Fixed array access on null in RavenHandler
vendor/monolog/monolog/README.md CHANGED
@@ -64,7 +64,11 @@ can also add your own there if you publish one.
64
 
65
  ### Requirements
66
 
67
- - Monolog 2.x works with PHP 7.2 or above, use Monolog `^1.0` for PHP 5.3+ support.
 
 
 
 
68
 
69
  ### Submitting bugs and feature requests
70
 
64
 
65
  ### Requirements
66
 
67
+ - Monolog `^2.0` works with PHP 7.2 or above, use Monolog `^1.25` for PHP 5.3+ support.
68
+
69
+ ### Support
70
+
71
+ Monolog 1.x support is somewhat limited at this point and only important fixes will be done. You should migrate to Monolog 2 where possible to benefit from all the latest features and fixes.
72
 
73
  ### Submitting bugs and feature requests
74
 
vendor/monolog/monolog/composer.json CHANGED
@@ -2,14 +2,14 @@
2
  "name": "monolog/monolog",
3
  "description": "Sends your logs to files, sockets, inboxes, databases and various web services",
4
  "keywords": ["log", "logging", "psr-3"],
5
- "homepage": "http://github.com/Seldaek/monolog",
6
  "type": "library",
7
  "license": "MIT",
8
  "authors": [
9
  {
10
  "name": "Jordi Boggiano",
11
  "email": "j.boggiano@seld.be",
12
- "homepage": "http://seld.be"
13
  }
14
  ],
15
  "require": {
@@ -19,17 +19,18 @@
19
  "require-dev": {
20
  "aws/aws-sdk-php": "^2.4.9 || ^3.0",
21
  "doctrine/couchdb": "~1.0@dev",
22
- "elasticsearch/elasticsearch": "^6.0",
 
23
  "graylog2/gelf-php": "^1.4.2",
24
  "php-amqplib/php-amqplib": "~2.4",
25
  "php-console/php-console": "^3.1.3",
26
- "php-parallel-lint/php-parallel-lint": "^1.0",
27
  "phpspec/prophecy": "^1.6.1",
28
  "phpunit/phpunit": "^8.5",
29
  "predis/predis": "^1.1",
30
  "rollbar/rollbar": "^1.3",
31
- "ruflin/elastica": ">=0.90 <3.0",
32
- "swiftmailer/swiftmailer": "^5.3|^6.0"
 
33
  },
34
  "suggest": {
35
  "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
@@ -56,16 +57,12 @@
56
  },
57
  "extra": {
58
  "branch-alias": {
59
- "dev-master": "2.x-dev"
60
  }
61
  },
62
  "scripts": {
63
- "lint": [
64
- "parallel-lint . --exclude vendor"
65
- ],
66
- "test": [
67
- "phpunit"
68
- ]
69
  },
70
  "config": {
71
  "sort-packages": true,
2
  "name": "monolog/monolog",
3
  "description": "Sends your logs to files, sockets, inboxes, databases and various web services",
4
  "keywords": ["log", "logging", "psr-3"],
5
+ "homepage": "https://github.com/Seldaek/monolog",
6
  "type": "library",
7
  "license": "MIT",
8
  "authors": [
9
  {
10
  "name": "Jordi Boggiano",
11
  "email": "j.boggiano@seld.be",
12
+ "homepage": "https://seld.be"
13
  }
14
  ],
15
  "require": {
19
  "require-dev": {
20
  "aws/aws-sdk-php": "^2.4.9 || ^3.0",
21
  "doctrine/couchdb": "~1.0@dev",
22
+ "elasticsearch/elasticsearch": "^7",
23
+ "mongodb/mongodb": "^1.8",
24
  "graylog2/gelf-php": "^1.4.2",
25
  "php-amqplib/php-amqplib": "~2.4",
26
  "php-console/php-console": "^3.1.3",
 
27
  "phpspec/prophecy": "^1.6.1",
28
  "phpunit/phpunit": "^8.5",
29
  "predis/predis": "^1.1",
30
  "rollbar/rollbar": "^1.3",
31
+ "ruflin/elastica": ">=0.90 <7.0.1",
32
+ "swiftmailer/swiftmailer": "^5.3|^6.0",
33
+ "phpstan/phpstan": "^0.12.59"
34
  },
35
  "suggest": {
36
  "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
57
  },
58
  "extra": {
59
  "branch-alias": {
60
+ "dev-main": "2.x-dev"
61
  }
62
  },
63
  "scripts": {
64
+ "test": "vendor/bin/phpunit",
65
+ "phpstan": "vendor/bin/phpstan analyse"
 
 
 
 
66
  },
67
  "config": {
68
  "sort-packages": true,
vendor/monolog/monolog/phpstan.neon.dist ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ parameters:
2
+ level: 5
3
+
4
+ treatPhpDocTypesAsCertain: false
5
+ reportUnmatchedIgnoredErrors: false
6
+
7
+ paths:
8
+ - src/
9
+ # - tests/
10
+
11
+ ignoreErrors:
12
+ - '#zend_monitor_|ZEND_MONITOR_#'
13
+ - '#^Cannot call method ltrim\(\) on int\|false.$#'
14
+ - '#MongoDB\\(Client|Collection)#'
15
+ - message: '#Return type \(string\) of method Monolog\\Formatter\\LineFormatter::normalizeException\(\) should be compatible with return type \(array\) of method Monolog\\Formatter\\NormalizerFormatter::normalizeException\(\)#'
16
+ paths:
17
+ - src/Monolog/Formatter/LineFormatter.php
18
+ - message: '#Method Monolog\\Handler\\LogglyHandler::loadCurlHandle\(\) never returns resource so it can be removed from the return typehint.#'
19
+ paths:
20
+ - src/Monolog/Handler/LogglyHandler.php
vendor/monolog/monolog/src/Monolog/ErrorHandler.php CHANGED
@@ -58,6 +58,7 @@ class ErrorHandler
58
  */
59
  public static function register(LoggerInterface $logger, $errorLevelMap = [], $exceptionLevelMap = [], $fatalLevel = null): self
60
  {
 
61
  $handler = new static($logger);
62
  if ($errorLevelMap !== false) {
63
  $handler->registerErrorHandler($errorLevelMap);
@@ -74,7 +75,9 @@ class ErrorHandler
74
 
75
  public function registerExceptionHandler($levelMap = [], $callPrevious = true): self
76
  {
77
- $prev = set_exception_handler([$this, 'handleException']);
 
 
78
  $this->uncaughtExceptionLevelMap = $levelMap;
79
  foreach ($this->defaultExceptionLevelMap() as $class => $level) {
80
  if (!isset($this->uncaughtExceptionLevelMap[$class])) {
@@ -145,11 +148,7 @@ class ErrorHandler
145
  ];
146
  }
147
 
148
- /**
149
- * @private
150
- * @param \Exception $e
151
- */
152
- public function handleException($e)
153
  {
154
  $level = LogLevel::ERROR;
155
  foreach ($this->uncaughtExceptionLevelMap as $class => $candidate) {
58
  */
59
  public static function register(LoggerInterface $logger, $errorLevelMap = [], $exceptionLevelMap = [], $fatalLevel = null): self
60
  {
61
+ /** @phpstan-ignore-next-line */
62
  $handler = new static($logger);
63
  if ($errorLevelMap !== false) {
64
  $handler->registerErrorHandler($errorLevelMap);
75
 
76
  public function registerExceptionHandler($levelMap = [], $callPrevious = true): self
77
  {
78
+ $prev = set_exception_handler(function (\Throwable $e): void {
79
+ $this->handleException($e);
80
+ });
81
  $this->uncaughtExceptionLevelMap = $levelMap;
82
  foreach ($this->defaultExceptionLevelMap() as $class => $level) {
83
  if (!isset($this->uncaughtExceptionLevelMap[$class])) {
148
  ];
149
  }
150
 
151
+ private function handleException(\Throwable $e)
 
 
 
 
152
  {
153
  $level = LogLevel::ERROR;
154
  foreach ($this->uncaughtExceptionLevelMap as $class => $candidate) {
vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php CHANGED
@@ -26,15 +26,15 @@ class ElasticaFormatter extends NormalizerFormatter
26
  protected $index;
27
 
28
  /**
29
- * @var string Elastic search document type
30
  */
31
  protected $type;
32
 
33
  /**
34
- * @param string $index Elastic Search index name
35
- * @param string $type Elastic Search document type
36
  */
37
- public function __construct(string $index, string $type)
38
  {
39
  // elasticsearch requires a ISO 8601 format date with optional millisecond precision.
40
  parent::__construct('Y-m-d\TH:i:s.uP');
@@ -58,6 +58,9 @@ class ElasticaFormatter extends NormalizerFormatter
58
  return $this->index;
59
  }
60
 
 
 
 
61
  public function getType(): string
62
  {
63
  return $this->type;
@@ -72,7 +75,9 @@ class ElasticaFormatter extends NormalizerFormatter
72
  {
73
  $document = new Document();
74
  $document->setData($record);
75
- $document->setType($this->type);
 
 
76
  $document->setIndex($this->index);
77
 
78
  return $document;
26
  protected $index;
27
 
28
  /**
29
+ * @var ?string Elastic search document type
30
  */
31
  protected $type;
32
 
33
  /**
34
+ * @param string $index Elastic Search index name
35
+ * @param ?string $type Elastic Search document type, deprecated as of Elastica 7
36
  */
37
+ public function __construct(string $index, ?string $type)
38
  {
39
  // elasticsearch requires a ISO 8601 format date with optional millisecond precision.
40
  parent::__construct('Y-m-d\TH:i:s.uP');
58
  return $this->index;
59
  }
60
 
61
+ /**
62
+ * @deprecated since Elastica 7 type has no effect
63
+ */
64
  public function getType(): string
65
  {
66
  return $this->type;
75
  {
76
  $document = new Document();
77
  $document->setData($record);
78
+ if(method_exists($document, 'setType')) {
79
+ $document->setType($this->type);
80
+ }
81
  $document->setIndex($this->index);
82
 
83
  return $document;
vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php CHANGED
@@ -134,6 +134,7 @@ class GelfMessageFormatter extends NormalizerFormatter
134
  $message->setAdditional($this->contextPrefix . $key, $val);
135
  }
136
 
 
137
  if (null === $message->getFile() && isset($record['context']['exception']['file'])) {
138
  if (preg_match("/^(.+):([0-9]+)$/", $record['context']['exception']['file'], $matches)) {
139
  $message->setFile($matches[1]);
134
  $message->setAdditional($this->contextPrefix . $key, $val);
135
  }
136
 
137
+ /** @phpstan-ignore-next-line */
138
  if (null === $message->getFile() && isset($record['context']['exception']['file'])) {
139
  if (preg_match("/^(.+):([0-9]+)$/", $record['context']['exception']['file'], $matches)) {
140
  $message->setFile($matches[1]);
vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php CHANGED
@@ -63,8 +63,6 @@ class JsonFormatter extends NormalizerFormatter
63
 
64
  /**
65
  * {@inheritdoc}
66
- *
67
- * @suppress PhanTypeComparisonToArray
68
  */
69
  public function format(array $record): string
70
  {
63
 
64
  /**
65
  * {@inheritdoc}
 
 
66
  */
67
  public function format(array $record): string
68
  {
vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php CHANGED
@@ -126,9 +126,6 @@ class LineFormatter extends NormalizerFormatter
126
  return $this->replaceNewlines($this->convertToString($value));
127
  }
128
 
129
- /**
130
- * @suppress PhanParamSignatureMismatch
131
- */
132
  protected function normalizeException(\Throwable $e, int $depth = 0): string
133
  {
134
  $str = $this->formatException($e);
126
  return $this->replaceNewlines($this->convertToString($value));
127
  }
128
 
 
 
 
129
  protected function normalizeException(\Throwable $e, int $depth = 0): string
130
  {
131
  $str = $this->formatException($e);
vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php CHANGED
@@ -34,7 +34,7 @@ class MongoDBFormatter implements FormatterInterface
34
  $this->maxNestingLevel = max($maxNestingLevel, 0);
35
  $this->exceptionTraceAsString = $exceptionTraceAsString;
36
 
37
- $this->isLegacyMongoExt = version_compare(phpversion('mongodb'), '1.1.9', '<=');
38
  }
39
 
40
  /**
@@ -118,7 +118,7 @@ class MongoDBFormatter implements FormatterInterface
118
 
119
  private function getMongoDbDateTime(\DateTimeInterface $value): UTCDateTime
120
  {
121
- return new UTCDateTime((int) (string) floor($value->format('U.u') * 1000));
122
  }
123
 
124
  /**
@@ -130,7 +130,7 @@ class MongoDBFormatter implements FormatterInterface
130
  */
131
  private function legacyGetMongoDbDateTime(\DateTimeInterface $value): UTCDateTime
132
  {
133
- $milliseconds = floor($value->format('U.u') * 1000);
134
 
135
  $milliseconds = (PHP_INT_SIZE == 8) //64-bit OS?
136
  ? (int) $milliseconds
34
  $this->maxNestingLevel = max($maxNestingLevel, 0);
35
  $this->exceptionTraceAsString = $exceptionTraceAsString;
36
 
37
+ $this->isLegacyMongoExt = extension_loaded('mongodb') && version_compare(phpversion('mongodb'), '1.1.9', '<=');
38
  }
39
 
40
  /**
118
 
119
  private function getMongoDbDateTime(\DateTimeInterface $value): UTCDateTime
120
  {
121
+ return new UTCDateTime((int) floor(((float) $value->format('U.u')) * 1000));
122
  }
123
 
124
  /**
130
  */
131
  private function legacyGetMongoDbDateTime(\DateTimeInterface $value): UTCDateTime
132
  {
133
+ $milliseconds = floor(((float) $value->format('U.u')) * 1000);
134
 
135
  $milliseconds = (PHP_INT_SIZE == 8) //64-bit OS?
136
  ? (int) $milliseconds
vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php CHANGED
@@ -24,10 +24,14 @@ class NormalizerFormatter implements FormatterInterface
24
  {
25
  public const SIMPLE_DATE = "Y-m-d\TH:i:sP";
26
 
 
27
  protected $dateFormat;
 
28
  protected $maxNormalizeDepth = 9;
 
29
  protected $maxNormalizeItemCount = 1000;
30
 
 
31
  private $jsonEncodeOptions = Utils::DEFAULT_JSON_FLAGS;
32
 
33
  /**
@@ -61,6 +65,18 @@ class NormalizerFormatter implements FormatterInterface
61
  return $records;
62
  }
63
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  /**
65
  * The maximum number of normalization levels to go through
66
  */
@@ -159,12 +175,7 @@ class NormalizerFormatter implements FormatterInterface
159
  $value = $data->__toString();
160
  } else {
161
  // the rest is normalized by json encoding and decoding it
162
- $encoded = $this->toJson($data, true);
163
- if ($encoded === false) {
164
- $value = 'JSON_ERROR';
165
- } else {
166
- $value = json_decode($encoded, true);
167
- }
168
  }
169
 
170
  return [Utils::getClass($data) => $value];
@@ -248,12 +259,12 @@ class NormalizerFormatter implements FormatterInterface
248
  return $date->format($this->dateFormat);
249
  }
250
 
251
- public function addJsonEncodeOption($option)
252
  {
253
  $this->jsonEncodeOptions |= $option;
254
  }
255
 
256
- public function removeJsonEncodeOption($option)
257
  {
258
  $this->jsonEncodeOptions &= ~$option;
259
  }
24
  {
25
  public const SIMPLE_DATE = "Y-m-d\TH:i:sP";
26
 
27
+ /** @var string */
28
  protected $dateFormat;
29
+ /** @var int */
30
  protected $maxNormalizeDepth = 9;
31
+ /** @var int */
32
  protected $maxNormalizeItemCount = 1000;
33
 
34
+ /** @var int */
35
  private $jsonEncodeOptions = Utils::DEFAULT_JSON_FLAGS;
36
 
37
  /**
65
  return $records;
66
  }
67
 
68
+ public function getDateFormat(): string
69
+ {
70
+ return $this->dateFormat;
71
+ }
72
+
73
+ public function setDateFormat(string $dateFormat): self
74
+ {
75
+ $this->dateFormat = $dateFormat;
76
+
77
+ return $this;
78
+ }
79
+
80
  /**
81
  * The maximum number of normalization levels to go through
82
  */
175
  $value = $data->__toString();
176
  } else {
177
  // the rest is normalized by json encoding and decoding it
178
+ $value = json_decode($this->toJson($data, true), true);
 
 
 
 
 
179
  }
180
 
181
  return [Utils::getClass($data) => $value];
259
  return $date->format($this->dateFormat);
260
  }
261
 
262
+ public function addJsonEncodeOption(int $option)
263
  {
264
  $this->jsonEncodeOptions |= $option;
265
  }
266
 
267
+ public function removeJsonEncodeOption(int $option)
268
  {
269
  $this->jsonEncodeOptions &= ~$option;
270
  }
vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php CHANGED
@@ -33,13 +33,13 @@ class ScalarFormatter extends NormalizerFormatter
33
 
34
  /**
35
  * @param mixed $value
36
- * @return mixed
37
  */
38
  protected function normalizeValue($value)
39
  {
40
  $normalized = $this->normalize($value);
41
 
42
- if (is_array($normalized) || is_object($normalized)) {
43
  return $this->toJson($normalized, true);
44
  }
45
 
33
 
34
  /**
35
  * @param mixed $value
36
+ * @return string|int|bool|null
37
  */
38
  protected function normalizeValue($value)
39
  {
40
  $normalized = $this->normalize($value);
41
 
42
+ if (is_array($normalized)) {
43
  return $this->toJson($normalized, true);
44
  }
45
 
vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php CHANGED
@@ -36,6 +36,17 @@ class WildfireFormatter extends NormalizerFormatter
36
  Logger::EMERGENCY => 'ERROR',
37
  ];
38
 
 
 
 
 
 
 
 
 
 
 
 
39
  /**
40
  * {@inheritdoc}
41
  */
@@ -105,7 +116,7 @@ class WildfireFormatter extends NormalizerFormatter
105
 
106
  /**
107
  * {@inheritdoc}
108
- * @suppress PhanTypeMismatchReturn
109
  */
110
  protected function normalize($data, int $depth = 0)
111
  {
36
  Logger::EMERGENCY => 'ERROR',
37
  ];
38
 
39
+ /**
40
+ * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format
41
+ */
42
+ public function __construct(?string $dateFormat = null)
43
+ {
44
+ parent::__construct($dateFormat);
45
+
46
+ // http headers do not like non-ISO-8559-1 characters
47
+ $this->removeJsonEncodeOption(JSON_UNESCAPED_UNICODE);
48
+ }
49
+
50
  /**
51
  * {@inheritdoc}
52
  */
116
 
117
  /**
118
  * {@inheritdoc}
119
+ * @return int|bool|string|null|array|object
120
  */
121
  protected function normalize($data, int $depth = 0)
122
  {
vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php CHANGED
@@ -27,6 +27,7 @@ class BufferHandler extends AbstractHandler implements ProcessableHandlerInterfa
27
  {
28
  use ProcessableHandlerTrait;
29
 
 
30
  protected $handler;
31
  protected $bufferSize = 0;
32
  protected $bufferLimit;
@@ -137,9 +138,13 @@ class BufferHandler extends AbstractHandler implements ProcessableHandlerInterfa
137
  */
138
  public function setFormatter(FormatterInterface $formatter): HandlerInterface
139
  {
140
- $this->handler->setFormatter($formatter);
 
141
 
142
- return $this;
 
 
 
143
  }
144
 
145
  /**
@@ -147,6 +152,10 @@ class BufferHandler extends AbstractHandler implements ProcessableHandlerInterfa
147
  */
148
  public function getFormatter(): FormatterInterface
149
  {
150
- return $this->handler->getFormatter();
 
 
 
 
151
  }
152
  }
27
  {
28
  use ProcessableHandlerTrait;
29
 
30
+ /** @var HandlerInterface */
31
  protected $handler;
32
  protected $bufferSize = 0;
33
  protected $bufferLimit;
138
  */
139
  public function setFormatter(FormatterInterface $formatter): HandlerInterface
140
  {
141
+ if ($this->handler instanceof FormattableHandlerInterface) {
142
+ $this->handler->setFormatter($formatter);
143
 
144
+ return $this;
145
+ }
146
+
147
+ throw new \UnexpectedValueException('The nested handler of type '.get_class($this->handler).' does not support formatters.');
148
  }
149
 
150
  /**
152
  */
153
  public function getFormatter(): FormatterInterface
154
  {
155
+ if ($this->handler instanceof FormattableHandlerInterface) {
156
+ return $this->handler->getFormatter();
157
+ }
158
+
159
+ throw new \UnexpectedValueException('The nested handler of type '.get_class($this->handler).' does not support formatters.');
160
  }
161
  }
vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php CHANGED
@@ -145,7 +145,7 @@ class ChromePHPHandler extends AbstractProcessingHandler
145
  self::$json['request_uri'] = $_SERVER['REQUEST_URI'] ?? '';
146
  }
147
 
148
- $json = Utils::jsonEncode(self::$json, null, true);
149
  $data = base64_encode(utf8_encode($json));
150
  if (strlen($data) > 3 * 1024) {
151
  self::$overflowed = true;
145
  self::$json['request_uri'] = $_SERVER['REQUEST_URI'] ?? '';
146
  }
147
 
148
+ $json = Utils::jsonEncode(self::$json, Utils::DEFAULT_JSON_FLAGS & ~JSON_UNESCAPED_UNICODE, true);
149
  $data = base64_encode(utf8_encode($json));
150
  if (strlen($data) > 3 * 1024) {
151
  self::$overflowed = true;
vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php CHANGED
@@ -11,6 +11,8 @@
11
 
12
  namespace Monolog\Handler\Curl;
13
 
 
 
14
  /**
15
  * This class is marked as internal and it is not under the BC promise of the package.
16
  *
@@ -31,10 +33,10 @@ final class Util
31
  /**
32
  * Executes a CURL request with optional retries and exception on failure
33
  *
34
- * @param resource $ch curl handler
35
- * @param int $retries
36
- * @param bool $closeAfterDone
37
- * @return bool|string @see curl_exec
38
  */
39
  public static function execute($ch, int $retries = 5, bool $closeAfterDone = true)
40
  {
11
 
12
  namespace Monolog\Handler\Curl;
13
 
14
+ use CurlHandle;
15
+
16
  /**
17
  * This class is marked as internal and it is not under the BC promise of the package.
18
  *
33
  /**
34
  * Executes a CURL request with optional retries and exception on failure
35
  *
36
+ * @param resource|CurlHandle $ch curl handler
37
+ * @param int $retries
38
+ * @param bool $closeAfterDone
39
+ * @return bool|string @see curl_exec
40
  */
41
  public static function execute($ch, int $retries = 5, bool $closeAfterDone = true)
42
  {
vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php CHANGED
@@ -53,6 +53,7 @@ class DynamoDbHandler extends AbstractProcessingHandler
53
  */
54
  public function __construct(DynamoDbClient $client, string $table, $level = Logger::DEBUG, bool $bubble = true)
55
  {
 
56
  if (defined('Aws\Sdk::VERSION') && version_compare(Sdk::VERSION, '3.0', '>=')) {
57
  $this->version = 3;
58
  $this->marshaler = new Marshaler;
@@ -75,6 +76,7 @@ class DynamoDbHandler extends AbstractProcessingHandler
75
  if ($this->version === 3) {
76
  $formatted = $this->marshaler->marshalItem($filtered);
77
  } else {
 
78
  $formatted = $this->client->formatAttributes($filtered);
79
  }
80
 
53
  */
54
  public function __construct(DynamoDbClient $client, string $table, $level = Logger::DEBUG, bool $bubble = true)
55
  {
56
+ /** @phpstan-ignore-next-line */
57
  if (defined('Aws\Sdk::VERSION') && version_compare(Sdk::VERSION, '3.0', '>=')) {
58
  $this->version = 3;
59
  $this->marshaler = new Marshaler;
76
  if ($this->version === 3) {
77
  $formatted = $this->marshaler->marshalItem($filtered);
78
  } else {
79
+ /** @phpstan-ignore-next-line */
80
  $formatted = $this->client->formatAttributes($filtered);
81
  }
82
 
vendor/monolog/monolog/src/Monolog/Handler/ElasticaHandler.php CHANGED
@@ -25,7 +25,7 @@ use Elastica\Exception\ExceptionInterface;
25
  * $client = new \Elastica\Client();
26
  * $options = array(
27
  * 'index' => 'elastic_index_name',
28
- * 'type' => 'elastic_doc_type',
29
  * );
30
  * $handler = new ElasticaHandler($client, $options);
31
  * $log = new Logger('application');
25
  * $client = new \Elastica\Client();
26
  * $options = array(
27
  * 'index' => 'elastic_index_name',
28
+ * 'type' => 'elastic_doc_type', Types have been removed in Elastica 7
29
  * );
30
  * $handler = new ElasticaHandler($client, $options);
31
  * $log = new Logger('application');
vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php CHANGED
@@ -159,9 +159,14 @@ class FilterHandler extends Handler implements ProcessableHandlerInterface, Rese
159
  */
160
  public function setFormatter(FormatterInterface $formatter): HandlerInterface
161
  {
162
- $this->getHandler()->setFormatter($formatter);
 
 
163
 
164
- return $this;
 
 
 
165
  }
166
 
167
  /**
@@ -169,7 +174,12 @@ class FilterHandler extends Handler implements ProcessableHandlerInterface, Rese
169
  */
170
  public function getFormatter(): FormatterInterface
171
  {
172
- return $this->getHandler()->getFormatter();
 
 
 
 
 
173
  }
174
 
175
  public function reset()
159
  */
160
  public function setFormatter(FormatterInterface $formatter): HandlerInterface
161
  {
162
+ $handler = $this->getHandler();
163
+ if ($handler instanceof FormattableHandlerInterface) {
164
+ $handler->setFormatter($formatter);
165
 
166
+ return $this;
167
+ }
168
+
169
+ throw new \UnexpectedValueException('The nested handler of type '.get_class($handler).' does not support formatters.');
170
  }
171
 
172
  /**
174
  */
175
  public function getFormatter(): FormatterInterface
176
  {
177
+ $handler = $this->getHandler();
178
+ if ($handler instanceof FormattableHandlerInterface) {
179
+ return $handler->getFormatter();
180
+ }
181
+
182
+ throw new \UnexpectedValueException('The nested handler of type '.get_class($handler).' does not support formatters.');
183
  }
184
 
185
  public function reset()
vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php CHANGED
@@ -37,6 +37,7 @@ class FingersCrossedHandler extends Handler implements ProcessableHandlerInterfa
37
  {
38
  use ProcessableHandlerTrait;
39
 
 
40
  protected $handler;
41
  protected $activationStrategy;
42
  protected $buffering = true;
@@ -202,9 +203,14 @@ class FingersCrossedHandler extends Handler implements ProcessableHandlerInterfa
202
  */
203
  public function setFormatter(FormatterInterface $formatter): HandlerInterface
204
  {
205
- $this->getHandler()->setFormatter($formatter);
 
 
206
 
207
- return $this;
 
 
 
208
  }
209
 
210
  /**
@@ -212,6 +218,11 @@ class FingersCrossedHandler extends Handler implements ProcessableHandlerInterfa
212
  */
213
  public function getFormatter(): FormatterInterface
214
  {
215
- return $this->getHandler()->getFormatter();
 
 
 
 
 
216
  }
217
  }
37
  {
38
  use ProcessableHandlerTrait;
39
 
40
+ /** @var HandlerInterface */
41
  protected $handler;
42
  protected $activationStrategy;
43
  protected $buffering = true;
203
  */
204
  public function setFormatter(FormatterInterface $formatter): HandlerInterface
205
  {
206
+ $handler = $this->getHandler();
207
+ if ($handler instanceof FormattableHandlerInterface) {
208
+ $handler->setFormatter($formatter);
209
 
210
+ return $this;
211
+ }
212
+
213
+ throw new \UnexpectedValueException('The nested handler of type '.get_class($handler).' does not support formatters.');
214
  }
215
 
216
  /**
218
  */
219
  public function getFormatter(): FormatterInterface
220
  {
221
+ $handler = $this->getHandler();
222
+ if ($handler instanceof FormattableHandlerInterface) {
223
+ return $handler->getFormatter();
224
+ }
225
+
226
+ throw new \UnexpectedValueException('The nested handler of type '.get_class($handler).' does not support formatters.');
227
  }
228
  }
vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php CHANGED
@@ -22,13 +22,12 @@ use Monolog\Formatter\LineFormatter;
22
  trait FormattableHandlerTrait
23
  {
24
  /**
25
- * @var FormatterInterface
26
  */
27
  protected $formatter;
28
 
29
  /**
30
  * {@inheritdoc}
31
- * @suppress PhanTypeMismatchReturn
32
  */
33
  public function setFormatter(FormatterInterface $formatter): HandlerInterface
34
  {
22
  trait FormattableHandlerTrait
23
  {
24
  /**
25
+ * @var ?FormatterInterface
26
  */
27
  protected $formatter;
28
 
29
  /**
30
  * {@inheritdoc}
 
31
  */
32
  public function setFormatter(FormatterInterface $formatter): HandlerInterface
33
  {
vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php CHANGED
@@ -23,6 +23,7 @@ class GroupHandler extends Handler implements ProcessableHandlerInterface, Reset
23
  {
24
  use ProcessableHandlerTrait;
25
 
 
26
  protected $handlers;
27
  protected $bubble;
28
 
@@ -116,7 +117,9 @@ class GroupHandler extends Handler implements ProcessableHandlerInterface, Reset
116
  public function setFormatter(FormatterInterface $formatter): HandlerInterface
117
  {
118
  foreach ($this->handlers as $handler) {
119
- $handler->setFormatter($formatter);
 
 
120
  }
121
 
122
  return $this;
23
  {
24
  use ProcessableHandlerTrait;
25
 
26
+ /** @var HandlerInterface[] */
27
  protected $handlers;
28
  protected $bubble;
29
 
117
  public function setFormatter(FormatterInterface $formatter): HandlerInterface
118
  {
119
  foreach ($this->handlers as $handler) {
120
+ if ($handler instanceof FormattableHandlerInterface) {
121
+ $handler->setFormatter($formatter);
122
+ }
123
  }
124
 
125
  return $this;
vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php CHANGED
@@ -108,6 +108,8 @@ class HandlerWrapper implements HandlerInterface, ProcessableHandlerInterface, F
108
  {
109
  if ($this->handler instanceof FormattableHandlerInterface) {
110
  $this->handler->setFormatter($formatter);
 
 
111
  }
112
 
113
  throw new \LogicException('The wrapped handler does not implement ' . FormattableHandlerInterface::class);
@@ -128,7 +130,7 @@ class HandlerWrapper implements HandlerInterface, ProcessableHandlerInterface, F
128
  public function reset()
129
  {
130
  if ($this->handler instanceof ResettableInterface) {
131
- return $this->handler->reset();
132
  }
133
  }
134
  }
108
  {
109
  if ($this->handler instanceof FormattableHandlerInterface) {
110
  $this->handler->setFormatter($formatter);
111
+
112
+ return $this;
113
  }
114
 
115
  throw new \LogicException('The wrapped handler does not implement ' . FormattableHandlerInterface::class);
130
  public function reset()
131
  {
132
  if ($this->handler instanceof ResettableInterface) {
133
+ $this->handler->reset();
134
  }
135
  }
136
  }
vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php CHANGED
@@ -15,6 +15,7 @@ use Monolog\Logger;
15
  use Monolog\Formatter\FormatterInterface;
16
  use Monolog\Formatter\LogglyFormatter;
17
  use function array_key_exists;
 
18
 
19
  /**
20
  * Sends errors to Loggly.
@@ -32,7 +33,7 @@ class LogglyHandler extends AbstractProcessingHandler
32
  /**
33
  * Caches the curl handlers for every given endpoint.
34
  *
35
- * @var array
36
  */
37
  protected $curlHandlers = [];
38
 
@@ -63,12 +64,12 @@ class LogglyHandler extends AbstractProcessingHandler
63
  *
64
  * @param string $endpoint
65
  *
66
- * @return resource
67
  */
68
  protected function getCurlHandler(string $endpoint)
69
  {
70
  if (!array_key_exists($endpoint, $this->curlHandlers)) {
71
- $this->curlHandlers[$endpoint] = $this->loadCurlHandler($endpoint);
72
  }
73
 
74
  return $this->curlHandlers[$endpoint];
@@ -79,9 +80,9 @@ class LogglyHandler extends AbstractProcessingHandler
79
  *
80
  * @param string $endpoint
81
  *
82
- * @return resource
83
  */
84
- private function loadCurlHandler(string $endpoint)
85
  {
86
  $url = sprintf("https://%s/%s/%s/", static::HOST, $endpoint, $this->token);
87
 
15
  use Monolog\Formatter\FormatterInterface;
16
  use Monolog\Formatter\LogglyFormatter;
17
  use function array_key_exists;
18
+ use CurlHandle;
19
 
20
  /**
21
  * Sends errors to Loggly.
33
  /**
34
  * Caches the curl handlers for every given endpoint.
35
  *
36
+ * @var resource[]|CurlHandle[]
37
  */
38
  protected $curlHandlers = [];
39
 
64
  *
65
  * @param string $endpoint
66
  *
67
+ * @return resource|CurlHandle
68
  */
69
  protected function getCurlHandler(string $endpoint)
70
  {
71
  if (!array_key_exists($endpoint, $this->curlHandlers)) {
72
+ $this->curlHandlers[$endpoint] = $this->loadCurlHandle($endpoint);
73
  }
74
 
75
  return $this->curlHandlers[$endpoint];
80
  *
81
  * @param string $endpoint
82
  *
83
+ * @return resource|CurlHandle
84
  */
85
+ private function loadCurlHandle(string $endpoint)
86
  {
87
  $url = sprintf("https://%s/%s/%s/", static::HOST, $endpoint, $this->token);
88
 
vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php CHANGED
@@ -13,6 +13,7 @@ namespace Monolog\Handler;
13
 
14
  use Monolog\Logger;
15
  use Swift;
 
16
 
17
  /**
18
  * MandrillHandler uses cURL to send the emails to the Mandrill API
@@ -21,25 +22,27 @@ use Swift;
21
  */
22
  class MandrillHandler extends MailHandler
23
  {
 
24
  protected $message;
 
25
  protected $apiKey;
26
 
27
  /**
28
- * @psalm-param Swift_Message|callable(string, array): Swift_Message $message
29
  *
30
- * @param string $apiKey A valid Mandrill API key
31
- * @param callable|\Swift_Message $message An example message for real messages, only the body will be replaced
32
- * @param string|int $level The minimum logging level at which this handler will be triggered
33
- * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
34
  */
35
  public function __construct(string $apiKey, $message, $level = Logger::ERROR, bool $bubble = true)
36
  {
37
  parent::__construct($level, $bubble);
38
 
39
- if (!$message instanceof \Swift_Message && is_callable($message)) {
40
  $message = $message();
41
  }
42
- if (!$message instanceof \Swift_Message) {
43
  throw new \InvalidArgumentException('You must provide either a Swift_Message instance or a callable returning it');
44
  }
45
  $this->message = $message;
@@ -58,9 +61,11 @@ class MandrillHandler extends MailHandler
58
 
59
  $message = clone $this->message;
60
  $message->setBody($content, $mime);
 
61
  if (version_compare(Swift::VERSION, '6.0.0', '>=')) {
62
  $message->setDate(new \DateTimeImmutable());
63
  } else {
 
64
  $message->setDate(time());
65
  }
66
 
13
 
14
  use Monolog\Logger;
15
  use Swift;
16
+ use Swift_Message;
17
 
18
  /**
19
  * MandrillHandler uses cURL to send the emails to the Mandrill API
22
  */
23
  class MandrillHandler extends MailHandler
24
  {
25
+ /** @var Swift_Message */
26
  protected $message;
27
+ /** @var string */
28
  protected $apiKey;
29
 
30
  /**
31
+ * @psalm-param Swift_Message|callable(): Swift_Message $message
32
  *
33
+ * @param string $apiKey A valid Mandrill API key
34
+ * @param callable|Swift_Message $message An example message for real messages, only the body will be replaced
35
+ * @param string|int $level The minimum logging level at which this handler will be triggered
36
+ * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
37
  */
38
  public function __construct(string $apiKey, $message, $level = Logger::ERROR, bool $bubble = true)
39
  {
40
  parent::__construct($level, $bubble);
41
 
42
+ if (!$message instanceof Swift_Message && is_callable($message)) {
43
  $message = $message();
44
  }
45
+ if (!$message instanceof Swift_Message) {
46
  throw new \InvalidArgumentException('You must provide either a Swift_Message instance or a callable returning it');
47
  }
48
  $this->message = $message;
61
 
62
  $message = clone $this->message;
63
  $message->setBody($content, $mime);
64
+ /** @phpstan-ignore-next-line */
65
  if (version_compare(Swift::VERSION, '6.0.0', '>=')) {
66
  $message->setDate(new \DateTimeImmutable());
67
  } else {
68
+ /** @phpstan-ignore-next-line */
69
  $message->setDate(time());
70
  }
71
 
vendor/monolog/monolog/src/Monolog/Handler/OverflowHandler.php CHANGED
@@ -131,9 +131,13 @@ class OverflowHandler extends AbstractHandler implements FormattableHandlerInter
131
  */
132
  public function setFormatter(FormatterInterface $formatter): HandlerInterface
133
  {
134
- $this->handler->setFormatter($formatter);
 
135
 
136
- return $this;
 
 
 
137
  }
138
 
139
  /**
@@ -141,6 +145,10 @@ class OverflowHandler extends AbstractHandler implements FormattableHandlerInter
141
  */
142
  public function getFormatter(): FormatterInterface
143
  {
144
- return $this->handler->getFormatter();
 
 
 
 
145
  }
146
  }
131
  */
132
  public function setFormatter(FormatterInterface $formatter): HandlerInterface
133
  {
134
+ if ($this->handler instanceof FormattableHandlerInterface) {
135
+ $this->handler->setFormatter($formatter);
136
 
137
+ return $this;
138
+ }
139
+
140
+ throw new \UnexpectedValueException('The nested handler of type '.get_class($this->handler).' does not support formatters.');
141
  }
142
 
143
  /**
145
  */
146
  public function getFormatter(): FormatterInterface
147
  {
148
+ if ($this->handler instanceof FormattableHandlerInterface) {
149
+ return $this->handler->getFormatter();
150
+ }
151
+
152
+ throw new \UnexpectedValueException('The nested handler of type '.get_class($this->handler).' does not support formatters.');
153
  }
154
  }
vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php CHANGED
@@ -93,9 +93,6 @@ class PHPConsoleHandler extends AbstractProcessingHandler
93
  return array_replace($this->options, $options);
94
  }
95
 
96
- /**
97
- * @suppress PhanTypeMismatchArgument
98
- */
99
  private function initConnector(?Connector $connector = null): Connector
100
  {
101
  if (!$connector) {
93
  return array_replace($this->options, $options);
94
  }
95
 
 
 
 
96
  private function initConnector(?Connector $connector = null): Connector
97
  {
98
  if (!$connector) {
vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php CHANGED
@@ -27,7 +27,6 @@ trait ProcessableHandlerTrait
27
 
28
  /**
29
  * {@inheritdoc}
30
- * @suppress PhanTypeMismatchReturn
31
  */
32
  public function pushProcessor(callable $callback): HandlerInterface
33
  {
27
 
28
  /**
29
  * {@inheritdoc}
 
30
  */
31
  public function pushProcessor(callable $callback): HandlerInterface
32
  {
vendor/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php declare(strict_types=1);
2
+
3
+ /*
4
+ * This file is part of the Monolog package.
5
+ *
6
+ * (c) Jordi Boggiano <j.boggiano@seld.be>
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace Monolog\Handler;
13
+
14
+ use Monolog\Formatter\LineFormatter;
15
+ use Monolog\Formatter\FormatterInterface;
16
+ use Monolog\Logger;
17
+
18
+ /**
19
+ * Sends the message to a Redis Pub/Sub channel using PUBLISH
20
+ *
21
+ * usage example:
22
+ *
23
+ * $log = new Logger('application');
24
+ * $redis = new RedisPubSubHandler(new Predis\Client("tcp://localhost:6379"), "logs", Logger::WARNING);
25
+ * $log->pushHandler($redis);
26
+ *
27
+ * @author Gaëtan Faugère <gaetan@fauge.re>
28
+ */
29
+ class RedisPubSubHandler extends AbstractProcessingHandler
30
+ {
31
+ private $redisClient;
32
+ private $channelKey;
33
+
34
+ /**
35
+ * @param \Predis\Client|\Redis $redis The redis instance
36
+ * @param string $key The channel key to publish records to
37
+ * @param string|int $level The minimum logging level at which this handler will be triggered
38
+ * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
39
+ */
40
+ public function __construct($redis, string $key, $level = Logger::DEBUG, bool $bubble = true)
41
+ {
42
+ if (!(($redis instanceof \Predis\Client) || ($redis instanceof \Redis))) {
43
+ throw new \InvalidArgumentException('Predis\Client or Redis instance required');
44
+ }
45
+
46
+ $this->redisClient = $redis;
47
+ $this->channelKey = $key;
48
+
49
+ parent::__construct($level, $bubble);
50
+ }
51
+
52
+ /**
53
+ * {@inheritDoc}
54
+ */
55
+ protected function write(array $record): void
56
+ {
57
+ $this->redisClient->publish($this->channelKey, $record["formatted"]);
58
+ }
59
+
60
+ /**
61
+ * {@inheritDoc}
62
+ */
63
+ protected function getDefaultFormatter(): FormatterInterface
64
+ {
65
+ return new LineFormatter();
66
+ }
67
+ }
vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php CHANGED
@@ -100,9 +100,14 @@ class SamplingHandler extends AbstractHandler implements ProcessableHandlerInter
100
  */
101
  public function setFormatter(FormatterInterface $formatter): HandlerInterface
102
  {
103
- $this->getHandler()->setFormatter($formatter);
 
 
104
 
105
- return $this;
 
 
 
106
  }
107
 
108
  /**
@@ -110,6 +115,11 @@ class SamplingHandler extends AbstractHandler implements ProcessableHandlerInter
110
  */
111
  public function getFormatter(): FormatterInterface
112
  {
113
- return $this->getHandler()->getFormatter();
 
 
 
 
 
114
  }
115
  }
100
  */
101
  public function setFormatter(FormatterInterface $formatter): HandlerInterface
102
  {
103
+ $handler = $this->getHandler();
104
+ if ($handler instanceof FormattableHandlerInterface) {
105
+ $handler->setFormatter($formatter);
106
 
107
+ return $this;
108
+ }
109
+
110
+ throw new \UnexpectedValueException('The nested handler of type '.get_class($handler).' does not support formatters.');
111
  }
112
 
113
  /**
115
  */
116
  public function getFormatter(): FormatterInterface
117
  {
118
+ $handler = $this->getHandler();
119
+ if ($handler instanceof FormattableHandlerInterface) {
120
+ return $handler->getFormatter();
121
+ }
122
+
123
+ throw new \UnexpectedValueException('The nested handler of type '.get_class($handler).' does not support formatters.');
124
  }
125
  }
vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php CHANGED
@@ -77,7 +77,7 @@ class SlackRecord
77
  private $excludeFields;
78
 
79
  /**
80
- * @var FormatterInterface
81
  */
82
  private $formatter;
83
 
@@ -226,7 +226,7 @@ class SlackRecord
226
  *
227
  * @param ?string $channel
228
  *
229
- * @return SlackHandler
230
  */
231
  public function setChannel(?string $channel = null): self
232
  {
@@ -240,7 +240,7 @@ class SlackRecord
240
  *
241
  * @param ?string $username
242
  *
243
- * @return SlackHandler
244
  */
245
  public function setUsername(?string $username = null): self
246
  {
77
  private $excludeFields;
78
 
79
  /**
80
+ * @var ?FormatterInterface
81
  */
82
  private $formatter;
83
 
226
  *
227
  * @param ?string $channel
228
  *
229
+ * @return static
230
  */
231
  public function setChannel(?string $channel = null): self
232
  {
240
  *
241
  * @param ?string $username
242
  *
243
+ * @return static
244
  */
245
  public function setUsername(?string $username = null): self
246
  {
vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php CHANGED
@@ -44,7 +44,7 @@ class SlackHandler extends SocketHandler
44
  * @param string|null $iconEmoji The emoji name to use (or null)
45
  * @param int $level The minimum logging level at which this handler will be triggered
46
  * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
47
- * @param bool $useShortAttachment Whether the the context/extra messages added to Slack as attachments are in a short style
48
  * @param bool $includeContextAndExtra Whether the attachment should include context and extra data
49
  * @param array $excludeFields Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2']
50
  * @throws MissingExtensionException If no OpenSSL PHP extension configured
44
  * @param string|null $iconEmoji The emoji name to use (or null)
45
  * @param int $level The minimum logging level at which this handler will be triggered
46
  * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
47
+ * @param bool $useShortAttachment Whether the context/extra messages added to Slack as attachments are in a short style
48
  * @param bool $includeContextAndExtra Whether the attachment should include context and extra data
49
  * @param array $excludeFields Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2']
50
  * @throws MissingExtensionException If no OpenSSL PHP extension configured
vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php CHANGED
@@ -26,15 +26,16 @@ class SocketHandler extends AbstractProcessingHandler
26
  /** @var resource|null */
27
  private $resource;
28
  /** @var float */
29
- private $timeout = 0;
30
  /** @var float */
31
- private $writingTimeout = 10;
32
  private $lastSentBytes = null;
33
  /** @var int */
34
  private $chunkSize = null;
35
  private $persistent = false;
36
  private $errno;
37
  private $errstr;
 
38
  private $lastWritingAt;
39
 
40
  /**
@@ -354,13 +355,13 @@ class SocketHandler extends AbstractProcessingHandler
354
 
355
  private function writingIsTimedOut(int $sent): bool
356
  {
357
- $writingTimeout = (int) floor($this->writingTimeout);
358
- if (0 === $writingTimeout) {
359
  return false;
360
  }
361
 
362
  if ($sent !== $this->lastSentBytes) {
363
- $this->lastWritingAt = time();
364
  $this->lastSentBytes = $sent;
365
 
366
  return false;
@@ -368,7 +369,7 @@ class SocketHandler extends AbstractProcessingHandler
368
  usleep(100);
369
  }
370
 
371
- if ((time() - $this->lastWritingAt) >= $writingTimeout) {
372
  $this->closeSocket();
373
 
374
  return true;
26
  /** @var resource|null */
27
  private $resource;
28
  /** @var float */
29
+ private $timeout = 0.0;
30
  /** @var float */
31
+ private $writingTimeout = 10.0;
32
  private $lastSentBytes = null;
33
  /** @var int */
34
  private $chunkSize = null;
35
  private $persistent = false;
36
  private $errno;
37
  private $errstr;
38
+ /** @var ?float */
39
  private $lastWritingAt;
40
 
41
  /**
355
 
356
  private function writingIsTimedOut(int $sent): bool
357
  {
358
+ // convert to ms
359
+ if (0.0 == $this->writingTimeout) {
360
  return false;
361
  }
362
 
363
  if ($sent !== $this->lastSentBytes) {
364
+ $this->lastWritingAt = microtime(true);
365
  $this->lastSentBytes = $sent;
366
 
367
  return false;
369
  usleep(100);
370
  }
371
 
372
+ if ((microtime(true) - $this->lastWritingAt) >= $this->writingTimeout) {
373
  $this->closeSocket();
374
 
375
  return true;
vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php CHANGED
@@ -93,9 +93,11 @@ class SwiftMailerHandler extends MailHandler
93
  }
94
 
95
  $message->setBody($content, $mime);
 
96
  if (version_compare(Swift::VERSION, '6.0.0', '>=')) {
97
  $message->setDate(new \DateTimeImmutable());
98
  } else {
 
99
  $message->setDate(time());
100
  }
101
 
93
  }
94
 
95
  $message->setBody($content, $mime);
96
+ /** @phpstan-ignore-next-line */
97
  if (version_compare(Swift::VERSION, '6.0.0', '>=')) {
98
  $message->setDate(new \DateTimeImmutable());
99
  } else {
100
+ /** @phpstan-ignore-next-line */
101
  $message->setDate(time());
102
  }
103
 
vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php CHANGED
@@ -12,6 +12,7 @@
12
  namespace Monolog\Handler\SyslogUdp;
13
 
14
  use Monolog\Utils;
 
15
 
16
  class UdpSocket
17
  {
@@ -21,14 +22,21 @@ class UdpSocket
21
  protected $ip;
22
  /** @var int */
23
  protected $port;
24
- /** @var resource|null */
25
  protected $socket;
26
 
27
  public function __construct(string $ip, int $port = 514)
28
  {
29
  $this->ip = $ip;
30
  $this->port = $port;
31
- $this->socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
 
 
 
 
 
 
 
32
  }
33
 
34
  public function write($line, $header = "")
@@ -38,7 +46,7 @@ class UdpSocket
38
 
39
  public function close(): void
40
  {
41
- if (is_resource($this->socket)) {
42
  socket_close($this->socket);
43
  $this->socket = null;
44
  }
@@ -46,7 +54,7 @@ class UdpSocket
46
 
47
  protected function send(string $chunk): void
48
  {
49
- if (!is_resource($this->socket)) {
50
  throw new \RuntimeException('The UdpSocket to '.$this->ip.':'.$this->port.' has been closed and can not be written to anymore');
51
  }
52
  socket_sendto($this->socket, $chunk, strlen($chunk), $flags = 0, $this->ip, $this->port);
12
  namespace Monolog\Handler\SyslogUdp;
13
 
14
  use Monolog\Utils;
15
+ use Socket;
16
 
17
  class UdpSocket
18
  {
22
  protected $ip;
23
  /** @var int */
24
  protected $port;
25
+ /** @var resource|Socket|null */
26
  protected $socket;
27
 
28
  public function __construct(string $ip, int $port = 514)
29
  {
30
  $this->ip = $ip;
31
  $this->port = $port;
32
+ $domain = AF_INET;
33
+ $protocol = SOL_UDP;
34
+ // Check if we are using unix sockets.
35
+ if ($port === 0) {
36
+ $domain = AF_UNIX;
37
+ $protocol = IPPROTO_IP;
38
+ }
39
+ $this->socket = socket_create($domain, SOCK_DGRAM, $protocol) ?: null;
40
  }
41
 
42
  public function write($line, $header = "")
46
 
47
  public function close(): void
48
  {
49
+ if (is_resource($this->socket) || $this->socket instanceof Socket) {
50
  socket_close($this->socket);
51
  $this->socket = null;
52
  }
54
 
55
  protected function send(string $chunk): void
56
  {
57
+ if (!is_resource($this->socket) && !$this->socket instanceof Socket) {
58
  throw new \RuntimeException('The UdpSocket to '.$this->ip.':'.$this->port.' has been closed and can not be written to anymore');
59
  }
60
  socket_sendto($this->socket, $chunk, strlen($chunk), $flags = 0, $this->ip, $this->port);
vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php CHANGED
@@ -25,10 +25,12 @@ class SyslogUdpHandler extends AbstractSyslogHandler
25
  {
26
  const RFC3164 = 0;
27
  const RFC5424 = 1;
 
28
 
29
  private $dateFormats = array(
30
  self::RFC3164 => 'M d H:i:s',
31
  self::RFC5424 => \DateTime::RFC3339,
 
32
  );
33
 
34
  protected $socket;
@@ -36,8 +38,8 @@ class SyslogUdpHandler extends AbstractSyslogHandler
36
  protected $rfc;
37
 
38
  /**
39
- * @param string $host
40
- * @param int $port
41
  * @param string|int $facility Either one of the names of the keys in $this->facilities, or a LOG_* facility constant
42
  * @param string|int $level The minimum logging level at which this handler will be triggered
43
  * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
@@ -51,7 +53,7 @@ class SyslogUdpHandler extends AbstractSyslogHandler
51
  $this->ident = $ident;
52
  $this->rfc = $rfc;
53
 
54
- $this->socket = new UdpSocket($host, $port ?: 514);
55
  }
56
 
57
  protected function write(array $record): void
@@ -94,7 +96,7 @@ class SyslogUdpHandler extends AbstractSyslogHandler
94
  $hostname = '-';
95
  }
96
 
97
- if ($this->rfc === self::RFC3164) {
98
  $datetime->setTimezone(new \DateTimeZone('UTC'));
99
  }
100
  $date = $datetime->format($this->dateFormats[$this->rfc]);
25
  {
26
  const RFC3164 = 0;
27
  const RFC5424 = 1;
28
+ const RFC5424e = 2;
29
 
30
  private $dateFormats = array(
31
  self::RFC3164 => 'M d H:i:s',
32
  self::RFC5424 => \DateTime::RFC3339,
33
+ self::RFC5424e => \DateTime::RFC3339_EXTENDED,
34
  );
35
 
36
  protected $socket;
38
  protected $rfc;
39
 
40
  /**
41
+ * @param string $host Either IP/hostname or a path to a unix socket (port must be 0 then)
42
+ * @param int $port Port number, or 0 if $host is a unix socket
43
  * @param string|int $facility Either one of the names of the keys in $this->facilities, or a LOG_* facility constant
44
  * @param string|int $level The minimum logging level at which this handler will be triggered
45
  * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
53
  $this->ident = $ident;
54
  $this->rfc = $rfc;
55
 
56
+ $this->socket = new UdpSocket($host, $port);
57
  }
58
 
59
  protected function write(array $record): void
96
  $hostname = '-';
97
  }
98
 
99
+ if ($this->rfc === self::RFC3164 && ($datetime instanceof \DateTimeImmutable || $datetime instanceof \DateTime)) {
100
  $datetime->setTimezone(new \DateTimeZone('UTC'));
101
  }
102
  $date = $datetime->format($this->dateFormats[$this->rfc]);
vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php CHANGED
@@ -93,8 +93,6 @@ class TelegramBotHandler extends AbstractProcessingHandler
93
 
94
  $this->apiKey = $apiKey;
95
  $this->channel = $channel;
96
- $this->level = $level;
97
- $this->bubble = $bubble;
98
  $this->setParseMode($parseMode);
99
  $this->disableWebPagePreview($disableWebPagePreview);
100
  $this->disableNotification($disableNotification);
@@ -122,6 +120,30 @@ class TelegramBotHandler extends AbstractProcessingHandler
122
  return $this;
123
  }
124
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  /**
126
  * @inheritDoc
127
  */
93
 
94
  $this->apiKey = $apiKey;
95
  $this->channel = $channel;
 
 
96
  $this->setParseMode($parseMode);
97
  $this->disableWebPagePreview($disableWebPagePreview);
98
  $this->disableNotification($disableNotification);
120
  return $this;
121
  }
122
 
123
+ /**
124
+ * {@inheritdoc}
125
+ */
126
+ public function handleBatch(array $records): void
127
+ {
128
+ $messages = [];
129
+
130
+ foreach ($records as $record) {
131
+ if (!$this->isHandling($record)) {
132
+ continue;
133
+ }
134
+
135
+ if ($this->processors) {
136
+ $record = $this->processRecord($record);
137
+ }
138
+
139
+ $messages[] = $record;
140
+ }
141
+
142
+ if (!empty($messages)) {
143
+ $this->send((string) $this->getFormatter()->formatBatch($messages));
144
+ }
145
+ }
146
+
147
  /**
148
  * @inheritDoc
149
  */
vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php CHANGED
@@ -73,7 +73,7 @@ class ZendMonitorHandler extends AbstractProcessingHandler
73
  * Write to Zend Monitor Events
74
  * @param string $type Text displayed in "Class Name (custom)" field
75
  * @param string $message Text displayed in "Error String"
76
- * @param mixed $formatted Displayed in Custom Variables tab
77
  * @param int $severity Set the event severity level (-1,0,1)
78
  */
79
  protected function writeZendMonitorCustomEvent(string $type, string $message, array $formatted, int $severity): void
73
  * Write to Zend Monitor Events
74
  * @param string $type Text displayed in "Class Name (custom)" field
75
  * @param string $message Text displayed in "Error String"
76
+ * @param array $formatted Displayed in Custom Variables tab
77
  * @param int $severity Set the event severity level (-1,0,1)
78
  */
79
  protected function writeZendMonitorCustomEvent(string $type, string $message, array $formatted, int $severity): void
vendor/monolog/monolog/src/Monolog/Logger.php CHANGED
@@ -90,7 +90,7 @@ class Logger implements LoggerInterface, ResettableInterface
90
  /**
91
  * This is a static variable and not a constant to serve as an extension point for custom levels
92
  *
93
- * @var string[] $levels Logging levels with the levels as key
94
  */
95
  protected static $levels = [
96
  self::DEBUG => 'DEBUG',
@@ -257,20 +257,14 @@ class Logger implements LoggerInterface, ResettableInterface
257
  * Control the use of microsecond resolution timestamps in the 'datetime'
258
  * member of new records.
259
  *
260
- * On PHP7.0, generating microsecond resolution timestamps by calling
261
- * microtime(true), formatting the result via sprintf() and then parsing
262
- * the resulting string via \DateTime::createFromFormat() can incur
263
- * a measurable runtime overhead vs simple usage of DateTime to capture
264
- * a second resolution timestamp in systems which generate a large number
265
- * of log events.
266
- *
267
- * On PHP7.1 however microseconds are always included by the engine, so
268
- * this setting can be left alone unless you really want to suppress
269
- * microseconds in the output.
270
  *
271
  * @param bool $micro True to use microtime() to create timestamps
272
  */
273
- public function useMicrosecondTimestamps(bool $micro)
274
  {
275
  $this->microsecondTimestamps = $micro;
276
  }
@@ -278,61 +272,59 @@ class Logger implements LoggerInterface, ResettableInterface
278
  /**
279
  * Adds a log record.
280
  *
281
- * @param int $level The logging level
282
- * @param string $message The log message
283
- * @param array $context The log context
284
- * @return bool Whether the record has been processed
285
  */
286
  public function addRecord(int $level, string $message, array $context = []): bool
287
  {
288
- // check if any handler will handle this message so we can return early and save cycles
289
- $handlerKey = null;
290
- foreach ($this->handlers as $key => $handler) {
291
- if ($handler->isHandling(['level' => $level])) {
292
- $handlerKey = $key;
293
- break;
294
- }
295
- }
296
-
297
- if (null === $handlerKey) {
298
- return false;
299
- }
300
 
301
- $levelName = static::getLevelName($level);
302
-
303
- $record = [
304
- 'message' => $message,
305
- 'context' => $context,
306
- 'level' => $level,
307
- 'level_name' => $levelName,
308
- 'channel' => $this->name,
309
- 'datetime' => new DateTimeImmutable($this->microsecondTimestamps, $this->timezone),
310
- 'extra' => [],
311
- ];
312
-
313
- try {
314
- foreach ($this->processors as $processor) {
315
- $record = $processor($record);
316
- }
317
 
318
- // advance the array pointer to the first handler that will handle this record
319
- reset($this->handlers);
320
- while ($handlerKey !== key($this->handlers)) {
321
- next($this->handlers);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
322
  }
323
 
324
- while ($handler = current($this->handlers)) {
 
325
  if (true === $handler->handle($record)) {
326
  break;
327
  }
 
 
328
 
329
- next($this->handlers);
330
  }
331
- } catch (Throwable $e) {
332
- $this->handleException($e, $record);
333
  }
334
 
335
- return true;
336
  }
337
 
338
  /**
@@ -380,7 +372,7 @@ class Logger implements LoggerInterface, ResettableInterface
380
  /**
381
  * Gets all supported logging levels.
382
  *
383
- * @return array Assoc array with human-readable level names => level codes.
384
  */
385
  public static function getLevels(): array
386
  {
@@ -410,6 +402,10 @@ class Logger implements LoggerInterface, ResettableInterface
410
  public static function toMonologLevel($level): int
411
  {
412
  if (is_string($level)) {
 
 
 
 
413
  // Contains chars of all log levels and avoids using strtoupper() which may have
414
  // strange results depending on locale (for example, "i" will become "İ" in Turkish locale)
415
  $upper = strtr($level, 'abcdefgilmnortuwy', 'ABCDEFGILMNORTUWY');
@@ -467,9 +463,9 @@ class Logger implements LoggerInterface, ResettableInterface
467
  *
468
  * This method allows for compatibility with common interfaces.
469
  *
470
- * @param mixed $level The log level
471
- * @param string $message The log message
472
- * @param array $context The log context
473
  */
474
  public function log($level, $message, array $context = []): void
475
  {
@@ -483,8 +479,8 @@ class Logger implements LoggerInterface, ResettableInterface
483
  *
484
  * This method allows for compatibility with common interfaces.
485
  *
486
- * @param string $message The log message
487
- * @param array $context The log context
488
  */
489
  public function debug($message, array $context = []): void
490
  {
@@ -496,8 +492,8 @@ class Logger implements LoggerInterface, ResettableInterface
496
  *
497
  * This method allows for compatibility with common interfaces.
498
  *
499
- * @param string $message The log message
500
- * @param array $context The log context
501
  */
502
  public function info($message, array $context = []): void
503
  {
@@ -509,8 +505,8 @@ class Logger implements LoggerInterface, ResettableInterface
509
  *
510
  * This method allows for compatibility with common interfaces.
511
  *
512
- * @param string $message The log message
513
- * @param array $context The log context
514
  */
515
  public function notice($message, array $context = []): void
516
  {
@@ -522,8 +518,8 @@ class Logger implements LoggerInterface, ResettableInterface
522
  *
523
  * This method allows for compatibility with common interfaces.
524
  *
525
- * @param string $message The log message
526
- * @param array $context The log context
527
  */
528
  public function warning($message, array $context = []): void
529
  {
@@ -535,8 +531,8 @@ class Logger implements LoggerInterface, ResettableInterface
535
  *
536
  * This method allows for compatibility with common interfaces.
537
  *
538
- * @param string $message The log message
539
- * @param array $context The log context
540
  */
541
  public function error($message, array $context = []): void
542
  {
@@ -548,8 +544,8 @@ class Logger implements LoggerInterface, ResettableInterface
548
  *
549
  * This method allows for compatibility with common interfaces.
550
  *
551
- * @param string $message The log message
552
- * @param array $context The log context
553
  */
554
  public function critical($message, array $context = []): void
555
  {
@@ -561,8 +557,8 @@ class Logger implements LoggerInterface, ResettableInterface
561
  *
562
  * This method allows for compatibility with common interfaces.
563
  *
564
- * @param string $message The log message
565
- * @param array $context The log context
566
  */
567
  public function alert($message, array $context = []): void
568
  {
@@ -574,8 +570,8 @@ class Logger implements LoggerInterface, ResettableInterface
574
  *
575
  * This method allows for compatibility with common interfaces.
576
  *
577
- * @param string $message The log message
578
- * @param array $context The log context
579
  */
580
  public function emergency($message, array $context = []): void
581
  {
@@ -604,7 +600,7 @@ class Logger implements LoggerInterface, ResettableInterface
604
  * Delegates exception management to the custom exception handler,
605
  * or throws the exception if no custom handler is set.
606
  */
607
- protected function handleException(Throwable $e, array $record)
608
  {
609
  if (!$this->exceptionHandler) {
610
  throw $e;
90
  /**
91
  * This is a static variable and not a constant to serve as an extension point for custom levels
92
  *
93
+ * @var array<int, string> $levels Logging levels with the levels as key
94
  */
95
  protected static $levels = [
96
  self::DEBUG => 'DEBUG',
257
  * Control the use of microsecond resolution timestamps in the 'datetime'
258
  * member of new records.
259
  *
260
+ * As of PHP7.1 microseconds are always included by the engine, so
261
+ * there is no performance penalty and Monolog 2 enabled microseconds
262
+ * by default. This function lets you disable them though in case you want
263
+ * to suppress microseconds from the output.
 
 
 
 
 
 
264
  *
265
  * @param bool $micro True to use microtime() to create timestamps
266
  */
267
+ public function useMicrosecondTimestamps(bool $micro): void
268
  {
269
  $this->microsecondTimestamps = $micro;
270
  }
272
  /**
273
  * Adds a log record.
274
  *
275
+ * @param int $level The logging level
276
+ * @param string $message The log message
277
+ * @param mixed[] $context The log context
278
+ * @return bool Whether the record has been processed
279
  */
280
  public function addRecord(int $level, string $message, array $context = []): bool
281
  {
282
+ $offset = 0;
283
+ $record = null;
 
 
 
 
 
 
 
 
 
 
284
 
285
+ foreach ($this->handlers as $handler) {
286
+ if (null === $record) {
287
+ // skip creating the record as long as no handler is going to handle it
288
+ if (!$handler->isHandling(['level' => $level])) {
289
+ continue;
290
+ }
 
 
 
 
 
 
 
 
 
 
291
 
292
+ $levelName = static::getLevelName($level);
293
+
294
+ $record = [
295
+ 'message' => $message,
296
+ 'context' => $context,
297
+ 'level' => $level,
298
+ 'level_name' => $levelName,
299
+ 'channel' => $this->name,
300
+ 'datetime' => new DateTimeImmutable($this->microsecondTimestamps, $this->timezone),
301
+ 'extra' => [],
302
+ ];
303
+
304
+ try {
305
+ foreach ($this->processors as $processor) {
306
+ $record = $processor($record);
307
+ }
308
+ } catch (Throwable $e) {
309
+ $this->handleException($e, $record);
310
+
311
+ return true;
312
+ }
313
  }
314
 
315
+ // once the record exists, send it to all handlers as long as the bubbling chain is not interrupted
316
+ try {
317
  if (true === $handler->handle($record)) {
318
  break;
319
  }
320
+ } catch (Throwable $e) {
321
+ $this->handleException($e, $record);
322
 
323
+ return true;
324
  }
 
 
325
  }
326
 
327
+ return null !== $record;
328
  }
329
 
330
  /**
372
  /**
373
  * Gets all supported logging levels.
374
  *
375
+ * @return array<string, int> Assoc array with human-readable level names => level codes.
376
  */
377
  public static function getLevels(): array
378
  {
402
  public static function toMonologLevel($level): int
403
  {
404
  if (is_string($level)) {
405
+ if (is_numeric($level)) {
406
+ return intval($level);
407
+ }
408
+
409
  // Contains chars of all log levels and avoids using strtoupper() which may have
410
  // strange results depending on locale (for example, "i" will become "İ" in Turkish locale)
411
  $upper = strtr($level, 'abcdefgilmnortuwy', 'ABCDEFGILMNORTUWY');
463
  *
464
  * This method allows for compatibility with common interfaces.
465
  *
466
+ * @param mixed $level The log level
467
+ * @param string $message The log message
468
+ * @param mixed[] $context The log context
469
  */
470
  public function log($level, $message, array $context = []): void
471
  {
479
  *
480
  * This method allows for compatibility with common interfaces.
481
  *
482
+ * @param string $message The log message
483
+ * @param mixed[] $context The log context
484
  */
485
  public function debug($message, array $context = []): void
486
  {
492
  *
493
  * This method allows for compatibility with common interfaces.
494
  *
495
+ * @param string $message The log message
496
+ * @param mixed[] $context The log context
497
  */
498
  public function info($message, array $context = []): void
499
  {
505
  *
506
  * This method allows for compatibility with common interfaces.
507
  *
508
+ * @param string $message The log message
509
+ * @param mixed[] $context The log context
510
  */
511
  public function notice($message, array $context = []): void
512
  {
518
  *
519
  * This method allows for compatibility with common interfaces.
520
  *
521
+ * @param string $message The log message
522
+ * @param mixed[] $context The log context
523
  */
524
  public function warning($message, array $context = []): void
525
  {
531
  *
532
  * This method allows for compatibility with common interfaces.
533
  *
534
+ * @param string $message The log message
535
+ * @param mixed[] $context The log context
536
  */
537
  public function error($message, array $context = []): void
538
  {
544
  *
545
  * This method allows for compatibility with common interfaces.
546
  *
547
+ * @param string $message The log message
548
+ * @param mixed[] $context The log context
549
  */
550
  public function critical($message, array $context = []): void
551
  {
557
  *
558
  * This method allows for compatibility with common interfaces.
559
  *
560
+ * @param string $message The log message
561
+ * @param mixed[] $context The log context
562
  */
563
  public function alert($message, array $context = []): void
564
  {
570
  *
571
  * This method allows for compatibility with common interfaces.
572
  *
573
+ * @param string $message The log message
574
+ * @param mixed[] $context The log context
575
  */
576
  public function emergency($message, array $context = []): void
577
  {
600
  * Delegates exception management to the custom exception handler,
601
  * or throws the exception if no custom handler is set.
602
  */
603
+ protected function handleException(Throwable $e, array $record): void
604
  {
605
  if (!$this->exceptionHandler) {
606
  throw $e;
vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php CHANGED
@@ -70,7 +70,7 @@ class PsrLogMessageProcessor implements ProcessorInterface
70
  } elseif (is_object($val)) {
71
  $replacements[$placeholder] = '[object '.Utils::getClass($val).']';
72
  } elseif (is_array($val)) {
73
- $replacements[$placeholder] = 'array'.@json_encode($val);
74
  } else {
75
  $replacements[$placeholder] = '['.gettype($val).']';
76
  }
70
  } elseif (is_object($val)) {
71
  $replacements[$placeholder] = '[object '.Utils::getClass($val).']';
72
  } elseif (is_array($val)) {
73
+ $replacements[$placeholder] = 'array'.Utils::jsonEncode($val, null, true);
74
  } else {
75
  $replacements[$placeholder] = '['.gettype($val).']';
76
  }
vendor/monolog/monolog/src/Monolog/SignalHandler.php CHANGED
@@ -41,9 +41,6 @@ class SignalHandler
41
 
42
  if ($callPrevious) {
43
  $handler = pcntl_signal_get_handler($signo);
44
- if ($handler === false) {
45
- return $this;
46
- }
47
  $this->previousSignalHandler[$signo] = $handler;
48
  } else {
49
  unset($this->previousSignalHandler[$signo]);
41
 
42
  if ($callPrevious) {
43
  $handler = pcntl_signal_get_handler($signo);
 
 
 
44
  $this->previousSignalHandler[$signo] = $handler;
45
  } else {
46
  unset($this->previousSignalHandler[$signo]);
vendor/monolog/monolog/src/Monolog/Test/TestCase.php CHANGED
@@ -49,9 +49,6 @@ class TestCase extends \PHPUnit\Framework\TestCase
49
  ];
50
  }
51
 
52
- /**
53
- * @suppress PhanTypeMismatchReturn
54
- */
55
  protected function getIdentityFormatter(): FormatterInterface
56
  {
57
  $formatter = $this->createMock(FormatterInterface::class);
49
  ];
50
  }
51
 
 
 
 
52
  protected function getIdentityFormatter(): FormatterInterface
53
  {
54
  $formatter = $this->createMock(FormatterInterface::class);
vendor/monolog/monolog/src/Monolog/Utils.php CHANGED
@@ -13,25 +13,22 @@ namespace Monolog;
13
 
14
  final class Utils
15
  {
16
- const DEFAULT_JSON_FLAGS = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION | JSON_INVALID_UTF8_SUBSTITUTE;
17
 
18
- /**
19
- * @internal
20
- */
21
- public static function getClass($object): string
22
  {
23
  $class = \get_class($object);
24
 
25
  return 'c' === $class[0] && 0 === strpos($class, "class@anonymous\0") ? get_parent_class($class).'@anonymous' : $class;
26
  }
27
 
28
- public static function substr(string $string, int $start, ?int $length = null)
29
  {
30
  if (extension_loaded('mbstring')) {
31
  return mb_strcut($string, $start, $length);
32
  }
33
 
34
- return substr($string, $start, $length);
35
  }
36
 
37
  /**
@@ -66,7 +63,7 @@ final class Utils
66
  * Return the JSON representation of a value
67
  *
68
  * @param mixed $data
69
- * @param int $encodeFlags flags to pass to json encode, defaults to JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE
70
  * @param bool $ignoreErrors whether to ignore encoding errors or to throw on error, when ignored and the encoding fails, "null" is returned which is valid json for null
71
  * @throws \RuntimeException if encoding fails and errors are not ignored
72
  * @return string when errors are ignored and the encoding fails, "null" is returned which is valid json for null
@@ -142,7 +139,7 @@ final class Utils
142
  * @param mixed $data data that was meant to be encoded
143
  * @throws \RuntimeException
144
  */
145
- private static function throwEncodeError(int $code, $data)
146
  {
147
  switch ($code) {
148
  case JSON_ERROR_DEPTH:
@@ -177,9 +174,9 @@ final class Utils
177
  * Function converts the input in place in the passed variable so that it
178
  * can be used as a callback for array_walk_recursive.
179
  *
180
- * @param mixed &$data Input to check and convert if needed
181
  */
182
- private static function detectAndCleanUtf8(&$data)
183
  {
184
  if (is_string($data) && !preg_match('//u', $data)) {
185
  $data = preg_replace_callback(
13
 
14
  final class Utils
15
  {
16
+ const DEFAULT_JSON_FLAGS = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION | JSON_INVALID_UTF8_SUBSTITUTE | JSON_PARTIAL_OUTPUT_ON_ERROR;
17
 
18
+ public static function getClass(object $object): string
 
 
 
19
  {
20
  $class = \get_class($object);
21
 
22
  return 'c' === $class[0] && 0 === strpos($class, "class@anonymous\0") ? get_parent_class($class).'@anonymous' : $class;
23
  }
24
 
25
+ public static function substr(string $string, int $start, ?int $length = null): string
26
  {
27
  if (extension_loaded('mbstring')) {
28
  return mb_strcut($string, $start, $length);
29
  }
30
 
31
+ return substr($string, $start, (null === $length) ? strlen($string) : $length);
32
  }
33
 
34
  /**
63
  * Return the JSON representation of a value
64
  *
65
  * @param mixed $data
66
+ * @param int $encodeFlags flags to pass to json encode, defaults to DEFAULT_JSON_FLAGS
67
  * @param bool $ignoreErrors whether to ignore encoding errors or to throw on error, when ignored and the encoding fails, "null" is returned which is valid json for null
68
  * @throws \RuntimeException if encoding fails and errors are not ignored
69
  * @return string when errors are ignored and the encoding fails, "null" is returned which is valid json for null
139
  * @param mixed $data data that was meant to be encoded
140
  * @throws \RuntimeException
141
  */
142
+ private static function throwEncodeError(int $code, $data): void
143
  {
144
  switch ($code) {
145
  case JSON_ERROR_DEPTH:
174
  * Function converts the input in place in the passed variable so that it
175
  * can be used as a callback for array_walk_recursive.
176
  *
177
+ * @param mixed $data Input to check and convert if needed, passed by ref
178
  */
179
+ private static function detectAndCleanUtf8(&$data): void
180
  {
181
  if (is_string($data) && !preg_match('//u', $data)) {
182
  $data = preg_replace_callback(
vendor/nesbot/carbon/composer.json CHANGED
@@ -39,7 +39,7 @@
39
  "kylekatarnls/multi-tester": "^2.0",
40
  "phpmd/phpmd": "^2.9",
41
  "phpstan/extension-installer": "^1.0",
42
- "phpstan/phpstan": "^0.12.35",
43
  "phpunit/phpunit": "^7.5 || ^8.0",
44
  "squizlabs/php_codesniffer": "^3.4"
45
  },
39
  "kylekatarnls/multi-tester": "^2.0",
40
  "phpmd/phpmd": "^2.9",
41
  "phpstan/extension-installer": "^1.0",
42
+ "phpstan/phpstan": "^0.12.54",
43
  "phpunit/phpunit": "^7.5 || ^8.0",
44
  "squizlabs/php_codesniffer": "^3.4"
45
  },
vendor/nesbot/carbon/readme.md CHANGED
@@ -82,8 +82,6 @@ use Carbon\Carbon;
82
  printf("Now: %s", Carbon::now());
83
  ```
84
 
85
- <a name="install-nocomposer"/>
86
-
87
  ### Without Composer
88
 
89
  Why are you not using [composer](http://getcomposer.org/)? Download the Carbon [latest release](https://github.com/briannesbitt/Carbon/releases) and put the contents of the ZIP archive into a directory in your project. Then require the file `autoload.php` to get all classes and dependencies loaded on need.
82
  printf("Now: %s", Carbon::now());
83
  ```
84
 
 
 
85
  ### Without Composer
86
 
87
  Why are you not using [composer](http://getcomposer.org/)? Download the Carbon [latest release](https://github.com/briannesbitt/Carbon/releases) and put the contents of the ZIP archive into a directory in your project. Then require the file `autoload.php` to get all classes and dependencies loaded on need.
vendor/nesbot/carbon/src/Carbon/Carbon.php CHANGED
@@ -29,7 +29,7 @@ use DateTimeZone;
29
  * @property int $second
30
  * @property int $micro
31
  * @property int $microsecond
32
- * @property int $timestamp seconds since the Unix Epoch
33
  * @property string $englishDayOfWeek the day of week in English
34
  * @property string $shortEnglishDayOfWeek the abbreviated day of week in English
35
  * @property string $englishMonth the month in English
29
  * @property int $second
30
  * @property int $micro
31
  * @property int $microsecond
32
+ * @property int|float|string $timestamp seconds since the Unix Epoch
33
  * @property string $englishDayOfWeek the day of week in English
34
  * @property string $shortEnglishDayOfWeek the abbreviated day of week in English
35
  * @property string $englishMonth the month in English
vendor/nesbot/carbon/src/Carbon/CarbonImmutable.php CHANGED
@@ -29,7 +29,7 @@ use DateTimeZone;
29
  * @property int $second
30
  * @property int $micro
31
  * @property int $microsecond
32
- * @property int $timestamp seconds since the Unix Epoch
33
  * @property string $englishDayOfWeek the day of week in English
34
  * @property string $shortEnglishDayOfWeek the abbreviated day of week in English
35
  * @property string $englishMonth the month in English
29
  * @property int $second
30
  * @property int $micro
31
  * @property int $microsecond
32
+ * @property int|float|string $timestamp seconds since the Unix Epoch
33
  * @property string $englishDayOfWeek the day of week in English
34
  * @property string $shortEnglishDayOfWeek the abbreviated day of week in English
35
  * @property string $englishMonth the month in English
vendor/nesbot/carbon/src/Carbon/CarbonInterface.php CHANGED
@@ -33,488 +33,488 @@ use Throwable;
33
  *
34
  * <autodoc generated by `composer phpdoc`>
35
  *
36
- * @property int $year
37
- * @property int $yearIso
38
- * @property int $month
39
- * @property int $day
40
- * @property int $hour
41
- * @property int $minute
42
- * @property int $second
43
- * @property int $micro
44
- * @property int $microsecond
45
- * @property int $timestamp seconds since the Unix Epoch
46
- * @property string $englishDayOfWeek the day of week in English
47
- * @property string $shortEnglishDayOfWeek the abbreviated day of week in English
48
- * @property string $englishMonth the month in English
49
- * @property string $shortEnglishMonth the abbreviated month in English
50
- * @property string $localeDayOfWeek the day of week in current locale LC_TIME
51
- * @property string $shortLocaleDayOfWeek the abbreviated day of week in current locale LC_TIME
52
- * @property string $localeMonth the month in current locale LC_TIME
53
- * @property string $shortLocaleMonth the abbreviated month in current locale LC_TIME
54
- * @property int $milliseconds
55
- * @property int $millisecond
56
- * @property int $milli
57
- * @property int $week 1 through 53
58
- * @property int $isoWeek 1 through 53
59
- * @property int $weekYear year according to week format
60
- * @property int $isoWeekYear year according to ISO week format
61
- * @property int $dayOfYear 1 through 366
62
- * @property int $age does a diffInYears() with default parameters
63
- * @property int $offset the timezone offset in seconds from UTC
64
- * @property int $offsetMinutes the timezone offset in minutes from UTC
65
- * @property int $offsetHours the timezone offset in hours from UTC
66
- * @property CarbonTimeZone $timezone the current timezone
67
- * @property CarbonTimeZone $tz alias of $timezone
68
- * @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday)
69
- * @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday)
70
- * @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday
71
- * @property-read int $daysInMonth number of days in the given month
72
- * @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark)
73
- * @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark)
74
- * @property-read string $timezoneAbbreviatedName the current timezone abbreviated name
75
- * @property-read string $tzAbbrName alias of $timezoneAbbreviatedName
76
- * @property-read string $dayName long name of weekday translated according to Carbon locale, in english if no translation available for current language
77
- * @property-read string $shortDayName short name of weekday translated according to Carbon locale, in english if no translation available for current language
78
- * @property-read string $minDayName very short name of weekday translated according to Carbon locale, in english if no translation available for current language
79
- * @property-read string $monthName long name of month translated according to Carbon locale, in english if no translation available for current language
80
- * @property-read string $shortMonthName short name of month translated according to Carbon locale, in english if no translation available for current language
81
- * @property-read string $meridiem lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language
82
- * @property-read string $upperMeridiem uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language
83
- * @property-read int $noZeroHour current hour from 1 to 24
84
- * @property-read int $weeksInYear 51 through 53
85
- * @property-read int $isoWeeksInYear 51 through 53
86
- * @property-read int $weekOfMonth 1 through 5
87
- * @property-read int $weekNumberInMonth 1 through 5
88
- * @property-read int $firstWeekDay 0 through 6
89
- * @property-read int $lastWeekDay 0 through 6
90
- * @property-read int $daysInYear 365 or 366
91
- * @property-read int $quarter the quarter of this instance, 1 - 4
92
- * @property-read int $decade the decade of this instance
93
- * @property-read int $century the century of this instance
94
- * @property-read int $millennium the millennium of this instance
95
- * @property-read bool $dst daylight savings time indicator, true if DST, false otherwise
96
- * @property-read bool $local checks if the timezone is local, true if local, false otherwise
97
- * @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise
98
- * @property-read string $timezoneName the current timezone name
99
- * @property-read string $tzName alias of $timezoneName
100
- * @property-read string $locale locale of the current instance
101
  *
102
- * @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.)
103
- * @method bool isLocal() Check if the current instance has non-UTC timezone.
104
- * @method bool isValid() Check if the current instance is a valid date.
105
- * @method bool isDST() Check if the current instance is in a daylight saving time.
106
- * @method bool isSunday() Checks if the instance day is sunday.
107
- * @method bool isMonday() Checks if the instance day is monday.
108
- * @method bool isTuesday() Checks if the instance day is tuesday.
109
- * @method bool isWednesday() Checks if the instance day is wednesday.
110
- * @method bool isThursday() Checks if the instance day is thursday.
111
- * @method bool isFriday() Checks if the instance day is friday.
112
- * @method bool isSaturday() Checks if the instance day is saturday.
113
- * @method bool isSameYear(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone).
114
- * @method bool isCurrentYear() Checks if the instance is in the same year as the current moment.
115
- * @method bool isNextYear() Checks if the instance is in the same year as the current moment next year.
116
- * @method bool isLastYear() Checks if the instance is in the same year as the current moment last year.
117
- * @method bool isSameWeek(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone).
118
- * @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment.
119
- * @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week.
120
- * @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week.
121
- * @method bool isSameDay(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone).
122
- * @method bool isCurrentDay() Checks if the instance is in the same day as the current moment.
123
- * @method bool isNextDay() Checks if the instance is in the same day as the current moment next day.
124
- * @method bool isLastDay() Checks if the instance is in the same day as the current moment last day.
125
- * @method bool isSameHour(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone).
126
- * @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment.
127
- * @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour.
128
- * @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour.
129
- * @method bool isSameMinute(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone).
130
- * @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment.
131
- * @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute.
132
- * @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute.
133
- * @method bool isSameSecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone).
134
- * @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment.
135
- * @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second.
136
- * @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second.
137
- * @method bool isSameMicro(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone).
138
- * @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment.
139
- * @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond.
140
- * @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond.
141
- * @method bool isSameMicrosecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone).
142
- * @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment.
143
- * @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond.
144
- * @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond.
145
- * @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment.
146
- * @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month.
147
- * @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month.
148
- * @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment.
149
- * @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter.
150
- * @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter.
151
- * @method bool isSameDecade(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone).
152
- * @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment.
153
- * @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade.
154
- * @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade.
155
- * @method bool isSameCentury(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone).
156
- * @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment.
157
- * @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century.
158
- * @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century.
159
- * @method bool isSameMillennium(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone).
160
- * @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment.
161
- * @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium.
162
- * @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium.
163
- * @method CarbonInterface years(int $value) Set current instance year to the given value.
164
- * @method CarbonInterface year(int $value) Set current instance year to the given value.
165
- * @method CarbonInterface setYears(int $value) Set current instance year to the given value.
166
- * @method CarbonInterface setYear(int $value) Set current instance year to the given value.
167
- * @method CarbonInterface months(int $value) Set current instance month to the given value.
168
- * @method CarbonInterface month(int $value) Set current instance month to the given value.
169
- * @method CarbonInterface setMonths(int $value) Set current instance month to the given value.
170
- * @method CarbonInterface setMonth(int $value) Set current instance month to the given value.
171
- * @method CarbonInterface days(int $value) Set current instance day to the given value.
172
- * @method CarbonInterface day(int $value) Set current instance day to the given value.
173
- * @method CarbonInterface setDays(int $value) Set current instance day to the given value.
174
- * @method CarbonInterface setDay(int $value) Set current instance day to the given value.
175
- * @method CarbonInterface hours(int $value) Set current instance hour to the given value.
176
- * @method CarbonInterface hour(int $value) Set current instance hour to the given value.
177
- * @method CarbonInterface setHours(int $value) Set current instance hour to the given value.
178
- * @method CarbonInterface setHour(int $value) Set current instance hour to the given value.
179
- * @method CarbonInterface minutes(int $value) Set current instance minute to the given value.
180
- * @method CarbonInterface minute(int $value) Set current instance minute to the given value.
181
- * @method CarbonInterface setMinutes(int $value) Set current instance minute to the given value.
182
- * @method CarbonInterface setMinute(int $value) Set current instance minute to the given value.
183
- * @method CarbonInterface seconds(int $value) Set current instance second to the given value.
184
- * @method CarbonInterface second(int $value) Set current instance second to the given value.
185
- * @method CarbonInterface setSeconds(int $value) Set current instance second to the given value.
186
- * @method CarbonInterface setSecond(int $value) Set current instance second to the given value.
187
- * @method CarbonInterface millis(int $value) Set current instance millisecond to the given value.
188
- * @method CarbonInterface milli(int $value) Set current instance millisecond to the given value.
189
- * @method CarbonInterface setMillis(int $value) Set current instance millisecond to the given value.
190
- * @method CarbonInterface setMilli(int $value) Set current instance millisecond to the given value.
191
- * @method CarbonInterface milliseconds(int $value) Set current instance millisecond to the given value.
192
- * @method CarbonInterface millisecond(int $value) Set current instance millisecond to the given value.
193
- * @method CarbonInterface setMilliseconds(int $value) Set current instance millisecond to the given value.
194
- * @method CarbonInterface setMillisecond(int $value) Set current instance millisecond to the given value.
195
- * @method CarbonInterface micros(int $value) Set current instance microsecond to the given value.
196
- * @method CarbonInterface micro(int $value) Set current instance microsecond to the given value.
197
- * @method CarbonInterface setMicros(int $value) Set current instance microsecond to the given value.
198
- * @method CarbonInterface setMicro(int $value) Set current instance microsecond to the given value.
199
- * @method CarbonInterface microseconds(int $value) Set current instance microsecond to the given value.
200
- * @method CarbonInterface microsecond(int $value) Set current instance microsecond to the given value.
201
- * @method CarbonInterface setMicroseconds(int $value) Set current instance microsecond to the given value.
202
- * @method CarbonInterface setMicrosecond(int $value) Set current instance microsecond to the given value.
203
- * @method CarbonInterface addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval).
204
- * @method CarbonInterface addYear() Add one year to the instance (using date interval).
205
- * @method CarbonInterface subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval).
206
- * @method CarbonInterface subYear() Sub one year to the instance (using date interval).
207
- * @method CarbonInterface addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
208
- * @method CarbonInterface addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed.
209
- * @method CarbonInterface subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
210
- * @method CarbonInterface subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed.
211
- * @method CarbonInterface addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
212
- * @method CarbonInterface addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden.
213
- * @method CarbonInterface subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
214
- * @method CarbonInterface subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden.
215
- * @method CarbonInterface addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
216
- * @method CarbonInterface addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden.
217
- * @method CarbonInterface subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
218
- * @method CarbonInterface subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden.
219
- * @method CarbonInterface addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
220
- * @method CarbonInterface addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden.
221
- * @method CarbonInterface subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
222
- * @method CarbonInterface subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden.
223
- * @method CarbonInterface addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval).
224
- * @method CarbonInterface addMonth() Add one month to the instance (using date interval).
225
- * @method CarbonInterface subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval).
226
- * @method CarbonInterface subMonth() Sub one month to the instance (using date interval).
227
- * @method CarbonInterface addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
228
- * @method CarbonInterface addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed.
229
- * @method CarbonInterface subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
230
- * @method CarbonInterface subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed.
231
- * @method CarbonInterface addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
232
- * @method CarbonInterface addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden.
233
- * @method CarbonInterface subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
234
- * @method CarbonInterface subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden.
235
- * @method CarbonInterface addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
236
- * @method CarbonInterface addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden.
237
- * @method CarbonInterface subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
238
- * @method CarbonInterface subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden.
239
- * @method CarbonInterface addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
240
- * @method CarbonInterface addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden.
241
- * @method CarbonInterface subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
242
- * @method CarbonInterface subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden.
243
- * @method CarbonInterface addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval).
244
- * @method CarbonInterface addDay() Add one day to the instance (using date interval).
245
- * @method CarbonInterface subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval).
246
- * @method CarbonInterface subDay() Sub one day to the instance (using date interval).
247
- * @method CarbonInterface addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval).
248
- * @method CarbonInterface addHour() Add one hour to the instance (using date interval).
249
- * @method CarbonInterface subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval).
250
- * @method CarbonInterface subHour() Sub one hour to the instance (using date interval).
251
- * @method CarbonInterface addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval).
252
- * @method CarbonInterface addMinute() Add one minute to the instance (using date interval).
253
- * @method CarbonInterface subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval).
254
- * @method CarbonInterface subMinute() Sub one minute to the instance (using date interval).
255
- * @method CarbonInterface addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval).
256
- * @method CarbonInterface addSecond() Add one second to the instance (using date interval).
257
- * @method CarbonInterface subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval).
258
- * @method CarbonInterface subSecond() Sub one second to the instance (using date interval).
259
- * @method CarbonInterface addMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval).
260
- * @method CarbonInterface addMilli() Add one millisecond to the instance (using date interval).
261
- * @method CarbonInterface subMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval).
262
- * @method CarbonInterface subMilli() Sub one millisecond to the instance (using date interval).
263
- * @method CarbonInterface addMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval).
264
- * @method CarbonInterface addMillisecond() Add one millisecond to the instance (using date interval).
265
- * @method CarbonInterface subMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval).
266
- * @method CarbonInterface subMillisecond() Sub one millisecond to the instance (using date interval).
267
- * @method CarbonInterface addMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval).
268
- * @method CarbonInterface addMicro() Add one microsecond to the instance (using date interval).
269
- * @method CarbonInterface subMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval).
270
- * @method CarbonInterface subMicro() Sub one microsecond to the instance (using date interval).
271
- * @method CarbonInterface addMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval).
272
- * @method CarbonInterface addMicrosecond() Add one microsecond to the instance (using date interval).
273
- * @method CarbonInterface subMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval).
274
- * @method CarbonInterface subMicrosecond() Sub one microsecond to the instance (using date interval).
275
- * @method CarbonInterface addMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval).
276
- * @method CarbonInterface addMillennium() Add one millennium to the instance (using date interval).
277
- * @method CarbonInterface subMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval).
278
- * @method CarbonInterface subMillennium() Sub one millennium to the instance (using date interval).
279
- * @method CarbonInterface addMillenniaWithOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
280
- * @method CarbonInterface addMillenniumWithOverflow() Add one millennium to the instance (using date interval) with overflow explicitly allowed.
281
- * @method CarbonInterface subMillenniaWithOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
282
- * @method CarbonInterface subMillenniumWithOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly allowed.
283
- * @method CarbonInterface addMillenniaWithoutOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
284
- * @method CarbonInterface addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden.
285
- * @method CarbonInterface subMillenniaWithoutOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
286
- * @method CarbonInterface subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden.
287
- * @method CarbonInterface addMillenniaWithNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
288
- * @method CarbonInterface addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden.
289
- * @method CarbonInterface subMillenniaWithNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
290
- * @method CarbonInterface subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden.
291
- * @method CarbonInterface addMillenniaNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
292
- * @method CarbonInterface addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden.
293
- * @method CarbonInterface subMillenniaNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
294
- * @method CarbonInterface subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden.
295
- * @method CarbonInterface addCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval).
296
- * @method CarbonInterface addCentury() Add one century to the instance (using date interval).
297
- * @method CarbonInterface subCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval).
298
- * @method CarbonInterface subCentury() Sub one century to the instance (using date interval).
299
- * @method CarbonInterface addCenturiesWithOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
300
- * @method CarbonInterface addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed.
301
- * @method CarbonInterface subCenturiesWithOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
302
- * @method CarbonInterface subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed.
303
- * @method CarbonInterface addCenturiesWithoutOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
304
- * @method CarbonInterface addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden.
305
- * @method CarbonInterface subCenturiesWithoutOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
306
- * @method CarbonInterface subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden.
307
- * @method CarbonInterface addCenturiesWithNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
308
- * @method CarbonInterface addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden.
309
- * @method CarbonInterface subCenturiesWithNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
310
- * @method CarbonInterface subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden.
311
- * @method CarbonInterface addCenturiesNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
312
- * @method CarbonInterface addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden.
313
- * @method CarbonInterface subCenturiesNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
314
- * @method CarbonInterface subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden.
315
- * @method CarbonInterface addDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval).
316
- * @method CarbonInterface addDecade() Add one decade to the instance (using date interval).
317
- * @method CarbonInterface subDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval).
318
- * @method CarbonInterface subDecade() Sub one decade to the instance (using date interval).
319
- * @method CarbonInterface addDecadesWithOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
320
- * @method CarbonInterface addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed.
321
- * @method CarbonInterface subDecadesWithOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
322
- * @method CarbonInterface subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed.
323
- * @method CarbonInterface addDecadesWithoutOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
324
- * @method CarbonInterface addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden.
325
- * @method CarbonInterface subDecadesWithoutOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
326
- * @method CarbonInterface subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden.
327
- * @method CarbonInterface addDecadesWithNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
328
- * @method CarbonInterface addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden.
329
- * @method CarbonInterface subDecadesWithNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
330
- * @method CarbonInterface subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden.
331
- * @method CarbonInterface addDecadesNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
332
- * @method CarbonInterface addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden.
333
- * @method CarbonInterface subDecadesNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
334
- * @method CarbonInterface subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden.
335
- * @method CarbonInterface addQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval).
336
- * @method CarbonInterface addQuarter() Add one quarter to the instance (using date interval).
337
- * @method CarbonInterface subQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval).
338
- * @method CarbonInterface subQuarter() Sub one quarter to the instance (using date interval).
339
- * @method CarbonInterface addQuartersWithOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
340
- * @method CarbonInterface addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed.
341
- * @method CarbonInterface subQuartersWithOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
342
- * @method CarbonInterface subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed.
343
- * @method CarbonInterface addQuartersWithoutOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
344
- * @method CarbonInterface addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden.
345
- * @method CarbonInterface subQuartersWithoutOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
346
- * @method CarbonInterface subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden.
347
- * @method CarbonInterface addQuartersWithNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
348
- * @method CarbonInterface addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden.
349
- * @method CarbonInterface subQuartersWithNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
350
- * @method CarbonInterface subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden.
351
- * @method CarbonInterface addQuartersNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
352
- * @method CarbonInterface addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden.
353
- * @method CarbonInterface subQuartersNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
354
- * @method CarbonInterface subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden.
355
- * @method CarbonInterface addWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using date interval).
356
- * @method CarbonInterface addWeek() Add one week to the instance (using date interval).
357
- * @method CarbonInterface subWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval).
358
- * @method CarbonInterface subWeek() Sub one week to the instance (using date interval).
359
- * @method CarbonInterface addWeekdays(int $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval).
360
- * @method CarbonInterface addWeekday() Add one weekday to the instance (using date interval).
361
- * @method CarbonInterface subWeekdays(int $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval).
362
- * @method CarbonInterface subWeekday() Sub one weekday to the instance (using date interval).
363
- * @method CarbonInterface addRealMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp).
364
- * @method CarbonInterface addRealMicro() Add one microsecond to the instance (using timestamp).
365
- * @method CarbonInterface subRealMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp).
366
- * @method CarbonInterface subRealMicro() Sub one microsecond to the instance (using timestamp).
367
- * @method CarbonPeriod microsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given.
368
- * @method CarbonInterface addRealMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp).
369
- * @method CarbonInterface addRealMicrosecond() Add one microsecond to the instance (using timestamp).
370
- * @method CarbonInterface subRealMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp).
371
- * @method CarbonInterface subRealMicrosecond() Sub one microsecond to the instance (using timestamp).
372
- * @method CarbonPeriod microsecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given.
373
- * @method CarbonInterface addRealMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp).
374
- * @method CarbonInterface addRealMilli() Add one millisecond to the instance (using timestamp).
375
- * @method CarbonInterface subRealMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp).
376
- * @method CarbonInterface subRealMilli() Sub one millisecond to the instance (using timestamp).
377
- * @method CarbonPeriod millisUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given.
378
- * @method CarbonInterface addRealMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp).
379
- * @method CarbonInterface addRealMillisecond() Add one millisecond to the instance (using timestamp).
380
- * @method CarbonInterface subRealMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp).
381
- * @method CarbonInterface subRealMillisecond() Sub one millisecond to the instance (using timestamp).
382
- * @method CarbonPeriod millisecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given.
383
- * @method CarbonInterface addRealSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp).
384
- * @method CarbonInterface addRealSecond() Add one second to the instance (using timestamp).
385
- * @method CarbonInterface subRealSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp).
386
- * @method CarbonInterface subRealSecond() Sub one second to the instance (using timestamp).
387
- * @method CarbonPeriod secondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each second or every X seconds if a factor is given.
388
- * @method CarbonInterface addRealMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp).
389
- * @method CarbonInterface addRealMinute() Add one minute to the instance (using timestamp).
390
- * @method CarbonInterface subRealMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp).
391
- * @method CarbonInterface subRealMinute() Sub one minute to the instance (using timestamp).
392
- * @method CarbonPeriod minutesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each minute or every X minutes if a factor is given.
393
- * @method CarbonInterface addRealHours(int $value = 1) Add hours (the $value count passed in) to the instance (using timestamp).
394
- * @method CarbonInterface addRealHour() Add one hour to the instance (using timestamp).
395
- * @method CarbonInterface subRealHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp).
396
- * @method CarbonInterface subRealHour() Sub one hour to the instance (using timestamp).
397
- * @method CarbonPeriod hoursUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each hour or every X hours if a factor is given.
398
- * @method CarbonInterface addRealDays(int $value = 1) Add days (the $value count passed in) to the instance (using timestamp).
399
- * @method CarbonInterface addRealDay() Add one day to the instance (using timestamp).
400
- * @method CarbonInterface subRealDays(int $value = 1) Sub days (the $value count passed in) to the instance (using timestamp).
401
- * @method CarbonInterface subRealDay() Sub one day to the instance (using timestamp).
402
- * @method CarbonPeriod daysUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each day or every X days if a factor is given.
403
- * @method CarbonInterface addRealWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp).
404
- * @method CarbonInterface addRealWeek() Add one week to the instance (using timestamp).
405
- * @method CarbonInterface subRealWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp).
406
- * @method CarbonInterface subRealWeek() Sub one week to the instance (using timestamp).
407
- * @method CarbonPeriod weeksUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each week or every X weeks if a factor is given.
408
- * @method CarbonInterface addRealMonths(int $value = 1) Add months (the $value count passed in) to the instance (using timestamp).
409
- * @method CarbonInterface addRealMonth() Add one month to the instance (using timestamp).
410
- * @method CarbonInterface subRealMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using timestamp).
411
- * @method CarbonInterface subRealMonth() Sub one month to the instance (using timestamp).
412
- * @method CarbonPeriod monthsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each month or every X months if a factor is given.
413
- * @method CarbonInterface addRealQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp).
414
- * @method CarbonInterface addRealQuarter() Add one quarter to the instance (using timestamp).
415
- * @method CarbonInterface subRealQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp).
416
- * @method CarbonInterface subRealQuarter() Sub one quarter to the instance (using timestamp).
417
- * @method CarbonPeriod quartersUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each quarter or every X quarters if a factor is given.
418
- * @method CarbonInterface addRealYears(int $value = 1) Add years (the $value count passed in) to the instance (using timestamp).
419
- * @method CarbonInterface addRealYear() Add one year to the instance (using timestamp).
420
- * @method CarbonInterface subRealYears(int $value = 1) Sub years (the $value count passed in) to the instance (using timestamp).
421
- * @method CarbonInterface subRealYear() Sub one year to the instance (using timestamp).
422
- * @method CarbonPeriod yearsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each year or every X years if a factor is given.
423
- * @method CarbonInterface addRealDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using timestamp).
424
- * @method CarbonInterface addRealDecade() Add one decade to the instance (using timestamp).
425
- * @method CarbonInterface subRealDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp).
426
- * @method CarbonInterface subRealDecade() Sub one decade to the instance (using timestamp).
427
- * @method CarbonPeriod decadesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each decade or every X decades if a factor is given.
428
- * @method CarbonInterface addRealCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp).
429
- * @method CarbonInterface addRealCentury() Add one century to the instance (using timestamp).
430
- * @method CarbonInterface subRealCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp).
431
- * @method CarbonInterface subRealCentury() Sub one century to the instance (using timestamp).
432
- * @method CarbonPeriod centuriesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each century or every X centuries if a factor is given.
433
- * @method CarbonInterface addRealMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp).
434
- * @method CarbonInterface addRealMillennium() Add one millennium to the instance (using timestamp).
435
- * @method CarbonInterface subRealMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp).
436
- * @method CarbonInterface subRealMillennium() Sub one millennium to the instance (using timestamp).
437
- * @method CarbonPeriod millenniaUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millennium or every X millennia if a factor is given.
438
- * @method CarbonInterface roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function.
439
- * @method CarbonInterface roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function.
440
- * @method CarbonInterface floorYear(float $precision = 1) Truncate the current instance year with given precision.
441
- * @method CarbonInterface floorYears(float $precision = 1) Truncate the current instance year with given precision.
442
- * @method CarbonInterface ceilYear(float $precision = 1) Ceil the current instance year with given precision.
443
- * @method CarbonInterface ceilYears(float $precision = 1) Ceil the current instance year with given precision.
444
- * @method CarbonInterface roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function.
445
- * @method CarbonInterface roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function.
446
- * @method CarbonInterface floorMonth(float $precision = 1) Truncate the current instance month with given precision.
447
- * @method CarbonInterface floorMonths(float $precision = 1) Truncate the current instance month with given precision.
448
- * @method CarbonInterface ceilMonth(float $precision = 1) Ceil the current instance month with given precision.
449
- * @method CarbonInterface ceilMonths(float $precision = 1) Ceil the current instance month with given precision.
450
- * @method CarbonInterface roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function.
451
- * @method CarbonInterface roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function.
452
- * @method CarbonInterface floorDay(float $precision = 1) Truncate the current instance day with given precision.
453
- * @method CarbonInterface floorDays(float $precision = 1) Truncate the current instance day with given precision.
454
- * @method CarbonInterface ceilDay(float $precision = 1) Ceil the current instance day with given precision.
455
- * @method CarbonInterface ceilDays(float $precision = 1) Ceil the current instance day with given precision.
456
- * @method CarbonInterface roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function.
457
- * @method CarbonInterface roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function.
458
- * @method CarbonInterface floorHour(float $precision = 1) Truncate the current instance hour with given precision.
459
- * @method CarbonInterface floorHours(float $precision = 1) Truncate the current instance hour with given precision.
460
- * @method CarbonInterface ceilHour(float $precision = 1) Ceil the current instance hour with given precision.
461
- * @method CarbonInterface ceilHours(float $precision = 1) Ceil the current instance hour with given precision.
462
- * @method CarbonInterface roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function.
463
- * @method CarbonInterface roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function.
464
- * @method CarbonInterface floorMinute(float $precision = 1) Truncate the current instance minute with given precision.
465
- * @method CarbonInterface floorMinutes(float $precision = 1) Truncate the current instance minute with given precision.
466
- * @method CarbonInterface ceilMinute(float $precision = 1) Ceil the current instance minute with given precision.
467
- * @method CarbonInterface ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision.
468
- * @method CarbonInterface roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function.
469
- * @method CarbonInterface roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function.
470
- * @method CarbonInterface floorSecond(float $precision = 1) Truncate the current instance second with given precision.
471
- * @method CarbonInterface floorSeconds(float $precision = 1) Truncate the current instance second with given precision.
472
- * @method CarbonInterface ceilSecond(float $precision = 1) Ceil the current instance second with given precision.
473
- * @method CarbonInterface ceilSeconds(float $precision = 1) Ceil the current instance second with given precision.
474
- * @method CarbonInterface roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function.
475
- * @method CarbonInterface roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function.
476
- * @method CarbonInterface floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision.
477
- * @method CarbonInterface floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision.
478
- * @method CarbonInterface ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision.
479
- * @method CarbonInterface ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision.
480
- * @method CarbonInterface roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function.
481
- * @method CarbonInterface roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function.
482
- * @method CarbonInterface floorCentury(float $precision = 1) Truncate the current instance century with given precision.
483
- * @method CarbonInterface floorCenturies(float $precision = 1) Truncate the current instance century with given precision.
484
- * @method CarbonInterface ceilCentury(float $precision = 1) Ceil the current instance century with given precision.
485
- * @method CarbonInterface ceilCenturies(float $precision = 1) Ceil the current instance century with given precision.
486
- * @method CarbonInterface roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function.
487
- * @method CarbonInterface roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function.
488
- * @method CarbonInterface floorDecade(float $precision = 1) Truncate the current instance decade with given precision.
489
- * @method CarbonInterface floorDecades(float $precision = 1) Truncate the current instance decade with given precision.
490
- * @method CarbonInterface ceilDecade(float $precision = 1) Ceil the current instance decade with given precision.
491
- * @method CarbonInterface ceilDecades(float $precision = 1) Ceil the current instance decade with given precision.
492
- * @method CarbonInterface roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function.
493
- * @method CarbonInterface roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function.
494
- * @method CarbonInterface floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision.
495
- * @method CarbonInterface floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision.
496
- * @method CarbonInterface ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision.
497
- * @method CarbonInterface ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision.
498
- * @method CarbonInterface roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function.
499
- * @method CarbonInterface roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function.
500
- * @method CarbonInterface floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision.
501
- * @method CarbonInterface floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision.
502
- * @method CarbonInterface ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision.
503
- * @method CarbonInterface ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision.
504
- * @method CarbonInterface roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function.
505
- * @method CarbonInterface roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function.
506
- * @method CarbonInterface floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision.
507
- * @method CarbonInterface floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision.
508
- * @method CarbonInterface ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision.
509
- * @method CarbonInterface ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision.
510
- * @method string shortAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
511
- * @method string longAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
512
- * @method string shortRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
513
- * @method string longRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
514
- * @method string shortRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
515
- * @method string longRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
516
- * @method string shortRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
517
- * @method string longRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.)
33
  *
34
  * <autodoc generated by `composer phpdoc`>
35
  *
36
+ * @property int $year
37
+ * @property int $yearIso
38
+ * @property int $month
39
+ * @property int $day
40
+ * @property int $hour
41
+ * @property int $minute
42
+ * @property int $second
43
+ * @property int $micro
44
+ * @property int $microsecond
45
+ * @property int|float|string $timestamp seconds since the Unix Epoch
46
+ * @property string $englishDayOfWeek the day of week in English
47
+ * @property string $shortEnglishDayOfWeek the abbreviated day of week in English
48
+ * @property string $englishMonth the month in English
49
+ * @property string $shortEnglishMonth the abbreviated month in English
50
+ * @property string $localeDayOfWeek the day of week in current locale LC_TIME
51
+ * @property string $shortLocaleDayOfWeek the abbreviated day of week in current locale LC_TIME
52
+ * @property string $localeMonth the month in current locale LC_TIME
53
+ * @property string $shortLocaleMonth the abbreviated month in current locale LC_TIME
54
+ * @property int $milliseconds
55
+ * @property int $millisecond
56
+ * @property int $milli
57
+ * @property int $week 1 through 53
58
+ * @property int $isoWeek 1 through 53
59
+ * @property int $weekYear year according to week format
60
+ * @property int $isoWeekYear year according to ISO week format
61
+ * @property int $dayOfYear 1 through 366
62
+ * @property int $age does a diffInYears() with default parameters
63
+ * @property int $offset the timezone offset in seconds from UTC
64
+ * @property int $offsetMinutes the timezone offset in minutes from UTC
65
+ * @property int $offsetHours the timezone offset in hours from UTC
66
+ * @property CarbonTimeZone $timezone the current timezone
67
+ * @property CarbonTimeZone $tz alias of $timezone
68
+ * @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday)
69
+ * @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday)
70
+ * @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday
71
+ * @property-read int $daysInMonth number of days in the given month
72
+ * @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark)
73
+ * @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark)
74
+ * @property-read string $timezoneAbbreviatedName the current timezone abbreviated name
75
+ * @property-read string $tzAbbrName alias of $timezoneAbbreviatedName
76
+ * @property-read string $dayName long name of weekday translated according to Carbon locale, in english if no translation available for current language
77
+ * @property-read string $shortDayName short name of weekday translated according to Carbon locale, in english if no translation available for current language
78
+ * @property-read string $minDayName very short name of weekday translated according to Carbon locale, in english if no translation available for current language
79
+ * @property-read string $monthName long name of month translated according to Carbon locale, in english if no translation available for current language
80
+ * @property-read string $shortMonthName short name of month translated according to Carbon locale, in english if no translation available for current language
81
+ * @property-read string $meridiem lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language
82
+ * @property-read string $upperMeridiem uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language
83
+ * @property-read int $noZeroHour current hour from 1 to 24
84
+ * @property-read int $weeksInYear 51 through 53
85
+ * @property-read int $isoWeeksInYear 51 through 53
86
+ * @property-read int $weekOfMonth 1 through 5
87
+ * @property-read int $weekNumberInMonth 1 through 5
88
+ * @property-read int $firstWeekDay 0 through 6
89
+ * @property-read int $lastWeekDay 0 through 6
90
+ * @property-read int $daysInYear 365 or 366
91
+ * @property-read int $quarter the quarter of this instance, 1 - 4
92
+ * @property-read int $decade the decade of this instance
93
+ * @property-read int $century the century of this instance
94
+ * @property-read int $millennium the millennium of this instance
95
+ * @property-read bool $dst daylight savings time indicator, true if DST, false otherwise
96
+ * @property-read bool $local checks if the timezone is local, true if local, false otherwise
97
+ * @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise
98
+ * @property-read string $timezoneName the current timezone name
99
+ * @property-read string $tzName alias of $timezoneName
100
+ * @property-read string $locale locale of the current instance
101
  *
102
+ * @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.)
103
+ * @method bool isLocal() Check if the current instance has non-UTC timezone.
104
+ * @method bool isValid() Check if the current instance is a valid date.
105
+ * @method bool isDST() Check if the current instance is in a daylight saving time.
106
+ * @method bool isSunday() Checks if the instance day is sunday.
107
+ * @method bool isMonday() Checks if the instance day is monday.
108
+ * @method bool isTuesday() Checks if the instance day is tuesday.
109
+ * @method bool isWednesday() Checks if the instance day is wednesday.
110
+ * @method bool isThursday() Checks if the instance day is thursday.
111
+ * @method bool isFriday() Checks if the instance day is friday.
112
+ * @method bool isSaturday() Checks if the instance day is saturday.
113
+ * @method bool isSameYear(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone).
114
+ * @method bool isCurrentYear() Checks if the instance is in the same year as the current moment.
115
+ * @method bool isNextYear() Checks if the instance is in the same year as the current moment next year.
116
+ * @method bool isLastYear() Checks if the instance is in the same year as the current moment last year.
117
+ * @method bool isSameWeek(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone).
118
+ * @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment.
119
+ * @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week.
120
+ * @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week.
121
+ * @method bool isSameDay(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone).
122
+ * @method bool isCurrentDay() Checks if the instance is in the same day as the current moment.
123
+ * @method bool isNextDay() Checks if the instance is in the same day as the current moment next day.
124
+ * @method bool isLastDay() Checks if the instance is in the same day as the current moment last day.
125
+ * @method bool isSameHour(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone).
126
+ * @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment.
127
+ * @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour.
128
+ * @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour.
129
+ * @method bool isSameMinute(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone).
130
+ * @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment.
131
+ * @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute.
132
+ * @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute.
133
+ * @method bool isSameSecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone).
134
+ * @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment.
135
+ * @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second.
136
+ * @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second.
137
+ * @method bool isSameMicro(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone).
138
+ * @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment.
139
+ * @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond.
140
+ * @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond.
141
+ * @method bool isSameMicrosecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone).
142
+ * @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment.
143
+ * @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond.
144
+ * @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond.
145
+ * @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment.
146
+ * @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month.
147
+ * @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month.
148
+ * @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment.
149
+ * @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter.
150
+ * @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter.
151
+ * @method bool isSameDecade(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone).
152
+ * @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment.
153
+ * @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade.
154
+ * @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade.
155
+ * @method bool isSameCentury(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone).
156
+ * @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment.
157
+ * @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century.
158
+ * @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century.
159
+ * @method bool isSameMillennium(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone).
160
+ * @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment.
161
+ * @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium.
162
+ * @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium.
163
+ * @method CarbonInterface years(int $value) Set current instance year to the given value.
164
+ * @method CarbonInterface year(int $value) Set current instance year to the given value.
165
+ * @method CarbonInterface setYears(int $value) Set current instance year to the given value.
166
+ * @method CarbonInterface setYear(int $value) Set current instance year to the given value.
167
+ * @method CarbonInterface months(int $value) Set current instance month to the given value.
168
+ * @method CarbonInterface month(int $value) Set current instance month to the given value.
169
+ * @method CarbonInterface setMonths(int $value) Set current instance month to the given value.
170
+ * @method CarbonInterface setMonth(int $value) Set current instance month to the given value.
171
+ * @method CarbonInterface days(int $value) Set current instance day to the given value.
172
+ * @method CarbonInterface day(int $value) Set current instance day to the given value.
173
+ * @method CarbonInterface setDays(int $value) Set current instance day to the given value.
174
+ * @method CarbonInterface setDay(int $value) Set current instance day to the given value.
175
+ * @method CarbonInterface hours(int $value) Set current instance hour to the given value.
176
+ * @method CarbonInterface hour(int $value) Set current instance hour to the given value.
177
+ * @method CarbonInterface setHours(int $value) Set current instance hour to the given value.
178
+ * @method CarbonInterface setHour(int $value) Set current instance hour to the given value.
179
+ * @method CarbonInterface minutes(int $value) Set current instance minute to the given value.
180
+ * @method CarbonInterface minute(int $value) Set current instance minute to the given value.
181
+ * @method CarbonInterface setMinutes(int $value) Set current instance minute to the given value.
182
+ * @method CarbonInterface setMinute(int $value) Set current instance minute to the given value.
183
+ * @method CarbonInterface seconds(int $value) Set current instance second to the given value.
184
+ * @method CarbonInterface second(int $value) Set current instance second to the given value.
185
+ * @method CarbonInterface setSeconds(int $value) Set current instance second to the given value.
186
+ * @method CarbonInterface setSecond(int $value) Set current instance second to the given value.
187
+ * @method CarbonInterface millis(int $value) Set current instance millisecond to the given value.
188
+ * @method CarbonInterface milli(int $value) Set current instance millisecond to the given value.
189
+ * @method CarbonInterface setMillis(int $value) Set current instance millisecond to the given value.
190
+ * @method CarbonInterface setMilli(int $value) Set current instance millisecond to the given value.
191
+ * @method CarbonInterface milliseconds(int $value) Set current instance millisecond to the given value.
192
+ * @method CarbonInterface millisecond(int $value) Set current instance millisecond to the given value.
193
+ * @method CarbonInterface setMilliseconds(int $value) Set current instance millisecond to the given value.
194
+ * @method CarbonInterface setMillisecond(int $value) Set current instance millisecond to the given value.
195
+ * @method CarbonInterface micros(int $value) Set current instance microsecond to the given value.
196
+ * @method CarbonInterface micro(int $value) Set current instance microsecond to the given value.
197
+ * @method CarbonInterface setMicros(int $value) Set current instance microsecond to the given value.
198
+ * @method CarbonInterface setMicro(int $value) Set current instance microsecond to the given value.
199
+ * @method CarbonInterface microseconds(int $value) Set current instance microsecond to the given value.
200
+ * @method CarbonInterface microsecond(int $value) Set current instance microsecond to the given value.
201
+ * @method CarbonInterface setMicroseconds(int $value) Set current instance microsecond to the given value.
202
+ * @method CarbonInterface setMicrosecond(int $value) Set current instance microsecond to the given value.
203
+ * @method CarbonInterface addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval).
204
+ * @method CarbonInterface addYear() Add one year to the instance (using date interval).
205
+ * @method CarbonInterface subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval).
206
+ * @method CarbonInterface subYear() Sub one year to the instance (using date interval).
207
+ * @method CarbonInterface addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
208
+ * @method CarbonInterface addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed.
209
+ * @method CarbonInterface subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
210
+ * @method CarbonInterface subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed.
211
+ * @method CarbonInterface addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
212
+ * @method CarbonInterface addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden.
213
+ * @method CarbonInterface subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
214
+ * @method CarbonInterface subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden.
215
+ * @method CarbonInterface addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
216
+ * @method CarbonInterface addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden.
217
+ * @method CarbonInterface subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
218
+ * @method CarbonInterface subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden.
219
+ * @method CarbonInterface addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
220
+ * @method CarbonInterface addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden.
221
+ * @method CarbonInterface subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
222
+ * @method CarbonInterface subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden.
223
+ * @method CarbonInterface addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval).
224
+ * @method CarbonInterface addMonth() Add one month to the instance (using date interval).
225
+ * @method CarbonInterface subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval).
226
+ * @method CarbonInterface subMonth() Sub one month to the instance (using date interval).
227
+ * @method CarbonInterface addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
228
+ * @method CarbonInterface addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed.
229
+ * @method CarbonInterface subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed.
230
+ * @method CarbonInterface subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed.
231
+ * @method CarbonInterface addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
232
+ * @method CarbonInterface addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden.
233
+ * @method CarbonInterface subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
234
+ * @method CarbonInterface subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden.
235
+ * @method CarbonInterface addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
236
+ * @method CarbonInterface addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden.
237
+ * @method CarbonInterface subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
238
+ * @method CarbonInterface subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden.
239
+ * @method CarbonInterface addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
240
+ * @method CarbonInterface addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden.
241
+ * @method CarbonInterface subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden.
242
+ * @method CarbonInterface subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden.
243
+ * @method CarbonInterface addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval).
244
+ * @method CarbonInterface addDay() Add one day to the instance (using date interval).
245
+ * @method CarbonInterface subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval).
246
+ * @method CarbonInterface subDay() Sub one day to the instance (using date interval).
247
+ * @method CarbonInterface addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval).
248
+ * @method CarbonInterface addHour() Add one hour to the instance (using date interval).
249
+ * @method CarbonInterface subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval).
250
+ * @method CarbonInterface subHour() Sub one hour to the instance (using date interval).
251
+ * @method CarbonInterface addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval).
252
+ * @method CarbonInterface addMinute() Add one minute to the instance (using date interval).
253
+ * @method CarbonInterface subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval).
254
+ * @method CarbonInterface subMinute() Sub one minute to the instance (using date interval).
255
+ * @method CarbonInterface addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval).
256
+ * @method CarbonInterface addSecond() Add one second to the instance (using date interval).
257
+ * @method CarbonInterface subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval).
258
+ * @method CarbonInterface subSecond()