Skip to content

Commit 5cd4ff6

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents e792cc1 + efa52d3 commit 5cd4ff6

307 files changed

Lines changed: 10038 additions & 4427 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/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ Checklist:
77

88
Tracker ticket:
99

10-
https://tracker.phpbb.com/browse/PHPBB3-12345
10+
https://tracker.phpbb.com/browse/PHPBB-12345
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Check merge to master
2+
3+
on:
4+
pull_request_target:
5+
types: [ opened, synchronize, reopened ]
6+
branches:
7+
- 3.3.x
8+
9+
jobs:
10+
merge-check:
11+
if: github.event_name == 'pull_request_target' && github.event.pull_request.base.ref == '3.3.x'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout the repository
15+
uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0 # Ensure full history is fetched
18+
19+
- name: Set up Git user
20+
run: |
21+
git config --global user.name "github-actions"
22+
git config --global user.email "github-actions@github.com"
23+
24+
- name: Fetch all branches
25+
run: git fetch origin
26+
27+
- name: Simulate merging PR into 3.3.x
28+
id: simulate_merge
29+
run: |
30+
git checkout 3.3.x
31+
git fetch origin pull/${{ github.event.pull_request.number }}/head
32+
git merge --no-ff FETCH_HEAD || exit 1
33+
34+
- name: Attempt to merge updated 3.3.x into master
35+
id: merge_master
36+
run: |
37+
git checkout master
38+
if git merge --no-ff 3.3.x --no-commit; then
39+
echo "mergeable=true" >> $GITHUB_OUTPUT
40+
else
41+
echo "mergeable=false" >> $GITHUB_OUTPUT
42+
git merge --abort
43+
fi
44+
45+
- name: Find Comment
46+
uses: peter-evans/find-comment@v3
47+
id: fc
48+
with:
49+
issue-number: ${{ github.event.pull_request.number }}
50+
comment-author: 'github-actions[bot]'
51+
body-includes: The attempt to merge branch `3.3.x` into `master` has completed
52+
53+
- name: Post comment on PR
54+
if: always() # Ensure this step always runs, regardless of merge result
55+
uses: peter-evans/create-or-update-comment@v4
56+
with:
57+
token: ${{ secrets.GITHUB_TOKEN }}
58+
issue-number: ${{ github.event.pull_request.number }}
59+
comment-id: ${{ steps.fc.outputs.comment-id }}
60+
edit-mode: replace
61+
body: |
62+
The attempt to merge branch `3.3.x` into `master` has completed after considering the changes in this PR.
63+
64+
- Merge result: ${{ steps.merge_master.outputs.mergeable == 'true' && 'Success ✅' || 'Conflict ❌' }}
65+
66+
${{ steps.merge_master.outputs.mergeable == 'true' && 'This PR is ready to be merged.' || 'A separate PR will be needed to merge `3.3.x` into `master`.' }}
67+
68+
- name: Mark job as succeeded
69+
if: always()
70+
run: echo "Merge check completed. Ignoring the result to avoid failed status."
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Merge 3.3.x into master
2+
3+
on:
4+
push:
5+
branches:
6+
- 3.3.x
7+
8+
jobs:
9+
merge-branch:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/create-github-app-token@v1
14+
id: app-token
15+
with:
16+
app-id: ${{ vars.MERGE_MASTER_APP_ID }}
17+
private-key: ${{ secrets.MERGE_MASTER_SECRET }}
18+
19+
- name: Checkout the repository
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0 # Fetch full history for proper merging
23+
ref: 3.3.x # Checkout the 3.3.x branch
24+
token: ${{ steps.app-token.outputs.token }}
25+
26+
- name: Fetch the latest commit information
27+
id: get-commit-info
28+
run: |
29+
# Get the latest commit SHA and its author details
30+
COMMIT_SHA=$(git rev-parse HEAD)
31+
COMMIT_AUTHOR_NAME=$(git log -1 --pretty=format:'%an' $COMMIT_SHA)
32+
COMMIT_AUTHOR_EMAIL=$(git log -1 --pretty=format:'%ae' $COMMIT_SHA)
33+
34+
# Save them as output for later steps
35+
echo "commit_sha=$COMMIT_SHA" >> $GITHUB_ENV
36+
echo "commit_author_name=$COMMIT_AUTHOR_NAME" >> $GITHUB_ENV
37+
echo "commit_author_email=$COMMIT_AUTHOR_EMAIL" >> $GITHUB_ENV
38+
39+
- name: Set up Git with the pull request author's info
40+
run: |
41+
git config --global user.name "${{ env.commit_author_name }}"
42+
git config --global user.email "${{ env.commit_author_email }}"
43+
44+
- name: Fetch all branches
45+
run: git fetch --all
46+
47+
- name: Merge 3.3.x into master
48+
run: |
49+
git checkout master
50+
if git merge --no-ff 3.3.x; then
51+
echo "merge_failed=false" >> $GITHUB_ENV
52+
else
53+
echo "merge_failed=true" >> $GITHUB_ENV
54+
fi
55+
56+
- name: Push changes to master if merge was successful
57+
if: env.merge_failed == 'false'
58+
run: git push origin master
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/tests.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ jobs:
137137
db: "mysql:5.7"
138138
- php: '8.3'
139139
db: "mariadb:10.2"
140+
- php: '8.4'
141+
db: "mysql:8.0"
142+
- php: '8.4'
143+
db: "mariadb:10.3"
140144

