Skip to content

Commit d1d8464

Browse files
authored
Merge pull request #24 from assoconnect/upgrade-analysis-tools
Clean CI and upgrade analysis tools to latest on lowest dependency runs
2 parents a49a13c + 57e8e58 commit d1d8464

4 files changed

Lines changed: 17 additions & 10 deletions

File tree

.github/workflows/build.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,24 @@ jobs:
1515
dependency-versions: ['lowest', 'highest']
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
21-
21+
2222
- uses: shivammathur/setup-php@v2
2323
with:
2424
php-version: ${{ matrix.php-versions }}
25-
25+
2626
- run: composer validate --strict
27-
28-
- run: composer install --prefer-dist --no-progress --no-suggest
29-
27+
28+
- uses: ramsey/composer-install@v2
29+
with:
30+
dependency-versions: ${{ matrix.dependency-versions }}
31+
32+
- name: Upgrade analysis tools to latest
33+
if: ${{ matrix.dependency-versions == 'lowest' }}
34+
run: composer update phpstan/phpstan rector/rector phpunit/phpunit squizlabs/php_codesniffer --with-all-dependencies --no-interaction
35+
3036
- run: vendor/bin/phpcs
3137
if: ${{ failure() || success() }}
3238

@@ -38,12 +44,12 @@ jobs:
3844

3945
- run: XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-clover ./clover.xml --log-junit ./phpunit.report.xml
4046
if: ${{ failure() || success() }}
41-
47+
4248
# https://community.sonarsource.com/t/code-coverage-doesnt-work-with-github-action/16747
4349
# $GITHUB_WORKSPACE contains a slash so @ is used as delimiter
4450
- run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' clover.xml
4551
- run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' phpunit.report.xml
46-
52+
4753
- uses: sonarsource/sonarcloud-github-action@master
4854
env:
4955
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/vendor/*
2-
.phpunit.result.cache
2+
.phpunit.cache
33
.idea
44
.php_cs.cache
55
composer.lock

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
}
2323
},
2424
"require-dev": {
25-
"assoconnect/php-quality-config": "^2"
25+
"assoconnect/php-quality-config": "^2.2"
2626
},
2727
"require": {
2828
"php": "^8.3",

phpunit.xml.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<env name="KERNEL_CLASS" value="App\Kernel"/>
66
<env name="APP_ENV" value="test"/>
77
<env name="APP_DEBUG" value="1"/>
8+
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak"/>
89
</php>
910
<testsuites>
1011
<testsuite name="main">

0 commit comments

Comments
 (0)