Skip to content

chore: remove psalm #1242

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,4 @@ phpbench.json export-ignore
phpstan.neon.dist export-ignore
phpstan-baseline.neon export-ignore
phpunit.xml.dist export-ignore
psalm.xml.dist export-ignore
psalm-baseline.xml export-ignore
renovate.json export-ignore
26 changes: 0 additions & 26 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,3 @@ jobs:

- name: Run a static analysis with phpstan/phpstan
run: vendor/bin/phpstan --error-format=checkstyle | cs2pr

static-analysis-psalm:
name: Static Analysis with Psalm
runs-on: ubuntu-20.04

strategy:
matrix:
php-version:
- 8.1

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: ${{ matrix.php-version }}
tools: cs2pr

- name: Install dependencies with Composer
uses: ramsey/composer-install@v2

- name: Run a static analysis with vimeo/psalm
run: vendor/bin/psalm --output-format=github --shepherd
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
composer.lock
composer.phar
phpstan.neon
psalm.xml
vendor
.idea
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
[![CI](https://github.com/webonyx/graphql-php/workflows/CI/badge.svg)](https://github.com/webonyx/graphql-php/actions?query=workflow:CI+branch:master)
[![Coverage Status](https://codecov.io/gh/webonyx/graphql-php/branch/master/graph/badge.svg)](https://codecov.io/gh/webonyx/graphql-php/branch/master)
[![Latest Stable Version](https://poser.pugx.org/webonyx/graphql-php/version)](https://packagist.org/packages/webonyx/graphql-php)
[![Shepherd Type](https://shepherd.dev/github/webonyx/graphql-php/coverage.svg)](ttps://shepherd.dev/github/webonyx/graphql-php)

This is a PHP implementation of the GraphQL [specification](https://github.com/graphql/graphql-spec)
based on the [reference implementation in JavaScript](https://github.com/graphql/graphql-js).
Expand Down
7 changes: 2 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@
"phpstan/phpstan-phpunit": "1.2.2",
"phpstan/phpstan-strict-rules": "1.4.4",
"phpunit/phpunit": "^9.5",
"psalm/plugin-phpunit": "^0.17",
"psr/http-message": "^1",
"react/promise": "^2",
"symfony/polyfill-php81": "^1.23",
"symfony/var-exporter": "^5 || ^6",
"thecodingmachine/safe": "^1.3",
"vimeo/psalm": "^4.19"
"thecodingmachine/safe": "^1.3"
},
"suggest": {
"psr/http-message": "To use standard GraphQL server",
Expand Down Expand Up @@ -59,12 +57,11 @@
"sort-packages": true
},
"scripts": {
"baseline": "phpstan --generate-baseline && psalm --set-baseline",
"bench": "phpbench run",
"check": "composer fix && composer stan && composer test",
"docs": "php generate-class-reference.php",
"fix": "php-cs-fixer fix",
"stan": "phpstan && psalm",
"stan": "phpstan",
"test": "phpunit"
}
}
17 changes: 0 additions & 17 deletions docs/class-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1264,17 +1264,8 @@ const CLASS_MAP = [
Implements the "Evaluating requests" section of the GraphQL specification.

@phpstan-type FieldResolver callable(mixed, array<string, mixed>, mixed, ResolveInfo): mixed

@see https://github.com/vimeo/psalm/issues/6928

@psalm-type FieldResolver callable(mixed, array, mixed, ResolveInfo): mixed

@phpstan-type ImplementationFactory callable(PromiseAdapter, Schema, DocumentNode, mixed, mixed, array<mixed>, ?string, callable): ExecutorImplementation

@see https://github.com/vimeo/psalm/issues/6928, https://github.com/vimeo/psalm/issues/7527

@psalm-type ImplementationFactory callable(PromiseAdapter, Schema, DocumentNode, mixed, mixed, array, ?string, callable): ExecutorImplementation

### GraphQL\Executor\Executor Methods

```php
Expand Down Expand Up @@ -1356,10 +1347,6 @@ extensions?: array<string, mixed>
@phpstan-type ErrorFormatter callable(Throwable): SerializableError
@phpstan-type ErrorsHandler callable(array<Error> $errors, ErrorFormatter $formatter): SerializableErrors

@see https://github.com/vimeo/psalm/issues/6928

@psalm-type ErrorsHandler callable(Error[], ErrorFormatter): SerializableErrors

### GraphQL\Executor\ExecutionResult Props

```php
Expand Down Expand Up @@ -1676,10 +1663,6 @@ Also, it is possible to override warning handler (which is **trigger_error()** b

@phpstan-type WarningHandler callable(string $errorMessage, int $warningId, ?int $messageLevel): void

@see https://github.com/vimeo/psalm/issues/7527

@psalm-type WarningHandler callable(string, int, int|null): void

### GraphQL\Error\Warning Constants

```php
Expand Down
54 changes: 0 additions & 54 deletions psalm-baseline.xml

This file was deleted.

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

This file was deleted.

4 changes: 0 additions & 4 deletions src/Error/Warning.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
* Also, it is possible to override warning handler (which is **trigger_error()** by default).
*
* @phpstan-type WarningHandler callable(string $errorMessage, int $warningId, ?int $messageLevel): void
*
* @see https://github.com/vimeo/psalm/issues/7527
*
* @psalm-type WarningHandler callable(string, int, int|null): void
*/
final class Warning
{
Expand Down
4 changes: 0 additions & 4 deletions src/Executor/ExecutionResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@
* }
* @phpstan-type ErrorFormatter callable(Throwable): SerializableError
* @phpstan-type ErrorsHandler callable(array<Error> $errors, ErrorFormatter $formatter): SerializableErrors
*
* @see https://github.com/vimeo/psalm/issues/6928
*
* @psalm-type ErrorsHandler callable(Error[], ErrorFormatter): SerializableErrors
*/
class ExecutionResult implements \JsonSerializable
{
Expand Down
9 changes: 0 additions & 9 deletions src/Executor/Executor.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,7 @@
* Implements the "Evaluating requests" section of the GraphQL specification.
*
* @phpstan-type FieldResolver callable(mixed, array<string, mixed>, mixed, ResolveInfo): mixed
*
* @see https://github.com/vimeo/psalm/issues/6928
*
* @psalm-type FieldResolver callable(mixed, array, mixed, ResolveInfo): mixed
*
* @phpstan-type ImplementationFactory callable(PromiseAdapter, Schema, DocumentNode, mixed, mixed, array<mixed>, ?string, callable): ExecutorImplementation
*
* @see https://github.com/vimeo/psalm/issues/6928, https://github.com/vimeo/psalm/issues/7527
*
* @psalm-type ImplementationFactory callable(PromiseAdapter, Schema, DocumentNode, mixed, mixed, array, ?string, callable): ExecutorImplementation
*/
class Executor
{
Expand Down