Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
"php": ">=8.1",
"ext-curl": "*",
"ext-json": "*",
"google/common-protos": "^1.4 || ^2.2 || ^3.2 || ^4.9",
"google/protobuf": "^3.25.5 || ^4.29.3",
"google/common-protos": "^4.9",
"google/protobuf": "^4.31.1",
"grpc/grpc": "^1.57",
"nesbot/carbon": "^2.72.6 || ^3.8.4",
"psr/log": "^2.0 || ^3.0.2",
"ramsey/uuid": "^4.7.6",
"react/promise": "^2.11",
"roadrunner-php/roadrunner-api-dto": "^1.12.0",
"roadrunner-php/roadrunner-api-dto": "^1.13.0",
"roadrunner-php/version-checker": "^1.0.1",
"spiral/attributes": "^3.1.8",
"spiral/roadrunner": "^2025.1.2",
Expand Down
35 changes: 5 additions & 30 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="6.13.0@70cdf647255a1362b426bb0f522a85817b8c791c">
<files psalm-version="6.13.1@1e3b7f0a8ab32b23197b91107adc0a7ed8a05b51">
<file src="src/Activity.php">
<ImplicitToStringCast>
<code><![CDATA[$type]]></code>
Expand Down Expand Up @@ -115,11 +115,6 @@
<code><![CDATA[$workflowType]]></code>
</PropertyNotSetInConstructor>
</file>
<file src="src/Client/Schedule/ScheduleHandle.php">
<RawObjectIteration>
<code><![CDATA[$response->getStartTime()]]></code>
</RawObjectIteration>
</file>
<file src="src/Client/Schedule/ScheduleOptions.php">
<DeprecatedProperty>
<code><![CDATA[$this->namespace]]></code>
Expand All @@ -139,14 +134,6 @@
<code><![CDATA[$options->namespace]]></code>
<code><![CDATA[$options->namespace]]></code>
</DeprecatedProperty>
<RawObjectIteration>
<code><![CDATA[$response->getSchedules()]]></code>
</RawObjectIteration>
</file>
<file src="src/Client/Workflow/WorkflowExecutionHistory.php">
<RawObjectIteration>
<code><![CDATA[$history->getEvents()]]></code>
</RawObjectIteration>
</file>
<file src="src/Client/WorkflowClient.php">
<ArgumentTypeCoercion>
Expand Down Expand Up @@ -184,9 +171,6 @@
<MoreSpecificReturnType>
<code><![CDATA[static]]></code>
</MoreSpecificReturnType>
<RawObjectIteration>
<code><![CDATA[$response->getExecutions()]]></code>
</RawObjectIteration>
<RedundantFunctionCall>
<code><![CDATA[\sprintf]]></code>
<code><![CDATA[\sprintf]]></code>
Expand Down Expand Up @@ -302,10 +286,6 @@
</MoreSpecificImplementedParamType>
</file>
<file src="src/DataConverter/EncodedValues.php">
<InvalidArgument>
<code><![CDATA[$payloads->getPayloads()]]></code>
<code><![CDATA[$payloads->getPayloads()]]></code>
</InvalidArgument>
<PossiblyNullIterator>
<code><![CDATA[$this->values]]></code>
</PossiblyNullIterator>
Expand Down Expand Up @@ -742,16 +722,17 @@
<code><![CDATA[(int) $message->getHistorySizeBytes()]]></code>
<code><![CDATA[(int) $message->getStateTransitionCount()]]></code>
</ArgumentTypeCoercion>
<DeprecatedMethod>
<code><![CDATA[getBinaryChecksum]]></code>
<code><![CDATA[getMostRecentWorkerVersionStamp]]></code>
</DeprecatedMethod>
<DocblockTypeContradiction>
<code><![CDATA[parse]]></code>
<code><![CDATA[parse]]></code>
<code><![CDATA[parse]]></code>
<code><![CDATA[parse]]></code>
<code><![CDATA[parse]]></code>
</DocblockTypeContradiction>
<RawObjectIteration>
<code><![CDATA[$getAutoResetPoints->getPoints()]]></code>
</RawObjectIteration>
<RedundantConditionGivenDocblockType>
<code><![CDATA[parse]]></code>
</RedundantConditionGivenDocblockType>
Expand Down Expand Up @@ -821,9 +802,6 @@
\sprintf('%d.%d', $input->getSeconds(), $input->getNanos() / 1000),
)]]></code>
</FalsableReturnStatement>
<InvalidArgument>
<code><![CDATA[$input->getPayloads()]]></code>
</InvalidArgument>
<InvalidFalsableReturnType>
<code><![CDATA[\DateTimeImmutable]]></code>
</InvalidFalsableReturnType>
Expand Down Expand Up @@ -1373,9 +1351,6 @@
<code><![CDATA[$e->getCode()]]></code>
<code><![CDATA[$e->getCode()]]></code>
</PossiblyInvalidArgument>
<RawObjectIteration>
<code><![CDATA[$frame->getMessages()]]></code>
</RawObjectIteration>
<TooManyArguments>
<code><![CDATA[decode]]></code>
</TooManyArguments>
Expand Down
2 changes: 2 additions & 0 deletions src/Client/GRPC/BaseClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ private function call(string $method, object $arg, ContextInterface $ctx): objec
throw new ServiceClientException($status);
}

