diff --git a/.gitattributes b/.gitattributes
index ccdb368..9785163 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -9,5 +9,4 @@
/phpstan.neon.dist export-ignore
/phpstan-baseline.neon export-ignore
/phpunit.xml.dist export-ignore
-/psalm.xml.dist export-ignore
/tests export-ignore
diff --git a/.gitignore b/.gitignore
index 8061d09..5996707 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,7 +2,6 @@
/composer.lock
/phpcs.xml
/phpstan.neon
-/psalm.xml
/phpunit.xml
/vendor/
.phpunit.result.cache
diff --git a/composer.json b/composer.json
index bcfccad..384bbe1 100644
--- a/composer.json
+++ b/composer.json
@@ -28,9 +28,7 @@
"phpstan/phpstan": "^1.3",
"phpstan/phpstan-phpunit": "^1.0",
"phpstan/phpstan-strict-rules": "^1.1",
- "phpunit/phpunit": "^10.1",
- "psalm/plugin-phpunit": "^0.19.0",
- "vimeo/psalm": "^5.0"
+ "phpunit/phpunit": "^10.1"
},
"autoload": {
"psr-4": {
diff --git a/psalm-baseline.xml b/psalm-baseline.xml
deleted file mode 100644
index a69719b..0000000
--- a/psalm-baseline.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
-
-
- private array $values = [];
-
-
-
-
- private array|null $args = null;
-
-
- FieldDefinitionConfig from FieldDefinition
- FieldResolver from Executor
- FieldType from FieldDefinition
-
-
- FieldResolver
-
-
- FieldDefinitionConfig
-
-
- FieldDefinitionConfig
-
-
-
-
- $config
-
-
- InputObjectFieldConfig
-
-
- FieldResolver from Executor
-
-
- setAccessible
-
-
-
-
-
- InterfaceConfig
-
-
-
-
-
- ObjectConfig
-
-
- FieldDefinitionConfig from FieldDefinition
-
-
- FieldDefinition|FieldDefinitionConfig
-
-
-
-
- $arrayError['extensions']
-
-
- $arrayError
-
-
- array
-
-
- $arrayError['extensions']['type']
-
-
-
diff --git a/psalm.xml.dist b/psalm.xml.dist
deleted file mode 100644
index 16e215c..0000000
--- a/psalm.xml.dist
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Builder/EnumBuilder.php b/src/Builder/EnumBuilder.php
index 53eca47..d36e56c 100644
--- a/src/Builder/EnumBuilder.php
+++ b/src/Builder/EnumBuilder.php
@@ -12,8 +12,8 @@
/**
* @see EnumType
*
- * @psalm-import-type EnumValues from EnumType
- * @psalm-import-type EnumTypeConfig from EnumType
+ * @phpstan-import-type EnumValues from EnumType
+ * @phpstan-import-type EnumTypeConfig from EnumType
*/
class EnumBuilder extends TypeBuilder
{
@@ -60,7 +60,7 @@ public function addValue(
return $this;
}
- /** @psalm-return EnumTypeConfig */
+ /** @phpstan-return EnumTypeConfig */
public function build(): array
{
return [
diff --git a/src/Builder/FieldBuilder.php b/src/Builder/FieldBuilder.php
index 9906855..9193448 100644
--- a/src/Builder/FieldBuilder.php
+++ b/src/Builder/FieldBuilder.php
@@ -13,35 +13,35 @@
* @see FieldDefinition
* @see Argument
*
- * @psalm-import-type FieldResolver from Executor
- * @psalm-import-type FieldDefinitionConfig from FieldDefinition
- * @psalm-import-type FieldType from FieldDefinition
- * @psalm-import-type ArgumentListConfig from Argument
- * @psalm-import-type ArgumentType from Argument
+ * @phpstan-import-type FieldResolver from Executor
+ * @phpstan-import-type FieldDefinitionConfig from FieldDefinition
+ * @phpstan-import-type FieldType from FieldDefinition
+ * @phpstan-import-type ArgumentListConfig from Argument
+ * @phpstan-import-type ArgumentType from Argument
*/
class FieldBuilder
{
- /** @psalm-var FieldType */
+ /** @phpstan-var FieldType */
private mixed $type;
private string|null $description = null;
private string|null $deprecationReason = null;
- /** @psalm-var FieldResolver|null */
+ /** @phpstan-var FieldResolver|null */
private $resolve;
- /** @psalm-var (ArgumentListConfig&array)|null */
+ /** @phpstan-var (ArgumentListConfig&array)|null */
private array|null $args = null;
- /** @psalm-param FieldType $type */
+ /** @phpstan-param FieldType $type */
final private function __construct(private string $name, $type)
{
$this->type = $type;
}
/**
- * @psalm-param FieldType $type
+ * @phpstan-param FieldType $type
*
* @return static
*/
@@ -59,7 +59,7 @@ public function setDescription(string $description): self
}
/**
- * @psalm-param ArgumentType $type
+ * @phpstan-param ArgumentType $type
*
* @return $this
*/
@@ -81,12 +81,10 @@ public function addArgument(
}
if ($defaultValue !== null) {
- /** @psalm-suppress MixedAssignment */
$value['defaultValue'] = $defaultValue;
}
if ($deprecationReason !== null) {
- /** @psalm-suppress MixedAssignment */
$value['deprecationReason'] = $deprecationReason;
}
@@ -96,7 +94,7 @@ public function addArgument(
}
/**
- * @psalm-param FieldResolver $resolver
+ * @phpstan-param FieldResolver $resolver
*
* @return $this
*/
@@ -115,7 +113,7 @@ public function setDeprecationReason(string $reason): self
return $this;
}
- /** @psalm-return FieldDefinitionConfig */
+ /** @phpstan-return FieldDefinitionConfig */
public function build(): array
{
return [
diff --git a/src/Builder/InputFieldBuilder.php b/src/Builder/InputFieldBuilder.php
index f685db7..8ea6d68 100644
--- a/src/Builder/InputFieldBuilder.php
+++ b/src/Builder/InputFieldBuilder.php
@@ -14,14 +14,14 @@
* @see InputObjectField
* @see Argument
*
- * @psalm-import-type FieldResolver from Executor
- * @psalm-import-type InputObjectFieldConfig from InputObjectField
- * @psalm-import-type ArgumentListConfig from Argument
- * @psalm-import-type ArgumentType from Argument
+ * @phpstan-import-type FieldResolver from Executor
+ * @phpstan-import-type InputObjectFieldConfig from InputObjectField
+ * @phpstan-import-type ArgumentListConfig from Argument
+ * @phpstan-import-type ArgumentType from Argument
*/
class InputFieldBuilder
{
- /** @psalm-var ArgumentType */
+ /** @phpstan-var ArgumentType */
private mixed $type;
private string|null $deprecationReason = null;
@@ -30,14 +30,14 @@ class InputFieldBuilder
private mixed $defaultValue;
- /** @psalm-param ArgumentType $type */
+ /** @phpstan-param ArgumentType $type */
final private function __construct(private string $name, $type)
{
$this->type = $type;
}
/**
- * @psalm-param ArgumentType $type
+ * @phpstan-param ArgumentType $type
*
* @return static
*/
@@ -70,7 +70,7 @@ public function setDeprecationReason(string|null $deprecationReason): self
return $this;
}
- /** @psalm-return InputObjectFieldConfig */
+ /** @phpstan-return InputObjectFieldConfig */
public function build(): array
{
$config = [
@@ -82,7 +82,6 @@ public function build(): array
$property = new ReflectionProperty($this, 'defaultValue');
if ($property->isInitialized($this)) {
- /** @psalm-suppress MixedAssignment */
$config['defaultValue'] = $this->defaultValue;
}
diff --git a/src/Builder/InputObjectBuilder.php b/src/Builder/InputObjectBuilder.php
index 9727901..100e27c 100644
--- a/src/Builder/InputObjectBuilder.php
+++ b/src/Builder/InputObjectBuilder.php
@@ -9,8 +9,8 @@
/**
* @see InputObjectType
*
- * @psalm-import-type FieldConfig from InputObjectType
- * @psalm-import-type InputObjectConfig from InputObjectType
+ * @phpstan-import-type FieldConfig from InputObjectType
+ * @phpstan-import-type InputObjectConfig from InputObjectType
*/
class InputObjectBuilder extends TypeBuilder
{
@@ -39,7 +39,7 @@ public function setFields(callable|array $fields): self
return $this;
}
- /** @psalm-return InputObjectConfig */
+ /** @phpstan-return InputObjectConfig */
public function build(): array
{
return [
diff --git a/src/Builder/InterfaceBuilder.php b/src/Builder/InterfaceBuilder.php
index 26882f1..822e7e3 100644
--- a/src/Builder/InterfaceBuilder.php
+++ b/src/Builder/InterfaceBuilder.php
@@ -10,7 +10,7 @@
/**
* @see InterfaceType
*
- * @psalm-import-type InterfaceConfig from InterfaceType
+ * @phpstan-import-type InterfaceConfig from InterfaceType
*/
class InterfaceBuilder extends TypeBuilder
{
@@ -61,7 +61,7 @@ public function setResolveType(callable $resolveType): self
return $this;
}
- /** @psalm-return InterfaceConfig */
+ /** @phpstan-return InterfaceConfig */
public function build(): array
{
return [
diff --git a/src/Builder/ObjectBuilder.php b/src/Builder/ObjectBuilder.php
index 8e7b162..5884615 100644
--- a/src/Builder/ObjectBuilder.php
+++ b/src/Builder/ObjectBuilder.php
@@ -15,8 +15,8 @@
* @see FieldDefinition
* @see ObjectType
*
- * @psalm-import-type FieldDefinitionConfig from FieldDefinition
- * @psalm-import-type ObjectConfig from ObjectType
+ * @phpstan-import-type FieldDefinitionConfig from FieldDefinition
+ * @phpstan-import-type ObjectConfig from ObjectType
*/
class ObjectBuilder extends TypeBuilder
{
@@ -94,7 +94,7 @@ public function setFieldResolver(callable $fieldResolver): self
return $this;
}
- /** @psalm-return ObjectConfig */
+ /** @phpstan-return ObjectConfig */
public function build(): array
{
return [
diff --git a/src/Builder/UnionBuilder.php b/src/Builder/UnionBuilder.php
index 8197ef2..75dd22f 100644
--- a/src/Builder/UnionBuilder.php
+++ b/src/Builder/UnionBuilder.php
@@ -13,27 +13,27 @@
* @see ObjectType
* @see UnionType
*
- * @psalm-import-type ResolveType from AbstractType
- * @psalm-import-type ObjectTypeReference from UnionType
- * @psalm-import-type UnionConfig from UnionType
- * @psalm-type Types iterable|callable(): iterable
+ * @phpstan-import-type ResolveType from AbstractType
+ * @phpstan-import-type ObjectTypeReference from UnionType
+ * @phpstan-import-type UnionConfig from UnionType
+ * @phpstan-type Types iterable|callable(): iterable
*/
class UnionBuilder extends TypeBuilder
{
- /** @psalm-var ResolveType|null */
+ /** @phpstan-var ResolveType|null */
private $resolveType = null;
- /** @psalm-var Types */
+ /** @phpstan-var Types */
private $types;
- /** @psalm-param Types $types */
+ /** @phpstan-param Types $types */
final private function __construct(iterable|callable $types, private string|null $name = null)
{
$this->types = $types;
}
/**
- * @psalm-param Types $types
+ * @phpstan-param Types $types
*
* @return static
*/
@@ -43,7 +43,7 @@ public static function create(string|null $name, iterable|callable $types): self
}
/**
- * @psalm-param ResolveType $resolveType
+ * @phpstan-param ResolveType $resolveType
*
* @return $this
*/
@@ -54,7 +54,7 @@ public function setResolveType(callable $resolveType): self
return $this;
}
- /** @psalm-return UnionConfig */
+ /** @phpstan-return UnionConfig */
public function build(): array
{
return [