Skip to content

Commit eb2a813

Browse files
authored
PHPLIB-1158: Upgrade psalm+rector job to PHP 8.2 (#1113)
1 parent 5a14dee commit eb2a813

File tree

3 files changed

+10
-23
lines changed

3 files changed

+10
-23
lines changed

.github/workflows/coding-standards.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ on:
1919
jobs:
2020
phpcs:
2121
name: "phpcs"
22-
runs-on: "ubuntu-20.04"
22+
runs-on: "ubuntu-22.04"
2323

2424
strategy:
2525
matrix:
2626
php-version:
27-
- "7.4"
27+
- "8.2"
2828
driver-version:
2929
- "mongodb/mongo-php-driver@master"
3030

.github/workflows/static-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ on:
1919
jobs:
2020
psalm:
2121
name: "Psalm"
22-
runs-on: "ubuntu-20.04"
22+
runs-on: "ubuntu-22.04"
2323

2424
strategy:
2525
matrix:
2626
php-version:
27-
- "7.4"
27+
- "8.2"
2828
driver-version:
2929
- "mongodb/mongo-php-driver@master"
3030

psalm-baseline.xml

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,8 @@
4141
</UnsafeInstantiation>
4242
</file>
4343
<file src="src/Exception/InvalidArgumentException.php">
44-
<UnsafeInstantiation occurrences="2">
44+
<UnsafeInstantiation occurrences="1">
4545
<code>new static(sprintf('Expected %s to have type "%s" but found "%s"', $name, $expectedType, get_debug_type($value)))</code>
46-
<code>new static('Expected update operator(s) or non-empty pipeline for ' . $name)</code>
4746
</UnsafeInstantiation>
4847
</file>
4948
<file src="src/Exception/ResumeTokenException.php">
@@ -421,18 +420,13 @@
421420
<code>$options['pipeline']</code>
422421
<code>$this-&gt;options['typeMap']</code>
423422
</MixedArgument>
424-
<MixedAssignment occurrences="4">
423+
<MixedAssignment occurrences="3">
425424
<code>$cmd[$option]</code>
426-
<code>$i</code>
427425
<code>$options['session']</code>
428426
<code>$options['writeConcern']</code>
429427
</MixedAssignment>
430428
</file>
431429
<file src="src/Operation/CreateEncryptedCollection.php">
432-
<DocblockTypeContradiction occurrences="2">
433-
<code>! is_array($encryptedFields['fields'])</code>
434-
<code>! is_array($field) &amp;&amp; ! is_object($field)</code>
435-
</DocblockTypeContradiction>
436430
<MixedArgument occurrences="1">
437431
<code>$this-&gt;options['encryptedFields']</code>
438432
</MixedArgument>
@@ -555,8 +549,7 @@
555549
<MixedArrayAccess occurrences="1">
556550
<code>$options['modifiers'][$modifier[1]]</code>
557551
</MixedArrayAccess>
558-
<MixedAssignment occurrences="5">
559-
<code>$cmd['readConcern']</code>
552+
<MixedAssignment occurrences="4">
560553
<code>$options[$modifier[0]]</code>
561554
<code>$options[$option]</code>
562555
<code>$options['readPreference']</code>
@@ -712,9 +705,8 @@
712705
<MixedArgument occurrences="1">
713706
<code>$this-&gt;options['writeConcern']</code>
714707
</MixedArgument>
715-
<MixedAssignment occurrences="6">
708+
<MixedAssignment occurrences="5">
716709
<code>$cmd['bypassDocumentValidation']</code>
717-
<code>$cmd['writeConcern']</code>
718710
<code>$options[$option]</code>
719711
<code>$options['session']</code>
720712
<code>$options['writeConcern']</code>
@@ -799,18 +791,13 @@
799791
<code>$typeMap['fieldPaths'][$fieldPath]</code>
800792
<code>$value</code>
801793
</MixedAssignment>
802-
<MixedInferredReturnType occurrences="3">
803-
<code>array|object</code>
794+
<MixedInferredReturnType occurrences="2">
804795
<code>array|object|null</code>
805796
<code>array|object|null</code>
806797
</MixedInferredReturnType>
807-
<MixedOperand occurrences="1">
808-
<code>$type</code>
809-
</MixedOperand>
810-
<MixedReturnStatement occurrences="3">
798+
<MixedReturnStatement occurrences="2">
811799
<code>$collectionInfo['options']['encryptedFields'] ?? null</code>
812800
<code>$encryptedFieldsMap[$databaseName . '.' . $collectionName] ?? null</code>
813-
<code>toPHP(fromPHP($document), $typeMap)</code>
814801
</MixedReturnStatement>
815802
</file>
816803
</files>

0 commit comments

Comments
 (0)