Skip to content

Commit 0b1fb2c

Browse files
authored
Merge branch '5.1-dev' into 5.0_Unused_imports
2 parents 12c5ef1 + bd1f055 commit 0b1fb2c

File tree

1,386 files changed

+12868
-9060
lines changed

Some content is hidden

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

1,386 files changed

+12868
-9060
lines changed

.appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,16 @@ hosts:
4848
openldap: 127.0.0.1
4949

5050
services:
51-
- mysql
5251
- iis
5352

5453
before_test:
5554
# Run openldap docker image
5655
- ps: docker pull bitnami/openldap:2.6.3
5756
- ps: docker run --rm --name openldap --publish 1389:1389 --publish 1636:1636 -v ${pwd}\tests\certs:/certificates --env LDAP_ADMIN_USERNAME=admin --env LDAP_ADMIN_PASSWORD=adminpassword --env LDAP_USERS=customuser --env LDAP_PASSWORDS=custompassword --env LDAP_ENABLE_TLS=yes --env LDAP_TLS_CERT_FILE=/certificates/openldap.crt --env LDAP_TLS_KEY_FILE=/certificates/openldap.key --env LDAP_TLS_CA_FILE=/certificates/CA.crt --env BITNAMI_DEBUG=true --env LDAP_CONFIG_ADMIN_ENABLED=yes --env LDAP_CONFIG_ADMIN_USERNAME=admin --env LDAP_CONFIG_ADMIN_PASSWORD=configpassword -d bitnami/openldap:2.6.3
5857
# Database setup for MySQL via PowerShell tools
58+
- ps: Start-Service MySQL80
5959
- >
60-
"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u root -p"Password12!" -e "CREATE DATABASE IF NOT EXISTS test_joomla;"
60+
"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql" -u root -p"Password12!" -e "CREATE DATABASE IF NOT EXISTS test_joomla;"
6161
# Wait till slapd has started
6262
- ps: |
6363
$Counter=0

.drone.yml

Lines changed: 62 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ clone:
66

