Skip to content

Commit 4e95d96

Browse files
committed
Merge branch 'refs/heads/main' into ext/rdkafka
# Conflicts: # config/source.json
2 parents 330dd2b + 29efc2c commit 4e95d96

File tree

310 files changed

+19887
-2565
lines changed

Some content is hidden

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

310 files changed

+19887
-2565
lines changed

.github/FUNDING.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
44
patreon: # Replace with a single Patreon username
55
open_collective: # Replace with a single Open Collective username
6-
ko_fi: # Replace with a single Ko-fi username
6+
ko_fi: crazywhalecc # Replace with a single Ko-fi username
77
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
88
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
99
liberapay: # Replace with a single Liberapay username
1010
issuehunt: # Replace with a single IssueHunt username
1111
otechie: # Replace with a single Otechie username
1212
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13+
# noinspection YAMLSchemaValidation
14+
buy_me_a_coffee: # crazywhalecc
1315
custom: 'https://github.com/crazywhalecc/crazywhalecc/blob/master/FUNDING.md' # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/pull_request_template.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## What does this PR do?
2+
3+
4+
5+
## Checklist before merging
6+
7+
> If your PR involves the changes mentioned below and completed the action, please tick the corresponding option.
8+
> If a modification is not involved, please skip it directly.
9+
10+
- [ ] If it's an extension or dependency update, make sure adding related extensions in `src/global/test-extensions.php`.
11+
- [ ] If you changed the behavior of static-php-cli, update docs in `./docs/`.
12+
- [ ] If you updated `config/xxx.json` content, run `bin/spc dev:sort-config xxx`.

.github/workflows/build-linux-arm.yml

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
default: '8.2'
1616
type: choice
1717
options:
18+
- '8.3'
1819
- '8.2'
1920
- '8.1'
2021
- '8.0'
@@ -33,7 +34,12 @@ on:
3334
description: extensions to compile (comma separated)
3435
required: true
3536
type: string
37+
prefer-pre-built:
38+
description: prefer pre-built binaries (reduce build time)
39+
type: boolean
40+
default: true
3641
debug:
42+
description: enable debug logs
3743
type: boolean
3844

3945
env:
@@ -44,18 +50,36 @@ jobs:
4450
name: build ${{ inputs.version }} on ${{ inputs.operating-system }}
4551
runs-on: ubuntu-latest
4652
steps:
47-
- uses: actions/checkout@v3
53+
- uses: actions/checkout@v4
54+
55+
# Cache composer dependencies
56+
- id: cache-composer-deps
57+
uses: actions/cache@v4
58+
with:
59+
path: vendor
60+
key: composer-dependencies
61+
62+
# If there's no Composer cache, install dependencies
63+
- if: steps.cache-composer-deps.outputs.cache-hit != 'true'
64+
run: composer update --no-dev --classmap-authoritative
65+
66+
- name: Generate hashed key for download cache
67+
run: |
68+
INPUT_HASH=$(echo "${{ runner.os }}-${{ inputs.version }}-${{ inputs.extensions }}" | sha256sum | awk '{print $1}')
69+
echo "INPUT_HASH=${INPUT_HASH}" >> $GITHUB_ENV
4870
4971
# Cache downloaded source
5072
- id: cache-download
51-
uses: actions/cache@v3
73+
uses: actions/cache@v4
5274
with:
5375
path: downloads
54-
key: php-${{ inputs.version }}-dependencies
76+
key: php-${{ env.INPUT_HASH }}
5577

5678
# With or without debug
5779
- if: inputs.debug == true
5880
run: echo "SPC_BUILD_DEBUG=--debug" >> $GITHUB_ENV
81+
- if: inputs.prefer-pre-built == true
82+
run: echo "SPC_PRE_BUILT=--prefer-pre-built" >> $env:GITHUB_ENV
5983

6084
# With target select: cli, micro or both
6185
- if: ${{ inputs.build-cli == true }}
@@ -67,38 +91,38 @@ jobs:
6791

