Skip to content

Commit

Permalink
update symfony checker to use new symfonycorp/security-checker-action
Browse files Browse the repository at this point in the history
  • Loading branch information
WengerK committed Jul 12, 2023
1 parent 61daa5b commit 7473e61
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 22 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/code-styles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
php-version: '8.0'
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
tools: php-cs-fixer, cs2pr
- uses: actions/checkout@master
- uses: actions/checkout@v2
- run: composer install --prefer-dist
- run: ./vendor/bin/php-cs-fixer fix --dry-run --format=checkstyle | cs2pr

Expand All @@ -25,7 +25,7 @@ jobs:
with:
php-version: '8.1'
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
- uses: actions/checkout@master
- uses: actions/checkout@v2
- run: composer install --prefer-dist
- run: ./vendor/bin/phpmd ./ text ./phpmd.xml --suffixes php,inc,test --exclude vendor,bin,tests

Expand All @@ -38,7 +38,7 @@ jobs:
with:
php-version: '8.1'
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
- uses: actions/checkout@master
- uses: actions/checkout@v2
- run: composer install --prefer-dist
- run: ./vendor/bin/phpcpd ./ --suffix .php --suffix .inc --suffix .test --exclude vendor --exclude bin --exclude tests

Expand All @@ -52,7 +52,7 @@ jobs:
php-version: '8.1'
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
tools: phpstan, cs2pr
- uses: actions/checkout@master
- uses: actions/checkout@v2
- run: composer install --prefer-dist
- run: ./vendor/bin/phpstan analyse ./src ./tests --error-format=checkstyle | cs2pr

Expand All @@ -65,7 +65,7 @@ jobs:
with:
php-version: '8.1'
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
- uses: actions/checkout@master
- uses: actions/checkout@v2
- run: composer install --prefer-dist
- run: ./vendor/bin/psalm --output-format=github

Expand All @@ -76,9 +76,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
tools: php-cs-fixer, cs2pr
- uses: actions/checkout@master
tools: composer:v2
- uses: actions/checkout@v2
- run: composer install --prefer-dist
- run: ./vendor/bin/security-checker security:check ./composer.lock
- uses: symfonycorp/security-checker-action@v3
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- update changelog following 'keep a changelog' format
- run code-styles Github Actions on PHP 8.1
- update symfony checker to use new symfonycorp/security-checker-action

### Added
- add run of tests on Github Actions
Expand Down
9 changes: 0 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,6 @@ It can modernize your code (like converting the pow function to the ** operator
./vendor/bin/phpstan analyse ./ --error-format=checkstyle
```

### Asserts Security Vulnerabilities

The [SensioLabs Security Checker](https://github.com/sensiolabs/security-checker) is a command line tool that checks
if the application uses dependencies with known security vulnerabilitie.

```bash
./vendor/bin/security-checker security:check ./composer.lock
```

### Improve global code quality using PHPCPD (Code duplication) & PHPMD (PHP Mess Detector)

Detect overcomplicated expressions & Unused parameters, methods, properties
Expand Down
3 changes: 0 additions & 3 deletions bin/post-commit
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,3 @@ echo "\n🙏 \033[0;32mRunning Psalm ...\033[0m"

echo "\n👻 \033[0;32mRunning PHPStan ...\033[0m"
./vendor/bin/phpstan analyse ./src ./tests --error-format=checkstyle

echo "\n⛔ \033[0;32mRunning SensioLabs Security Checker ...\033[0m"
./vendor/bin/security-checker security:check ./composer.lock

0 comments on commit 7473e61

Please sign in to comment.