File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 "require" : {
1212 "php" : " ^7.1" ,
1313 "scriptfusion/static-class" : " ^1" ,
14- "scriptfusion/retry" : " ^2" ,
14+ "scriptfusion/retry" : " ^2.1 " ,
1515 "scriptfusion/retry-exception-handlers" : " ^1.1" ,
1616 "amphp/amp" : " ^2" ,
1717 "psr/container" : " ^1" ,
1818 "psr/cache" : " ^1"
1919 },
2020 "require-dev" : {
2121 "phpunit/phpunit" : " ^7.1.3" ,
22- "bilge /mockery" : " dev-issue-871 "
22+ "mockery /mockery" : " ^1.1 "
2323 },
2424 "suggest" : {
2525 "connectors/http" : " Provides an HTTP connector for Porter providers." ,
Original file line number Diff line number Diff line change @@ -15,6 +15,6 @@ public function count(): int
1515
1616 private function setCount (int $ count ): void
1717 {
18- $ this ->count = $ count | 0 ;
18+ $ this ->count = $ count ;
1919 }
2020}
Original file line number Diff line number Diff line change 1111
1212/**
1313 * Connector whose lifecycle is synchronised with an import operation. Ensures correct ConnectionContext is delivered
14- * to the wrapped connector.
14+ * to the wrapped connector and intercepts failed connections to facilitate automatic retries .
1515 *
1616 * Do not store references to this connector that would prevent it expiring when an import operation ends.
1717 *
@@ -111,12 +111,12 @@ private function createExceptionHandler(): \Closure
111111 * Invokes the specified fetch exception handler, cloning it if required.
112112 *
113113 * @param RecoverableExceptionHandler $handler Fetch exception handler.
114- * @param \Exception $exception Exception to pass to the handler.
114+ * @param RecoverableException $recoverableException Recoverable exception to pass to the handler.
115115 * @param bool $cloned False if handler requires cloning, true if handler has already been cloned.
116116 */
117117 private static function invokeHandler (
118118 RecoverableExceptionHandler &$ handler ,
119- \ Exception $ exception ,
119+ RecoverableException $ recoverableException ,
120120 bool &$ cloned
121121 ): void {
122122 if (!$ cloned && !$ handler instanceof StatelessRecoverableExceptionHandler) {
@@ -125,7 +125,7 @@ private static function invokeHandler(
125125 $ cloned = true ;
126126 }
127127
128- $ handler ($ exception );
128+ $ handler ($ recoverableException );
129129 }
130130
131131 /**
Original file line number Diff line number Diff line change @@ -20,9 +20,9 @@ class ExponentialSleepRecoverableExceptionHandler implements RecoverableExceptio
2020 *
2121 * @param int $initialDelay Initial delay.
2222 */
23- public function __construct ($ initialDelay = ExponentialBackoffExceptionHandler::DEFAULT_COEFFICIENT )
23+ public function __construct (int $ initialDelay = ExponentialBackoffExceptionHandler::DEFAULT_COEFFICIENT )
2424 {
25- $ this ->initialDelay = $ initialDelay | 0 ;
25+ $ this ->initialDelay = $ initialDelay ;
2626 }
2727
2828 public function initialize (): void
Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ public function initialize(): void;
2727
2828 /**
2929 * Handles a recoverable exception.
30+ *
31+ * @return mixed
3032 */
31- public function __invoke (RecoverableException $ exception ): void ;
33+ public function __invoke (RecoverableException $ exception );
3234}
Original file line number Diff line number Diff line change @@ -167,6 +167,8 @@ private function hasTransformer(Transformer $transformer): bool
167167
168168 /**
169169 * @return mixed
170+ *
171+ * @deprecated TODO: Evaluate whether context can be removed.
170172 */
171173 final public function getContext ()
172174 {
@@ -177,6 +179,8 @@ final public function getContext()
177179 * @param mixed $context
178180 *
179181 * @return $this
182+ *
183+ * @deprecated TODO: Evaluate whether context can be removed.
180184 */
181185 final public function setContext ($ context ): self
182186 {
You can’t perform that action at this time.
0 commit comments