Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 2923

Extension Writers Discussion • Re: [Info] Using Github Actions to Test Extensions

$
0
0
That's unfortunate. Extensions allow for requiring a higher version of PHP than what phpBB requires and was hoping there was a var like PHP_VERSION or such. Otherwise, what's the point of allowing for higher PHP in extensions if testing still forces 7.2?
The 3.3.x branch uses the same PHP matrix as phpBB 3.3.x. This means that extensions are tested under the same conditions as phpBB. The master branch uses the same PHP matrix as phpBB master (version 4).

If you’re developing for 3.3.x, use the 3.3.x branch. If you’re developing for phpBB 4, use the master branch.

PHP versions are not an option because there are many different PHP combinations to consider. If you need to run your extension’s PHPUnit tests on a different matrix of PHP/DB combinations than phpBB uses, you’ll need to stick to using your original tests.yml.

Also, for what it’s worth, the 3.3.x branch tests from PHP 7.2 through 8.4.

You’re specifically talking about the basic tests, which are just EPV, code sniffer, and image profiles. These tests don’t matter if the PHP version is 7 or 8. No code is ever executed in those tests so the PHP version for that test shouldn't matter.

So, what’s the point of this? Well, all extensions (unless they’re specifically written to not fully support the same minimum requirements as the host phpBB app) should run with these tests out of the box. You get options to disable the major jobs, like skipping Postgresql tests or the MSSQL/SQLite tests (if you can only support MySQL with your extension) which is explained in the documentation at the repository.

But the whole point is to not have to maintain your own tests.yml. So, when GitHub images for Ubuntu change or the setup of the containers requires adjustments in the tests.yml, none of that will be your burden anymore. All those tests.yml fixes/updates can be made in one place at the reusable framework.

Every single official phpBB extension is currently on the new framework, except for one - the WebPush extension - because it does have a different phpBB minimum requirement than phpBB does, so that one has to maintain its own original full tests.yml.

But also bear in mind this is a new tool that we'll be improving over time.

Statistics: Posted by MattF — Wed Apr 30, 2025 2:11 pm



Viewing all articles
Browse latest Browse all 2923

Latest Images

Trending Articles



Latest Images