Skip to content
Draft
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
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"internal/destroy": "^1.0",
"internal/promise": "^3.4",
"nesbot/carbon": "^2.72.6 || ^3.8.4",
"psr/clock": "^1.0",
"psr/log": "^2.0 || ^3.0.2",
"ramsey/uuid": "^4.7.6",
"roadrunner-php/roadrunner-api-dto": "^1.14.0",
Expand Down
1 change: 1 addition & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
</testsuite>
<testsuite name="Unit">
<directory suffix="TestCase.php">tests/Unit</directory>
<directory suffix="Test.php">tests/Nexus/Unit</directory>
</testsuite>
<testsuite name="Functional">
<directory suffix="TestCase.php">tests/Functional</directory>
Expand Down
148 changes: 57 additions & 91 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@
</ArgumentTypeCoercion>
</file>
<file src="src/Client/Schedule/Action/StartWorkflowAction.php">
<DocblockTypeContradiction>
<code><![CDATA[parse]]></code>
<code><![CDATA[parse]]></code>
<code><![CDATA[parse]]></code>
</DocblockTypeContradiction>
<InaccessibleProperty>
<code><![CDATA[$workflowType->name]]></code>
</InaccessibleProperty>
Expand Down Expand Up @@ -99,9 +94,6 @@
<code><![CDATA[$this->excludeCalendarList]]></code>
<code><![CDATA[$this->excludeCalendarList]]></code>
</DeprecatedProperty>
<DocblockTypeContradiction>
<code><![CDATA[parse]]></code>
</DocblockTypeContradiction>
</file>
<file src="src/Client/ScheduleClient.php">
<DeprecatedProperty>
Expand Down Expand Up @@ -258,11 +250,6 @@
<code><![CDATA[getID]]></code>
</PossiblyNullReference>
</file>
<file src="src/Exception/Client/ServiceClientException.php">
<ImplementedReturnTypeMismatch>
<code><![CDATA[RepeatedField]]></code>
</ImplementedReturnTypeMismatch>
</file>
<file src="src/Exception/Client/WorkflowException.php">
<UnsafeInstantiation>
<code><![CDATA[new static(null, $execution, $workflowType, $previous)]]></code>
Expand Down Expand Up @@ -447,9 +434,6 @@
</PropertyNotSetInConstructor>
</file>
<file src="src/Internal/Declaration/Graph/ClassNode.php">
<ImplicitToStringCast>
<code><![CDATA[list<array{class-string, \ReflectionMethod}>]]></code>
</ImplicitToStringCast>
<InvalidReturnType>
<code><![CDATA[\Traversable<ClassNode>]]></code>
</InvalidReturnType>
Expand Down Expand Up @@ -515,6 +499,12 @@
</RedundantConditionGivenDocblockType>
<UnnecessaryVarAnnotation>
<code><![CDATA[\ReflectionMethod]]></code>
<code><![CDATA[\Traversable<ClassNode, \ReflectionMethod>]]></code>
</UnnecessaryVarAnnotation>
</file>
<file src="src/Internal/Declaration/Reader/NexusServiceReader.php">
<UnnecessaryVarAnnotation>
<code><![CDATA[\Traversable<ClassNode, \ReflectionMethod>]]></code>
</UnnecessaryVarAnnotation>
</file>
<file src="src/Internal/Declaration/Reader/WorkflowReader.php">
Expand All @@ -533,7 +523,8 @@
<code><![CDATA[$retry !== null]]></code>
</RedundantConditionGivenDocblockType>
<UnnecessaryVarAnnotation>
<code><![CDATA[\Traversable<class-string, \ReflectionMethod>]]></code>
<code><![CDATA[\Traversable<ClassNode, \ReflectionMethod>]]></code>
<code><![CDATA[\Traversable<ClassNode, \ReflectionMethod>]]></code>
</UnnecessaryVarAnnotation>
</file>
<file src="src/Internal/Declaration/WorkflowInstance/QueryDispatcher.php">
Expand Down Expand Up @@ -585,18 +576,6 @@
<code><![CDATA[setDataConverter]]></code>
</UndefinedInterfaceMethod>
</file>
<file src="src/Internal/Mapper/WorkflowExecutionConfigMapper.php">
<DocblockTypeContradiction>
<code><![CDATA[parse]]></code>
<code><![CDATA[parse]]></code>
<code><![CDATA[parse]]></code>
<code><![CDATA[parse]]></code>
<code><![CDATA[parse]]></code>
</DocblockTypeContradiction>
<RedundantConditionGivenDocblockType>
<code><![CDATA[parse]]></code>
</RedundantConditionGivenDocblockType>
</file>
<file src="src/Internal/Mapper/WorkflowExecutionInfoMapper.php">
<ArgumentTypeCoercion>
<code><![CDATA[$execution->getRunId()]]></code>
Expand All @@ -609,16 +588,6 @@
<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>
<RedundantConditionGivenDocblockType>
<code><![CDATA[parse]]></code>
</RedundantConditionGivenDocblockType>
</file>
<file src="src/Internal/Marshaller/Mapper/AttributeMapper.php">
<MissingClosureParamType>
Expand Down Expand Up @@ -817,17 +786,7 @@
</DeprecatedConstant>
<RedundantCondition>
<code><![CDATA[$nullEmpty && $seconds === 0 && $micros === 0]]></code>
<code><![CDATA[parse]]></code>
</RedundantCondition>
<TypeDoesNotContainNull>
<code><![CDATA[parse]]></code>
</TypeDoesNotContainNull>
<TypeDoesNotContainType>
<code><![CDATA[parse]]></code>
<code><![CDATA[parse]]></code>
<code><![CDATA[parse]]></code>
<code><![CDATA[parse]]></code>
</TypeDoesNotContainType>
</file>
<file src="src/Internal/Support/DateTime.php">
<InvalidReturnStatement>
Expand Down Expand Up @@ -924,10 +883,6 @@
</ArgumentTypeCoercion>
</file>
<file src="src/Internal/Transport/Router/StartWorkflow.php">
<PossiblyFalseArgument>
<code><![CDATA[\json_encode($param)]]></code>
<code><![CDATA[\json_encode($param)]]></code>
</PossiblyFalseArgument>
<UnnecessaryVarAnnotation>
<code><![CDATA[Input]]></code>
</UnnecessaryVarAnnotation>
Expand All @@ -936,13 +891,6 @@
<ArgumentTypeCoercion>
<code><![CDATA[$e->getMessage()]]></code>
</ArgumentTypeCoercion>
<InvalidArgument>
<code><![CDATA[$request]]></code>
<code><![CDATA[$request]]></code>
</InvalidArgument>
<MismatchingDocblockParamType>
<code><![CDATA[RequestInterface]]></code>
</MismatchingDocblockParamType>
</file>
<file src="src/Internal/Workflow/ActivityProxy.php">
<ArgumentTypeCoercion>
Expand Down Expand Up @@ -1003,6 +951,17 @@
<code><![CDATA[$header ?? Header::empty()]]></code>
</PropertyTypeCoercion>
</file>
<file src="src/Internal/Workflow/NexusOperationStub.php">
<ArgumentTypeCoercion>
<code><![CDATA[$endpoint]]></code>
<code><![CDATA[$service]]></code>
</ArgumentTypeCoercion>
</file>
<file src="src/Internal/Workflow/NexusServiceProxy.php">
<ArgumentTypeCoercion>
<code><![CDATA[$input->operation]]></code>
</ArgumentTypeCoercion>
</file>
<file src="src/Internal/Workflow/Process/DeferredGenerator.php">
<UnevaluatedCode>
<code><![CDATA[yield;]]></code>
Expand Down Expand Up @@ -1060,6 +1019,7 @@
<ArgumentTypeCoercion>
<code><![CDATA[$input->maxSupported]]></code>
<code><![CDATA[$input->minSupported]]></code>
<code><![CDATA[$input->operation]]></code>
<code><![CDATA[$input->type]]></code>
<code><![CDATA[$type]]></code>
<code><![CDATA[$type]]></code>
Expand Down Expand Up @@ -1102,6 +1062,37 @@
<code><![CDATA[$clone->trace = &$this->trace]]></code>
</UnsupportedPropertyReferenceUsage>
</file>
<file src="src/Nexus/Attribute/AsyncOperation.php">
<DeprecatedClass>
<code><![CDATA[NamedArgumentConstructor]]></code>
</DeprecatedClass>
</file>
<file src="src/Nexus/Attribute/Operation.php">
<DeprecatedClass>
<code><![CDATA[NamedArgumentConstructor]]></code>
</DeprecatedClass>
</file>
<file src="src/Nexus/Attribute/Service.php">
<DeprecatedClass>
<code><![CDATA[NamedArgumentConstructor]]></code>
</DeprecatedClass>
</file>
<file src="src/Nexus/Handler/Internal/WorkflowRunStarter.php">
<DeprecatedConstant>
<code><![CDATA[Header::OPERATION_ID]]></code>
<code><![CDATA[Header::OPERATION_ID]]></code>
</DeprecatedConstant>
</file>
<file src="src/Nexus/Handler/LinkCollection.php">
<RedundantFunctionCall>
<code><![CDATA[\array_values]]></code>
</RedundantFunctionCall>
</file>
<file src="src/Nexus/WorkflowRunOperation.php">
<ArgumentTypeCoercion>
<code><![CDATA[$decoded->workflowId]]></code>
</ArgumentTypeCoercion>
</file>
<file src="src/Promise.php">
<InvalidArgument>
<code><![CDATA[$reasons]]></code>
Expand Down Expand Up @@ -1182,12 +1173,6 @@
</PossiblyNullArgument>
</file>
<file src="src/Worker/Transport/Codec/ProtoCodec.php">
<LessSpecificReturnStatement>
<code><![CDATA[$frame->serializeToString()]]></code>
</LessSpecificReturnStatement>
<MoreSpecificReturnType>
<code><![CDATA[string]]></code>
</MoreSpecificReturnType>
<PossiblyInvalidArgument>
<code><![CDATA[$e->getCode()]]></code>
<code><![CDATA[$e->getCode()]]></code>
Expand All @@ -1210,22 +1195,10 @@
</PossiblyNullReference>
</file>
<file src="src/Worker/Transport/Codec/ProtoCodec/Encoder.php">
<PossiblyFalseArgument>
<code><![CDATA[\json_encode($cmd->getOptions(), JSON_INVALID_UTF8_IGNORE | JSON_UNESCAPED_UNICODE)]]></code>
<code><![CDATA[\json_encode($options)]]></code>
</PossiblyFalseArgument>
<PossiblyNullArgument>
<code><![CDATA[$cmd->getFailure()]]></code>
</PossiblyNullArgument>
</file>
<file src="src/Worker/Transport/Command/Client/FailedClientResponse.php">
<InvalidNullableReturnType>
<code><![CDATA[\Throwable]]></code>
</InvalidNullableReturnType>
<NullableReturnStatement>
<code><![CDATA[$this->failure]]></code>
</NullableReturnStatement>
</file>
<file src="src/Worker/Transport/Command/Client/SuccessClientResponse.php">
<InvalidNullableReturnType>
<code><![CDATA[ValuesInterface]]></code>
Expand Down Expand Up @@ -1360,6 +1333,12 @@
<code><![CDATA[getUpdateContext]]></code>
</UndefinedInterfaceMethod>
</file>
<file src="src/Workflow/NexusOperationOptions.php">
<ImpureMethodCall>
<code><![CDATA[assert]]></code>
<code><![CDATA[parse]]></code>
</ImpureMethodCall>
</file>
<file src="src/Workflow/QueryMethod.php">
<DeprecatedClass>
<code><![CDATA[NamedArgumentConstructor]]></code>
Expand Down Expand Up @@ -1492,19 +1471,6 @@
<code><![CDATA[$message->getHeader()]]></code>
<code><![CDATA[$message->getPayloads()]]></code>
</PossiblyNullArgument>
<TooManyTemplateParams>
<code><![CDATA[$fields]]></code>
<code><![CDATA[$meta]]></code>
</TooManyTemplateParams>
</file>
<file src="testing/src/Transcript/WorkflowHistoryDumper.php">
<InvalidOperand>
<code><![CDATA[$eventTime->getSeconds() + \round($eventTime->getNanos() / 1_000_000_000, 6)]]></code>
<code><![CDATA[($sec - $startSec) * 1000]]></code>
</InvalidOperand>
<PossiblyInvalidOperand>
<code><![CDATA[$eventTime->getSeconds()]]></code>
</PossiblyInvalidOperand>
</file>
<file src="testing/src/WorkerMock.php">
<DeprecatedMethod>
Expand Down
5 changes: 5 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
<stubs>
<file name="stubs/GoogleProtobufRepeatedField.phpstub" />
<file name="stubs/GoogleProtobufMapField.phpstub" />
<file name="stubs/CarbonInterval.phpstub" />
</stubs>
<issueHandlers>
<MissingOverrideAttribute errorLevel="suppress" />
<ClassMustBeFinal errorLevel="suppress" />
Expand Down
Loading
Loading