diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000000..6e7092b03230 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ + +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 000000000000..ab8f15bbb1e0 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,103 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL Advanced" + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + schedule: + - cron: '42 22 * * 4' + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + # Runner size impacts CodeQL analysis time. To learn more, please see: + # - https://gh.io/recommended-hardware-resources-for-running-codeql + # - https://gh.io/supported-runners-and-hardware-resources + # - https://gh.io/using-larger-runners (GitHub.com only) + # Consider using larger runners or machines with greater resources for possible analysis time improvements. + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + permissions: + # required for all workflows + security-events: write + + # required to fetch internal or private CodeQL packs + packages: read + + # only required for workflows in private repositories + actions: read + contents: read + + strategy: + fail-fast: false + matrix: + include: + - language: c-cpp + build-mode: none + - language: javascript-typescript + build-mode: none + - language: python + build-mode: none + # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift' + # Use `c-cpp` to analyze code written in C, C++ or both + # Use 'java-kotlin' to analyze code written in Java, Kotlin or both + # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both + # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, + # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. + # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how + # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages + steps: + - name: Checkout repository + uses: actions/checkout@v7 + + # Add any setup steps before running the `github/codeql-action/init` action. + # This includes steps like installing compilers or runtimes (`actions/setup-node` + # or others). This is typically only required for manual builds. + # - name: Setup runtime (example) + # uses: actions/setup-example@v1 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v4 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + # If the analyze step fails for one of the languages you are analyzing with + # "We were unable to automatically build your code", modify the matrix above + # to set the build mode to "manual" for that language. Then modify this step + # to build your code. + # â„šī¸ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + - name: Run manual build steps + if: matrix.build-mode == 'manual' + shell: bash + run: | + echo 'If you are using a "manual" build mode for one or more of the' \ + 'languages you are analyzing, replace this with the commands to build' \ + 'your code, for example:' + echo ' make bootstrap' + echo ' make release' + exit 1 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v4 + with: + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ffb45c9a20cd..d6ce0f3b433d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -17,7 +17,7 @@ jobs: if: github.repository == 'php/php-src' steps: - name: git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Install dependencies run: pip install -r docs/requirements.txt - name: Check formatting diff --git a/.github/workflows/real-time-benchmark.yml b/.github/workflows/real-time-benchmark.yml index 4147157ccfcb..ef4cba4da033 100644 --- a/.github/workflows/real-time-benchmark.yml +++ b/.github/workflows/real-time-benchmark.yml @@ -119,7 +119,7 @@ jobs: sudo apt-get update -y sudo apt-get install -y terraform=1.5.7-* - name: Checkout benchmark suite - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: repository: 'kocsismate/php-version-benchmarks' ref: 'main' @@ -133,7 +133,7 @@ jobs: rm -rf ./php-version-benchmarks/docs/results - name: Checkout benchmark data if: github.event_name != 'workflow_dispatch' - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: repository: php/real-time-benchmark-data ssh-key: ${{ secrets.PHP_VERSION_BENCHMARK_RESULTS_DEPLOY_KEY }} @@ -283,7 +283,7 @@ jobs: echo "NEWEST_RESULT_DIRECTORY=$(ls -td ${{ github.workspace }}/php-version-benchmarks/docs/results/${{ env.YEAR }}/*/ | head -1)" >> $GITHUB_ENV - name: Upload artifacts id: upload - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: name: results path: | diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index a9bb570f9212..deb4b14c5c47 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -19,7 +19,7 @@ jobs: timeout-minutes: 180 steps: - name: git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: ref: ${{ fromJson(inputs.branch).ref }} - name: System info @@ -61,7 +61,7 @@ jobs: image: 'alpine:3.22' steps: - name: git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: ref: ${{ fromJson(inputs.branch).ref }} - name: apk @@ -135,7 +135,7 @@ jobs: timeout-minutes: 180 steps: - name: git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: ref: ${{ fromJson(inputs.branch).ref }} - name: Create MSSQL container @@ -258,7 +258,7 @@ jobs: FIREBIRD_PASSWORD: test steps: - name: git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: ref: ${{ fromJson(inputs.branch).ref }} - name: apt @@ -316,7 +316,7 @@ jobs: timeout-minutes: 180 steps: - name: git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: ref: ${{ fromJson(inputs.branch).ref }} - name: Update clang @@ -394,7 +394,7 @@ jobs: timeout-minutes: 180 steps: - name: git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: ref: ${{ fromJson(inputs.branch).ref }} - name: Create MSSQL container @@ -422,7 +422,7 @@ jobs: - name: Generate coverage report if: ${{ !cancelled() }} run: make gcovr-xml - - uses: codecov/codecov-action@v6 + - uses: codecov/codecov-action@v7 if: ${{ !cancelled() }} with: disable_search: true @@ -444,7 +444,7 @@ jobs: USE_TRACKED_ALLOC: 1 steps: - name: git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: ref: ${{ fromJson(inputs.branch).ref }} - name: apt @@ -656,7 +656,7 @@ jobs: timeout-minutes: 180 steps: - name: git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: ref: ${{ fromJson(inputs.branch).ref }} - name: Create MSSQL container @@ -720,7 +720,7 @@ jobs: timeout-minutes: 180 steps: - name: git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: ref: ${{ fromJson(inputs.branch).ref }} - name: apt @@ -812,7 +812,7 @@ jobs: timeout-minutes: 180 steps: - name: git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: ref: ${{ fromJson(inputs.branch).ref }} - name: apt @@ -866,7 +866,7 @@ jobs: - name: git config run: git config --global core.autocrlf false && git config --global core.eol lf - name: git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: ref: ${{ fromJson(inputs.branch).ref }} - name: Setup @@ -885,7 +885,7 @@ jobs: timeout-minutes: 50 steps: - name: git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: ref: ${{ fromJson(inputs.branch).ref }} - name: FreeBSD @@ -901,7 +901,7 @@ jobs: timeout-minutes: 50 steps: - name: git checkout - uses: actions/checkout@v5 + uses: actions/checkout@v7 with: ref: ${{ fromJson(inputs.branch).ref }} - name: Solaris @@ -916,7 +916,7 @@ jobs: timeout-minutes: 50 steps: - name: git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: ref: ${{ fromJson(inputs.branch).ref }} fetch-depth: 0 @@ -979,7 +979,7 @@ jobs: mysql -uroot -proot -e "CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'wordpress'; FLUSH PRIVILEGES;" mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON *.* TO 'wordpress'@'localhost' WITH GRANT OPTION;" - name: git checkout benchmarking-data - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: repository: php/benchmarking-data ssh-key: ${{ secrets.BENCHMARKING_DATA_DEPLOY_KEY }} @@ -1010,7 +1010,7 @@ jobs: ${{ github.sha }} \ ${{ github.event.pull_request.base.sha }} \ > $GITHUB_STEP_SUMMARY - - uses: actions/upload-artifact@v6 + - uses: actions/upload-artifact@v7 with: name: profiles path: ${{ github.workspace }}/benchmark/profiles diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 057ed83eb226..4128a854b525 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,7 +41,7 @@ jobs: all_variations: ${{ steps.set-matrix.outputs.all_variations }} branches: ${{ steps.set-matrix.outputs.branches }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: # When running nightly, set fetch-depth to 0 to clone the full # repository including all branches. This is required to find the diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index fa79580f42ec..844267544608 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -39,7 +39,7 @@ jobs: timeout-minutes: 20 steps: - name: git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Install dependencies run: | diff --git a/.github/workflows/verify-bundled-files.yml b/.github/workflows/verify-bundled-files.yml index 6f1b6e68d6c4..229de285fe23 100644 --- a/.github/workflows/verify-bundled-files.yml +++ b/.github/workflows/verify-bundled-files.yml @@ -26,11 +26,11 @@ jobs: runs-on: ubuntu-24.04 steps: - name: git checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Detect changed files if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }} - uses: dorny/paths-filter@v3 + uses: dorny/paths-filter@v4 id: changes with: filters: | diff --git a/win32/build/buildconf.js b/win32/build/buildconf.js index 52b8a7d0fd39..8018e00db52a 100644 --- a/win32/build/buildconf.js +++ b/win32/build/buildconf.js @@ -227,7 +227,7 @@ if (module_dirs.length == 0) { modules += gen_modules(); // Look for ARG_ENABLE or ARG_WITH calls -re = new RegExp("(ARG_(ENABLE|WITH)\([^;]+\);)", "gm"); +re = new RegExp("(ARG_(ENABLE|WITH)\\([^;]+\\);)", "gm"); calls = modules.match(re); for (i = 0; i < calls.length; i++) { item = calls[i];