Skip to content

Commit 8467a08

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents e063cf0 + 736ec35 commit 8467a08

584 files changed

Lines changed: 10245 additions & 13455 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.

.devcontainer/Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
# Debian version
2-
ARG VARIANT="buster"
2+
ARG VARIANT="bookworm"
33
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
44

55
# Install PHP
6+
RUN apt-get -y update && apt-get -y install software-properties-common
7+
RUN add-apt-repository ppa:ondrej/php
68
RUN apt-get -y update
7-
RUN apt-get -y install php php-xml php-mbstring php-curl php-zip php-xdebug
9+
RUN apt-get -y install php8.4 php8.4-xml php8.4-mbstring php8.4-curl php8.4-zip php8.4-xdebug
810

911
# Install Composer
1012
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
1113

1214
# Install MySQL
13-
RUN apt-get -y install mysql-server php-mysql
15+
RUN apt-get -y install mysql-server php8.4-mysql
1416

1517
# Xdebug
16-
ADD resources/xdebug.ini /etc/php/8.1/apache2/conf.d/xdebug.ini
18+
ADD resources/xdebug.ini /etc/php/8.4/apache2/conf.d/xdebug.ini
1719

1820
# Configure Apache
1921
RUN echo "Listen 8080" >> /etc/apache2/ports.conf && \

