Poll: Which method do you find most convenient?
You do not have permission to vote in this poll.
Using the Build Package
68.18%
15 68.18%
Using Composer myself
22.73%
5 22.73%
Using Docker
4.55%
1 4.55%
Using GitHub Codespaces
4.55%
1 4.55%
Total 22 vote(s) 100%
* You voted for this item. [Show Results]

Quick Start: Installing MyBB 1.9 Development Version
#1
Working with the New Codebase

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.



  • [Image: 19-codespaces-steps.gif]🌐 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 the dev-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
[Image: 19-error-dependencies-not-installed-frame.png]


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.
Reply
#2
Even though I'm used to manual installation, composer and docker are of great benefit.
MyBB Türkçe Destek Sitesi: https://mybbturkce.com

Please! Do not request support via private message unless I give permission. If you want paid consulting, you can contact us.
Reply
#3
Old school guy, I prefer manual.
I like to know exactly what is installed on my server, this is not a question about trust but a personnal preference.
Tchat en français
Do not ask me help through PM or Discord

Reply
#4
(2024-06-19, 09:53 PM)Crazycat Wrote: Old school guy, I prefer manual.
I like to know exactly what is installed on my server, this is not a question about trust but a personnal preference.
me too
No support via PM, email, telephone, home visit, Discord, Telegram, WhatsApp and other useless tools
Reply
#5
I'm not a pro at this and I tried to install 1.9 on xampp, and I can't seem to figure out these two problems:
1. I keep getting this error while installing the dependencies
Class Unit\Utilities\DecoratorTest located in ./tests/Unit/Utilities/DecoratorTest.php does not comply with psr-4 autoloading standard (rule: MyBB\Tests\ => ./tests). Skipping.
Class MyBB\View\LocatorTest located in ./tests/Unit/View/LocatorTest.php does not comply with psr-4 autoloading standard (rule: MyBB\Tests\ => ./tests). Skipping.

2. I can't seem to be able to figure out how to install a new theme for testing. Also, with the current base theme, I think the security image portion is missing for when you try to create an account. I keep getting the error
The image verification code that you entered was incorrect. Please enter the code exactly how it appears in the image.
Reply
#6
Thanks, the autoloading errors should be fixed now.

New themes can be created in inc/themes/ and tested by changing the yet-hardcoded codename - this process is explained in detail here, with some examples: https://community.mybb.com/thread-241300.html

Quote:Also, with the current base theme, I think the security image portion is missing for when you try to create an account. I keep getting the error
The image verification code that you entered was incorrect. Please enter the code exactly how it appears in the image.

It may be the case if the gd PHP extension is missing. It looks like it's not currently installed in the Codespaces setup by default either.
devilshakerz.com/pgp (DF3A 34D9 A627 42E5 BC6A 6750 1F2F B8AA 28FF E1BC) ▪ keybase.io/devilshakerz
Reply
#7
Thank you for your help. I've got it running correctly now!
Time to explore this new theme system
I feel like there's gonna be a lot to learn lol
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)