* bump version * fix formatting locale reset after embedded controller sub-requests (#5944) * fix GHSA-c6w6-57jj-62vh * fix GHSA-m492-gv72-xvxj * fix GHSA-jr9p-4h4j-6c58 * make sure to only use JS logic to call API endpoints * fixes GHSA-r8vr-m544-qh4h * make sure to only use JS logic to call API endpoints * fix GHSA-rw46-qg69-vg6h * fix GHSA-pj8j-p4g4-4vw8 - prevent kimai from rendering images via markdown * fix GHSA-pj8j-p4g4-4vw8 - use a safe network client to prevent SSRF via images * fix GHSA-xv4r-4885-gwpg * fix GHSA-pgcc-vfmc-7cw5 - move GET routes to API with POST method to prevent CSRF * fix tooltip survives page reload * updated wizard images * split wizard and password reset subscriber into two classes * relax upper php limit * added zizmor workflow scans and apply findings * user permissions <name>_other_profile now respect teams * move all linting steps to new job * updated docker image version names * use .env.local for storing APP_SECRET * improve build order and use given tag as ref for checkout, not default main branch * improved APP_SECRET handling, see entrypoint.sh * use local code for building the image for more flexibility, added dockerignore
77 lines
2.7 KiB
YAML
77 lines
2.7 KiB
YAML
name: Lint PHP
|
|
|
|
on:
|
|
pull_request: null
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
integration:
|
|
name: Linting (${{ matrix.php }})
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
php: ['8.2'] # use lowest supported PHP version to prevent introducing syntax from newer PHP versions
|
|
|
|
steps:
|
|
|
|
- name: Clone Kimai
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
|
|
with:
|
|
php-version: ${{ matrix.php }}
|
|
coverage: pcov
|
|
extensions: ctype, gd, iconv, intl, mbstring, xml, zip
|
|
tools: cs2pr, symfony-cli
|
|
env:
|
|
fail-fast: true
|
|
|
|
- name: Determine composer cache directory
|
|
id: composer-cache
|
|
run: echo "composer_cache_directory=$(composer config cache-dir)" >> $GITHUB_ENV
|
|
|
|
- name: Cache Composer dependencies
|
|
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
|
with:
|
|
path: "${{ env.composer_cache_directory }}"
|
|
key: ${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
|
|
|
|
- name: Install dependencies
|
|
run: composer install
|
|
|
|
- name: Validate Composer
|
|
run: composer validate --strict --no-check-all
|
|
|
|
- name: Lint YAML
|
|
run: APP_ENV=dev bin/console lint:yaml --parse-tags config
|
|
|
|
- name: Lint XLIFF
|
|
run: APP_ENV=dev bin/console lint:xliff translations
|
|
|
|
- name: Check codestyles
|
|
run: vendor/bin/php-cs-fixer fix --dry-run --verbose --config=.php-cs-fixer.dist.php --using-cache=no --show-progress=none --format=checkstyle | cs2pr
|
|
|
|
- name: Run PHPStan for application
|
|
run: vendor/bin/phpstan analyse -c phpstan.neon --no-progress --error-format=checkstyle | cs2pr
|
|
|
|
- name: Run PHPStan for tests
|
|
run: vendor/bin/phpstan analyse -c tests/phpstan.neon --no-progress --error-format=checkstyle | cs2pr
|
|
|
|
- name: Lint codebase
|
|
run: composer linting
|
|
|
|
- name: Check for security issues in packages
|
|
run: symfony security:check
|