refactor(search): optimize controller logic and enforce engine reliance #763
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: PHPMD | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| schedule: | |
| - cron: "44 20 * * 2" | |
| permissions: | |
| contents: read | |
| jobs: | |
| phpmd: | |
| name: Run PHPMD scanning | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| security-events: write | |
| actions: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "8.3" | |
| coverage: none | |
| tools: phpmd, composer | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: vendor | |
| key: composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| composer- | |
| - name: Install dependencies | |
| run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader | |
| - name: Run PHPMD | |
| run: | | |
| phpmd app,bootstrap,config,database,routes,tests sarif \ | |
| codesize,cleancode,unusedcode,design \ | |
| --reportfile phpmd-results.sarif | |
| continue-on-error: true | |
| - name: Upload PHPMD results to GitHub Security tab | |
| uses: github/codeql-action/upload-sarif@v4 | |
| with: | |
| sarif_file: phpmd-results.sarif | |
| wait-for-processing: true | |
| - name: Upload PHPMD results as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: phpmd-results | |
| path: phpmd-results.sarif |