Skip to content

Commit

Permalink
chore: enable phpstan (#95)
Browse files Browse the repository at this point in the history
* chore: enable phpstan

* fix: phpstan errors

* chore: bump js deps, audit fix

* Apply fixes from StyleCI

* chore: php8+

---------

Co-authored-by: StyleCI Bot <[email protected]>
  • Loading branch information
imorland and StyleCIBot authored Nov 12, 2023
1 parent a8d0658 commit ea4621a
Show file tree
Hide file tree
Showing 10 changed files with 6,186 additions and 6,111 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: FoF Drafts PHP

on: [workflow_dispatch, push, pull_request]

jobs:
run:
uses: flarum/framework/.github/workflows/REUSABLE_backend.yml@main
with:
enable_backend_testing: false
enable_phpstan: true
php_versions: '["8.0", "8.1", "8.2"]'

backend_directory: .
10 changes: 4 additions & 6 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
name: Frontend
name: FoF Drafts JS

on:
push:
branches:
- master
on: [workflow_dispatch, push, pull_request]

jobs:
run:
uses: flarum/framework/.github/workflows/REUSABLE_frontend.yml@main
with:
enable_bundlewatch: false
enable_prettier: true
enable_typescript: false
enable_typescript: true

frontend_directory: ./js
backend_directory: .
js_package_manager: npm
main_git_branch: master

secrets:
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
15 changes: 14 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,22 @@
},
"flagrow": {
"discuss": "https://discuss.flarum.org/d/20957"
},
"flarum-cli": {
"modules": {
"githubActions": true
}
}
},
"require-dev": {
"blomstra/gdpr": "@beta"
"blomstra/gdpr": "@beta",
"flarum/phpstan": "*"
},
"scripts": {
"analyse:phpstan": "phpstan analyse",
"clear-cache:phpstan": "phpstan clear-result-cache"
},
"scripts-descriptions": {
"analyse:phpstan": "Run static analysis"
}
}
2 changes: 1 addition & 1 deletion extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

(new Extend\Console())
->command(PublishDrafts::class)
->schedule(PublishDrafts::class, new PublishSchedule()),
->schedule(PublishDrafts::class, PublishSchedule::class),

(new Extend\ApiSerializer(CurrentUserSerializer::class))
->attributes(function (CurrentUserSerializer $serializer) {
Expand Down
Loading

0 comments on commit ea4621a

Please sign in to comment.