Skip to content
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

Droped Psalm #91

Merged
merged 2 commits into from
Nov 28, 2024
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
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
/phpcs.xml.dist export-ignore
/phpstan.neon export-ignore
/phpunit.xml.dist export-ignore
/psalm.xml export-ignore
/tests/ export-ignore
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
name: "Static Analysis"
name: "Static Analysis with PHPStan"

on:
pull_request:
branches:
- "*.x"
paths:
- ".github/workflows/static-analysis.yml"
- ".github/workflows/phpstan.yml"
- "composer.*"
- "src/**"
- "phpstan*"
- "psalm*"
- "tests/**"
push:
branches:
- "*.x"
paths:
- ".github/workflows/static-analysis.yml"
- ".github/workflows/phpstan.yml"
- "composer.*"
- "src/**"
- "phpstan*"
- "psalm*"
- "tests/**"

jobs:
static-analysis:
phpstan:
name: "Static Analysis"
uses: "doctrine/.github/.github/workflows/static-analysis[email protected]"
uses: "doctrine/.github/.github/workflows/phpstan[email protected]"
with:
php-version: "8.3"
6 changes: 2 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"doctrine/coding-standard": "^12.0.0",
"phpdocumentor/guides-cli": "^1.5.0",
"phpstan/phpstan": "^2.0.2",
"phpunit/phpunit": "^10.5.38",
"vimeo/psalm": "^5.26.1"
"phpstan/phpstan-deprecation-rules": "^2.0.0",
"phpunit/phpunit": "^10.5.38"
},
"autoload": {
"psr-4": {
Expand All @@ -48,13 +48,11 @@
"check": [
"@cs-check",
"@phpstan",
"@psalm",
"@test"
],
"cs-check": "phpcs",
"cs-fix": "phpcbf",
"phpstan": "phpstan analyse",
"psalm": "psalm --stats",
"test": "phpunit --colors=always",
"test-coverage": "phpunit --colors=always --coverage-clover=coverage.xml"
}
Expand Down
17 changes: 0 additions & 17 deletions psalm.xml

This file was deleted.

16 changes: 8 additions & 8 deletions src/DoctrineObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,9 @@ public function hydrateValue(string $name, $value, array|null $data = null)
* Caution: Parameter $object should not be null, signature will be changed to not-nullable in next major
*
* @param array<string,mixed> $data
* @psalm-param T $object
* @phpstan-param T $object
*
* @psalm-return T
* @phpstan-return T
*
* @throws RuntimeException
*
Expand Down Expand Up @@ -394,9 +394,9 @@ protected function hydrateByValue(array $data, object|null $object): object
* Caution: Parameter $object should not be null, signature will be changed to not-nullable in next major
*
* @param array<string,mixed> $data
* @psalm-param T $object
* @phpstan-param T $object
*
* @psalm-return T
* @phpstan-return T
*
* @template T of object
*/
Expand Down Expand Up @@ -459,9 +459,9 @@ protected function hydrateByReference(array $data, object|null $object): object
* tricks like setting manually the existing id directly into the entity
*
* @param array<string,mixed> $data The data that may contain identifiers keys
* @psalm-param T $object
* @phpstan-param T $object
*
* @psalm-return T|null
* @phpstan-return T|null
*
* @template T of object
*/
Expand Down Expand Up @@ -692,9 +692,9 @@ protected function handleTypeConversions(mixed $value, string|null $typeOfField)
/**
* Find an object by a given target class and identifier
*
* @psalm-param class-string<T> $targetClass
* @phpstan-param class-string<T> $targetClass
*
* @psalm-return T|null
* @phpstan-return T|null
*
* @template T of object
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/Assets/OneToManyArrayEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function getId(): int
return $this->id;
}

/** @psalm-param Collection<array-key,object> $entities */
/** @param Collection<array-key,object> $entities */
public function addEntities(Collection $entities, bool $modifyValue = true): void
{
foreach ($entities as $entity) {
Expand Down