Tools for phpBB packages: two Bash scripts that build release zips (one for extensions, one for language packs), and a local test board for smoke-testing extensions (phpbb-test-board/).
| Script | Builds | Zip name |
|---|---|---|
git-release.sh |
A phpBB extension | <vendor>-<name>-<version>.zip, from composer.json |
git-release-langpack.sh |
A phpBB language pack for the phpBB.com Customisation Database | <languagename>_<version>.zip |
Both scripts build the zip from the current git commit (HEAD), so uncommitted changes are not included. Files marked export-ignore in .gitattributes are left out. They were written and tested on Linux.
git-release.sh:git,jq,zipgit-release-langpack.sh:git,curl,jq,unzip,zip. For--checkalsophp,composerandsha256sum.phpbb-test-board/:git,php(with thesqlite3extension),composer,curl,jq,openssl, Python 3 withvenv, and ImageMagick'sconvertfor the reassignthumbs feature check. The Python scripts create and use their own virtualenv (phpbb-test-board/.venv) on first run.
Run it inside the extension's git repository. composer.json must have a name (vendor/name) and a version.
git-release.shThe zip is written to ../git-exported, next to the repository. Its top folder is vendor/name/.
Run it inside the language pack's git repository. With no arguments it prints help.
git-release-langpack.sh --check --release--checkruns the phpBB Translation Validator (branch1.6.x, phpBB 3.3 only) on the exact zip contents. It uses the English files of the official phpBB release zip as the reference, checked against phpBB's published SHA-256.--releasebuilds<languagename>_<version>.zipwith a folder of the same name inside. Onlyext/,language/andstyles/are included, because the Language Pack Validation Policy does not allow other files.- With both options, the zip is written only if validation passes.
- The version defaults to the current stable phpBB 3.3 release from
https://version.phpbb.com/phpbb/versions.json. Use--versionto set it, for example--version 3.3.16.
Run git-release-langpack.sh --help for all options.
Builds a local phpBB board on SQLite and runs an extension on it with PHP error logging on, to catch problems that validation and syntax checks miss, such as pages that crash at runtime, forms that can never submit, or an extension that can't be enabled on a fresh board. For local testing only; never expose the board to a network.
phpbb-test-board/setup-board.sh -d ~/phpbb-test-board
export PHPBB_TEST_BOARD=~/phpbb-test-board
phpbb-test-board/smoke_test.py path/to/extension --ref origin/main
phpbb-test-board/feature_checks.py path/to/extension@origin/mainFor an extension that needs another one, pass the other extension's checkout with --with (repeat it for several, in the order they must be enabled):
phpbb-test-board/smoke_test.py path/to/sfscompanion --with path/to/stopforumspamsetup-board.shinstalls the current phpBB 3.3 release (or--version) with no extensions, and keeps a clean copy of the database so every test starts from the same state. The admin password is generated and stored only inboard.env.smoke_test.pyinstalls the extension from git, loads board pages as a guest and as the admin, the extension's routes, ACP/MCP/UCP modules and cron tasks, then disables, deletes data and re-enables it. It reports any server error, empty page, phpBB debug notice or PHP error-log entry.feature_checks.pyexercises the main feature of the phpbbmodders extensions listed in its--help(for example: a moderator can't warn a user in an unticked group). Add a check for a new extension in itsCHECKStable.- The board is restored after each run. Each script has
--help. --withextensions are installed and enabled before the extension under test and stay enabled; only the extension under test goes through the disable and delete data round trip.feature_checks.pyinstalls a--withextension only for the extensions whosecomposer.jsonrequires it. Ifcomposer.jsonrequires a package you didn't supply, the scripts print a note naming it.
tests/test-release-scripts.sh
tests/test-phpbb-test-board.shThe tests run in a temporary directory; the release script tests are offline, and the test-board tests only check options and errors (the first run creates the Python virtualenv). GitHub Actions runs them, and ShellCheck, on every pull request.
Contributions are welcome!
- Bug reports: Open an issue.
- Everything else (questions, feature requests, ideas, general discussion): Use Discussions.
- Pull requests are welcome for bug fixes or discussed features.
- Code review, bug fixes, and documentation assisted by Claude.
This project is licensed under the GNU General Public License v2.0.
See LICENSE for more information.