.devcontainer/devcontainer.json renamed to .devcontainer/customisations-team/devcontainer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
22
// https://github.com/microsoft/vscode-dev-containers/tree/v0.238.1/containers/ubuntu
33
{
4-
"name": "Ubuntu",
4+
"name": "phpBB (Customisations Team)",
55
"build": {
6-
"dockerfile": "Dockerfile",
7-
// Update 'VARIANT' to pick an Ubuntu version: jammy / ubuntu-22.04, focal / ubuntu-20.04, bionic /ubuntu-18.04
8-
// Use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon.
9-
"args": { "VARIANT": "ubuntu-22.04" }
6+
"dockerfile": "../Dockerfile",
7+
"args": {
8+
"VARIANT": "ubuntu-22.04"
9+
}
1010
},
1111

1212
// Configure tool-specific properties.
@@ -27,7 +27,7 @@
2727
"forwardPorts": [80, 9003],
2828

2929
// Use 'postCreateCommand' to run commands after the container is created.
30-
"postStartCommand": "bash .devcontainer/resources/setup.sh",
30+
"postStartCommand": "bash .devcontainer/customisations-team/setup.sh",
3131

3232
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
3333
"remoteUser": "vscode",
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
installer:
2+
admin:
3+
name: admin
4+
password: adminadmin
5+
email: admin@example.org
6+
7+
board:
8+
lang: en
9+
name: My Board (with Titania)
10+
description: My amazing new phpBB board (with Titania)
11+
12+
database:
13+
dbms: mysqli
14+
dbhost: 127.0.0.1
15+
dbport: 3306
16+
dbuser: phpbb
17+
dbpasswd: phpbb
18+
dbname: phpbb
19+
table_prefix: phpbb_
20+
21+
email:
22+
enabled: false
23+
smtp_delivery : ~
24+
smtp_host: ~
25+
smtp_port: ~
26+
smtp_user: ~
27+
smtp_pass: ~
28+
29+
server:
30+
cookie_secure: false
31+
server_protocol: http://
32+
force_server_vars: true
33+
server_name: localhost
34+
server_port: 80
35+
script_path: /
36+
37+
extensions: ["phpbb/titania"]
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# setup.sh - Customisations Team
2+
# Commands to install and configure phpBB
3+
echo "[Codespaces] Customisations Team configuration..."
4+
5+
# Start MySQL
6+
echo "[Codespaces] Start MySQL"
7+
sudo service mysql start
8+
9+
# Start Apache
10+
echo "[Codespaces] Start Apache"
11+
sudo apache2ctl start
12+
13+
# Create a MySQL user to use
14+
echo "[Codespaces] Create MySQL user"
15+
sudo mysql -u root<<EOFMYSQL
16+
CREATE USER 'phpbb'@'localhost' IDENTIFIED BY 'phpbb';
17+
GRANT ALL PRIVILEGES ON *.* TO 'phpbb'@'localhost' WITH GRANT OPTION;
18+
CREATE DATABASE IF NOT EXISTS phpbb;
19+
EOFMYSQL
20+
21+
# Symlink the webroot so it can be viewed
22+
echo "[Codespaces] Create Symlink of webroot"
23+
sudo rm -rf /var/www/html
24+
sudo ln -s /workspaces/phpbb/phpBB /var/www/html
25+
26+
# Force the server URL to reflect the Codespace
27+
# https://docs.github.com/en/codespaces/developing-in-a-codespace/default-environment-variables-for-your-codespace
28+
if [ "$CODESPACES" = true ] ; then
29+
cp /workspaces/phpbb/.devcontainer/customisations-team/phpbb-config.yml /tmp/phpbb-config.yml
30+
CODESPACES_URL="${CODESPACE_NAME}-80.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}"
31+
echo "[Codespaces] Set the phpBB server name using default environment variables: $CODESPACES_URL"
32+
sed -i "s/localhost/$CODESPACES_URL/g" /tmp/phpbb-config.yml
33+
fi
34+
35+
URL_EPV="https://github.com/phpbb/epv"
36+
URL_TV="https://github.com/phpbb/phpbb-translation-validator"
37+
URL_TITANIA="https://github.com/phpbb/customisation-db.git"
38+
39+
# Install Titania
40+
echo "[Codespaces] Install Titania"
41+
cd /workspaces/
42+
git clone -b oberon $URL_TITANIA titania
43+
cd /workspaces/titania
44+
chmod 755 files store
45+
composer install --no-interaction
46+
chmod 755 /workspaces/phpbb/phpBB/ext
47+
mkdir /workspaces/phpbb/phpBB/ext/phpbb
48+
sudo ln -s /workspaces/titania /workspaces/phpbb/phpBB/ext/phpbb/titania
49+
50+
# Install EPV
51+
echo "[Codespaces] Install EPV"
52+
cd /workspaces/
53+
git clone -b master $URL_EPV epv
54+
cd /workspaces/epv
55+
composer install --no-interaction
56+
rm -rf /workspaces/phpbb/phpBB/ext/phpbb/titania/vendor/phpbb/epv
57+
sudo ln -s /workspaces/epv /workspaces/phpbb/phpBB/ext/phpbb/titania/vendor/phpbb/epv
58+
59+
# Install Translation Validator
60+
echo "[Codespaces] Install Translation Validator"
61+
cd /workspaces/
62+
git clone -b master $URL_TV translation-validator
63+
cd /workspaces/translation-validator
64+
composer install --no-interaction
65+
rm -rf /workspaces/phpbb/phpBB/ext/phpbb/titania/vendor/phpbb/translation-validator
66+
sudo ln -s /workspaces/translation-validator /workspaces/phpbb/phpBB/ext/phpbb/titania/vendor/phpbb/translation-validator
67+
68+
# Install phpBB (last so that the extension is auto-installed)
69+
echo "[Codespaces] Run phpBB CLI installation"
70+
cd /workspaces/phpbb/phpBB && composer install --no-interaction
71+
sudo php /workspaces/phpbb/phpBB/install/phpbbcli.php install /tmp/phpbb-config.yml
72+
rm -rf /workspaces/phpbb/phpBB/install
73+
74+
# Set to debug mode
75+
sed -i \
76+
-e "s|@define('PHPBB_ENVIRONMENT', 'production');|@define('PHPBB_ENVIRONMENT', 'development');|" \
77+
-e "s|// *@define('DEBUG_CONTAINER', true);|@define('DEBUG_CONTAINER', true);|" \
78+
/workspaces/phpbb/phpBB/config.php
79+
80+
# Finished
81+
echo "[Codespaces] phpBB (Customisation Team) installation completed"
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.238.1/containers/ubuntu
3+
{
4+
"name": "phpBB (Development Team)",
5+
"build": {
6+
"dockerfile": "../Dockerfile",
7+
"args": {
8+
"VARIANT": "ubuntu-22.04"
9+
}
10+
},
11+
12+
// Configure tool-specific properties.
13+
"customizations": {
14+
// Configure properties specific to VS Code.
15+
"vscode": {
16+
"settings": {
17+
// Allow Xdebug to listen to requests from remote (or container)
18+
"remote.localPortHost": "allInterfaces"
19+
},
20+
//"devPort": {},
21+
// Specify which VS Code extensions to install (List of IDs)
22+
"extensions": ["xdebug.php-debug"]
23+
}
24+
},
25+
26+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
27+
"forwardPorts": [80, 9003],
28+
29+
// Use 'postCreateCommand' to run commands after the container is created.
30+
"postStartCommand": "bash .devcontainer/development-team/setup.sh",
31+
32+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
33+
"remoteUser": "vscode",
34+
"features": {
35+
"github-cli": "latest"
36+
}
37+
}

.devcontainer/resources/phpbb-config.yml renamed to .devcontainer/development-team/phpbb-config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ installer:
2323
smtp_delivery : ~
2424
smtp_host: ~
2525
smtp_port: ~
26-
smtp_auth: ~
2726
smtp_user: ~
2827
smtp_pass: ~
2928

Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
# setup.sh
1+
# setup.sh - Development Team
22
# Commands to install and configure phpBB
3+
echo "[Codespaces] Development Team configuration..."
34

45
# Start MySQL
56
echo "[Codespaces] Start MySQL"
67
sudo service mysql start
78

89
# Start Apache
910
echo "[Codespaces] Start Apache"
10-
sudo service apache2 start
11-
12-
# Add SSH key
13-
echo "[Codespaces] Add SSH key"
14-
echo "$SSH_KEY" > /home/vscode/.ssh/id_rsa && chmod 600 /home/vscode/.ssh/id_rsa
11+
sudo apache2ctl start
1512

1613
# Create a MySQL user to use
1714
echo "[Codespaces] Create MySQL user"
@@ -30,23 +27,24 @@ echo "[Codespaces] Create Symlink of webroot"
3027
sudo rm -rf /var/www/html
3128
sudo ln -s /workspaces/phpbb/phpBB /var/www/html
3229

33-
# Copy phpBB config
34-
echo "[Codespaces] Copy phpBB configuration"
35-
cp /workspaces/phpbb/.devcontainer/resources/phpbb-config.yml /workspaces/phpbb/phpBB/install/install-config.yml
36-
3730
# Force the server URL to reflect the Codespace
3831
# https://docs.github.com/en/codespaces/developing-in-a-codespace/default-environment-variables-for-your-codespace
3932
if [ "$CODESPACES" = true ] ; then
40-
echo "[Codespaces] Set the phpBB server name using default environment variables"
41-
codespaces_url="${CODESPACE_NAME}-80.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}"
42-
sed -i "s/localhost/$codespaces_url/g" /workspaces/phpbb/phpBB/install/install-config.yml
33+
cp /workspaces/phpbb/.devcontainer/development-team/phpbb-config.yml /tmp/phpbb-config.yml
34+
CODESPACES_URL="${CODESPACE_NAME}-80.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}"
35+
echo "[Codespaces] Set the phpBB server name using default environment variables: $CODESPACES_URL"
36+
sed -i "s/localhost/$CODESPACES_URL/g" /tmp/phpbb-config.yml
4337
fi
4438

39+
# Copy phpBB config
40+
# echo "[Codespaces] Copy phpBB configuration"
41+
# cp /workspaces/phpbb/.devcontainer/resources/phpbb-config.yml /workspaces/phpbb/phpBB/install/install-config.yml
42+
4543
# Install phpBB
4644
echo "[Codespaces] Run phpBB CLI installation"
4745
cd /workspaces/phpbb/phpBB && composer install --no-interaction
48-
sudo php /workspaces/phpbb/phpBB/install/phpbbcli.php install /workspaces/phpbb/phpBB/install/install-config.yml
46+
sudo php /workspaces/phpbb/phpBB/install/phpbbcli.php install /tmp/phpbb-config.yml
4947
rm -rf /workspaces/phpbb/phpBB/install
5048

5149
# Finished
52-
echo "[Codespaces] phpBB installation completed"
50+
echo "[Codespaces] phpBB (Development Team) installation completed"

.github/check-js.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ set +x
1414
sudo npm install -g > /dev/null
1515
npm ci > /dev/null
1616
set -x
17-
node_modules/eslint/bin/eslint.js "phpBB/**/*.js"
18-
node_modules/eslint/bin/eslint.js "phpBB/**/*.js.twig"
17+
node_modules/eslint/bin/eslint.js "phpBB/**/*.js" --ignore-pattern "phpBB/ext/"
18+
node_modules/eslint/bin/eslint.js "phpBB/**/*.js.twig" --ignore-pattern "phpBB/ext/"
1919
node_modules/eslint/bin/eslint.js "gulpfile.js"

.github/phpunit-mariadb-github.xml

Lines changed: 46 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,48 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="true"
3-
backupStaticAttributes="false"
4-
colors="true"
5-
convertErrorsToExceptions="true"
6-
convertNoticesToExceptions="true"
7-
convertWarningsToExceptions="true"
8-
processIsolation="false"
9-
stopOnFailure="false"
10-
verbose="true"
11-
bootstrap="../tests/bootstrap.php">
12-
<testsuites>
13-
<testsuite name="phpBB Test Suite">
14-
<directory suffix="_test.php">../tests</directory>
15-
<exclude>../tests/functional</exclude>
16-
<exclude>../tests/lint_test.php</exclude>
17-
</testsuite>
18-
<testsuite name="phpBB Functional Tests">
19-
<directory suffix="_test.php">../tests/functional</directory>
20-
</testsuite>
21-
</testsuites>
22-
23-
<groups>
24-
<exclude>
25-
<group>slow</group>
26-
</exclude>
27-
</groups>
28-
29-
<php>
30-
<server name="PHPBB_TEST_DBMS" value="mysqli" />
31-
<server name="PHPBB_TEST_DBHOST" value="0.0.0.0" />
32-
<server name="PHPBB_TEST_DBPORT" value="3306" />
33-
<server name="PHPBB_TEST_DBNAME" value="phpbb_tests" />
34-
<server name="PHPBB_TEST_DBUSER" value="root" />
35-
<server name="PHPBB_TEST_DBPASSWD" value="" />
36-
<server name="PHPBB_TEST_TABLE_PREFIX" value="phpbb_"/>
37-
<server name="PHPBB_FUNCTIONAL_URL" value="http://localhost/" />
38-
</php>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
backupGlobals="true"
4+
colors="true"
5+
processIsolation="false"
6+
stopOnFailure="false"
7+
bootstrap="../tests/bootstrap.php"
8+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
9+
cacheDirectory=".phpunit.cache"
10+
backupStaticProperties="false">
11+
<testsuites>
12+
<testsuite name="phpBB Test Suite">
13+
<directory suffix="_test.php">../tests</directory>
14+
<exclude>../tests/functional</exclude>
15+
<exclude>../tests/lint_test.php</exclude>
16+
</testsuite>
17+
<testsuite name="phpBB Functional Tests">
18+
<directory suffix="_test.php">../tests/functional</directory>
19+
</testsuite>
20+
</testsuites>
21+
<groups>
22+
<exclude>
23+
<group>slow</group>
24+
</exclude>
25+
</groups>
26+
<source restrictDeprecations="true">
27+
<include>
28+
<directory suffix=".php">../phpBB/</directory>
29+
<directory suffix=".php">../tests/</directory>
30+
</include>
31+
<exclude>
32+
<directory suffix=".php">../phpBB/vendor/</directory>
33+
<directory suffix=".php">../phpBB/cache/</directory>
34+
<directory suffix=".php">../phpBB/develop/</directory>
35+
<directory suffix=".php">../phpBB/store/</directory>
36+
</exclude>
37+
</source>
38+
<php>
39+
<server name="PHPBB_TEST_DBMS" value="mysqli"/>
40+
<server name="PHPBB_TEST_DBHOST" value="0.0.0.0"/>
41+
<server name="PHPBB_TEST_DBPORT" value="3306"/>
42+
<server name="PHPBB_TEST_DBNAME" value="phpbb_tests"/>
43+
<server name="PHPBB_TEST_DBUSER" value="root"/>
44+
<server name="PHPBB_TEST_DBPASSWD" value=""/>
45+
<server name="PHPBB_TEST_TABLE_PREFIX" value="phpbb_"/>
46+
<server name="PHPBB_FUNCTIONAL_URL" value="http://localhost/"/>
47+
</php>
3948
</phpunit>

0 commit comments

Comments
 (0)