77
steps:
88
- name: setup
9-
image: joomlaprojects/docker-images:php8.2
9+
image: joomlaprojects/docker-images:php8.3
1010
volumes:
1111
- name: certificates
1212
path: /certificates
1313
commands:
1414
- cp -v tests/certs/* /certificates/
1515

1616
- name: composer
17-
image: joomlaprojects/docker-images:php8.2
17+
image: joomlaprojects/docker-images:php8.3
1818
volumes:
1919
- name: composer-cache
2020
path: /tmp/composer-cache
@@ -39,7 +39,7 @@ steps:
3939
- ./libraries/vendor/bin/phan
4040

4141
- name: npm
42-
image: node:18-bullseye-slim
42+
image: node:20-bullseye-slim
4343
depends_on: [ phpcs ]
4444
volumes:
4545
- name: npm-cache
@@ -63,6 +63,13 @@ steps:
6363
- php -v
6464
- ./libraries/vendor/bin/phpunit --testsuite Unit
6565

66+
- name: php83-unit
67+
depends_on: [ phpcs ]
68+
image: joomlaprojects/docker-images:php8.3
69+
commands:
70+
- php -v
71+
- ./libraries/vendor/bin/phpunit --testsuite Unit
72+
6673
- name: php81-integration
6774
depends_on: [ npm ]
6875
image: joomlaprojects/docker-images:php8.1
@@ -77,6 +84,13 @@ steps:
7784
- php -v
7885
- ./libraries/vendor/bin/phpunit --testsuite Integration
7986

87+
- name: php83-integration
88+
depends_on: [ npm ]
89+
image: joomlaprojects/docker-images:php8.3
90+
commands:
91+
- php -v
92+
- ./libraries/vendor/bin/phpunit --testsuite Integration
93+
8094
- name: php81-integration-pgsql
8195
depends_on: [ npm ]
8296
image: joomlaprojects/docker-images:php8.1
@@ -91,6 +105,13 @@ steps:
91105
- php -v
92106
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist
93107

108+
- name: php83-integration-pgsql
109+
depends_on: [ npm ]
110+
image: joomlaprojects/docker-images:php8.3
111+
commands:
112+
- php -v
113+
- ./libraries/vendor/bin/phpunit --testsuite Integration --configuration phpunit-pgsql.xml.dist
114+
94115
- name: scss-cs
95116
depends_on: [ npm ]
96117
image: node:current-alpine
@@ -145,7 +166,7 @@ steps:
145166
- name: phpnext-system-mysql
146167
depends_on:
147168
- phpmax-system-mysql
148-
image: joomlaprojects/docker-images:cypress8.2
169+
image: joomlaprojects/docker-images:cypress8.3
149170
volumes:
150171
- name: cypress-cache
151172
path: /root/.cache/Cypress
@@ -184,7 +205,7 @@ steps:
184205
- name: phpnext-system-postgres
185206
depends_on:
186207
- phpmax-system-postgres
187-
image: joomlaprojects/docker-images:cypress8.2
208+
image: joomlaprojects/docker-images:cypress8.3
188209
volumes:
189210
- name: cypress-cache
190211
path: /root/.cache/Cypress
@@ -286,29 +307,39 @@ steps:
286307
- name: packager
287308
image: joomlaprojects/docker-images:packager
288309
environment:
289-
FTP_USERNAME:
290-
from_secret: ftpusername
291-
FTP_PASSWORD:
292-
from_secret: ftppassword
293-
FTP_HOSTNAME: ci.joomla.org
294-
FTP_PORT: "21"
295-
FTP_DEST_DIR: /artifacts
296-
FTP_VERIFY: "false"
297-
FTP_SECURE: "true"
298-
HTTP_ROOT: "https://ci.joomla.org/artifacts"
310+
HTTP_ROOT: "https://artifacts.joomla.org/drone"
299311
DRONE_PULL_REQUEST: DRONE_PULL_REQUEST
300312
DRONE_COMMIT: DRONE_COMMIT
313+
commands:
314+
- /bin/drone_prepare_package.sh
315+
316+
- name: upload
317+
image: joomlaprojects/docker-images:packager
318+
environment:
319+
package_key:
320+
from_secret: package_key
321+
package_user:
322+
from_secret: package_user
323+
package_host:
324+
from_secret: package_host
325+
package_root:
326+
from_secret: package_root
301327
GITHUB_TOKEN:
302328
from_secret: github_token
303329
commands:
304-
- if [ $DRONE_REPO_NAME != 'joomla-cms' ]; then echo "The packager only runs on the joomla/joomla-cms repo"; exit 0; fi
305-
- /bin/drone_build.sh
306-
volumes:
307-
- name: reference
308-
path: /reference
309-
when:
310-
repo:
311-
- joomla/joomla-cms
330+
- mkdir -p ~/.ssh
331+
- eval $(ssh-agent -s)
332+
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
333+
- echo "$package_key" > ~/.ssh/id_rsa
334+
- chmod 600 ~/.ssh/id_rsa
335+
- ssh-add
336+
- rclone config create package sftp host $package_host user $package_user port 22
337+
- rclone copy ./upload/ package:$package_root/$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST/downloads/$DRONE_BUILD_NUMBER
338+
- /bin/add_github_status.sh "Download" "Prebuilt packages are available for download." "https://artifacts.joomla.org/drone/${DRONE_REPO}/${DRONE_BRANCH}/${DRONE_PULL_REQUEST}/downloads/${DRONE_BUILD_NUMBER}"
339+
340+
trigger:
341+
repo:
342+
- joomla/joomla-cms
312343

313344
---
314345
kind: pipeline
@@ -323,7 +354,7 @@ steps:
323354
- mkdir -p transfer
324355
- date +%s > transfer/$MINORVERSION-time.txt
325356
- git rev-parse origin/$MINORVERSION-dev > transfer/$MINORVERSION.txt
326-
- php build/build.php --remote=origin/$MINORVERSION-dev --exclude-gzip --exclude-bzip2 --disable-patch-packages
357+
- php build/build.php --remote=origin/$MINORVERSION-dev --exclude-gzip --disable-patch-packages
327358
- mv build/tmp/packages/* transfer/
328359

329360
- name: upload
@@ -335,8 +366,8 @@ steps:
335366
from_secret: nightly_user
336367
nightly_host:
337368
from_secret: nightly_host
338-
RINGCENTRAL_WEBHOOK:
339-
from_secret: notification_url
369+
MATTERMOST_NIGHTLY_HOOK:
370+
from_secret: mattermost_nightly_hook
340371
commands:
341372
- export MINORVERSION=${DRONE_BRANCH%-*}
342373
- mkdir -p ~/.ssh
@@ -349,15 +380,15 @@ steps:
349380
- rclone delete nightly:/home/devj/public_html/nightlies/ --include "Joomla_$MINORVERSION.*"
350381
- rclone delete nightly:/home/devj/public_html/cache/com_content/
351382
- rclone copy ./transfer/ nightly:/home/devj/public_html/nightlies/
352-
- /bin/notify
383+
- curl -i -X POST -H 'Content-Type:application/json' -d '{"text":"Nightly Build for [Joomla 5.1](https://developer.joomla.org/nightly-builds.html) successfully built."}' $MATTERMOST_NIGHTLY_HOOK
353384

354385
- name: buildfailure
355386
image: joomlaprojects/docker-images:packager
356387
environment:
357-
RINGCENTRAL_WEBHOOK:
358-
from_secret: notification_url
388+
MATTERMOST_NIGHTLY_HOOK:
389+
from_secret: mattermost_nightly_hook
359390
commands:
360-
- /bin/notify
391+
- curl -i -X POST -H 'Content-Type:application/json' -d '{"text":"Nightly Build for [Joomla 5.1](https://developer.joomla.org/nightly-builds.html) FAILED to built."}' $MATTERMOST_NIGHTLY_HOOK
361392
when:
362393
status:
363394
- failure
@@ -372,6 +403,6 @@ trigger:
372403

373404
---
374405
kind: signature
375-
hmac: 45b19b7430edc5ec922ef32c2f2dcb284c7cbf7ba55eb295ba4d877cee0fe5a4
406+
hmac: c1434b09300896f8627ccb11c92e97878caf7a303772db01a647dca53a92fa3f
376407

377408
...

.github/workflows/cacert-update.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

.github/workflows/create-translation-pull-request-v4.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
fetch-depth: 0
2929
- uses: actions/setup-node@v3
3030
with:
31-
node-version: 16
31+
node-version: 20
3232

3333
- name: Fetch latest cms changes
3434
run: |
@@ -37,7 +37,7 @@ jobs:
3737
git remote add upstream https://github.com/joomla/joomla-cms.git
3838
git fetch upstream
3939
git checkout --progress --force -B translation refs/remotes/origin/translation
40-
git merge upstream/4.3-dev
40+
git merge upstream/4.4-dev
4141
4242
- name: Fetch and extract translations
4343
run: |
@@ -73,5 +73,5 @@ jobs:
7373
env:
7474
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
7575
run: |
76-
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "Translation Update" | grep -v "No pull" || \
77-
gh pr create --title "Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 4.3-dev
76+
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "[4.x] Translation Update" | grep -v "No pull" || \
77+
gh pr create --title "[4.x] Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 4.4-dev
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Create translation pull request
2+
3+
on:
4+
push:
5+
branches: [ translation ]
6+
7+
workflow_dispatch:
8+
9+
schedule:
10+
# Run daily at 7:32
11+
- cron: '32 7 * * *'
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
build:
18+
permissions:
19+
contents: write # for Git to git push
20+
runs-on: ubuntu-latest
21+
# Only run this action the translation-bot repository in the translation branch
22+
if: ${{ github.repository == 'joomla-translation-bot/joomla-cms' && github.ref == 'refs/heads/translation5' }}
23+
24+
steps:
25+
- uses: actions/checkout@v3
26+
# We need the full depth to create / update the pull request against the main repo
27+
with:
28+
fetch-depth: 0
29+
- uses: actions/setup-node@v3
30+
with:
31+
node-version: 20
32+
33+
- name: Fetch latest cms changes
34+
run: |
35+
git config user.name Translation Bot
36+
git config user.email [email protected]
37+
git remote add upstream https://github.com/joomla/joomla-cms.git
38+
git fetch upstream
39+
git checkout --progress --force -B translation5 refs/remotes/origin/translation5
40+
git merge upstream/5.0-dev
41+
42+
- name: Fetch and extract translations
43+
run: |
44+
cd ..
45+
wget -nv "https://github.com/joomla/core-translations/archive/refs/heads/main.zip"
46+
unzip main.zip
47+
48+
- name: Syncing directories
49+
# We use a simple copy paste syntax here if needed customization for different directories
50+
run: |
51+
cd ..
52+
SYNC_VERSION="v5"
53+
54+
SYNC_PATH="installation/language/"
55+
echo ${SYNC_PATH}
56+
rsync -i -rptgo --checksum --ignore-times --delete --exclude="*en-GB*" core-translations-main/joomla_${SYNC_VERSION}/translations/core/${SYNC_PATH} joomla-cms/${SYNC_PATH}
57+
58+
- name: Update static error pages
59+
run: |
60+
npm ci --ignore-scripts && node build/build.js --build-pages
61+
62+
- name: Create commit
63+
continue-on-error: true
64+
run: |
65+
git config user.name Translation Bot
66+
git config user.email [email protected]
67+
git add .
68+
git commit -m "Language update"
69+
git push --force
70+
71+
- name: Create pull request
72+
if: ${{ success() }}
73+
env:
74+
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
75+
run: |
76+
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "Translation Update" | grep -v "No pull" || \
77+
gh pr create --title "Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 5.0-dev

.php-cs-fixer.dist.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@
8686
'ordered_imports' => ['imports_order' => ['class', 'function', 'const'], 'sort_algorithm' => 'alpha'],
8787
// There should not be useless else cases
8888
'no_useless_else' => true,
89+
// Native function invocation
90+
'native_function_invocation' => ['include' => ['@compiler_optimized']],
8991
]
9092
)
9193
->setFinder($finder);

0 commit comments

Comments
 (0)