\assert($result !== null);

return $result;
} catch (ServiceClientException $e) {
if (!\in_array($e->getCode(), self::RETRYABLE_ERRORS, true)) {
Expand Down
2 changes: 0 additions & 2 deletions src/Client/Schedule/ScheduleHandle.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,6 @@ public function listScheduleMatchingTimes(
/** @var list<\DateTimeInterface> $list */
$list = [];
foreach ($response->getStartTime() as $timestamp) {
\assert($timestamp instanceof Timestamp);

$list[] = new \DateTimeImmutable("@{$timestamp->getSeconds()}");
}

Expand Down
1 change: 0 additions & 1 deletion src/Client/ScheduleClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ public function listSchedules(

$page = [];
foreach ($response->getSchedules() as $message) {
\assert($message instanceof \Temporal\Api\Schedule\V1\ScheduleListEntry);
$values = $this->protoConverter->convert($message);
$dto = new ScheduleListEntry();

Expand Down
1 change: 0 additions & 1 deletion src/Client/Workflow/WorkflowExecutionHistory.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public function getEvents(): \Generator
if ($history === null) {
return;
}
/** @var HistoryEvent $event */
foreach ($history->getEvents() as $event) {
yield $event;
}
Expand Down
2 changes: 0 additions & 2 deletions src/Client/WorkflowClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
use Spiral\Attributes\Composite\SelectiveReader;
use Spiral\Attributes\ReaderInterface;
use Temporal\Api\Enums\V1\HistoryEventFilterType;
use Temporal\Api\Workflow\V1\WorkflowExecutionInfo;
use Temporal\Api\Workflowservice\V1\CountWorkflowExecutionsRequest;
use Temporal\Api\Workflowservice\V1\GetWorkflowExecutionHistoryRequest;
use Temporal\Api\Workflowservice\V1\ListWorkflowExecutionsRequest;
Expand Down Expand Up @@ -335,7 +334,6 @@ public function listWorkflowExecutions(

$page = [];
foreach ($response->getExecutions() as $message) {
\assert($message instanceof WorkflowExecutionInfo);
$page[] = $mapper->fromMessage($message);
}
yield $page;
Expand Down
2 changes: 0 additions & 2 deletions src/Internal/Mapper/WorkflowExecutionInfoMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Temporal\Api\Common\V1\SearchAttributes;
use Temporal\Api\Common\V1\WorkerVersionStamp;
use Temporal\Api\Common\V1\WorkflowExecution;
use Temporal\Api\Workflow\V1\ResetPointInfo;
use Temporal\Api\Workflow\V1\ResetPoints;
use Temporal\Api\Workflow\V1\WorkflowExecutionInfo;
use Temporal\Common\WorkerVersionStamp as WorkerVersionStampDto;
Expand Down Expand Up @@ -118,7 +117,6 @@ private function prepareAutoResetPoints(?ResetPoints $getAutoResetPoints): array

$resetPoints = [];
foreach ($getAutoResetPoints->getPoints() as $point) {
\assert($point instanceof ResetPointInfo);
$resetPoints[] = new ResetPointInfoDto(
binaryChecksum: $point->getBinaryChecksum(),
runId: $point->getRunId(),
Expand Down
2 changes: 0 additions & 2 deletions src/Worker/Transport/Codec/ProtoCodec.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Temporal\DataConverter\DataConverterInterface;
use Temporal\Exception\ProtocolException;
use RoadRunner\Temporal\DTO\V1\Frame;
use RoadRunner\Temporal\DTO\V1\Message;
use Temporal\Worker\Transport\Codec\ProtoCodec\Decoder;
use Temporal\Worker\Transport\Codec\ProtoCodec\Encoder;
use Temporal\Worker\Transport\Command\CommandInterface;
Expand Down Expand Up @@ -61,7 +60,6 @@ public function decode(string $batch, array $headers = []): iterable
$frame = new Frame();
$frame->mergeFromString($batch);

/** @var Message $msg */
foreach ($frame->getMessages() as $msg) {
/** @psalm-suppress ArgumentTypeCoercion */
$info = new TickInfo(
Expand Down
Loading