6892
# If there's no dependencies cache, fetch sources, with or without debug
6993
- if: steps.cache-download.outputs.cache-hit != 'true'
70-
run: SPC_USE_ARCH=${{ inputs.operating-system }} ./bin/spc-alpine-docker download --with-php=${{ inputs.version }} --all ${{ env.SPC_BUILD_DEBUG }}
94+
run: SPC_USE_ARCH=${{ inputs.operating-system }} ./bin/spc-alpine-docker download --with-php=${{ inputs.version }} --for-extensions=${{ inputs.extensions }} ${{ env.SPC_BUILD_DEBUG }} ${{ env.SPC_PRE_BUILT }}
7195

7296
# Run build command
7397
- run: SPC_USE_ARCH=${{ inputs.operating-system }} ./bin/spc-alpine-docker build ${{ inputs.extensions }} ${{ env.SPC_BUILD_DEBUG }} ${{ env.SPC_BUILD_CLI }} ${{ env.SPC_BUILD_MICRO }} ${{ env.SPC_BUILD_FPM }}
7498

7599
# Upload cli executable
76100
- if: ${{ inputs.build-cli == true }}
77-
uses: actions/upload-artifact@v3
101+
uses: actions/upload-artifact@v4
78102
with:
79103
name: php-${{ inputs.version }}-linux-${{ inputs.operating-system }}
80104
path: buildroot/bin/php
81105

82106
# Upload micro self-extracted executable
83107
- if: ${{ inputs.build-micro == true }}
84-
uses: actions/upload-artifact@v3
108+
uses: actions/upload-artifact@v4
85109
with:
86110
name: micro-${{ inputs.version }}-linux-${{ inputs.operating-system }}
87111
path: buildroot/bin/micro.sfx
88112

89113
# Upload fpm executable
90114
- if: ${{ inputs.build-fpm == true }}
91-
uses: actions/upload-artifact@v3
115+
uses: actions/upload-artifact@v4
92116
with:
93117
name: php-fpm-${{ inputs.version }}-linux-${{ inputs.operating-system }}
94118
path: buildroot/bin/php-fpm
95119

96120
# Upload extensions metadata
97-
- uses: actions/upload-artifact@v3
121+
- uses: actions/upload-artifact@v4
98122
with:
99123
name: license-files
100124
path: buildroot/license/
101-
- uses: actions/upload-artifact@v3
125+
- uses: actions/upload-artifact@v4
102126
with:
103127
name: build-meta
104128
path: |

.github/workflows/build-linux-x86_64.yml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
default: '8.2'
1010
type: choice
1111
options:
12+
- '8.3'
1213
- '8.2'
1314
- '8.1'
1415
- '8.0'
@@ -27,7 +28,12 @@ on:
2728
description: extensions to compile (comma separated)
2829
required: true
2930
type: string
31+
prefer-pre-built:
32+
description: prefer pre-built binaries (reduce build time)
33+
type: boolean
34+
default: true
3035
debug:
36+
description: enable debug logs
3137
type: boolean
3238

3339
env:
@@ -38,11 +44,11 @@ jobs:
3844
name: build ${{ inputs.version }} on Linux x86_64
3945
runs-on: ubuntu-latest
4046
steps:
41-
- uses: actions/checkout@v3
47+
- uses: actions/checkout@v4
4248

4349
# Cache composer dependencies
4450
- id: cache-composer-deps
45-
uses: actions/cache@v3
51+
uses: actions/cache@v4
4652
with:
4753
path: vendor
4854
key: composer-dependencies
@@ -51,16 +57,23 @@ jobs:
5157
- if: steps.cache-composer-deps.outputs.cache-hit != 'true'
5258
run: composer update --no-dev --classmap-authoritative
5359

60+
- name: Generate hashed key for download cache
61+
run: |
62+
INPUT_HASH=$(echo "${{ runner.os }}-${{ inputs.version }}-${{ inputs.extensions }}" | sha256sum | awk '{print $1}')
63+
echo "INPUT_HASH=${INPUT_HASH}" >> $GITHUB_ENV
64+
5465
# Cache downloaded source
5566
- id: cache-download
56-
uses: actions/cache@v3
67+
uses: actions/cache@v4
5768
with:
5869
path: downloads
59-
key: php-${{ inputs.version }}-dependencies
70+
key: php-${{ env.INPUT_HASH }}
6071

