Skip to content

Commit

Permalink
Tests : ajout de PHPStan (#662)
Browse files Browse the repository at this point in the history
* Add PHPStan package. run in CI

* Fix errors from Entities & Controllers

* fix errors in BookingController

* remove useless  from EntityService

* remove useless  from CommissionJoinOrLeaveEvent

* ToggleableHandler: handle() should return bool

* fix BeneficiaryService & MembershipService

* fix ShiftService

* fix SwipeCardEvent & TimeLogEventListener

* fix BasePathPicture

* fix Commands

* Remove unused code

* homogenise form error display

Co-authored-by: Albin PETIT <[email protected]>
  • Loading branch information
raphodn and petitalb authored Jan 4, 2023
1 parent a073246 commit fe1c854
Show file tree
Hide file tree
Showing 25 changed files with 270 additions and 333 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ jobs:
- name: Install Composer dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader

# PHPStan finds bugs in your code without writing tests
# https://github.com/phpstan/phpstan
- name: Run PHPStan code scan
run: vendor/bin/phpstan analyse src

# Tests
- name: Run unit and functional tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
"vich/uploader-bundle": "^1.11"
},
"require-dev": {
"phpstan/phpstan": "^1.9",
"phpunit/phpunit": "^7.5",
"sensio/generator-bundle": "^3.1",
"symfony/phpunit-bridge": "^4.4"

},
"scripts": {
"symfony-scripts": [
Expand Down
Loading

0 comments on commit fe1c854

Please sign in to comment.