Skip to content

Commit

Permalink
feat: add a stan baseline and upgrade to Katapult API 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bencromwell committed Jul 2, 2024
1 parent 410f9cf commit f0e30d0
Show file tree
Hide file tree
Showing 5 changed files with 440 additions and 11 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Static Analysis

on:
pull_request:
paths:
- '**.php'
push:
branches:
- main
paths:
- '**.php'

concurrency:
# On the main branch we want all builds to complete, even if new commits are merged.
group: ${{ github.ref == 'refs/heads/main' && format('lint-main-{0}', github.run_id) || format('lint-{0}-lint', github.ref) }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'

- name: Install Composer dependencies
run: composer install

- name: Run PHPStan
run: composer stan
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "project",
"require": {
"php": "^8.1",
"krystal/katapult": "^v3.0",
"krystal/katapult": "^v4.0",
"grizzlyware/salmon-whmcs": "^1.1",
"guzzlehttp/psr7": "^2.6"
},
Expand Down Expand Up @@ -45,6 +45,7 @@
},
"scripts": {
"lint": "phpcs --standard=phpcs.xml -p",
"lint-fix": "phpcbf --standard=phpcs.xml -p"
"lint-fix": "phpcbf --standard=phpcs.xml -p",
"stan": "phpstan --memory-limit=1G"
}
}
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f0e30d0

Please sign in to comment.