Changeset 1561223
- Timestamp:
- 12/24/2016 07:28:59 AM (9 years ago)
- Location:
- botamp/trunk
- Files:
-
- 3 added
- 5 deleted
- 16 edited
-
composer.json (added)
-
vendor/botamp/botamp-php/.git (deleted)
-
vendor/botamp/botamp-php/.gitignore (modified) (1 diff)
-
vendor/composer/installed.json (modified) (9 diffs)
-
vendor/guzzlehttp/promises/.gitignore (deleted)
-
vendor/guzzlehttp/promises/.travis.yml (deleted)
-
vendor/guzzlehttp/promises/CHANGELOG.md (modified) (1 diff)
-
vendor/guzzlehttp/promises/LICENSE (modified) (1 diff)
-
vendor/guzzlehttp/promises/README.md (modified) (2 diffs)
-
vendor/guzzlehttp/promises/composer.json (modified) (3 diffs)
-
vendor/guzzlehttp/promises/phpunit.xml.dist (deleted)
-
vendor/guzzlehttp/promises/src/Coroutine.php (added)
-
vendor/guzzlehttp/promises/src/Promise.php (modified) (1 diff)
-
vendor/guzzlehttp/promises/src/TaskQueue.php (modified) (4 diffs)
-
vendor/guzzlehttp/promises/src/TaskQueueInterface.php (added)
-
vendor/guzzlehttp/promises/src/functions.php (modified) (8 diffs)
-
vendor/guzzlehttp/promises/tests (deleted)
-
vendor/php-http/discovery/CHANGELOG.md (modified) (1 diff)
-
vendor/php-http/discovery/src/ClassDiscovery.php (modified) (1 diff)
-
vendor/php-http/discovery/src/Exception/DiscoveryFailedException.php (modified) (2 diffs)
-
vendor/php-http/discovery/src/Strategy/CommonClassesStrategy.php (modified) (1 diff)
-
vendor/php-http/message/CHANGELOG.md (modified) (2 diffs)
-
vendor/php-http/message/src/Cookie.php (modified) (1 diff)
-
vendor/symfony/options-resolver/composer.json (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
botamp/trunk/vendor/botamp/botamp-php/.gitignore
r1558890 r1561223 4 4 /vendor/ 5 5 demo 6 .git -
botamp/trunk/vendor/composer/installed.json
r1558890 r1561223 1 1 [ 2 {3 "name": "guzzlehttp/promises",4 "version": "1.2.0",5 "version_normalized": "1.2.0.0",6 "source": {7 "type": "git",8 "url": "https://github.com/guzzle/promises.git",9 "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579"10 },11 "dist": {12 "type": "zip",13 "url": "https://api.github.com/repos/guzzle/promises/zipball/c10d860e2a9595f8883527fa0021c7da9e65f579",14 "reference": "c10d860e2a9595f8883527fa0021c7da9e65f579",15 "shasum": ""16 },17 "require": {18 "php": ">=5.5.0"19 },20 "require-dev": {21 "phpunit/phpunit": "~4.0"22 },23 "time": "2016-05-18 16:56:05",24 "type": "library",25 "extra": {26 "branch-alias": {27 "dev-master": "1.0-dev"28 }29 },30 "installation-source": "dist",31 "autoload": {32 "psr-4": {33 "GuzzleHttp\\Promise\\": "src/"34 },35 "files": [36 "src/functions_include.php"37 ]38 },39 "notification-url": "https://packagist.org/downloads/",40 "license": [41 "MIT"42 ],43 "authors": [44 {45 "name": "Michael Dowling",46 "email": "mtdowling@gmail.com",47 "homepage": "https://github.com/mtdowling"48 }49 ],50 "description": "Guzzle promises library",51 "keywords": [52 "promise"53 ]54 },55 2 { 56 3 "name": "psr/http-message", … … 505 452 }, 506 453 { 507 "name": "php-http/discovery", 508 "version": "v1.1.0", 509 "version_normalized": "1.1.0.0", 510 "source": { 511 "type": "git", 512 "url": "https://github.com/php-http/discovery.git", 513 "reference": "5a236c5e43486286efbd6b36f5151e0b962cfdb5" 514 }, 515 "dist": { 516 "type": "zip", 517 "url": "https://api.github.com/repos/php-http/discovery/zipball/5a236c5e43486286efbd6b36f5151e0b962cfdb5", 518 "reference": "5a236c5e43486286efbd6b36f5151e0b962cfdb5", 519 "shasum": "" 520 }, 521 "require": { 522 "php": "^5.5 || ^7.0" 523 }, 524 "require-dev": { 525 "henrikbjorn/phpspec-code-coverage": "^2.0.2", 526 "php-http/httplug": "^1.0", 454 "name": "php-http/client-common", 455 "version": "v1.4.0", 456 "version_normalized": "1.4.0.0", 457 "source": { 458 "type": "git", 459 "url": "https://github.com/php-http/client-common.git", 460 "reference": "3cf7eb93a2e19bded055efff1a267a1fa6d46074" 461 }, 462 "dist": { 463 "type": "zip", 464 "url": "https://api.github.com/repos/php-http/client-common/zipball/3cf7eb93a2e19bded055efff1a267a1fa6d46074", 465 "reference": "3cf7eb93a2e19bded055efff1a267a1fa6d46074", 466 "shasum": "" 467 }, 468 "require": { 469 "php": ">=5.4", 470 "php-http/httplug": "^1.1", 471 "php-http/message": "^1.2", 527 472 "php-http/message-factory": "^1.0", 528 "phpspec/phpspec": "^2.4", 529 "puli/composer-plugin": "1.0.0-beta10" 473 "symfony/options-resolver": "^2.6 || ^3.0" 474 }, 475 "require-dev": { 476 "henrikbjorn/phpspec-code-coverage": "^1.0", 477 "phpspec/phpspec": "^2.4" 530 478 }, 531 479 "suggest": { 532 "php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories", 533 "puli/composer-plugin": "Sets up Puli which is recommended for Discovery to work. Check http://docs.php-http.org/en/latest/discovery.html for more details." 534 }, 535 "time": "2016-10-20 08:05:06", 536 "type": "library", 537 "extra": { 538 "branch-alias": { 539 "dev-master": "1.2-dev" 540 } 541 }, 542 "installation-source": "dist", 543 "autoload": { 544 "psr-4": { 545 "Http\\Discovery\\": "src/" 480 "php-http/cache-plugin": "PSR-6 Cache plugin", 481 "php-http/logger-plugin": "PSR-3 Logger plugin", 482 "php-http/stopwatch-plugin": "Symfony Stopwatch plugin" 483 }, 484 "time": "2016-11-04 09:19:15", 485 "type": "library", 486 "extra": { 487 "branch-alias": { 488 "dev-master": "1.5-dev" 489 } 490 }, 491 "installation-source": "dist", 492 "autoload": { 493 "psr-4": { 494 "Http\\Client\\Common\\": "src/" 546 495 } 547 496 }, … … 556 505 } 557 506 ], 558 "description": "Finds installed HTTPlug implementations and PSR-7 message factories", 559 "homepage": "http://php-http.org", 560 "keywords": [ 561 "adapter", 507 "description": "Common HTTP Client implementations and tools for HTTPlug", 508 "homepage": "http://httplug.io", 509 "keywords": [ 562 510 "client", 563 "discovery", 564 "factory", 511 "common", 565 512 "http", 566 "message", 567 "psr7" 513 "httplug" 514 ] 515 }, 516 { 517 "name": "guzzlehttp/promises", 518 "version": "v1.3.1", 519 "version_normalized": "1.3.1.0", 520 "source": { 521 "type": "git", 522 "url": "https://github.com/guzzle/promises.git", 523 "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" 524 }, 525 "dist": { 526 "type": "zip", 527 "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", 528 "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", 529 "shasum": "" 530 }, 531 "require": { 532 "php": ">=5.5.0" 533 }, 534 "require-dev": { 535 "phpunit/phpunit": "^4.0" 536 }, 537 "time": "2016-12-20 10:07:11", 538 "type": "library", 539 "extra": { 540 "branch-alias": { 541 "dev-master": "1.4-dev" 542 } 543 }, 544 "installation-source": "dist", 545 "autoload": { 546 "psr-4": { 547 "GuzzleHttp\\Promise\\": "src/" 548 }, 549 "files": [ 550 "src/functions_include.php" 551 ] 552 }, 553 "notification-url": "https://packagist.org/downloads/", 554 "license": [ 555 "MIT" 556 ], 557 "authors": [ 558 { 559 "name": "Michael Dowling", 560 "email": "mtdowling@gmail.com", 561 "homepage": "https://github.com/mtdowling" 562 } 563 ], 564 "description": "Guzzle promises library", 565 "keywords": [ 566 "promise" 568 567 ] 569 568 }, 570 569 { 571 570 "name": "symfony/options-resolver", 572 "version": "v3. 1.6",573 "version_normalized": "3. 1.6.0",571 "version": "v3.2.1", 572 "version_normalized": "3.2.1.0", 574 573 "source": { 575 574 "type": "git", 576 575 "url": "https://github.com/symfony/options-resolver.git", 577 "reference": " 30605874d99af0cde6c41fd39e18546330c38100"578 }, 579 "dist": { 580 "type": "zip", 581 "url": "https://api.github.com/repos/symfony/options-resolver/zipball/ 30605874d99af0cde6c41fd39e18546330c38100",582 "reference": " 30605874d99af0cde6c41fd39e18546330c38100",576 "reference": "45940bcad6388b3b6058107eca67ced738d205bb" 577 }, 578 "dist": { 579 "type": "zip", 580 "url": "https://api.github.com/repos/symfony/options-resolver/zipball/45940bcad6388b3b6058107eca67ced738d205bb", 581 "reference": "45940bcad6388b3b6058107eca67ced738d205bb", 583 582 "shasum": "" 584 583 }, … … 586 585 "php": ">=5.5.9" 587 586 }, 588 "time": "2016-05-1 2 15:59:27",589 "type": "library", 590 "extra": { 591 "branch-alias": { 592 "dev-master": "3. 1-dev"587 "time": "2016-05-13 18:13:23", 588 "type": "library", 589 "extra": { 590 "branch-alias": { 591 "dev-master": "3.2-dev" 593 592 } 594 593 }, … … 626 625 { 627 626 "name": "php-http/message", 628 "version": "v1.4. 0",629 "version_normalized": "1.4. 0.0",627 "version": "v1.4.1", 628 "version_normalized": "1.4.1.0", 630 629 "source": { 631 630 "type": "git", 632 631 "url": "https://github.com/php-http/message.git", 633 "reference": " 20ffbdc291a127e93f66007742693fbdf020d223"634 }, 635 "dist": { 636 "type": "zip", 637 "url": "https://api.github.com/repos/php-http/message/zipball/ 20ffbdc291a127e93f66007742693fbdf020d223",638 "reference": " 20ffbdc291a127e93f66007742693fbdf020d223",632 "reference": "bfd895a4e753bdde99bed64d75b999e0c9fa6147" 633 }, 634 "dist": { 635 "type": "zip", 636 "url": "https://api.github.com/repos/php-http/message/zipball/bfd895a4e753bdde99bed64d75b999e0c9fa6147", 637 "reference": "bfd895a4e753bdde99bed64d75b999e0c9fa6147", 639 638 "shasum": "" 640 639 }, … … 661 660 "zendframework/zend-diactoros": "Used with Diactoros Factories" 662 661 }, 663 "time": "2016-1 0-20 06:59:05",662 "time": "2016-12-16 21:09:21", 664 663 "type": "library", 665 664 "extra": { … … 696 695 }, 697 696 { 698 "name": "php-http/client-common", 699 "version": "v1.4.0", 700 "version_normalized": "1.4.0.0", 701 "source": { 702 "type": "git", 703 "url": "https://github.com/php-http/client-common.git", 704 "reference": "3cf7eb93a2e19bded055efff1a267a1fa6d46074" 705 }, 706 "dist": { 707 "type": "zip", 708 "url": "https://api.github.com/repos/php-http/client-common/zipball/3cf7eb93a2e19bded055efff1a267a1fa6d46074", 709 "reference": "3cf7eb93a2e19bded055efff1a267a1fa6d46074", 710 "shasum": "" 711 }, 712 "require": { 713 "php": ">=5.4", 714 "php-http/httplug": "^1.1", 715 "php-http/message": "^1.2", 697 "name": "php-http/discovery", 698 "version": "v1.1.1", 699 "version_normalized": "1.1.1.0", 700 "source": { 701 "type": "git", 702 "url": "https://github.com/php-http/discovery.git", 703 "reference": "47fc36bd73ab615b55c31f4134e6bae70f1c04c1" 704 }, 705 "dist": { 706 "type": "zip", 707 "url": "https://api.github.com/repos/php-http/discovery/zipball/47fc36bd73ab615b55c31f4134e6bae70f1c04c1", 708 "reference": "47fc36bd73ab615b55c31f4134e6bae70f1c04c1", 709 "shasum": "" 710 }, 711 "require": { 712 "php": "^5.5 || ^7.0" 713 }, 714 "require-dev": { 715 "henrikbjorn/phpspec-code-coverage": "^2.0.2", 716 "php-http/httplug": "^1.0", 716 717 "php-http/message-factory": "^1.0", 717 "symfony/options-resolver": "^2.6 || ^3.0" 718 }, 719 "require-dev": { 720 "henrikbjorn/phpspec-code-coverage": "^1.0", 721 "phpspec/phpspec": "^2.4" 718 "phpspec/phpspec": "^2.4", 719 "puli/composer-plugin": "1.0.0-beta10" 722 720 }, 723 721 "suggest": { 724 "php-http/cache-plugin": "PSR-6 Cache plugin", 725 "php-http/logger-plugin": "PSR-3 Logger plugin", 726 "php-http/stopwatch-plugin": "Symfony Stopwatch plugin" 727 }, 728 "time": "2016-11-04 09:19:15", 729 "type": "library", 730 "extra": { 731 "branch-alias": { 732 "dev-master": "1.5-dev" 733 } 734 }, 735 "installation-source": "dist", 736 "autoload": { 737 "psr-4": { 738 "Http\\Client\\Common\\": "src/" 722 "php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories", 723 "puli/composer-plugin": "Sets up Puli which is recommended for Discovery to work. Check http://docs.php-http.org/en/latest/discovery.html for more details." 724 }, 725 "time": "2016-11-27 12:21:25", 726 "type": "library", 727 "extra": { 728 "branch-alias": { 729 "dev-master": "1.2-dev" 730 } 731 }, 732 "installation-source": "dist", 733 "autoload": { 734 "psr-4": { 735 "Http\\Discovery\\": "src/" 739 736 } 740 737 }, … … 749 746 } 750 747 ], 751 "description": "Common HTTP Client implementations and tools for HTTPlug", 752 "homepage": "http://httplug.io", 753 "keywords": [ 748 "description": "Finds installed HTTPlug implementations and PSR-7 message factories", 749 "homepage": "http://php-http.org", 750 "keywords": [ 751 "adapter", 754 752 "client", 755 "common", 753 "discovery", 754 "factory", 756 755 "http", 757 "httplug" 756 "message", 757 "psr7" 758 758 ] 759 759 }, 760 760 { 761 761 "name": "botamp/botamp-php", 762 "version": " dev-master",763 "version_normalized": " 9999999-dev",762 "version": "v1.0.0", 763 "version_normalized": "1.0.0.0", 764 764 "source": { 765 765 "type": "git", 766 766 "url": "https://github.com/botamp/botamp-php.git", 767 "reference": " 308fb5ceecbeb87d230b51186eb432fe1e895146"768 }, 769 "dist": { 770 "type": "zip", 771 "url": "https://api.github.com/repos/botamp/botamp-php/zipball/ 308fb5ceecbeb87d230b51186eb432fe1e895146",772 "reference": " 308fb5ceecbeb87d230b51186eb432fe1e895146",767 "reference": "2aaf76b022410e14f3ea14e590252945cd548afb" 768 }, 769 "dist": { 770 "type": "zip", 771 "url": "https://api.github.com/repos/botamp/botamp-php/zipball/2aaf76b022410e14f3ea14e590252945cd548afb", 772 "reference": "2aaf76b022410e14f3ea14e590252945cd548afb", 773 773 "shasum": "" 774 774 }, … … 790 790 "satooshi/php-coveralls": "~1.0" 791 791 }, 792 "time": "2016-1 1-14 18:22:26",793 "type": "library", 794 "installation-source": " source",792 "time": "2016-12-24 04:24:32", 793 "type": "library", 794 "installation-source": "dist", 795 795 "autoload": { 796 796 "psr-4": { -
botamp/trunk/vendor/guzzlehttp/promises/CHANGELOG.md
r1520640 r1561223 1 1 # CHANGELOG 2 3 4 ## 1.3.1 - 2016-12-20 5 6 ### Fixed 7 8 - `wait()` foreign promise compatibility 9 10 11 ## 1.3.0 - 2016-11-18 12 13 ### Added 14 15 - Adds support for custom task queues. 16 17 ### Fixed 18 19 - Fixed coroutine promise memory leak. 20 2 21 3 22 ## 1.2.0 - 2016-05-18 4 23 5 * Update to now catch `\Throwable` on PHP 7+ 24 ### Changed 25 26 - Update to now catch `\Throwable` on PHP 7+ 27 6 28 7 29 ## 1.1.0 - 2016-03-07 8 30 9 * Update EachPromise to prevent recurring on a iterator when advancing, as this 31 ### Changed 32 33 - Update EachPromise to prevent recurring on a iterator when advancing, as this 10 34 could trigger fatal generator errors. 11 * Update Promise to allow recursive waiting without unwrapping exceptions. 35 - Update Promise to allow recursive waiting without unwrapping exceptions. 36 12 37 13 38 ## 1.0.3 - 2015-10-15 14 39 15 * Update EachPromise to immediately resolve when the underlying promise iterator 40 ### Changed 41 42 - Update EachPromise to immediately resolve when the underlying promise iterator 16 43 is empty. Previously, such a promise would throw an exception when its `wait` 17 44 function was called. 18 45 46 19 47 ## 1.0.2 - 2015-05-15 20 48 21 * Conditionally require functions.php. 49 ### Changed 50 51 - Conditionally require functions.php. 52 22 53 23 54 ## 1.0.1 - 2015-06-24 24 55 25 * Updating EachPromise to call next on the underlying promise iterator as late 56 ### Changed 57 58 - Updating EachPromise to call next on the underlying promise iterator as late 26 59 as possible to ensure that generators that generate new requests based on 27 60 callbacks are not iterated until after callbacks are invoked. 28 61 62 29 63 ## 1.0.0 - 2015-05-12 30 64 31 *Initial release65 - Initial release -
botamp/trunk/vendor/guzzlehttp/promises/LICENSE
r1520640 r1561223 1 Copyright (c) 2015 Michael Dowling, https://github.com/mtdowling <mtdowling@gmail.com>1 Copyright (c) 2015-2016 Michael Dowling, https://github.com/mtdowling <mtdowling@gmail.com> 2 2 3 3 Permission is hereby granted, free of charge, to any person obtaining a copy -
botamp/trunk/vendor/guzzlehttp/promises/README.md
r1520640 r1561223 97 97 98 98 Promises can be chained one after the other. Each then in the chain is a new 99 promise. The return value of ofa promise is what's forwarded to the next99 promise. The return value of a promise is what's forwarded to the next 100 100 promise in the chain. Returning a promise in a `then` callback will cause the 101 101 subsequent promises in the chain to only be fulfilled when the returned promise … … 316 316 - `then(callable $onFulfilled, callable $onRejected) : PromiseInterface` 317 317 318 Creates a new promise that is fulfilled or rejected when the promise is 319 resolved. 318 Appends fulfillment and rejection handlers to the promise, and returns a new promise resolving to the return value of the called handler. 319 320 - `otherwise(callable $onRejected) : PromiseInterface` 321 322 Appends a rejection handler callback to the promise, and returns a new promise resolving to the return value of the callback if it is called, or to its original fulfillment value if the promise is instead fulfilled. 320 323 321 324 - `wait($unwrap = true) : mixed` -
botamp/trunk/vendor/guzzlehttp/promises/composer.json
r1520640 r1561223 1 1 { 2 2 "name": "guzzlehttp/promises", 3 "type": "library",4 3 "description": "Guzzle promises library", 5 4 "keywords": ["promise"], … … 16 15 }, 17 16 "require-dev": { 18 "phpunit/phpunit": " ~4.0"17 "phpunit/phpunit": "^4.0" 19 18 }, 20 19 "autoload": { … … 24 23 "files": ["src/functions_include.php"] 25 24 }, 25 "scripts": { 26 "test": "vendor/bin/phpunit", 27 "test-ci": "vendor/bin/phpunit --coverage-text" 28 }, 26 29 "extra": { 27 30 "branch-alias": { 28 "dev-master": "1. 0-dev"31 "dev-master": "1.4-dev" 29 32 } 30 33 } -
botamp/trunk/vendor/guzzlehttp/promises/src/Promise.php
r1520640 r1561223 264 264 265 265 foreach ($waitList as $result) { 266 $result->waitIfPending(); 267 while ($result->result instanceof Promise) { 268 $result = $result->result; 266 while (true) { 269 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 } 270 277 } 271 278 } -
botamp/trunk/vendor/guzzlehttp/promises/src/TaskQueue.php
r1520640 r1561223 11 11 * GuzzleHttp\Promise\queue()->run(); 12 12 */ 13 class TaskQueue 13 class TaskQueue implements TaskQueueInterface 14 14 { 15 15 private $enableShutdown = true; … … 31 31 } 32 32 33 /**34 * Returns true if the queue is empty.35 *36 * @return bool37 */38 33 public function isEmpty() 39 34 { … … 41 36 } 42 37 43 /**44 * Adds a task to the queue that will be executed the next time run is45 * called.46 *47 * @param callable $task48 */49 38 public function add(callable $task) 50 39 { … … 52 41 } 53 42 54 /**55 * Execute all of the pending task in the queue.56 */57 43 public function run() 58 44 { -
botamp/trunk/vendor/guzzlehttp/promises/src/functions.php
r1520640 r1561223 15 15 * </code> 16 16 * 17 * @return TaskQueue 18 */ 19 function queue() 17 * @param TaskQueueInterface $assign Optionally specify a new queue instance. 18 * 19 * @return TaskQueueInterface 20 */ 21 function queue(TaskQueueInterface $assign = null) 20 22 { 21 23 static $queue; 22 24 23 if (!$queue) { 25 if ($assign) { 26 $queue = $assign; 27 } elseif (!$queue) { 24 28 $queue = new TaskQueue(); 25 29 } … … 211 215 * @param mixed $promises Promises or values. 212 216 * 213 * @return Promise 217 * @return PromiseInterface 214 218 */ 215 219 function all($promises) … … 244 248 * @param mixed $promises Promises or values. 245 249 * 246 * @return Promise 250 * @return PromiseInterface 247 251 */ 248 252 function some($count, $promises) … … 300 304 * @param mixed $promises Promises or values. 301 305 * 302 * @return Promise 306 * @return PromiseInterface 303 307 * @see GuzzleHttp\Promise\inspect for the inspection state array format. 304 308 */ … … 338 342 * @param callable $onRejected 339 343 * 340 * @return Promise 344 * @return PromiseInterface 341 345 */ 342 346 function each( … … 364 368 * @param callable $onRejected 365 369 * 366 * @return mixed370 * @return PromiseInterface 367 371 */ 368 372 function each_limit( … … 388 392 * @param callable $onFulfilled 389 393 * 390 * @return mixed394 * @return PromiseInterface 391 395 */ 392 396 function each_limit_all( … … 442 446 443 447 /** 444 * Creates a promise that is resolved using a generator that yields values or 445 * promises (somewhat similar to C#'s async keyword). 446 * 447 * When called, the coroutine function will start an instance of the generator 448 * and returns a promise that is fulfilled with its final yielded value. 449 * 450 * Control is returned back to the generator when the yielded promise settles. 451 * This can lead to less verbose code when doing lots of sequential async calls 452 * with minimal processing in between. 453 * 454 * use GuzzleHttp\Promise; 455 * 456 * function createPromise($value) { 457 * return new Promise\FulfilledPromise($value); 458 * } 459 * 460 * $promise = Promise\coroutine(function () { 461 * $value = (yield createPromise('a')); 462 * try { 463 * $value = (yield createPromise($value . 'b')); 464 * } catch (\Exception $e) { 465 * // The promise was rejected. 466 * } 467 * yield $value . 'c'; 468 * }); 469 * 470 * // Outputs "abc" 471 * $promise->then(function ($v) { echo $v; }); 472 * 473 * @param callable $generatorFn Generator function to wrap into a promise. 474 * 475 * @return Promise 476 * @link https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration 448 * @see Coroutine 449 * 450 * @param callable $generatorFn 451 * 452 * @return PromiseInterface 477 453 */ 478 454 function coroutine(callable $generatorFn) 479 455 { 480 $generator = $generatorFn(); 481 return __next_coroutine($generator->current(), $generator)->then(); 482 } 483 484 /** @internal */ 485 function __next_coroutine($yielded, \Generator $generator) 486 { 487 return promise_for($yielded)->then( 488 function ($value) use ($generator) { 489 $nextYield = $generator->send($value); 490 return $generator->valid() 491 ? __next_coroutine($nextYield, $generator) 492 : $value; 493 }, 494 function ($reason) use ($generator) { 495 $nextYield = $generator->throw(exception_for($reason)); 496 // The throw was caught, so keep iterating on the coroutine 497 return __next_coroutine($nextYield, $generator); 498 } 499 ); 500 } 456 return new Coroutine($generatorFn); 457 } -
botamp/trunk/vendor/php-http/discovery/CHANGELOG.md
r1558890 r1561223 3 3 4 4 ## Unreleased 5 6 ## 1.1.1 - 2016-11-27 7 8 ### Changed 9 10 - Made exception messages clearer. `StrategyUnavailableException` is no longer the previous exception to `DiscoveryFailedException`. 11 - `CommonClassesStrategy` is using `self` instead of `static`. Using `static` makes no sense when `CommonClassesStrategy` is final. 5 12 6 13 ## 1.1.0 - 2016-10-20 -
botamp/trunk/vendor/php-http/discovery/src/ClassDiscovery.php
r1558890 r1561223 72 72 } 73 73 74 throw new DiscoveryFailedException('Could not find resource using any discovery strategy',$exceptions);74 throw DiscoveryFailedException::create($exceptions); 75 75 } 76 76 -
botamp/trunk/vendor/php-http/discovery/src/Exception/DiscoveryFailedException.php
r1520640 r1561223 13 13 { 14 14 /** 15 * @var array15 * @var \Exception[] 16 16 */ 17 17 private $exceptions; 18 18 19 19 /** 20 * @param $exceptions 20 * @param string $message 21 * @param \Exception[] $exceptions 21 22 */ 22 23 public function __construct($message, array $exceptions = []) … … 24 25 $this->exceptions = $exceptions; 25 26 26 parent::__construct($message , 0, array_shift($exceptions));27 parent::__construct($message); 27 28 } 28 29 29 30 /** 30 * @return array 31 * @param \Exception[] $exceptions 32 */ 33 public static function create($exceptions) 34 { 35 $message = 'Could not find resource using any discovery strategy. Find more information at http://docs.php-http.org/en/latest/discovery.html#common-errors'; 36 foreach ($exceptions as $e) { 37 $message .= "\n - ".$e->getMessage(); 38 } 39 $message .= "\n\n"; 40 41 return new self($message, $exceptions); 42 } 43 44 /** 45 * @return \Exception[] 31 46 */ 32 47 public function getExceptions() -
botamp/trunk/vendor/php-http/discovery/src/Strategy/CommonClassesStrategy.php
r1558890 r1561223 68 68 public static function getCandidates($type) 69 69 { 70 if (isset(s tatic::$classes[$type])) {71 return s tatic::$classes[$type];70 if (isset(self::$classes[$type])) { 71 return self::$classes[$type]; 72 72 } 73 73 -
botamp/trunk/vendor/php-http/message/CHANGELOG.md
r1558890 r1561223 1 1 # Change Log 2 3 4 ## 1.4.1 - 2016-12-16 5 6 ### Fixed 7 8 - Cookie::matchPath Cookie with root path (`/`) will not match sub path (e.g. `/cookie`). 9 2 10 3 11 ## 1.4.0 - 2016-10-20 … … 8 16 - BufferedStream that allow you to decorate a non-seekable stream with a seekable one. 9 17 - cUrlFormatter to be able to redo the request with a cURL command 18 10 19 11 20 ## 1.3.1 - 2016-07-15 -
botamp/trunk/vendor/php-http/message/src/Cookie.php
r1520640 r1561223 314 314 public function matchPath($path) 315 315 { 316 return $this->path === $path || (strpos($path, $this->path.'/') === 0);316 return $this->path === $path || (strpos($path, rtrim($this->path, '/').'/') === 0); 317 317 } 318 318 -
botamp/trunk/vendor/symfony/options-resolver/composer.json
r1520640 r1561223 28 28 "extra": { 29 29 "branch-alias": { 30 "dev-master": "3. 1-dev"30 "dev-master": "3.2-dev" 31 31 } 32 32 }
Note: See TracChangeset
for help on using the changeset viewer.