Update profile #156
This file contains hidden or 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
| name: PHP CI | |
| on: | |
| push: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout code | |
| - uses: actions/checkout@v4 | |
| # Setup PHP 8.4 | |
| - name: Setup PHP 8.4 | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| tools: composer:v2 | |
| # Show PHP version | |
| - name: Show PHP version | |
| run: php -v | |
| # Validate composer.json | |
| - name: Validate composer.json | |
| run: composer validate --strict | |
| # Cache Composer packages | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: vendor | |
| key: ${{ runner.os }}-php-${{ hashFiles('**/composer.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-php- | |
| # Install dependencies (no lock file) | |
| - name: Install Composer dependencies (including dev) | |
| run: composer install --prefer-dist --no-progress --no-suggest --ignore-platform-reqs | |
| # Verify PHP platform requirements | |
| - name: Check platform requirements | |
| run: composer check-platform-reqs | |
| # Run PHPStan | |
| - name: Setup PHPStan | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| tools: phpstan | |
| - name: Run PHPStan | |
| run: phpstan analyse src/ --level=8 |