Skip to content

Commit 07baef2

Browse files
authored
Merge pull request #12 from dgtlss/Code-Quality-Improvements-Testing
Improve Code Quality With Static Analysis
2 parents e0fa527 + 3a6ddd3 commit 07baef2

32 files changed

Lines changed: 5643 additions & 413 deletions

.github/workflows/phpstan.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: PHPStan Static Analysis
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
phpstan:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Set up PHP
18+
uses: shivammathur/setup-php@v2
19+
with:
20+
php-version: '8.4'
21+
tools: composer
22+
23+
- name: Install dependencies
24+
run: composer install --no-interaction --no-suggest --no-scripts
25+
26+
- name: Run PHPStan
27+
run: vendor/bin/phpstan analyse --memory-limit=2G
28+
env:
29+
PHPSTAN_MEMORY_LIMIT: 2G
30+
31+
- name: Upload PHPStan results
32+
if: failure()
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: phpstan-results
36+
path: phpstan-results.xml
37+
retention-days: 1

composer.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "dgtlss/warden",
33
"description": "A Laravel package that proactively monitors your dependencies for security vulnerabilities by running automated composer audits and sending notifications via webhooks and email",
44
"keywords": ["laravel", "composer", "security", "vulnerabilities", "audits", "notifications", "CVE"],
5-
"version": "1.3.5",
5+
"version": "1.4.0",
66
"license": "MIT",
77
"autoload": {
88
"psr-4": {
@@ -18,8 +18,9 @@
1818
"minimum-stability": "dev",
1919
"prefer-stable": true,
2020
"require": {
21-
"php": ">=8.1",
21+
"php": ">=8.3",
2222
"illuminate/support": "^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
23+
"illuminate/cache": "^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
2324
"guzzlehttp/guzzle": "^7.0",
2425
"laravel/prompts": "^0.3"
2526
},
@@ -29,5 +30,13 @@
2930
"Dgtlss\\Warden\\Providers\\WardenServiceProvider"
3031
]
3132
}
33+
},
34+
"require-dev": {
35+
"phpstan/phpstan": "^2.1",
36+
"rector/rector": "^2.2",
37+
"larastan/larastan": "^3.0"
38+
},
39+
"scripts": {
40+
"phpstan": "vendor/bin/phpstan analyse --memory-limit=2G"
3241
}
3342
}

0 commit comments

Comments
 (0)