Skip to content

Commit d3fa52d

Browse files
authored
Merge pull request #2372 from flow-php/data-frame-mago
refactor: cover core static analysis with mago
2 parents 8c97d02 + e232e6e commit d3fa52d

309 files changed

Lines changed: 5316 additions & 4660 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/automation-changelog-release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ on:
22
push:
33
tags: [ '*' ]
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
automation:
7-
uses: aeon-php/actions/.github/workflows/automation-changelog-release.yml@main
10+
uses: aeon-php/actions/.github/workflows/automation-changelog-release.yml@ed056e3e36c7011d5c0f633471e7d888737e628a # main
811
secrets:
912
automation_github_token: "${{ secrets.ACCESS_TOKEN }}"

.github/workflows/automation-changelog-update.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ on:
33
push:
44
branches: [ 1.x ]
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
automation:
8-
uses: aeon-php/actions/.github/workflows/automation-changelog-update.yml@main
11+
uses: aeon-php/actions/.github/workflows/automation-changelog-update.yml@ed056e3e36c7011d5c0f633471e7d888737e628a # main
912
secrets:
1013
automation_github_token: "${{ secrets.ACCESS_TOKEN }}"

.github/workflows/automation-release-description-update.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ on:
22
release:
33
types: [ created ]
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
automation:
7-
uses: aeon-php/actions/.github/workflows/automation-release-description-update.yml@main
10+
uses: aeon-php/actions/.github/workflows/automation-release-description-update.yml@ed056e3e36c7011d5c0f633471e7d888737e628a # main
811
secrets:
912
automation_github_token: "${{ secrets.ACCESS_TOKEN }}"

.github/workflows/baseline.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,15 @@ on:
1515
schedule:
1616
- cron: '0 3 * * *'
1717

18+
permissions:
19+
contents: read
20+
1821
jobs:
1922
build-archives:
2023
runs-on: ubuntu-latest
24+
permissions:
25+
contents: read
26+
packages: write
2127

2228
strategy:
2329
fail-fast: false
@@ -29,9 +35,10 @@ jobs:
2935

3036
steps:
3137
- name: "Checkout"
32-
uses: "actions/checkout@v5"
38+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
3339
with:
3440
fetch-depth: 0
41+
persist-credentials: false
3542

3643
- name: "Setup PHP Environment"
3744
uses: "./.github/actions/setup-php-env"
@@ -52,20 +59,20 @@ jobs:
5259
./build/flow.phar --version
5360
5461
- name: Set up Docker Buildx
55-
uses: docker/setup-buildx-action@v4
62+
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
5663

5764
- name: Set up QEMU
58-
uses: docker/setup-qemu-action@v4
65+
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4
5966

6067
- name: Login to GitHub Container Registry
61-
uses: docker/login-action@v4
68+
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4
6269
with:
6370
registry: ghcr.io
6471
username: ${{ github.actor }}
6572
password: ${{ secrets.GITHUB_TOKEN }}
6673

6774
- name: Build Docker Image
68-
uses: docker/build-push-action@v7
75+
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7
6976
with:
7077
context: .
7178
file: ./Dockerfile
@@ -82,9 +89,9 @@ jobs:
8289
shell: bash
8390
run: |
8491
BUILD_TAG=${GITHUB_SHA:0:7}
85-
echo "BUILD_TAG=$BUILD_TAG" >> $GITHUB_ENV
92+
echo "BUILD_TAG=$BUILD_TAG" >> "$GITHUB_ENV"
8693
87-
- uses: actions/upload-artifact@v7
94+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
8895
with:
8996
name: flow-${{ env.BUILD_TAG }}.phar
9097
path: build/flow.phar
@@ -100,13 +107,14 @@ jobs:
100107

101108
steps:
102109
- name: "Checkout"
103-
uses: "actions/checkout@v5"
110+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
104111
with:
105112
fetch-depth: 0
113+
persist-credentials: false
106114

107115
- name: "Get Flow Version"
108116
id: flow_version
109-
uses: "WyriHaximus/github-action-get-previous-tag@v1"
117+
uses: WyriHaximus/github-action-get-previous-tag@04e8485ecb6487243907e330d522ff60f02283ce # v1
110118
with:
111119
fallback: 1.x-dev
112120

@@ -146,15 +154,15 @@ jobs:
146154
run: "just docs-api"
147155

148156
- name: "Setup Node.js"
149-
uses: actions/setup-node@v4
157+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
150158
with:
151159
node-version: '20'
152160

