Start free trial

Extensions (PHP) · Check, build and version

Check, build and version

fs:check

The check is the same robot the directory runs on every upload. It reads the package, the code rules, the migrations and the translations, and grades the extension:

GradeMeans
ANothing to fix or improve.
BOne or two things to improve.
CMore than two things to improve.
DSomething must be fixed. A D grade is refused and fs:build stops.

In the admin panel, Developer, Check shows the same list with Open file and, where it can, Fix this. Add --json to the command for a report your own tools can read.

fs:cycle

Installs, updates, uninstalls, reinstalls and removes the extension on your test forum, then checks nothing was left behind: no tables, files or settings. Run it before every release. It deletes the extension's data on that forum, so use test data.

fs:build

Runs the check, then writes the release zip with a checksum. The zip is what you upload to the directory and what forums install.

Versions

The version lives in extension.json. Developer, Versions and builds keeps every release; New version starts the next one and a new migrations folder. Set "forumspark" to the ForumSpark versions your extension works with; forums outside that range cannot install it.

RangeMeans
>=2.12.1 or newer
>=2.1 <3.02.1 or newer, but not 3.0
^2.1The same as >=2.1 <3.0

Extensions yours needs

If your extension builds on another extension, list it under requires with a range, for example "requires": { "harbour/pins": "^1.2" }. A forum can only install yours once that extension is installed in a version that fits, and cannot uninstall that extension while yours still needs it.