diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c2a5a11..bab1467 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -26,7 +26,7 @@ jobs:
uses: ramsey/composer-install@v3
- name: Run Psalm
- run: vendor/bin/psalm --show-info=false --find-unused-psalm-suppress --no-progress
+ run: vendor/bin/psalm --show-info=false --no-progress
phpunit:
name: PHPUnit
diff --git a/composer.json b/composer.json
index c74a100..a9700dd 100644
--- a/composer.json
+++ b/composer.json
@@ -14,7 +14,7 @@
"require-dev": {
"ext-pdo": "*",
"phpunit/phpunit": "^9.0",
- "vimeo/psalm": "4.2.1"
+ "vimeo/psalm": "5.24.0"
},
"autoload": {
"psr-4": {
diff --git a/psalm-baseline.xml b/psalm-baseline.xml
new file mode 100644
index 0000000..f0174ed
--- /dev/null
+++ b/psalm-baseline.xml
@@ -0,0 +1,36 @@
+
+
+
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+ entities[$class]]]>
+ entities[$class]]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/psalm.xml b/psalm.xml
index 40b6cd5..d96ebef 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -5,6 +5,10 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
+ errorBaseline="psalm-baseline.xml"
+ findUnusedPsalmSuppress="true"
+ findUnusedBaselineEntry="true"
+ findUnusedCode="false"
>
@@ -15,7 +19,6 @@
-
diff --git a/src/Configuration.php b/src/Configuration.php
index 663af71..4ca2c62 100644
--- a/src/Configuration.php
+++ b/src/Configuration.php
@@ -374,7 +374,7 @@ public function getCustomPropertyMappings() : array
*/
public function setTransientProperties(string $class, string ...$properties) : Configuration
{
- $this->transientProperties[$class] = $properties;
+ $this->transientProperties[$class] = array_values($properties);
return $this;
}
diff --git a/src/EntityConfiguration.php b/src/EntityConfiguration.php
index dd4caf0..8bb1b99 100644
--- a/src/EntityConfiguration.php
+++ b/src/EntityConfiguration.php
@@ -143,6 +143,8 @@ public function setIdentityProperties(string ...$identityProperties) : EntityCon
throw new \InvalidArgumentException('The list of identity properties cannot be empty.');
}
+ $identityProperties = array_values($identityProperties);
+
$this->checkProperties($identityProperties);
$this->identityProperties = $identityProperties;
diff --git a/src/Gateway.php b/src/Gateway.php
index f470084..06576b3 100644
--- a/src/Gateway.php
+++ b/src/Gateway.php
@@ -280,6 +280,7 @@ public function hydrate(object $entity, int $options = 0, string ...$props) : vo
$class = $this->getEntityClass($entity);
$identity = $this->getIdentity($class, $entity);
+ $props = array_values($props);
$values = $this->loadProps($class, $identity, $props, $options);
if ($values === null) {
@@ -294,8 +295,6 @@ public function hydrate(object $entity, int $options = 0, string ...$props) : vo
/**
* Finds entities using a query object.
*
- * @psalm-suppress MixedOperand See: https://github.com/vimeo/psalm/issues/4739
- *
* @psalm-return list