6172
# With or without debug
6273
- if: inputs.debug == true
6374
run: echo "SPC_BUILD_DEBUG=--debug" >> $GITHUB_ENV
75+
- if: inputs.prefer-pre-built == true
76+
run: echo "SPC_PRE_BUILT=--prefer-pre-built" >> $env:GITHUB_ENV
6477

6578
# With target select: cli, micro or both
6679
- if: ${{ inputs.build-cli == true }}
@@ -72,38 +85,38 @@ jobs:
7285

7386
# If there's no dependencies cache, fetch sources, with or without debug
7487
- if: steps.cache-download.outputs.cache-hit != 'true'
75-
run: CACHE_API_EXEC=yes ./bin/spc-alpine-docker download --with-php=${{ inputs.version }} --all ${{ env.SPC_BUILD_DEBUG }}
88+
run: CACHE_API_EXEC=yes ./bin/spc-alpine-docker download --with-php=${{ inputs.version }} --for-extensions=${{ inputs.extensions }} ${{ env.SPC_BUILD_DEBUG }} ${{ env.SPC_PRE_BUILT }}
7689

7790
# Run build command
7891
- run: ./bin/spc-alpine-docker build ${{ inputs.extensions }} ${{ env.SPC_BUILD_DEBUG }} ${{ env.SPC_BUILD_CLI }} ${{ env.SPC_BUILD_MICRO }} ${{ env.SPC_BUILD_FPM }}
7992

8093
# Upload cli executable
8194
- if: ${{ inputs.build-cli == true }}
82-
uses: actions/upload-artifact@v3
95+
uses: actions/upload-artifact@v4
8396
with:
8497
name: php-${{ inputs.version }}-${{ env.SPC_BUILD_OS }}
8598
path: buildroot/bin/php
8699

87100
# Upload micro self-extracted executable
88101
- if: ${{ inputs.build-micro == true }}
89-
uses: actions/upload-artifact@v3
102+
uses: actions/upload-artifact@v4
90103
with:
91104
name: micro-${{ inputs.version }}-${{ env.SPC_BUILD_OS }}
92105
path: buildroot/bin/micro.sfx
93106

94107
# Upload fpm executable
95108
- if: ${{ inputs.build-fpm == true }}
96-
uses: actions/upload-artifact@v3
109+
uses: actions/upload-artifact@v4
97110
with:
98111
name: php-fpm-${{ inputs.version }}-${{ env.SPC_BUILD_OS }}
99112
path: buildroot/bin/php-fpm
100113