153161
- name: "Build Pagefind index"
154162
run: "npx --yes pagefind@1.5.2 --site web/landing/build --output-subdir pagefind"
155163

156164
- name: Pushes build to website repository
157-
uses: cpina/github-action-push-to-another-repository@main
165+
uses: cpina/github-action-push-to-another-repository@55306faa4ed53b815ae49e564af8cfb359d32ae2 # main
158166
env:
159167
API_TOKEN_GITHUB: ${{ secrets.ACCESS_TOKEN }}
160168
with:

.github/workflows/dependabot-auto-merge.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ permissions:
77
jobs:
88
dependabot:
99
runs-on: ubuntu-latest
10-
if: ${{ github.actor == 'dependabot[bot]' }}
10+
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
1111
steps:
1212
- name: Dependabot metadata
1313
id: metadata
14-
uses: dependabot/fetch-metadata@v3
14+
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3
1515
with:
1616
github-token: "${{ secrets.GITHUB_TOKEN }}"
1717
- name: Enable auto-merge for Dependabot PRs
1818
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
1919
run: gh pr merge --auto --merge "$PR_URL"
2020
env:
2121
PR_URL: ${{github.event.pull_request.html_url}}
22-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
22+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/docs.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,17 @@ concurrency:
1616
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1717
cancel-in-progress: true
1818

19+
permissions:
20+
contents: read
21+
1922
jobs:
2023
documentation-linter:
2124
runs-on: "ubuntu-latest"
2225
steps:
2326
- name: "Checkout"
24-
uses: "actions/checkout@v5"
27+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
28+
with:
29+
persist-credentials: false
2530

2631
- name: "Setup PHP Environment"
2732
uses: "./.github/actions/setup-php-env"

.github/workflows/job-arrow-extension.yml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ jobs:
1717
php: ['8.3', '8.4', '8.5']
1818

1919
steps:
20-
- uses: actions/checkout@v5
20+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
21+
with:
22+
persist-credentials: false
2123

2224
- name: Setup PHP Environment
2325
uses: ./.github/actions/setup-php-env
@@ -30,10 +32,12 @@ jobs:
3032
install-dependencies: 'false'
3133

3234
- name: Install Rust toolchain
33-
uses: dtolnay/rust-toolchain@stable
35+
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
36+
with:
37+
toolchain: stable
3438

3539
- name: Cache cargo registry and build
36-
uses: actions/cache@v5
40+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
3741
with:
3842
path: |
3943
~/.cargo/registry
@@ -53,7 +57,7 @@ jobs:
5357
if: runner.os == 'macOS'
5458
run: |
5559
brew install llvm
56-
echo "LIBCLANG_PATH=$(brew --prefix llvm)/lib" >> $GITHUB_ENV
60+
echo "LIBCLANG_PATH=$(brew --prefix llvm)/lib" >> "$GITHUB_ENV"
5761
5862
- name: Set LIBCLANG_PATH (Ubuntu)
5963
if: runner.os == 'Linux'
@@ -68,7 +72,7 @@ jobs:
6872
echo "Could not locate libclang.so under /usr/lib" >&2
6973
exit 1
7074
fi
71-
echo "LIBCLANG_PATH=$(dirname "$LIBCLANG_SO")" >> $GITHUB_ENV
75+
echo "LIBCLANG_PATH=$(dirname "$LIBCLANG_SO")" >> "$GITHUB_ENV"
7276
echo "Detected libclang at: $LIBCLANG_SO"
7377
7478
- name: Build extension
@@ -95,7 +99,7 @@ jobs:
9599

96100
- name: Upload to Codecov
97101
if: ${{ !cancelled() && matrix.php == '8.3' && matrix.os == 'ubuntu-latest' }}
98-
uses: codecov/codecov-action@v6
102+
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6
99103
with:
100104
token: ${{ secrets.CODECOV_TOKEN }}
101105
directory: ./var/phpunit/coverage/clover
@@ -112,7 +116,9 @@ jobs:
112116
os: ['ubuntu-latest', 'macos-latest']
113117

114118
steps:
115-
- uses: actions/checkout@v5
119+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
120+
with:
121+
persist-credentials: false
116122

117123
- name: Setup PHP Environment
118124
uses: ./.github/actions/setup-php-env
@@ -123,7 +129,9 @@ jobs:
123129
tools: 'composer:v2, phpize, php-config'
124130

125131
- name: Install Rust toolchain
126-
uses: dtolnay/rust-toolchain@stable
132+
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
133+
with:
134+
toolchain: stable
127135

