Repository navigation
Developer Notes
If you would like to contribute to BFStop, you're more than welcome to do so!
- You can check if there is an open issue that interests you in the Issue tracker
- If you have a cool new feature in mind, head over to the Issue tracker as well and add it. Or if you feel like immediately diving into the implementation, fork bfstop, implement your enhancement and provide a pull request!
- Testers are always welcome, especially for newer versions and test releases (betas/release candidates). Grab such a version (as described under Specific Versions), go over to the Test Cases section and run through some of the scenarios described there in a test server environment!
- Please report security issues by email to security@bfstop.de, not in the issue tracker, see SECURITY.md.
Since 2.0, all of BFStop is in one repository, codeling/bfstop, released as one package with one version. The component's repository (codeling/com_bfstop) was merged into it with its history; the package repository (codeling/pkg_bfstop) is no longer used.
-
library/: the library (lib_bfstop, namespaceCodeling\Library\Bfstop), which the others use: addresses and networks, the block policy, the database tables (one repository class each,src/Repository), the services that combine them (src/Service), the.htaccessand nginx files, the mails, the log, the daily maintenance and the defaults of the settings (Settings::Defaults). -
plugin/: the system plugin (plg_system_bfstop, namespaceCodeling\Plugin\System\Bfstop), which only handles Joomla!'s events:src/Extension/Bfstop.php, plusRequestClassifier(what a request does),Responder(the block page, the messages) andLoginTurn(logins of one address one after the other). It also holds the SQL files and the update script. -
component/: the component (com_bfstop, namespaceCodeling\Component\Bfstop): settings, lists, log, username statistics and IP information in the backend, the unblock page in the frontend. -
task/: the task plugin (plg_task_bfstop), which runs the daily maintenance in Joomla!'s Task Scheduler. -
package/: the package manifest, its installer script,build.sh, the release notes and the update server generator. -
tests/: unit, integration and upgrade tests, linters, CI scripts and performance tests.
Plugins and component don't use each other's classes, only the library's. Requirements: Joomla! 5.4/6, PHP 8.2. The coding style is Joomla!'s (PSR-12) for new files; existing files are converted separately.
-
package/build.sh [<output directory>]builds the zips of all parts and the package, with aSHA256SUMS-<version>file. - Tests: see tests/README.md. Unit tests need only PHP and PHPUnit; integration tests need a Joomla! site (
JOOMLA_ROOT). CI runs them on every Joomla! version of its matrix, on MySQL, MariaDB and PostgreSQL, tests the update from the previous release, checks the.htaccesssection against a real Apache, and runs phpstan. -
tests/lint/checks the versions, language files, zips and workflows.
See package/README.md. In short:
- The version is in
library/bfstop.xml,plugin/bfstop.xml,task/bfstop.xml,component/bfstop.xml,package/pkg_bfstop.xmland the first entry ofCHANGELOG((unreleased)until the release);tests/lint/check-versions.phpchecks that they agree. Test releases areX.Y.Z-betaN,-rcNor-alphaN. - Pushing a tag with the version runs
.github/workflows/release.yml, which builds and tests the package and creates a draft GitHub release with the zips, checksums, a build provenance attestation and notes from the CHANGELOG. Check and publish it. - Publishing a release updates the update server (
https://bfstop.de/update.xml) by itself. After a release, put it intotests/ci/previous-release.sha256. - Wiki: the documentation is versioned (see below). Update the extensions page (extensions.joomla.org).
Pages that differ between major versions exist once per version, with the version in the page name (Configuration 1.5, Configuration 2.x); the page without version (Configuration) only links to them, so that old links keep working. The sidebar (_Sidebar.md) groups the pages by version. When 2.0.0 is released, mark 2.x as "current stable" and 1.5.x as "previous" in Home.md, _Sidebar.md and the version chooser pages, and remove the "not released yet" notes from the 2.x pages. For a future major version, copy the 2.x pages to … 3.x pages and add a column.
- The plugin was in codeling/bfstop (tags up to 1.5.2), the component in codeling/com_bfstop, the package in codeling/pkg_bfstop.
- When releasing: in bfstop, com_bfstop and pkg_bfstop, adapt the version number in deploy.sh and bfstop.xml; adapt the download link and version number in update.xml (on a separate server, not in the repository).
- Add language files in the respective folders (copying the English version is a good start). In 2.x:
-
plugin/language/xx-XX/(xx-XX.plg_system_bfstop.ini, xx-XX.plg_system_bfstop.sys.ini) -
component/admin/language/xx-XX/(xx-XX.com_bfstop.ini, xx-XX.com_bfstop.sys.ini) -
component/site/language/xx-XX/(xx-XX.com_bfstop.ini) - optionally
task/language/xx-XX/andlibrary/language/xx-XX/(which only have English so far)
-
- Add references to the language files in the manifests (
bfstop.xml) of the parts. -
php tests/lint/check-language.php <manifest.xml>reports missing and superfluous keys (CI runs it for every part).
In 1.x, the folders were language/ (plugin repository), admlang/ and site/language/ (component repository).
BFStop 2.x (upcoming)
- Download and Installation 2.x
- Configuration 2.x
- Feature Descriptions 2.x
- FAQ 2.x
- Known issues 2.x
- Upgrading to 2.0
- Why No Delay Options in 2.0
- Design Decision No Response Delays
BFStop 1.5.x (current stable)
General