101114
# Upload extensions metadata
102-
- uses: actions/upload-artifact@v3
115+
- uses: actions/upload-artifact@v4
103116
with:
104117
name: license-files
105118
path: buildroot/license/
106-
- uses: actions/upload-artifact@v3
119+
- uses: actions/upload-artifact@v4
107120
with:
108121
name: build-meta
109122
path: |
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
name: CI on arm64 macOS
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
required: true
8+
description: php version to compile
9+
default: '8.2'
10+
type: choice
11+
options:
12+
- '8.3'
13+
- '8.2'
14+
- '8.1'
15+
- '8.0'
16+
- '7.4'
17+
build-cli:
18+
description: build cli binary
19+
default: true
20+
type: boolean
21+
build-micro:
22+
description: build phpmicro binary
23+
type: boolean
24+
build-fpm:
25+
description: build fpm binary
26+
type: boolean
27+
extensions:
28+
description: extensions to compile (comma separated)
29+
required: true
30+
type: string
31+
prefer-pre-built:
32+
description: prefer pre-built binaries (reduce build time)
33+
type: boolean
34+
default: true
35+
debug:
36+
description: enable debug logs
37+
type: boolean
38+
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
42+
jobs:
43+
build:
44+
name: build ${{ inputs.version }} on macOS arm64
45+
runs-on: macos-14
46+
steps:
47+
- uses: actions/checkout@v4
48+
49+
# Install macOS missing packages and mark os suffix
50+
- run: |
51+
brew install automake gzip
52+
echo "SPC_BUILD_OS=macos" >> $GITHUB_ENV
53+
54+
55+
- name: "Setup PHP"
56+
uses: shivammathur/setup-php@v2
57+
with:
58+
php-version: 8.1
59+
tools: pecl, composer
60+
extensions: curl, openssl, mbstring, tokenizer
61+
ini-values: memory_limit=-1
62+
63+
64+
# Cache composer dependencies
65+
- id: cache-composer-deps
66+
uses: actions/cache@v4
67+
with:
68+
path: vendor
69+
key: composer-dependencies
70+
71+
# If there's no Composer cache, install dependencies
72+
- if: steps.cache-composer-deps.outputs.cache-hit != 'true'
73+
run: composer update --no-dev --classmap-authoritative
74+
75+
- name: Generate hashed key for download cache
76+
run: |
77+
INPUT_HASH=$(echo "${{ runner.os }}-${{ inputs.version }}-${{ inputs.extensions }}" | sha256sum | awk '{print $1}')
78+
echo "INPUT_HASH=${INPUT_HASH}" >> $GITHUB_ENV
79+
80+
# Cache downloaded source
81+
- id: cache-download
82+
uses: actions/cache@v4
83+
with:
84+
path: downloads
85+
key: php-${{ env.INPUT_HASH }}
86+
87+
# With or without debug
88+
- if: inputs.debug == true
89+
run: echo "SPC_BUILD_DEBUG=--debug" >> $GITHUB_ENV
90+
- if: inputs.prefer-pre-built == true
91+
run: echo "SPC_PRE_BUILT=--prefer-pre-built" >> $env:GITHUB_ENV
92+
93+
# With target select: cli, micro or both
94+
- if: ${{ inputs.build-cli == true }}
95+
run: echo "SPC_BUILD_CLI=--build-cli" >> $GITHUB_ENV
96+
- if: ${{ inputs.build-micro == true }}
97+
run: echo "SPC_BUILD_MICRO=--build-micro" >> $GITHUB_ENV
98+
- if: ${{ inputs.build-fpm == true }}
99+
run: echo "SPC_BUILD_FPM=--build-fpm" >> $GITHUB_ENV
100+
101+
# If there's no dependencies cache, fetch sources, with or without debug
102+
- if: steps.cache-download.outputs.cache-hit != 'true'
103+
run: ./bin/spc download --with-php=${{ inputs.version }} --for-extensions=${{ inputs.extensions }} ${{ env.SPC_BUILD_DEBUG }} ${{ env.SPC_PRE_BUILT }}
104+
105+
# Run build command
106+
- run: ./bin/spc build ${{ inputs.extensions }} ${{ env.SPC_BUILD_DEBUG }} ${{ env.SPC_BUILD_CLI }} ${{ env.SPC_BUILD_MICRO }} ${{ env.SPC_BUILD_FPM }}
107+
108+
# Upload cli executable
109+
- if: ${{ inputs.build-cli == true }}
110+
uses: actions/upload-artifact@v4
111+
with:
112+
name: php-${{ inputs.version }}-${{ env.SPC_BUILD_OS }}
113+
path: buildroot/bin/php
114+
115+
# Upload micro self-extracted executable
116+
- if: ${{ inputs.build-micro == true }}
117+
uses: actions/upload-artifact@v4
118+
with:
119+
name: micro-${{ inputs.version }}-${{ env.SPC_BUILD_OS }}
120+
path: buildroot/bin/micro.sfx
121+
122+
# Upload fpm executable
123+
- if: ${{ inputs.build-fpm == true }}
124+
uses: actions/upload-artifact@v4
125+
with:
126+
name: php-fpm-${{ inputs.version }}-${{ env.SPC_BUILD_OS }}
127+
path: buildroot/bin/php-fpm
128+
129+
# Upload extensions metadata
130+
- uses: actions/upload-artifact@v4
131+
with:
132+
name: license-files
133+
path: buildroot/license/
134+
- uses: actions/upload-artifact@v4
135+
with:
136+
name: build-meta
137+
path: |
138+
buildroot/build-extensions.json
139+
buildroot/build-libraries.json

0 commit comments

Comments
 (0)