-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from the-coding-owl/phpstan
[TASK] Add phpstan as static code analyser for PHP code
- Loading branch information
Showing
12 changed files
with
165 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM composer:latest | ||
|
||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh | ||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name: 'Install TYPO3 Dashboard extension via composer' | ||
description: 'Install TYPO3 Dashboard extension via composer' | ||
author: 'Kevin Ditscheid <kevin@the-coding-owl.de>' | ||
runs: | ||
using: docker | ||
image: Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
set -e | ||
exec composer require typo3/cms-dashboard:^10.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM php:7.3-cli | ||
|
||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh | ||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name: 'Run the phpstan analyser' | ||
description: 'Run the phpstan analyser' | ||
author: 'Kevin Ditscheid <kevin@the-coding-owl.de>' | ||
runs: | ||
using: docker | ||
image: Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
set -e | ||
exec php ./vendor/bin/phpstan analyse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: phpstan | ||
|
||
on: | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
analyse: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache composer dependencies | ||
uses: actions/cache@v1 | ||
env: | ||
cache-name: cache-composer-dependencies | ||
with: | ||
path: ./.composer/cache | ||
key: ${{ runner.os }}-build-${{ env.cache-name }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }} | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- name: Composer install | ||
uses: php-actions/composer@v1 | ||
|
||
- name: Composer require typo3/cms-dashboard | ||
uses: ./.github/actions/install-typo3-cms-dashboard | ||
|
||
- name: Run phpstan | ||
uses: ./.github/actions/run-phpstan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
parameters: | ||
level: max | ||
paths: | ||
- Classes | ||
ignoreErrors: | ||
- | ||
message: '#Property TheCodingOwl\\Oclock\\Widgets\\ClockWidget::$extConf \(array\<string, array\<string\>|string\>\) does not accept mixed\.#' | ||
path: Classes/Widgets/ClockWidget.php |