Skip to content

Commit a271938

Browse files
authored
Merge pull request #523: Resolve deprecations, update CI
2 parents ee90e67 + 9397729 commit a271938

File tree

7 files changed

+32
-17
lines changed

7 files changed

+32
-17
lines changed

.github/workflows/run-test-suite.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,14 @@ jobs:
4848
fail-fast: ${{ inputs.fail-fast }}
4949
matrix:
5050
php: [ 8.1, 8.2, 8.3 ]
51-
os: [ ubuntu-latest, windows-latest ]
51+
os: [ ubuntu-latest ]
5252
extensions-suffix: [ '', ', protobuf' ]
5353
dependencies: [ lowest , highest ]
5454
timeout-minutes: [ '${{ inputs.test-timeout }}' ]
55-
exclude:
56-
- os: windows-latest
57-
php: 8.2
55+
include:
5856
- os: windows-latest
5957
extensions-suffix: ', protobuf'
60-
- os: windows-latest
61-
php: 8.3
58+
php: 8.1
6259
steps:
6360
- name: Set Git To Use LF
6461
run: |

phpunit.xml.dist

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
stopOnFailure="false"
1010
stopOnError="false"
1111
stderr="true"
12+
displayDetailsOnIncompleteTests="true"
13+
displayDetailsOnSkippedTests="true"
14+
displayDetailsOnTestsThatTriggerDeprecations="true"
15+
displayDetailsOnTestsThatTriggerErrors="true"
16+
displayDetailsOnTestsThatTriggerNotices="true"
17+
displayDetailsOnTestsThatTriggerWarnings="true"
1218
>
1319
<testsuites>
1420
<testsuite name="Acceptance">

psalm-baseline.xml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@
109109
<code><![CDATA[$workflowType]]></code>
110110
</PropertyNotSetInConstructor>
111111
</file>
112+
<file src="src/Client/Schedule/Spec/ScheduleSpec.php">
113+
<DeprecatedProperty>
114+
<code><![CDATA[$this->excludeCalendarList]]></code>
115+
<code><![CDATA[$this->excludeCalendarList]]></code>
116+
</DeprecatedProperty>
117+
</file>
112118
<file src="src/Client/Update/UpdateHandle.php">
113119
<PossiblyNullArgument>
114120
<code><![CDATA[$result->getSuccess()]]></code>
@@ -508,7 +514,6 @@
508514
</file>
509515
<file src="src/Internal/Declaration/Reader/WorkflowReader.php">
510516
<ArgumentTypeCoercion>
511-
<code><![CDATA[$class]]></code>
512517
<code><![CDATA[$contextualRetry]]></code>
513518
<code><![CDATA[$method]]></code>
514519
<code><![CDATA[$name]]></code>
@@ -1218,10 +1223,6 @@
12181223
<InvalidOperand>
12191224
<code><![CDATA[$promisesOrValues]]></code>
12201225
</InvalidOperand>
1221-
<MissingParamType>
1222-
<code><![CDATA[$promiseOrValue]]></code>
1223-
<code><![CDATA[$promiseOrValue]]></code>
1224-
</MissingParamType>
12251226
<TooManyArguments>
12261227
<code><![CDATA[$reduce($c, $value, $i++, $total)]]></code>
12271228
</TooManyArguments>
@@ -1367,11 +1368,6 @@
13671368
<code><![CDATA[$method]]></code>
13681369
</ArgumentTypeCoercion>
13691370
</file>
1370-
<file src="src/Worker/Transport/RPCConnectionInterface.php">
1371-
<MissingParamType>
1372-
<code><![CDATA[$payload]]></code>
1373-
</MissingParamType>
1374-
</file>
13751371
<file src="src/Worker/Transport/RoadRunner.php">
13761372
<ArgumentTypeCoercion>
13771373
<code><![CDATA[$env->getRelayAddress()]]></code>

src/Client/Schedule/Spec/ScheduleSpec.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ final class ScheduleSpec
7676
* Any timestamps matching any of exclude* will be skipped.
7777
*
7878
* @var list<CalendarSpec>
79+
*
80+
* @deprecated
7981
*/
8082
#[MarshalArray(name: 'exclude_calendar', of: CalendarSpec::class)]
8183
public readonly array $excludeCalendarList;
@@ -245,18 +247,25 @@ public function withAddedInterval(mixed $interval): self
245247

246248
/**
247249
* Returns a new instance with the replaced exclude calendar list.
250+
*
251+
* @deprecated This method is deprecated and will be removed in the next major release.
248252
*/
249253
public function withExcludeCalendarList(CalendarSpec ...$calendar): self
250254
{
255+
@\trigger_error('ScheduleSpec::withExcludeCalendarList() is deprecated', E_USER_DEPRECATED);
256+
251257
/** @see self::$excludeCalendarList */
252258
return $this->with('excludeCalendarList', $calendar);
253259
}
254260

255261
/**
256262
* Any timestamps matching any of exclude* will be skipped.
263+
*
264+
* @deprecated This method is deprecated and will be removed in the next major release.
257265
*/
258266
public function withAddedExcludeCalendar(CalendarSpec $calendar): self
259267
{
268+
@\trigger_error('ScheduleSpec::withAddedExcludeCalendar() is deprecated', E_USER_DEPRECATED);
260269
$value = $this->excludeCalendarList;
261270
$value[] = $calendar;
262271

src/Exception/Client/ServiceClientException.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ public function __construct(\stdClass $status, \Throwable $previous = null)
3131
$this->status->mergeFromString($status->metadata['grpc-status-details-bin'][0]);
3232
}
3333

34-
parent::__construct($status->details . " (code: $status->code)", $status->code, $previous);
34+
parent::__construct(\sprintf(
35+
"%s (code: %d)",
36+
isset($status->details) ? (string) $status->details : '',
37+
$status->code,
38+
), $status->code, $previous);
3539
}
3640

3741
public function getStatus(): Status

tests/Unit/Router/InvokeActivityTestCase.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ final class InvokeActivityTestCase extends AbstractUnit
3232
{
3333
private ServiceContainer $services;
3434
private InvokeActivity $router;
35+
private ActivityContext $activityContext;
3536

3637
protected function setUp(): void
3738
{

tests/Unit/Router/StartWorkflowTestCase.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ final class StartWorkflowTestCase extends AbstractUnit
3737
{
3838
private ServiceContainer $services;
3939
private StartWorkflow $router;
40+
private WorkflowContext $workflowContext;
41+
private MarshallerInterface $marshaller;
4042

4143
protected function setUp(): void
4244
{

0 commit comments

Comments
 (0)