Skip to content

Commit

Permalink
chore: remove Psalm static analysis checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ramsey committed May 26, 2024
1 parent a96eef8 commit 5b538a1
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 71 deletions.
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
/phpcs.xml.dist export-ignore
/phpstan.neon.dist export-ignore
/phpunit.xml.dist export-ignore
/psalm-baseline.xml export-ignore
/psalm.xml export-ignore
/resources/ export-ignore
/SECURITY.md export-ignore
/tests/ export-ignore
32 changes: 1 addition & 31 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

env:
Expand Down Expand Up @@ -66,36 +66,6 @@ jobs:
- name: "Statically analyze code (PHPStan)"
run: "composer dev:analyze:phpstan"

- name: "Statically analyze code (Psalm)"
run: "composer dev:analyze:psalm -- --shepherd"

security-analysis:
name: "Security analysis"
needs: ["coding-standards", "static-analysis"]
runs-on: "ubuntu-latest"

steps:
- name: "Checkout repository"
uses: "actions/[email protected]"

- name: "Install PHP"
uses: "shivammathur/[email protected]"
with:
php-version: "latest"
extensions: "bcmath, ctype, gmp"
coverage: "none"

- name: "Install dependencies (Composer)"
uses: "ramsey/[email protected]"

- name: "Analyze security of code (Psalm)"
run: "./vendor/bin/psalm --taint-analysis --report=build/logs/psalm.sarif"

- name: "Upload security analysis results to GitHub"
uses: "github/codeql-action/upload-sarif@v3"
with:
sarif_file: "build/logs/psalm.sarif"

code-coverage:
name: "Code coverage"
needs: ["coding-standards", "static-analysis"]
Expand Down
5 changes: 2 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,8 @@ composer dev:lint:fix

### Static Analysis

This project uses a combination of [PHPStan](https://github.com/phpstan/phpstan)
and [Psalm](https://github.com/vimeo/psalm) to provide static analysis of PHP
code.
This project uses [PHPStan](https://github.com/phpstan/phpstan) to provide
static analysis of PHP code.

CaptainHook will run static analysis checks before committing.

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<a href="https://github.com/ramsey/uuid-doctrine/blob/main/LICENSE"><img src="https://img.shields.io/packagist/l/ramsey/uuid-doctrine.svg?style=flat-square&colorB=darkcyan" alt="Read License"></a>
<a href="https://github.com/ramsey/uuid-doctrine/actions/workflows/continuous-integration.yml"><img src="https://img.shields.io/github/actions/workflow/status/ramsey/uuid-doctrine/continuous-integration.yml?branch=main&logo=github&style=flat-square" alt="Build Status"></a>
<a href="https://codecov.io/gh/ramsey/uuid-doctrine"><img src="https://img.shields.io/codecov/c/gh/ramsey/uuid-doctrine?label=codecov&logo=codecov&style=flat-square" alt="Codecov Code Coverage"></a>
<a href="https://shepherd.dev/github/ramsey/uuid-doctrine"><img src="https://img.shields.io/endpoint?style=flat-square&url=https%3A%2F%2Fshepherd.dev%2Fgithub%2Framsey%2Fuuid-doctrine%2Fcoverage" alt="Psalm Type Coverage"></a>
</p>

The ramsey/uuid-doctrine package provides the ability to use
Expand Down
10 changes: 2 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,8 @@
"phpstan/phpstan-mockery": "^1.1",
"phpstan/phpstan-phpunit": "^1.3",
"phpunit/phpunit": "^9.5",
"psalm/plugin-mockery": "^1.1",
"psalm/plugin-phpunit": "^0.19.0",
"ramsey/coding-standard": "^2.0.3",
"ramsey/conventional-commits": "^1.3",
"vimeo/psalm": "^5.4"
"ramsey/conventional-commits": "^1.3"
},
"minimum-stability": "alpha",
"prefer-stable": true,
Expand Down Expand Up @@ -73,11 +70,9 @@
},
"scripts": {
"dev:analyze": [
"@dev:analyze:phpstan",
"@dev:analyze:psalm"
"@dev:analyze:phpstan"
],
"dev:analyze:phpstan": "phpstan analyse --ansi --memory-limit=1G",
"dev:analyze:psalm": "psalm",
"dev:build:clean": "git clean -fX build/",
"dev:lint": [
"@dev:lint:syntax",
Expand All @@ -99,7 +94,6 @@
"scripts-descriptions": {
"dev:analyze": "Runs all static analysis checks.",
"dev:analyze:phpstan": "Runs the PHPStan static analyzer.",
"dev:analyze:psalm": "Runs the Psalm static analyzer.",
"dev:build:clean": "Cleans the build/ directory.",
"dev:lint": "Runs all linting checks.",
"dev:lint:fix": "Auto-fixes coding standards issues, if possible.",
Expand Down
2 changes: 0 additions & 2 deletions psalm-baseline.xml

This file was deleted.

23 changes: 0 additions & 23 deletions psalm.xml

This file was deleted.

1 change: 0 additions & 1 deletion src/UuidBinaryOrderedTimeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ protected function getCodec(): OrderedTimeCodec
*/
private function assertUuidV1(UuidInterface $value): void
{
/** @psalm-suppress DeprecatedMethod */
if ($value->getVersion() !== 1) {
throw ConversionException::conversionFailedFormat(
$value->toString(),
Expand Down

0 comments on commit 5b538a1

Please sign in to comment.