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

Remove psalm in favor of phpstan #926

Merged
merged 2 commits into from
Feb 7, 2025
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 @@ -3,8 +3,6 @@ infection.json export-ignore
Makefile export-ignore
phpstan.neon.dist export-ignore
phpstan-baseline.neon export-ignore
psalm-baseline.xml export-ignore
psalm.xml export-ignore
phpunit.xml.dist export-ignore
/tests export-ignore
/vendor-bin export-ignore
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ cs: vendor-bin/tools/vendor
cs-fix: vendor-bin/tools/vendor
vendor/bin/php-cs-fixer fix --verbose

.PHONY: psalm
psalm: vendor-bin/tools/vendor
vendor/bin/psalm --config=psalm.xml --diff --shepherd --show-info=false --stats --threads=4

.PHONY: phpstan
phpstan: vendor-bin/tools/vendor
vendor/bin/phpstan analyse
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"symfony/expression-language": "^6.4 || ^7.0",
"symfony/form": "^6.4 || ^7.0",
"symfony/framework-bundle": "^6.4 || ^7.0",
"symfony/http-client": "^7.2",
"symfony/http-foundation": "^6.4 || ^7.0",
"symfony/http-kernel": "^6.4 || ^7.0",
"symfony/options-resolver": "^6.4 || ^7.0",
Expand Down
55 changes: 0 additions & 55 deletions psalm-baseline.xml

This file was deleted.

18 changes: 0 additions & 18 deletions psalm.xml

This file was deleted.

2 changes: 1 addition & 1 deletion src/Block/Service/MapBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@
$longitude = $blockContext->getSetting('longitude');
$latitude = $blockContext->getSetting('latitude');

if (null !== $longitude && null !== $latitude) {

Check warning on line 178 in src/Block/Service/MapBlockService.php

View workflow job for this annotation

GitHub Actions / run / Mutation Tests (8.4)

Escaped Mutant for Mutator "NotIdentical": @@ @@ { $longitude = $blockContext->getSetting('longitude'); $latitude = $blockContext->getSetting('latitude'); - if (null !== $longitude && null !== $latitude) { + if (null !== $longitude && null === $latitude) { return [(float) $latitude, (float) $longitude]; } $address = $blockContext->getSetting('address');

Check warning on line 178 in src/Block/Service/MapBlockService.php

View workflow job for this annotation

GitHub Actions / run / Mutation Tests (8.4)

Escaped Mutant for Mutator "NotIdentical": @@ @@ { $longitude = $blockContext->getSetting('longitude'); $latitude = $blockContext->getSetting('latitude'); - if (null !== $longitude && null !== $latitude) { + if (null === $longitude && null !== $latitude) { return [(float) $latitude, (float) $longitude]; } $address = $blockContext->getSetting('address');

Check warning on line 178 in src/Block/Service/MapBlockService.php

View workflow job for this annotation

GitHub Actions / run / Mutation Tests (8.4)

Escaped Mutant for Mutator "LogicalAnd": @@ @@ { $longitude = $blockContext->getSetting('longitude'); $latitude = $blockContext->getSetting('latitude'); - if (null !== $longitude && null !== $latitude) { + if (null !== $longitude || null !== $latitude) { return [(float) $latitude, (float) $longitude]; } $address = $blockContext->getSetting('address');

Check warning on line 178 in src/Block/Service/MapBlockService.php

View workflow job for this annotation

GitHub Actions / run / Mutation Tests (8.4)

Escaped Mutant for Mutator "LogicalAndAllSubExprNegation": @@ @@ { $longitude = $blockContext->getSetting('longitude'); $latitude = $blockContext->getSetting('latitude'); - if (null !== $longitude && null !== $latitude) { + if (!(null !== $longitude) && !(null !== $latitude)) { return [(float) $latitude, (float) $longitude]; } $address = $blockContext->getSetting('address');

Check warning on line 178 in src/Block/Service/MapBlockService.php

View workflow job for this annotation

GitHub Actions / run / Mutation Tests (8.4)

Escaped Mutant for Mutator "LogicalAndNegation": @@ @@ { $longitude = $blockContext->getSetting('longitude'); $latitude = $blockContext->getSetting('latitude'); - if (null !== $longitude && null !== $latitude) { + if (!(null !== $longitude && null !== $latitude)) { return [(float) $latitude, (float) $longitude]; } $address = $blockContext->getSetting('address');
return [(float) $latitude, (float) $longitude];

Check warning on line 179 in src/Block/Service/MapBlockService.php

View workflow job for this annotation

GitHub Actions / run / Mutation Tests (8.4)

Escaped Mutant for Mutator "CastFloat": @@ @@ $longitude = $blockContext->getSetting('longitude'); $latitude = $blockContext->getSetting('latitude'); if (null !== $longitude && null !== $latitude) { - return [(float) $latitude, (float) $longitude]; + return [$latitude, (float) $longitude]; } $address = $blockContext->getSetting('address'); if (!\is_string($address)) {

Check warning on line 179 in src/Block/Service/MapBlockService.php

View workflow job for this annotation

GitHub Actions / run / Mutation Tests (8.4)

Escaped Mutant for Mutator "CastFloat": @@ @@ $longitude = $blockContext->getSetting('longitude'); $latitude = $blockContext->getSetting('latitude'); if (null !== $longitude && null !== $latitude) { - return [(float) $latitude, (float) $longitude]; + return [(float) $latitude, $longitude]; } $address = $blockContext->getSetting('address'); if (!\is_string($address)) {

Check warning on line 179 in src/Block/Service/MapBlockService.php

View workflow job for this annotation

GitHub Actions / run / Mutation Tests (8.4)

Escaped Mutant for Mutator "ArrayItemRemoval": @@ @@ $longitude = $blockContext->getSetting('longitude'); $latitude = $blockContext->getSetting('latitude'); if (null !== $longitude && null !== $latitude) { - return [(float) $latitude, (float) $longitude]; + return [(float) $longitude]; } $address = $blockContext->getSetting('address'); if (!\is_string($address)) {
}

$address = $blockContext->getSetting('address');
Expand Down Expand Up @@ -205,7 +205,7 @@

return [$coordinates->getLatitude(), $coordinates->getLongitude()];
} catch (Exception $e) {
$this->logger->warning(sprintf('Error fetch geo information for %s', $address), [
$this->logger->warning(\sprintf('Error fetch geo information for %s', $address), [
'exception' => $e,
]);
}
Expand Down
5 changes: 1 addition & 4 deletions vendor-bin/tools/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
"phpstan/phpstan-strict-rules": "^1.0",
"phpstan/phpstan-symfony": "^1.0",
"phpunit/phpunit": "^10.0",
"psalm/plugin-phpunit": "^0.19",
"psalm/plugin-symfony": "^5.0",
"symfony/phpunit-bridge": "^7.0",
"vimeo/psalm": "^5.0"
"symfony/phpunit-bridge": "^7.0"
},
"config": {
"allow-plugins": {
Expand Down
Loading
Loading