141145
name: PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }}
142146

@@ -272,6 +276,8 @@ jobs:
272276
db: "postgres:9.5"
273277
- php: '8.3'
274278
db: "postgres:9.5"
279+
- php: '8.4'
280+
db: "postgres:9.5"
275281

276282
name: PHP ${{ matrix.php }} - ${{ matrix.db }}
277283

@@ -364,7 +370,7 @@ jobs:
364370
365371
# Other database types, namely sqlite3 and mssql
366372
other-tests:
367-
runs-on: ubuntu-latest
373+
runs-on: ubuntu-20.04
368374
strategy:
369375
matrix:
370376
include:
@@ -374,17 +380,17 @@ jobs:
374380
db: "mcr.microsoft.com/mssql/server:2017-latest"
375381
db_alias: 'MSSQL 2017'
376382
- php: '8.1'
377-
db: "mcr.microsoft.com/mssql/server:2019-latest"
383+
db: "mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04"
378384
db_alias: 'MSSQL 2019'
379385
- php: '8.1'
380-
db: "mcr.microsoft.com/mssql/server:2022-latest"
386+
db: "mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04"
381387
db_alias: 'MSSQL 2022'
382388

383389
name: PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }}
384390

385391
services:
386392
mssql:
387-
image: ${{ matrix.db != 'mcr.microsoft.com/mssql/server:2017-latest' && matrix.db != 'mcr.microsoft.com/mssql/server:2019-latest' && matrix.db != 'mcr.microsoft.com/mssql/server:2022-latest' && 'mcr.microsoft.com/mssql/server:2017-latest' || matrix.db }}
393+
image: ${{ matrix.db != 'mcr.microsoft.com/mssql/server:2017-latest' && matrix.db != 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' && matrix.db != 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' && 'mcr.microsoft.com/mssql/server:2017-latest' || matrix.db }}
388394
env:
389395
SA_PASSWORD: "Pssw0rd_12"
390396
ACCEPT_EULA: "y"
@@ -416,7 +422,7 @@ jobs:
416422
env:
417423
MATRIX_DB: ${{ matrix.db }}
418424
run: |
419-
if [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2017-latest' ] || [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2019-latest' ] || [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2022-latest' ]
425+
if [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2017-latest' ] || [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2019-CU27-ubuntu-20.04' ] || [ $MATRIX_DB == 'mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04' ]
420426
then
421427
db='mssql'
422428
else
@@ -480,7 +486,7 @@ jobs:
480486
strategy:
481487
matrix:
482488
type: ['unit', 'functional']
483-
php: ['8.1', '8.2']
489+
php: ['8.1', '8.2', '8.3']
484490
db: ['postgres']
485491

486492
name: Windows - ${{ matrix.type }} - PHP ${{ matrix.php }} - ${{ matrix.db }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141

4242
# Excludes test / dev files
4343
/phpunit.xml
44+
/.phpunit.result.cache
4445
/phpBB/composer.phar
4546
/tests/phpbb_unit_tests.sqlite*
4647
/tests/test_config*.php

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ We have unit and functional tests in order to prevent regressions. You can view
4242

4343
Branch | Description | GitHub Actions |
4444
------- | ----------- | -------------- |
45-
**master** | Latest development version | ![Tests](https://github.com/phpbb/phpbb/workflows/Tests/badge.svg?branch=master) |
46-
**3.3.x** | Development of version 3.3.x | ![Tests](https://github.com/phpbb/phpbb/workflows/Tests/badge.svg?branch=3.3.x) |
45+
**master** | Latest development version | ![Tests](https://github.com/phpbb/phpbb/actions/workflows/tests.yml/badge.svg?branch=master) |
46+
**3.3.x** | Development of version 3.3.x | ![Tests](https://github.com/phpbb/phpbb/actions/workflows/tests.yml/badge.svg?branch=3.3.x) |
4747

4848
## 📜 License
4949

build/build.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
44
<!-- a few settings for the build -->
55
<property name="newversion" value="4.0.0-a1-dev" />
6-
<property name="prevversion" value="3.3.12" />
7-
<property name="olderversions" value="3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.1.12, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.2.8, 3.2.9, 3.2.10, 3.2.11, 3.3.0, 3.3.1, 3.3.2, 3.3.3, 3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.3.10, 3.3.11" />
6+
<property name="prevversion" value="3.3.14" />
7+
<property name="olderversions" value="3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.1.12, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.2.8, 3.2.9, 3.2.10, 3.2.11, 3.3.0, 3.3.1, 3.3.2, 3.3.3, 3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.9, 3.3.10, 3.3.11, 3.3.12, 3.3.13" />
88
<!-- no configuration should be needed beyond this point -->
99

1010
<property name="oldversions" value="${olderversions}, ${prevversion}" />
@@ -181,6 +181,7 @@
181181

182182
<!-- create an empty config.php file (not for diffs) -->
183183
<touch file="build/new_version/phpBB3/config.php" />
184+
<copy file="build/new_version/phpBB3/vendor-ext/.htaccess" tofile="build/new_version/phpBB3/vendor/.htaccess" />
184185

185186
</target>
186187

composer.phar

18.9 KB
Binary file not shown.

git-tools/hooks/commit-msg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ do
224224
"footer")
225225
err=$ERR_FOOTER;
226226
# Each ticket is on its own line
227-
echo "$line" | grep -Eq "^PHPBB3-[0-9]+$";
227+
echo "$line" | grep -Eq "^PHPBB3?-[0-9]+$";
228228
;;
229229
"eof")
230230
err=$ERR_EOF;
@@ -356,7 +356,7 @@ echo "$expecting" | grep -q "eof" || (
356356
# Check the branch ticket is mentioned, doesn't make sense otherwise
357357
if [ $ticket -gt 0 ]
358358
then
359-
echo "$tickets" | grep -Eq "\bPHPBB3-$ticket\b" || (
359+
echo "$tickets" | grep -Eq "\bPHPBB3?-$ticket\b" || (
360360
complain "Ticket ID [$ticket] of branch missing from list of tickets:" >&2;
361361
complain "$tickets" | sed 's/ /\n/g;s/^/* /g' >&2;
362362
quit $ERR_FOOTER;

git-tools/hooks/prepare-commit-msg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ then
4747
# Branch is prefixed with 'ticket/', append ticket ID to message
4848
if [ "$branch" != "${branch##ticket/}" ];
4949
then
50-
tail="$(printf '\n\nPHPBB3-%s' "$ticket_id")";
50+
tail="$(printf '\n\nPHPBB-%s' "$ticket_id")";
5151
fi
5252
fi
5353

0 commit comments

Comments
 (0)