├── CONTRIBUTING.md ├── README.md ├── composer.json ├── composer.lock └── src ├── History.php └── HistoryMiddleware.php /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Contributing Guidelines 2 | ======================= 3 | 4 | Choosing the right branch 5 | ------------------------- 6 | 7 | Before working on a patch, you must determine on which branch you need to work: 8 | 9 | * `1.3`, if you are fixing a bug for an existing feature (you may have to choose a higher branch if the feature you are fixing was introduced in a later version) 10 | * `master`, if you are adding a new and backward incompatible feature. 11 | 12 | Working on your code 13 | -------------------- 14 | 15 | Fork, then clone the repo: 16 | 17 | git clone git@github.com/your-username/CsaGuzzleBundle.git 18 | 19 | Create your working branch, based on the correct branch (replace `1.3` with the correct target branch): 20 | 21 | git checkout -b BRANCH_NAME -t origin/1.3 22 | 23 | `BRANCH_NAME` should be descriptive (`ticket_XXX` where `XXX` is the ticket number is a good convention for bug fixes). 24 | 25 | Install dependencies: 26 | 27 | composer update 28 | 29 | Make sure the tests pass: 30 | 31 | vendor/bin/phpunit 32 | 33 | Push to your fork and [submit a pull request](https://github.com/csarrazi/CsaGuzzleBundle/compare/). 34 | 35 | At this point you're waiting on me. I like to at least comment on pull requests within 36 | three business days (and, typically, one business day). I may suggest some changes or 37 | improvements or alternatives. 38 | 39 | Some things that will increase the chance that your pull request is accepted: 40 | 41 | * Write tests. 42 | * Follow [PSR-1](http://www.php-fig.org/psr/psr-1/) and [PSR-2](http://www.php-fig.org/psr/psr-2/). 43 | * Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). 44 | 45 | Pull request template 46 | --------------------- 47 | 48 | ```markdown 49 | | Q | A 50 | | ------------- | --- 51 | | Bug fix? | [yes|no] 52 | | New feature? | [yes|no] 53 | | BC breaks? | [yes|no] 54 | | Deprecations? | [yes|no] 55 | | Tests pass? | [yes|no] 56 | | Fixed tickets | [comma separated list of tickets fixed by the PR] 57 | | License | Apache License 2.0 58 | ``` 59 | 60 | Notes 61 | ----- 62 | 63 | All bug fixes merged into maintenance branches are also merged into more recent 64 | branches on a regular basis. For instance, if you submit a patch for the 1.3 branch, 65 | the patch will also be applied by the core team on the master branch. 66 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Guzzle History Middleware 2 | ========================= 3 | 4 | Installation 5 | ------------ 6 | 7 | ``` 8 | composer req csa/guzzle-history-middleware 9 | ``` 10 | 11 | Upgrade 12 | ------- 13 | 14 | Although I try to guarantee forward-compatibility of the bundle with previous versions. 15 | Here are the upgrade notes between each version. 16 | 17 | See [Upgrade.md](UPGRADE.md). 18 | 19 | Documentation 20 | ------------- 21 | 22 | Contributing 23 | ------------ 24 | 25 | The Guzzle History Middleware is an open source project. If you'd like to contribute, please read 26 | the [Contributing Guidelines](CONTRIBUTING.md). 27 | 28 | License 29 | ------- 30 | 31 | This library is under Apache License 2.0. For the full copyright and license 32 | information, please view the [LICENSE](src/Resources/meta/LICENSE) file that was 33 | distributed with this source code. 34 | 35 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "csa/guzzle-history-middleware", 3 | "description": "A History middleware for GuzzleHttp >= 6.0", 4 | "license": "Apache-2.0", 5 | "type": "library", 6 | "authors": [ 7 | { "name": "Charles Sarrazin", "email": "charles@sarraz.in" } 8 | ], 9 | "require": { 10 | "php": ">=5.6.0", 11 | "guzzlehttp/guzzle": "^6.1" 12 | }, 13 | "require-dev": { 14 | "phpunit/phpunit": "^4.8", 15 | "symfony/phpunit-bridge": "^2.7|^3.0|^4.0|^5.0" 16 | }, 17 | "autoload": { 18 | "psr-4": { "Csa\\GuzzleHttp\\Middleware\\History\\": "src" } 19 | }, 20 | "autoload-dev": { 21 | "psr-4": { "Csa\\Tests\\GuzzleHttp\\Middleware\\History\\": "tests" } 22 | }, 23 | "minimum-stability": "dev", 24 | "prefer-stable": true, 25 | "extra": { 26 | "branch-alias": { 27 | "dev-master": "1.0-dev" 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 5 | "This file is @generated automatically" 6 | ], 7 | "content-hash": "8363c6f85fe9e0b71df3773a3666a6f7", 8 | "packages": [ 9 | { 10 | "name": "guzzlehttp/guzzle", 11 | "version": "6.4.1", 12 | "source": { 13 | "type": "git", 14 | "url": "https://github.com/guzzle/guzzle.git", 15 | "reference": "0895c932405407fd3a7368b6910c09a24d26db11" 16 | }, 17 | "dist": { 18 | "type": "zip", 19 | "url": "https://api.github.com/repos/guzzle/guzzle/zipball/0895c932405407fd3a7368b6910c09a24d26db11", 20 | "reference": "0895c932405407fd3a7368b6910c09a24d26db11", 21 | "shasum": "" 22 | }, 23 | "require": { 24 | "ext-json": "*", 25 | "guzzlehttp/promises": "^1.0", 26 | "guzzlehttp/psr7": "^1.6.1", 27 | "php": ">=5.5" 28 | }, 29 | "require-dev": { 30 | "ext-curl": "*", 31 | "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", 32 | "psr/log": "^1.1" 33 | }, 34 | "suggest": { 35 | "psr/log": "Required for using the Log middleware" 36 | }, 37 | "type": "library", 38 | "extra": { 39 | "branch-alias": { 40 | "dev-master": "6.3-dev" 41 | } 42 | }, 43 | "autoload": { 44 | "psr-4": { 45 | "GuzzleHttp\\": "src/" 46 | }, 47 | "files": [ 48 | "src/functions_include.php" 49 | ] 50 | }, 51 | "notification-url": "https://packagist.org/downloads/", 52 | "license": [ 53 | "MIT" 54 | ], 55 | "authors": [ 56 | { 57 | "name": "Michael Dowling", 58 | "email": "mtdowling@gmail.com", 59 | "homepage": "https://github.com/mtdowling" 60 | } 61 | ], 62 | "description": "Guzzle is a PHP HTTP client library", 63 | "homepage": "http://guzzlephp.org/", 64 | "keywords": [ 65 | "client", 66 | "curl", 67 | "framework", 68 | "http", 69 | "http client", 70 | "rest", 71 | "web service" 72 | ], 73 | "time": "2019-10-23T15:58:00+00:00" 74 | }, 75 | { 76 | "name": "guzzlehttp/promises", 77 | "version": "v1.3.1", 78 | "source": { 79 | "type": "git", 80 | "url": "https://github.com/guzzle/promises.git", 81 | "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" 82 | }, 83 | "dist": { 84 | "type": "zip", 85 | "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", 86 | "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", 87 | "shasum": "" 88 | }, 89 | "require": { 90 | "php": ">=5.5.0" 91 | }, 92 | "require-dev": { 93 | "phpunit/phpunit": "^4.0" 94 | }, 95 | "type": "library", 96 | "extra": { 97 | "branch-alias": { 98 | "dev-master": "1.4-dev" 99 | } 100 | }, 101 | "autoload": { 102 | "psr-4": { 103 | "GuzzleHttp\\Promise\\": "src/" 104 | }, 105 | "files": [ 106 | "src/functions_include.php" 107 | ] 108 | }, 109 | "notification-url": "https://packagist.org/downloads/", 110 | "license": [ 111 | "MIT" 112 | ], 113 | "authors": [ 114 | { 115 | "name": "Michael Dowling", 116 | "email": "mtdowling@gmail.com", 117 | "homepage": "https://github.com/mtdowling" 118 | } 119 | ], 120 | "description": "Guzzle promises library", 121 | "keywords": [ 122 | "promise" 123 | ], 124 | "time": "2016-12-20T10:07:11+00:00" 125 | }, 126 | { 127 | "name": "guzzlehttp/psr7", 128 | "version": "1.6.1", 129 | "source": { 130 | "type": "git", 131 | "url": "https://github.com/guzzle/psr7.git", 132 | "reference": "239400de7a173fe9901b9ac7c06497751f00727a" 133 | }, 134 | "dist": { 135 | "type": "zip", 136 | "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", 137 | "reference": "239400de7a173fe9901b9ac7c06497751f00727a", 138 | "shasum": "" 139 | }, 140 | "require": { 141 | "php": ">=5.4.0", 142 | "psr/http-message": "~1.0", 143 | "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" 144 | }, 145 | "provide": { 146 | "psr/http-message-implementation": "1.0" 147 | }, 148 | "require-dev": { 149 | "ext-zlib": "*", 150 | "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" 151 | }, 152 | "suggest": { 153 | "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" 154 | }, 155 | "type": "library", 156 | "extra": { 157 | "branch-alias": { 158 | "dev-master": "1.6-dev" 159 | } 160 | }, 161 | "autoload": { 162 | "psr-4": { 163 | "GuzzleHttp\\Psr7\\": "src/" 164 | }, 165 | "files": [ 166 | "src/functions_include.php" 167 | ] 168 | }, 169 | "notification-url": "https://packagist.org/downloads/", 170 | "license": [ 171 | "MIT" 172 | ], 173 | "authors": [ 174 | { 175 | "name": "Michael Dowling", 176 | "email": "mtdowling@gmail.com", 177 | "homepage": "https://github.com/mtdowling" 178 | }, 179 | { 180 | "name": "Tobias Schultze", 181 | "homepage": "https://github.com/Tobion" 182 | } 183 | ], 184 | "description": "PSR-7 message implementation that also provides common utility methods", 185 | "keywords": [ 186 | "http", 187 | "message", 188 | "psr-7", 189 | "request", 190 | "response", 191 | "stream", 192 | "uri", 193 | "url" 194 | ], 195 | "time": "2019-07-01T23:21:34+00:00" 196 | }, 197 | { 198 | "name": "psr/http-message", 199 | "version": "1.0.1", 200 | "source": { 201 | "type": "git", 202 | "url": "https://github.com/php-fig/http-message.git", 203 | "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" 204 | }, 205 | "dist": { 206 | "type": "zip", 207 | "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", 208 | "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", 209 | "shasum": "" 210 | }, 211 | "require": { 212 | "php": ">=5.3.0" 213 | }, 214 | "type": "library", 215 | "extra": { 216 | "branch-alias": { 217 | "dev-master": "1.0.x-dev" 218 | } 219 | }, 220 | "autoload": { 221 | "psr-4": { 222 | "Psr\\Http\\Message\\": "src/" 223 | } 224 | }, 225 | "notification-url": "https://packagist.org/downloads/", 226 | "license": [ 227 | "MIT" 228 | ], 229 | "authors": [ 230 | { 231 | "name": "PHP-FIG", 232 | "homepage": "http://www.php-fig.org/" 233 | } 234 | ], 235 | "description": "Common interface for HTTP messages", 236 | "homepage": "https://github.com/php-fig/http-message", 237 | "keywords": [ 238 | "http", 239 | "http-message", 240 | "psr", 241 | "psr-7", 242 | "request", 243 | "response" 244 | ], 245 | "time": "2016-08-06T14:39:51+00:00" 246 | }, 247 | { 248 | "name": "ralouphie/getallheaders", 249 | "version": "3.0.3", 250 | "source": { 251 | "type": "git", 252 | "url": "https://github.com/ralouphie/getallheaders.git", 253 | "reference": "120b605dfeb996808c31b6477290a714d356e822" 254 | }, 255 | "dist": { 256 | "type": "zip", 257 | "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", 258 | "reference": "120b605dfeb996808c31b6477290a714d356e822", 259 | "shasum": "" 260 | }, 261 | "require": { 262 | "php": ">=5.6" 263 | }, 264 | "require-dev": { 265 | "php-coveralls/php-coveralls": "^2.1", 266 | "phpunit/phpunit": "^5 || ^6.5" 267 | }, 268 | "type": "library", 269 | "autoload": { 270 | "files": [ 271 | "src/getallheaders.php" 272 | ] 273 | }, 274 | "notification-url": "https://packagist.org/downloads/", 275 | "license": [ 276 | "MIT" 277 | ], 278 | "authors": [ 279 | { 280 | "name": "Ralph Khattar", 281 | "email": "ralph.khattar@gmail.com" 282 | } 283 | ], 284 | "description": "A polyfill for getallheaders.", 285 | "time": "2019-03-08T08:55:37+00:00" 286 | } 287 | ], 288 | "packages-dev": [ 289 | { 290 | "name": "doctrine/instantiator", 291 | "version": "1.3.0", 292 | "source": { 293 | "type": "git", 294 | "url": "https://github.com/doctrine/instantiator.git", 295 | "reference": "ae466f726242e637cebdd526a7d991b9433bacf1" 296 | }, 297 | "dist": { 298 | "type": "zip", 299 | "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1", 300 | "reference": "ae466f726242e637cebdd526a7d991b9433bacf1", 301 | "shasum": "" 302 | }, 303 | "require": { 304 | "php": "^7.1" 305 | }, 306 | "require-dev": { 307 | "doctrine/coding-standard": "^6.0", 308 | "ext-pdo": "*", 309 | "ext-phar": "*", 310 | "phpbench/phpbench": "^0.13", 311 | "phpstan/phpstan-phpunit": "^0.11", 312 | "phpstan/phpstan-shim": "^0.11", 313 | "phpunit/phpunit": "^7.0" 314 | }, 315 | "type": "library", 316 | "extra": { 317 | "branch-alias": { 318 | "dev-master": "1.2.x-dev" 319 | } 320 | }, 321 | "autoload": { 322 | "psr-4": { 323 | "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" 324 | } 325 | }, 326 | "notification-url": "https://packagist.org/downloads/", 327 | "license": [ 328 | "MIT" 329 | ], 330 | "authors": [ 331 | { 332 | "name": "Marco Pivetta", 333 | "email": "ocramius@gmail.com", 334 | "homepage": "http://ocramius.github.com/" 335 | } 336 | ], 337 | "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", 338 | "homepage": "https://www.doctrine-project.org/projects/instantiator.html", 339 | "keywords": [ 340 | "constructor", 341 | "instantiate" 342 | ], 343 | "time": "2019-10-21T16:45:58+00:00" 344 | }, 345 | { 346 | "name": "phpdocumentor/reflection-common", 347 | "version": "2.0.0", 348 | "source": { 349 | "type": "git", 350 | "url": "https://github.com/phpDocumentor/ReflectionCommon.git", 351 | "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" 352 | }, 353 | "dist": { 354 | "type": "zip", 355 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", 356 | "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", 357 | "shasum": "" 358 | }, 359 | "require": { 360 | "php": ">=7.1" 361 | }, 362 | "require-dev": { 363 | "phpunit/phpunit": "~6" 364 | }, 365 | "type": "library", 366 | "extra": { 367 | "branch-alias": { 368 | "dev-master": "2.x-dev" 369 | } 370 | }, 371 | "autoload": { 372 | "psr-4": { 373 | "phpDocumentor\\Reflection\\": "src/" 374 | } 375 | }, 376 | "notification-url": "https://packagist.org/downloads/", 377 | "license": [ 378 | "MIT" 379 | ], 380 | "authors": [ 381 | { 382 | "name": "Jaap van Otterdijk", 383 | "email": "opensource@ijaap.nl" 384 | } 385 | ], 386 | "description": "Common reflection classes used by phpdocumentor to reflect the code structure", 387 | "homepage": "http://www.phpdoc.org", 388 | "keywords": [ 389 | "FQSEN", 390 | "phpDocumentor", 391 | "phpdoc", 392 | "reflection", 393 | "static analysis" 394 | ], 395 | "time": "2018-08-07T13:53:10+00:00" 396 | }, 397 | { 398 | "name": "phpdocumentor/reflection-docblock", 399 | "version": "4.3.2", 400 | "source": { 401 | "type": "git", 402 | "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", 403 | "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e" 404 | }, 405 | "dist": { 406 | "type": "zip", 407 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/b83ff7cfcfee7827e1e78b637a5904fe6a96698e", 408 | "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e", 409 | "shasum": "" 410 | }, 411 | "require": { 412 | "php": "^7.0", 413 | "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", 414 | "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", 415 | "webmozart/assert": "^1.0" 416 | }, 417 | "require-dev": { 418 | "doctrine/instantiator": "^1.0.5", 419 | "mockery/mockery": "^1.0", 420 | "phpunit/phpunit": "^6.4" 421 | }, 422 | "type": "library", 423 | "extra": { 424 | "branch-alias": { 425 | "dev-master": "4.x-dev" 426 | } 427 | }, 428 | "autoload": { 429 | "psr-4": { 430 | "phpDocumentor\\Reflection\\": [ 431 | "src/" 432 | ] 433 | } 434 | }, 435 | "notification-url": "https://packagist.org/downloads/", 436 | "license": [ 437 | "MIT" 438 | ], 439 | "authors": [ 440 | { 441 | "name": "Mike van Riel", 442 | "email": "me@mikevanriel.com" 443 | } 444 | ], 445 | "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", 446 | "time": "2019-09-12T14:27:41+00:00" 447 | }, 448 | { 449 | "name": "phpdocumentor/type-resolver", 450 | "version": "1.0.1", 451 | "source": { 452 | "type": "git", 453 | "url": "https://github.com/phpDocumentor/TypeResolver.git", 454 | "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" 455 | }, 456 | "dist": { 457 | "type": "zip", 458 | "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", 459 | "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", 460 | "shasum": "" 461 | }, 462 | "require": { 463 | "php": "^7.1", 464 | "phpdocumentor/reflection-common": "^2.0" 465 | }, 466 | "require-dev": { 467 | "ext-tokenizer": "^7.1", 468 | "mockery/mockery": "~1", 469 | "phpunit/phpunit": "^7.0" 470 | }, 471 | "type": "library", 472 | "extra": { 473 | "branch-alias": { 474 | "dev-master": "1.x-dev" 475 | } 476 | }, 477 | "autoload": { 478 | "psr-4": { 479 | "phpDocumentor\\Reflection\\": "src" 480 | } 481 | }, 482 | "notification-url": "https://packagist.org/downloads/", 483 | "license": [ 484 | "MIT" 485 | ], 486 | "authors": [ 487 | { 488 | "name": "Mike van Riel", 489 | "email": "me@mikevanriel.com" 490 | } 491 | ], 492 | "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", 493 | "time": "2019-08-22T18:11:29+00:00" 494 | }, 495 | { 496 | "name": "phpspec/prophecy", 497 | "version": "1.9.0", 498 | "source": { 499 | "type": "git", 500 | "url": "https://github.com/phpspec/prophecy.git", 501 | "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203" 502 | }, 503 | "dist": { 504 | "type": "zip", 505 | "url": "https://api.github.com/repos/phpspec/prophecy/zipball/f6811d96d97bdf400077a0cc100ae56aa32b9203", 506 | "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203", 507 | "shasum": "" 508 | }, 509 | "require": { 510 | "doctrine/instantiator": "^1.0.2", 511 | "php": "^5.3|^7.0", 512 | "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", 513 | "sebastian/comparator": "^1.1|^2.0|^3.0", 514 | "sebastian/recursion-context": "^1.0|^2.0|^3.0" 515 | }, 516 | "require-dev": { 517 | "phpspec/phpspec": "^2.5|^3.2", 518 | "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" 519 | }, 520 | "type": "library", 521 | "extra": { 522 | "branch-alias": { 523 | "dev-master": "1.8.x-dev" 524 | } 525 | }, 526 | "autoload": { 527 | "psr-4": { 528 | "Prophecy\\": "src/Prophecy" 529 | } 530 | }, 531 | "notification-url": "https://packagist.org/downloads/", 532 | "license": [ 533 | "MIT" 534 | ], 535 | "authors": [ 536 | { 537 | "name": "Konstantin Kudryashov", 538 | "email": "ever.zet@gmail.com", 539 | "homepage": "http://everzet.com" 540 | }, 541 | { 542 | "name": "Marcello Duarte", 543 | "email": "marcello.duarte@gmail.com" 544 | } 545 | ], 546 | "description": "Highly opinionated mocking framework for PHP 5.3+", 547 | "homepage": "https://github.com/phpspec/prophecy", 548 | "keywords": [ 549 | "Double", 550 | "Dummy", 551 | "fake", 552 | "mock", 553 | "spy", 554 | "stub" 555 | ], 556 | "time": "2019-10-03T11:07:50+00:00" 557 | }, 558 | { 559 | "name": "phpunit/php-code-coverage", 560 | "version": "2.2.4", 561 | "source": { 562 | "type": "git", 563 | "url": "https://github.com/sebastianbergmann/php-code-coverage.git", 564 | "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" 565 | }, 566 | "dist": { 567 | "type": "zip", 568 | "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", 569 | "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", 570 | "shasum": "" 571 | }, 572 | "require": { 573 | "php": ">=5.3.3", 574 | "phpunit/php-file-iterator": "~1.3", 575 | "phpunit/php-text-template": "~1.2", 576 | "phpunit/php-token-stream": "~1.3", 577 | "sebastian/environment": "^1.3.2", 578 | "sebastian/version": "~1.0" 579 | }, 580 | "require-dev": { 581 | "ext-xdebug": ">=2.1.4", 582 | "phpunit/phpunit": "~4" 583 | }, 584 | "suggest": { 585 | "ext-dom": "*", 586 | "ext-xdebug": ">=2.2.1", 587 | "ext-xmlwriter": "*" 588 | }, 589 | "type": "library", 590 | "extra": { 591 | "branch-alias": { 592 | "dev-master": "2.2.x-dev" 593 | } 594 | }, 595 | "autoload": { 596 | "classmap": [ 597 | "src/" 598 | ] 599 | }, 600 | "notification-url": "https://packagist.org/downloads/", 601 | "license": [ 602 | "BSD-3-Clause" 603 | ], 604 | "authors": [ 605 | { 606 | "name": "Sebastian Bergmann", 607 | "email": "sb@sebastian-bergmann.de", 608 | "role": "lead" 609 | } 610 | ], 611 | "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", 612 | "homepage": "https://github.com/sebastianbergmann/php-code-coverage", 613 | "keywords": [ 614 | "coverage", 615 | "testing", 616 | "xunit" 617 | ], 618 | "time": "2015-10-06T15:47:00+00:00" 619 | }, 620 | { 621 | "name": "phpunit/php-file-iterator", 622 | "version": "1.4.5", 623 | "source": { 624 | "type": "git", 625 | "url": "https://github.com/sebastianbergmann/php-file-iterator.git", 626 | "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" 627 | }, 628 | "dist": { 629 | "type": "zip", 630 | "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", 631 | "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", 632 | "shasum": "" 633 | }, 634 | "require": { 635 | "php": ">=5.3.3" 636 | }, 637 | "type": "library", 638 | "extra": { 639 | "branch-alias": { 640 | "dev-master": "1.4.x-dev" 641 | } 642 | }, 643 | "autoload": { 644 | "classmap": [ 645 | "src/" 646 | ] 647 | }, 648 | "notification-url": "https://packagist.org/downloads/", 649 | "license": [ 650 | "BSD-3-Clause" 651 | ], 652 | "authors": [ 653 | { 654 | "name": "Sebastian Bergmann", 655 | "email": "sb@sebastian-bergmann.de", 656 | "role": "lead" 657 | } 658 | ], 659 | "description": "FilterIterator implementation that filters files based on a list of suffixes.", 660 | "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", 661 | "keywords": [ 662 | "filesystem", 663 | "iterator" 664 | ], 665 | "time": "2017-11-27T13:52:08+00:00" 666 | }, 667 | { 668 | "name": "phpunit/php-text-template", 669 | "version": "1.2.1", 670 | "source": { 671 | "type": "git", 672 | "url": "https://github.com/sebastianbergmann/php-text-template.git", 673 | "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" 674 | }, 675 | "dist": { 676 | "type": "zip", 677 | "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", 678 | "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", 679 | "shasum": "" 680 | }, 681 | "require": { 682 | "php": ">=5.3.3" 683 | }, 684 | "type": "library", 685 | "autoload": { 686 | "classmap": [ 687 | "src/" 688 | ] 689 | }, 690 | "notification-url": "https://packagist.org/downloads/", 691 | "license": [ 692 | "BSD-3-Clause" 693 | ], 694 | "authors": [ 695 | { 696 | "name": "Sebastian Bergmann", 697 | "email": "sebastian@phpunit.de", 698 | "role": "lead" 699 | } 700 | ], 701 | "description": "Simple template engine.", 702 | "homepage": "https://github.com/sebastianbergmann/php-text-template/", 703 | "keywords": [ 704 | "template" 705 | ], 706 | "time": "2015-06-21T13:50:34+00:00" 707 | }, 708 | { 709 | "name": "phpunit/php-timer", 710 | "version": "1.0.9", 711 | "source": { 712 | "type": "git", 713 | "url": "https://github.com/sebastianbergmann/php-timer.git", 714 | "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" 715 | }, 716 | "dist": { 717 | "type": "zip", 718 | "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", 719 | "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", 720 | "shasum": "" 721 | }, 722 | "require": { 723 | "php": "^5.3.3 || ^7.0" 724 | }, 725 | "require-dev": { 726 | "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" 727 | }, 728 | "type": "library", 729 | "extra": { 730 | "branch-alias": { 731 | "dev-master": "1.0-dev" 732 | } 733 | }, 734 | "autoload": { 735 | "classmap": [ 736 | "src/" 737 | ] 738 | }, 739 | "notification-url": "https://packagist.org/downloads/", 740 | "license": [ 741 | "BSD-3-Clause" 742 | ], 743 | "authors": [ 744 | { 745 | "name": "Sebastian Bergmann", 746 | "email": "sb@sebastian-bergmann.de", 747 | "role": "lead" 748 | } 749 | ], 750 | "description": "Utility class for timing", 751 | "homepage": "https://github.com/sebastianbergmann/php-timer/", 752 | "keywords": [ 753 | "timer" 754 | ], 755 | "time": "2017-02-26T11:10:40+00:00" 756 | }, 757 | { 758 | "name": "phpunit/php-token-stream", 759 | "version": "1.4.12", 760 | "source": { 761 | "type": "git", 762 | "url": "https://github.com/sebastianbergmann/php-token-stream.git", 763 | "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16" 764 | }, 765 | "dist": { 766 | "type": "zip", 767 | "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16", 768 | "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16", 769 | "shasum": "" 770 | }, 771 | "require": { 772 | "ext-tokenizer": "*", 773 | "php": ">=5.3.3" 774 | }, 775 | "require-dev": { 776 | "phpunit/phpunit": "~4.2" 777 | }, 778 | "type": "library", 779 | "extra": { 780 | "branch-alias": { 781 | "dev-master": "1.4-dev" 782 | } 783 | }, 784 | "autoload": { 785 | "classmap": [ 786 | "src/" 787 | ] 788 | }, 789 | "notification-url": "https://packagist.org/downloads/", 790 | "license": [ 791 | "BSD-3-Clause" 792 | ], 793 | "authors": [ 794 | { 795 | "name": "Sebastian Bergmann", 796 | "email": "sebastian@phpunit.de" 797 | } 798 | ], 799 | "description": "Wrapper around PHP's tokenizer extension.", 800 | "homepage": "https://github.com/sebastianbergmann/php-token-stream/", 801 | "keywords": [ 802 | "tokenizer" 803 | ], 804 | "time": "2017-12-04T08:55:13+00:00" 805 | }, 806 | { 807 | "name": "phpunit/phpunit", 808 | "version": "4.8.36", 809 | "source": { 810 | "type": "git", 811 | "url": "https://github.com/sebastianbergmann/phpunit.git", 812 | "reference": "46023de9a91eec7dfb06cc56cb4e260017298517" 813 | }, 814 | "dist": { 815 | "type": "zip", 816 | "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517", 817 | "reference": "46023de9a91eec7dfb06cc56cb4e260017298517", 818 | "shasum": "" 819 | }, 820 | "require": { 821 | "ext-dom": "*", 822 | "ext-json": "*", 823 | "ext-pcre": "*", 824 | "ext-reflection": "*", 825 | "ext-spl": "*", 826 | "php": ">=5.3.3", 827 | "phpspec/prophecy": "^1.3.1", 828 | "phpunit/php-code-coverage": "~2.1", 829 | "phpunit/php-file-iterator": "~1.4", 830 | "phpunit/php-text-template": "~1.2", 831 | "phpunit/php-timer": "^1.0.6", 832 | "phpunit/phpunit-mock-objects": "~2.3", 833 | "sebastian/comparator": "~1.2.2", 834 | "sebastian/diff": "~1.2", 835 | "sebastian/environment": "~1.3", 836 | "sebastian/exporter": "~1.2", 837 | "sebastian/global-state": "~1.0", 838 | "sebastian/version": "~1.0", 839 | "symfony/yaml": "~2.1|~3.0" 840 | }, 841 | "suggest": { 842 | "phpunit/php-invoker": "~1.1" 843 | }, 844 | "bin": [ 845 | "phpunit" 846 | ], 847 | "type": "library", 848 | "extra": { 849 | "branch-alias": { 850 | "dev-master": "4.8.x-dev" 851 | } 852 | }, 853 | "autoload": { 854 | "classmap": [ 855 | "src/" 856 | ] 857 | }, 858 | "notification-url": "https://packagist.org/downloads/", 859 | "license": [ 860 | "BSD-3-Clause" 861 | ], 862 | "authors": [ 863 | { 864 | "name": "Sebastian Bergmann", 865 | "email": "sebastian@phpunit.de", 866 | "role": "lead" 867 | } 868 | ], 869 | "description": "The PHP Unit Testing framework.", 870 | "homepage": "https://phpunit.de/", 871 | "keywords": [ 872 | "phpunit", 873 | "testing", 874 | "xunit" 875 | ], 876 | "time": "2017-06-21T08:07:12+00:00" 877 | }, 878 | { 879 | "name": "phpunit/phpunit-mock-objects", 880 | "version": "2.3.8", 881 | "source": { 882 | "type": "git", 883 | "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", 884 | "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" 885 | }, 886 | "dist": { 887 | "type": "zip", 888 | "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", 889 | "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", 890 | "shasum": "" 891 | }, 892 | "require": { 893 | "doctrine/instantiator": "^1.0.2", 894 | "php": ">=5.3.3", 895 | "phpunit/php-text-template": "~1.2", 896 | "sebastian/exporter": "~1.2" 897 | }, 898 | "require-dev": { 899 | "phpunit/phpunit": "~4.4" 900 | }, 901 | "suggest": { 902 | "ext-soap": "*" 903 | }, 904 | "type": "library", 905 | "extra": { 906 | "branch-alias": { 907 | "dev-master": "2.3.x-dev" 908 | } 909 | }, 910 | "autoload": { 911 | "classmap": [ 912 | "src/" 913 | ] 914 | }, 915 | "notification-url": "https://packagist.org/downloads/", 916 | "license": [ 917 | "BSD-3-Clause" 918 | ], 919 | "authors": [ 920 | { 921 | "name": "Sebastian Bergmann", 922 | "email": "sb@sebastian-bergmann.de", 923 | "role": "lead" 924 | } 925 | ], 926 | "description": "Mock Object library for PHPUnit", 927 | "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", 928 | "keywords": [ 929 | "mock", 930 | "xunit" 931 | ], 932 | "abandoned": true, 933 | "time": "2015-10-02T06:51:40+00:00" 934 | }, 935 | { 936 | "name": "sebastian/comparator", 937 | "version": "1.2.4", 938 | "source": { 939 | "type": "git", 940 | "url": "https://github.com/sebastianbergmann/comparator.git", 941 | "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" 942 | }, 943 | "dist": { 944 | "type": "zip", 945 | "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", 946 | "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", 947 | "shasum": "" 948 | }, 949 | "require": { 950 | "php": ">=5.3.3", 951 | "sebastian/diff": "~1.2", 952 | "sebastian/exporter": "~1.2 || ~2.0" 953 | }, 954 | "require-dev": { 955 | "phpunit/phpunit": "~4.4" 956 | }, 957 | "type": "library", 958 | "extra": { 959 | "branch-alias": { 960 | "dev-master": "1.2.x-dev" 961 | } 962 | }, 963 | "autoload": { 964 | "classmap": [ 965 | "src/" 966 | ] 967 | }, 968 | "notification-url": "https://packagist.org/downloads/", 969 | "license": [ 970 | "BSD-3-Clause" 971 | ], 972 | "authors": [ 973 | { 974 | "name": "Jeff Welch", 975 | "email": "whatthejeff@gmail.com" 976 | }, 977 | { 978 | "name": "Volker Dusch", 979 | "email": "github@wallbash.com" 980 | }, 981 | { 982 | "name": "Bernhard Schussek", 983 | "email": "bschussek@2bepublished.at" 984 | }, 985 | { 986 | "name": "Sebastian Bergmann", 987 | "email": "sebastian@phpunit.de" 988 | } 989 | ], 990 | "description": "Provides the functionality to compare PHP values for equality", 991 | "homepage": "http://www.github.com/sebastianbergmann/comparator", 992 | "keywords": [ 993 | "comparator", 994 | "compare", 995 | "equality" 996 | ], 997 | "time": "2017-01-29T09:50:25+00:00" 998 | }, 999 | { 1000 | "name": "sebastian/diff", 1001 | "version": "1.4.3", 1002 | "source": { 1003 | "type": "git", 1004 | "url": "https://github.com/sebastianbergmann/diff.git", 1005 | "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" 1006 | }, 1007 | "dist": { 1008 | "type": "zip", 1009 | "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", 1010 | "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", 1011 | "shasum": "" 1012 | }, 1013 | "require": { 1014 | "php": "^5.3.3 || ^7.0" 1015 | }, 1016 | "require-dev": { 1017 | "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" 1018 | }, 1019 | "type": "library", 1020 | "extra": { 1021 | "branch-alias": { 1022 | "dev-master": "1.4-dev" 1023 | } 1024 | }, 1025 | "autoload": { 1026 | "classmap": [ 1027 | "src/" 1028 | ] 1029 | }, 1030 | "notification-url": "https://packagist.org/downloads/", 1031 | "license": [ 1032 | "BSD-3-Clause" 1033 | ], 1034 | "authors": [ 1035 | { 1036 | "name": "Kore Nordmann", 1037 | "email": "mail@kore-nordmann.de" 1038 | }, 1039 | { 1040 | "name": "Sebastian Bergmann", 1041 | "email": "sebastian@phpunit.de" 1042 | } 1043 | ], 1044 | "description": "Diff implementation", 1045 | "homepage": "https://github.com/sebastianbergmann/diff", 1046 | "keywords": [ 1047 | "diff" 1048 | ], 1049 | "time": "2017-05-22T07:24:03+00:00" 1050 | }, 1051 | { 1052 | "name": "sebastian/environment", 1053 | "version": "1.3.8", 1054 | "source": { 1055 | "type": "git", 1056 | "url": "https://github.com/sebastianbergmann/environment.git", 1057 | "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" 1058 | }, 1059 | "dist": { 1060 | "type": "zip", 1061 | "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", 1062 | "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", 1063 | "shasum": "" 1064 | }, 1065 | "require": { 1066 | "php": "^5.3.3 || ^7.0" 1067 | }, 1068 | "require-dev": { 1069 | "phpunit/phpunit": "^4.8 || ^5.0" 1070 | }, 1071 | "type": "library", 1072 | "extra": { 1073 | "branch-alias": { 1074 | "dev-master": "1.3.x-dev" 1075 | } 1076 | }, 1077 | "autoload": { 1078 | "classmap": [ 1079 | "src/" 1080 | ] 1081 | }, 1082 | "notification-url": "https://packagist.org/downloads/", 1083 | "license": [ 1084 | "BSD-3-Clause" 1085 | ], 1086 | "authors": [ 1087 | { 1088 | "name": "Sebastian Bergmann", 1089 | "email": "sebastian@phpunit.de" 1090 | } 1091 | ], 1092 | "description": "Provides functionality to handle HHVM/PHP environments", 1093 | "homepage": "http://www.github.com/sebastianbergmann/environment", 1094 | "keywords": [ 1095 | "Xdebug", 1096 | "environment", 1097 | "hhvm" 1098 | ], 1099 | "time": "2016-08-18T05:49:44+00:00" 1100 | }, 1101 | { 1102 | "name": "sebastian/exporter", 1103 | "version": "1.2.2", 1104 | "source": { 1105 | "type": "git", 1106 | "url": "https://github.com/sebastianbergmann/exporter.git", 1107 | "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" 1108 | }, 1109 | "dist": { 1110 | "type": "zip", 1111 | "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", 1112 | "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", 1113 | "shasum": "" 1114 | }, 1115 | "require": { 1116 | "php": ">=5.3.3", 1117 | "sebastian/recursion-context": "~1.0" 1118 | }, 1119 | "require-dev": { 1120 | "ext-mbstring": "*", 1121 | "phpunit/phpunit": "~4.4" 1122 | }, 1123 | "type": "library", 1124 | "extra": { 1125 | "branch-alias": { 1126 | "dev-master": "1.3.x-dev" 1127 | } 1128 | }, 1129 | "autoload": { 1130 | "classmap": [ 1131 | "src/" 1132 | ] 1133 | }, 1134 | "notification-url": "https://packagist.org/downloads/", 1135 | "license": [ 1136 | "BSD-3-Clause" 1137 | ], 1138 | "authors": [ 1139 | { 1140 | "name": "Jeff Welch", 1141 | "email": "whatthejeff@gmail.com" 1142 | }, 1143 | { 1144 | "name": "Volker Dusch", 1145 | "email": "github@wallbash.com" 1146 | }, 1147 | { 1148 | "name": "Bernhard Schussek", 1149 | "email": "bschussek@2bepublished.at" 1150 | }, 1151 | { 1152 | "name": "Sebastian Bergmann", 1153 | "email": "sebastian@phpunit.de" 1154 | }, 1155 | { 1156 | "name": "Adam Harvey", 1157 | "email": "aharvey@php.net" 1158 | } 1159 | ], 1160 | "description": "Provides the functionality to export PHP variables for visualization", 1161 | "homepage": "http://www.github.com/sebastianbergmann/exporter", 1162 | "keywords": [ 1163 | "export", 1164 | "exporter" 1165 | ], 1166 | "time": "2016-06-17T09:04:28+00:00" 1167 | }, 1168 | { 1169 | "name": "sebastian/global-state", 1170 | "version": "1.1.1", 1171 | "source": { 1172 | "type": "git", 1173 | "url": "https://github.com/sebastianbergmann/global-state.git", 1174 | "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" 1175 | }, 1176 | "dist": { 1177 | "type": "zip", 1178 | "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", 1179 | "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", 1180 | "shasum": "" 1181 | }, 1182 | "require": { 1183 | "php": ">=5.3.3" 1184 | }, 1185 | "require-dev": { 1186 | "phpunit/phpunit": "~4.2" 1187 | }, 1188 | "suggest": { 1189 | "ext-uopz": "*" 1190 | }, 1191 | "type": "library", 1192 | "extra": { 1193 | "branch-alias": { 1194 | "dev-master": "1.0-dev" 1195 | } 1196 | }, 1197 | "autoload": { 1198 | "classmap": [ 1199 | "src/" 1200 | ] 1201 | }, 1202 | "notification-url": "https://packagist.org/downloads/", 1203 | "license": [ 1204 | "BSD-3-Clause" 1205 | ], 1206 | "authors": [ 1207 | { 1208 | "name": "Sebastian Bergmann", 1209 | "email": "sebastian@phpunit.de" 1210 | } 1211 | ], 1212 | "description": "Snapshotting of global state", 1213 | "homepage": "http://www.github.com/sebastianbergmann/global-state", 1214 | "keywords": [ 1215 | "global state" 1216 | ], 1217 | "time": "2015-10-12T03:26:01+00:00" 1218 | }, 1219 | { 1220 | "name": "sebastian/recursion-context", 1221 | "version": "1.0.5", 1222 | "source": { 1223 | "type": "git", 1224 | "url": "https://github.com/sebastianbergmann/recursion-context.git", 1225 | "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" 1226 | }, 1227 | "dist": { 1228 | "type": "zip", 1229 | "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", 1230 | "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", 1231 | "shasum": "" 1232 | }, 1233 | "require": { 1234 | "php": ">=5.3.3" 1235 | }, 1236 | "require-dev": { 1237 | "phpunit/phpunit": "~4.4" 1238 | }, 1239 | "type": "library", 1240 | "extra": { 1241 | "branch-alias": { 1242 | "dev-master": "1.0.x-dev" 1243 | } 1244 | }, 1245 | "autoload": { 1246 | "classmap": [ 1247 | "src/" 1248 | ] 1249 | }, 1250 | "notification-url": "https://packagist.org/downloads/", 1251 | "license": [ 1252 | "BSD-3-Clause" 1253 | ], 1254 | "authors": [ 1255 | { 1256 | "name": "Jeff Welch", 1257 | "email": "whatthejeff@gmail.com" 1258 | }, 1259 | { 1260 | "name": "Sebastian Bergmann", 1261 | "email": "sebastian@phpunit.de" 1262 | }, 1263 | { 1264 | "name": "Adam Harvey", 1265 | "email": "aharvey@php.net" 1266 | } 1267 | ], 1268 | "description": "Provides functionality to recursively process PHP variables", 1269 | "homepage": "http://www.github.com/sebastianbergmann/recursion-context", 1270 | "time": "2016-10-03T07:41:43+00:00" 1271 | }, 1272 | { 1273 | "name": "sebastian/version", 1274 | "version": "1.0.6", 1275 | "source": { 1276 | "type": "git", 1277 | "url": "https://github.com/sebastianbergmann/version.git", 1278 | "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" 1279 | }, 1280 | "dist": { 1281 | "type": "zip", 1282 | "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", 1283 | "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", 1284 | "shasum": "" 1285 | }, 1286 | "type": "library", 1287 | "autoload": { 1288 | "classmap": [ 1289 | "src/" 1290 | ] 1291 | }, 1292 | "notification-url": "https://packagist.org/downloads/", 1293 | "license": [ 1294 | "BSD-3-Clause" 1295 | ], 1296 | "authors": [ 1297 | { 1298 | "name": "Sebastian Bergmann", 1299 | "email": "sebastian@phpunit.de", 1300 | "role": "lead" 1301 | } 1302 | ], 1303 | "description": "Library that helps with managing the version number of Git-hosted PHP projects", 1304 | "homepage": "https://github.com/sebastianbergmann/version", 1305 | "time": "2015-06-21T13:59:46+00:00" 1306 | }, 1307 | { 1308 | "name": "symfony/phpunit-bridge", 1309 | "version": "v4.4.0", 1310 | "source": { 1311 | "type": "git", 1312 | "url": "https://github.com/symfony/phpunit-bridge.git", 1313 | "reference": "7daa9d4a2f457f9cae32f1c2406de1921dc86a79" 1314 | }, 1315 | "dist": { 1316 | "type": "zip", 1317 | "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/7daa9d4a2f457f9cae32f1c2406de1921dc86a79", 1318 | "reference": "7daa9d4a2f457f9cae32f1c2406de1921dc86a79", 1319 | "shasum": "" 1320 | }, 1321 | "require": { 1322 | "php": ">=5.5.9" 1323 | }, 1324 | "conflict": { 1325 | "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" 1326 | }, 1327 | "suggest": { 1328 | "symfony/error-handler": "For tracking deprecated interfaces usages at runtime with DebugClassLoader" 1329 | }, 1330 | "bin": [ 1331 | "bin/simple-phpunit" 1332 | ], 1333 | "type": "symfony-bridge", 1334 | "extra": { 1335 | "branch-alias": { 1336 | "dev-master": "4.4-dev" 1337 | }, 1338 | "thanks": { 1339 | "name": "phpunit/phpunit", 1340 | "url": "https://github.com/sebastianbergmann/phpunit" 1341 | } 1342 | }, 1343 | "autoload": { 1344 | "files": [ 1345 | "bootstrap.php" 1346 | ], 1347 | "psr-4": { 1348 | "Symfony\\Bridge\\PhpUnit\\": "" 1349 | }, 1350 | "exclude-from-classmap": [ 1351 | "/Tests/" 1352 | ] 1353 | }, 1354 | "notification-url": "https://packagist.org/downloads/", 1355 | "license": [ 1356 | "MIT" 1357 | ], 1358 | "authors": [ 1359 | { 1360 | "name": "Nicolas Grekas", 1361 | "email": "p@tchwork.com" 1362 | }, 1363 | { 1364 | "name": "Symfony Community", 1365 | "homepage": "https://symfony.com/contributors" 1366 | } 1367 | ], 1368 | "description": "Symfony PHPUnit Bridge", 1369 | "homepage": "https://symfony.com", 1370 | "time": "2019-11-08T15:59:14+00:00" 1371 | }, 1372 | { 1373 | "name": "symfony/polyfill-ctype", 1374 | "version": "v1.12.0", 1375 | "source": { 1376 | "type": "git", 1377 | "url": "https://github.com/symfony/polyfill-ctype.git", 1378 | "reference": "550ebaac289296ce228a706d0867afc34687e3f4" 1379 | }, 1380 | "dist": { 1381 | "type": "zip", 1382 | "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4", 1383 | "reference": "550ebaac289296ce228a706d0867afc34687e3f4", 1384 | "shasum": "" 1385 | }, 1386 | "require": { 1387 | "php": ">=5.3.3" 1388 | }, 1389 | "suggest": { 1390 | "ext-ctype": "For best performance" 1391 | }, 1392 | "type": "library", 1393 | "extra": { 1394 | "branch-alias": { 1395 | "dev-master": "1.12-dev" 1396 | } 1397 | }, 1398 | "autoload": { 1399 | "psr-4": { 1400 | "Symfony\\Polyfill\\Ctype\\": "" 1401 | }, 1402 | "files": [ 1403 | "bootstrap.php" 1404 | ] 1405 | }, 1406 | "notification-url": "https://packagist.org/downloads/", 1407 | "license": [ 1408 | "MIT" 1409 | ], 1410 | "authors": [ 1411 | { 1412 | "name": "Gert de Pagter", 1413 | "email": "BackEndTea@gmail.com" 1414 | }, 1415 | { 1416 | "name": "Symfony Community", 1417 | "homepage": "https://symfony.com/contributors" 1418 | } 1419 | ], 1420 | "description": "Symfony polyfill for ctype functions", 1421 | "homepage": "https://symfony.com", 1422 | "keywords": [ 1423 | "compatibility", 1424 | "ctype", 1425 | "polyfill", 1426 | "portable" 1427 | ], 1428 | "time": "2019-08-06T08:03:45+00:00" 1429 | }, 1430 | { 1431 | "name": "symfony/yaml", 1432 | "version": "v3.4.35", 1433 | "source": { 1434 | "type": "git", 1435 | "url": "https://github.com/symfony/yaml.git", 1436 | "reference": "dab657db15207879217fc81df4f875947bf68804" 1437 | }, 1438 | "dist": { 1439 | "type": "zip", 1440 | "url": "https://api.github.com/repos/symfony/yaml/zipball/dab657db15207879217fc81df4f875947bf68804", 1441 | "reference": "dab657db15207879217fc81df4f875947bf68804", 1442 | "shasum": "" 1443 | }, 1444 | "require": { 1445 | "php": "^5.5.9|>=7.0.8", 1446 | "symfony/polyfill-ctype": "~1.8" 1447 | }, 1448 | "conflict": { 1449 | "symfony/console": "<3.4" 1450 | }, 1451 | "require-dev": { 1452 | "symfony/console": "~3.4|~4.0" 1453 | }, 1454 | "suggest": { 1455 | "symfony/console": "For validating YAML files using the lint command" 1456 | }, 1457 | "type": "library", 1458 | "extra": { 1459 | "branch-alias": { 1460 | "dev-master": "3.4-dev" 1461 | } 1462 | }, 1463 | "autoload": { 1464 | "psr-4": { 1465 | "Symfony\\Component\\Yaml\\": "" 1466 | }, 1467 | "exclude-from-classmap": [ 1468 | "/Tests/" 1469 | ] 1470 | }, 1471 | "notification-url": "https://packagist.org/downloads/", 1472 | "license": [ 1473 | "MIT" 1474 | ], 1475 | "authors": [ 1476 | { 1477 | "name": "Fabien Potencier", 1478 | "email": "fabien@symfony.com" 1479 | }, 1480 | { 1481 | "name": "Symfony Community", 1482 | "homepage": "https://symfony.com/contributors" 1483 | } 1484 | ], 1485 | "description": "Symfony Yaml Component", 1486 | "homepage": "https://symfony.com", 1487 | "time": "2019-10-24T15:33:53+00:00" 1488 | }, 1489 | { 1490 | "name": "webmozart/assert", 1491 | "version": "1.5.0", 1492 | "source": { 1493 | "type": "git", 1494 | "url": "https://github.com/webmozart/assert.git", 1495 | "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4" 1496 | }, 1497 | "dist": { 1498 | "type": "zip", 1499 | "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4", 1500 | "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4", 1501 | "shasum": "" 1502 | }, 1503 | "require": { 1504 | "php": "^5.3.3 || ^7.0", 1505 | "symfony/polyfill-ctype": "^1.8" 1506 | }, 1507 | "require-dev": { 1508 | "phpunit/phpunit": "^4.8.36 || ^7.5.13" 1509 | }, 1510 | "type": "library", 1511 | "extra": { 1512 | "branch-alias": { 1513 | "dev-master": "1.3-dev" 1514 | } 1515 | }, 1516 | "autoload": { 1517 | "psr-4": { 1518 | "Webmozart\\Assert\\": "src/" 1519 | } 1520 | }, 1521 | "notification-url": "https://packagist.org/downloads/", 1522 | "license": [ 1523 | "MIT" 1524 | ], 1525 | "authors": [ 1526 | { 1527 | "name": "Bernhard Schussek", 1528 | "email": "bschussek@gmail.com" 1529 | } 1530 | ], 1531 | "description": "Assertions to validate method input/output with nice error messages.", 1532 | "keywords": [ 1533 | "assert", 1534 | "check", 1535 | "validate" 1536 | ], 1537 | "time": "2019-08-24T08:43:50+00:00" 1538 | } 1539 | ], 1540 | "aliases": [], 1541 | "minimum-stability": "dev", 1542 | "stability-flags": [], 1543 | "prefer-stable": true, 1544 | "prefer-lowest": false, 1545 | "platform": { 1546 | "php": ">=5.6.0" 1547 | }, 1548 | "platform-dev": [] 1549 | } 1550 | -------------------------------------------------------------------------------- /src/History.php: -------------------------------------------------------------------------------- 1 | 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 Csa\GuzzleHttp\Middleware\History; 13 | 14 | use GuzzleHttp\TransferStats; 15 | use Psr\Http\Message\RequestInterface; 16 | 17 | class History extends \SplObjectStorage 18 | { 19 | public function mergeInfo(RequestInterface $request, array $info) 20 | { 21 | $info = array_merge( 22 | ['response' => null, 'error' => null, 'info' => null], 23 | array_filter($this->contains($request) ? $this[$request] : []), 24 | array_filter($info) 25 | ); 26 | 27 | $this->attach($request, $info); 28 | } 29 | 30 | public function addStats(TransferStats $stats) 31 | { 32 | $this->mergeInfo($stats->getRequest(), ['info' => $stats->getHandlerStats()]); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/HistoryMiddleware.php: -------------------------------------------------------------------------------- 1 | 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 Csa\GuzzleHttp\Middleware\History; 13 | 14 | use GuzzleHttp\Promise\RejectedPromise; 15 | use Psr\Http\Message\RequestInterface; 16 | 17 | /** 18 | * History Middleware. 19 | * 20 | * @author Charles Sarrazin 21 | */ 22 | class HistoryMiddleware 23 | { 24 | private $container; 25 | 26 | public function __construct(History $container) 27 | { 28 | $this->container = $container; 29 | } 30 | 31 | public function __invoke(callable $handler) 32 | { 33 | return function (RequestInterface $request, array $options) use ($handler) { 34 | return $handler($request, $options)->then( 35 | function ($response) use ($request, $options) { 36 | $this->container->mergeInfo($request, [ 37 | 'response' => $response, 38 | 'error' => null, 39 | 'options' => $options, 40 | 'info' => [], 41 | ]); 42 | 43 | return $response; 44 | }, 45 | function ($reason) use ($request, $options) { 46 | $this->container->mergeInfo($request, [ 47 | 'response' => null, 48 | 'error' => $reason, 49 | 'options' => $options, 50 | 'info' => [], 51 | ]); 52 | 53 | return new RejectedPromise($reason); 54 | } 55 | ); 56 | }; 57 | } 58 | } 59 | --------------------------------------------------------------------------------