128136
- name: Install build dependencies (Ubuntu)
129137
if: runner.os == 'Linux'
@@ -135,7 +143,7 @@ jobs:
135143
if: runner.os == 'macOS'
136144
run: |
137145
brew install autoconf automake libtool llvm
138-
echo "LIBCLANG_PATH=$(brew --prefix llvm)/lib" >> $GITHUB_ENV
146+
echo "LIBCLANG_PATH=$(brew --prefix llvm)/lib" >> "$GITHUB_ENV"
139147
140148
- name: Set LIBCLANG_PATH (Ubuntu)
141149
if: runner.os == 'Linux'
@@ -150,7 +158,7 @@ jobs:
150158
echo "Could not locate libclang.so under /usr/lib" >&2
151159
exit 1
152160
fi
153-
echo "LIBCLANG_PATH=$(dirname "$LIBCLANG_SO")" >> $GITHUB_ENV
161+
echo "LIBCLANG_PATH=$(dirname "$LIBCLANG_SO")" >> "$GITHUB_ENV"
154162
echo "Detected libclang at: $LIBCLANG_SO"
155163
156164
- name: Install PIE

.github/workflows/job-extension-tests.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ jobs:
2121

2222
steps:
2323
- name: "Checkout"
24-
uses: "actions/checkout@v5"
24+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
25+
with:
26+
persist-credentials: false
2527

2628
- name: "Install dependencies"
2729
run: |
@@ -51,8 +53,8 @@ jobs:
5153

5254
- name: Upload to Codecov
5355
if: ${{ !cancelled() && matrix.php-version == '8.3' }}
54-
uses: codecov/codecov-action@v6
56+
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6
5557
with:
5658
token: ${{ secrets.CODECOV_TOKEN }}
5759
directory: ./var/phpunit/coverage/clover
58-
flags: extension-tests
60+
flags: extension-tests

.github/workflows/job-mutation-tests.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ jobs:
1616

1717
steps:
1818
- name: "Checkout"
19-
uses: "actions/checkout@v5"
19+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
2020
with:
2121
fetch-depth: 0 # Need full history for git-diff-filter
22+
persist-credentials: false
2223

2324
- name: "Setup PHP Environment"
2425
uses: "./.github/actions/setup-php-env"
@@ -32,17 +33,20 @@ jobs:
3233
run: "mkdir -p var/infection/cache"
3334

3435
- name: "Cache infection results"
35-
uses: "actions/cache@v5"
36+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
3637
with:
3738
path: "var/infection/cache"
3839
key: "php-${{ matrix.php-version }}-infection-cache-${{ hashFiles('infection.json', 'tools/infection/phpunit.xml', 'composer.lock') }}"
3940
restore-keys: |
4041
php-${{ matrix.php-version }}-infection-cache-
4142
4243
- name: "Mutation Tests"
44+
env:
45+
EVENT_NAME: ${{ github.event_name }}
46+
BASE_REF: ${{ github.base_ref }}
4347
run: |
44-
if [ "${{ github.event_name }}" = "pull_request" ]; then
45-
just test-mutation --git-diff-filter=AM --git-diff-base=origin/${{ github.base_ref }} --logger-github=false --log-verbosity=none
48+
if [ "$EVENT_NAME" = "pull_request" ]; then
49+
just test-mutation --git-diff-filter=AM --git-diff-base="origin/$BASE_REF" --logger-github=false --log-verbosity=none
4650
else
4751
just test-mutation --logger-github=false --log-verbosity=none
48-
fi
52+
fi

.github/workflows/job-pg-query-extension.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ name: PG Query Extension
22

33
on:
44
workflow_call:
5-
secrets:
6-
CODECOV_TOKEN:
7-
required: false
85

96
jobs:
107
build:
@@ -17,7 +14,9 @@ jobs:
1714
php: ['8.3', '8.4', '8.5']
1815

1916
steps:
20-
- uses: actions/checkout@v5
17+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
18+
with:
19+
persist-credentials: false
2120

2221
- name: Setup PHP Environment
2322
uses: ./.github/actions/setup-php-env
@@ -66,7 +65,9 @@ jobs:
6665
os: ['ubuntu-latest', 'macos-latest']
6766

6867
steps:
69-
- uses: actions/checkout@v5
68+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
69+
with:
70+
persist-credentials: false
7071

7172
- name: Setup PHP Environment
7273
uses: ./.github/actions/setup-php-env

0 commit comments

Comments
 (0)