Skip to content

Commit

Permalink
ci: drop psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
simPod committed Mar 23, 2024
1 parent 01c30a0 commit 399f5f8
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 141 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/composer.lock
/phpcs.xml
/phpstan.neon
/psalm.xml
/phpunit.xml
/vendor/
.phpunit.result.cache
4 changes: 1 addition & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
73 changes: 0 additions & 73 deletions psalm-baseline.xml

This file was deleted.

18 changes: 0 additions & 18 deletions psalm.xml.dist

This file was deleted.

6 changes: 3 additions & 3 deletions src/Builder/EnumBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -60,7 +60,7 @@ public function addValue(
return $this;
}

/** @psalm-return EnumTypeConfig */
/** @phpstan-return EnumTypeConfig */
public function build(): array
{
return [
Expand Down
28 changes: 13 additions & 15 deletions src/Builder/FieldBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -59,7 +59,7 @@ public function setDescription(string $description): self
}

/**
* @psalm-param ArgumentType $type
* @phpstan-param ArgumentType $type
*
* @return $this
*/
Expand All @@ -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;
}

Expand All @@ -96,7 +94,7 @@ public function addArgument(
}

/**
* @psalm-param FieldResolver $resolver
* @phpstan-param FieldResolver $resolver
*
* @return $this
*/
Expand All @@ -115,7 +113,7 @@ public function setDeprecationReason(string $reason): self
return $this;
}

/** @psalm-return FieldDefinitionConfig */
/** @phpstan-return FieldDefinitionConfig */
public function build(): array
{
return [
Expand Down
17 changes: 8 additions & 9 deletions src/Builder/InputFieldBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
*/
Expand Down Expand Up @@ -70,7 +70,7 @@ public function setDeprecationReason(string|null $deprecationReason): self
return $this;
}

/** @psalm-return InputObjectFieldConfig */
/** @phpstan-return InputObjectFieldConfig */
public function build(): array
{
$config = [
Expand All @@ -82,7 +82,6 @@ public function build(): array

$property = new ReflectionProperty($this, 'defaultValue');
if ($property->isInitialized($this)) {
/** @psalm-suppress MixedAssignment */
$config['defaultValue'] = $this->defaultValue;
}

Expand Down
6 changes: 3 additions & 3 deletions src/Builder/InputObjectBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -39,7 +39,7 @@ public function setFields(callable|array $fields): self
return $this;
}

/** @psalm-return InputObjectConfig */
/** @phpstan-return InputObjectConfig */
public function build(): array
{
return [
Expand Down
4 changes: 2 additions & 2 deletions src/Builder/InterfaceBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* @see InterfaceType
*
* @psalm-import-type InterfaceConfig from InterfaceType
* @phpstan-import-type InterfaceConfig from InterfaceType
*/
class InterfaceBuilder extends TypeBuilder
{
Expand Down Expand Up @@ -61,7 +61,7 @@ public function setResolveType(callable $resolveType): self
return $this;
}

/** @psalm-return InterfaceConfig */
/** @phpstan-return InterfaceConfig */
public function build(): array
{
return [
Expand Down
6 changes: 3 additions & 3 deletions src/Builder/ObjectBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -94,7 +94,7 @@ public function setFieldResolver(callable $fieldResolver): self
return $this;
}

/** @psalm-return ObjectConfig */
/** @phpstan-return ObjectConfig */
public function build(): array
{
return [
Expand Down
20 changes: 10 additions & 10 deletions src/Builder/UnionBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<ObjectTypeReference>|callable(): iterable<ObjectTypeReference>
* @phpstan-import-type ResolveType from AbstractType
* @phpstan-import-type ObjectTypeReference from UnionType
* @phpstan-import-type UnionConfig from UnionType
* @phpstan-type Types iterable<ObjectTypeReference>|callable(): iterable<ObjectTypeReference>
*/
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
*/
Expand All @@ -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
*/
Expand All @@ -54,7 +54,7 @@ public function setResolveType(callable $resolveType): self
return $this;
}

/** @psalm-return UnionConfig */
/** @phpstan-return UnionConfig */
public function build(): array
{
return [
Expand Down

0 comments on commit 399f5f8

Please sign in to comment.