2024-06-19, 06:39 PM
(This post was last modified: 2024-06-26, 05:45 PM by Devilshakerz. Edited 1 time in total.)
Working with the New Codebase
Starting with version 1.9, developed on the
This means that instead of copying third-party code into its own repository, various libraries and packages are declared in the
Additionally, MyBB's own code structures added under
Before MyBB can run, the packages and related information need to be downloaded and built using
Running MyBB 1.9 from Source
The following options are available to run the latest development version of MyBB 1.9:
Source Updates: Regular code changes in the repository that don't affect dependencies (
Dependencies Self-Check
During runtime, MyBB's initialization includes the
MyBB checks for the existence of Composer-generated files and, if missing, displays a relevant error.
If you encounter a Dependencies Not Installed (code 48) error, make sure that your installation has an
You can also cross-reference the content of
Starting with version 1.9, developed on the
dev-1.9
branch, MyBB's dependencies are managed using Composer.This means that instead of copying third-party code into its own repository, various libraries and packages are declared in the
composer.json
file. The corresponding complete list of dependencies, and their specific versions, are determined by the composer update
utility, which generates the composer.lock
file. These files are updated by contributors, and checked into the repository.Additionally, MyBB's own code structures added under
inc/src/
follow a common standard that allows their use without explicit include
or require
statements in PHP - with namespace-based use
declarations (see example).Before MyBB can run, the packages and related information need to be downloaded and built using
composer install
. The command may be run manually or included in various scripts, and will be part of the release process.Running MyBB 1.9 from Source
The following options are available to run the latest development version of MyBB 1.9:
- 📦 Using the Automated Build Package (local or remote server)
Easiest with an existing compatible server (PHP 8.2 or newer) and database system
This package contains both MyBB's source code and installed dependencies (inc/vendor/
).
Download Automated Build Package (.zip)
The file is generated automatically on GitHub when the repository is updated.
You can also download a package (Artifact) for selected runs of the Build Package Action, generated after changes are pushed to the repository.
When placed on the web server and accessed with a browser, the application should redirect to MyBB installation.
- 💻 By running Composer (locally)
Easiest for development and testing
With Composer installed on your system, download MyBB from the repository branch, and run the following command in the directory:
composer install
Alternatively, to leave out dependencies used only for development tools, use:
composer install --no-dev
This will produce the same (or similar) set of files as in the Build Package above.
When placed on the web server and accessed with a browser, the application should redirect to MyBB installation.
- 🐳 Using Docker Compose (local environment)
Easiest for testing different server versions
Use Quick Start instructions for our Docker development stack, with all services necessary for MyBB (nginx, PHP, database system) running in containers.
This avoids the need to install, configure, or replace each component on your host system.
The Composer installation command will be executed automatically, and MyBB will attempt automated installation.
- 🌐 On GitHub Codespaces (remote environment)
Easiest for simple experiments, with a GitHub account
GitHub offers a free quota for Codespaces, an in-browser IDE and server.
When logged in, open thedev-1.9
branch and use the Code → Codespaces button to launch, and wait for the build script to make the temporary server available.
MyBB will be installed automatically with a SQLite database.
You can also use VSCode locally.
Source Updates: Regular code changes in the repository that don't affect dependencies (
composer.json
, composer.lock
) can usually be applied by simply overwriting selected source code files in your installation, similarly to MyBB 1.8.Dependencies Self-Check
During runtime, MyBB's initialization includes the
inc/src/bootstrap.php
file, which makes custom and third-party code known and ready for automatic inclusion.MyBB checks for the existence of Composer-generated files and, if missing, displays a relevant error.
If you encounter a Dependencies Not Installed (code 48) error, make sure that your installation has an
inc/vendor/
directory - containing a number of folders and an autoload.php
file.You can also cross-reference the content of
inc/vendor/
with the generated Build Packages above.