Skip to content

Support phpBB 4.0 and start 1.6.1-dev - #45

Merged
bonelifer merged 4 commits into
masterfrom
phpbb4-support
Oct 19, 2026
Merged

bonelifer merged 4 commits into
masterfrom
phpbb4-support

Conversation

@bonelifer

@bonelifer bonelifer commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Declares phpBB 4.0 support and starts the 1.6.1-dev version. The code changes 4.0 needed are already merged: #42 (ACP radio buttons), #43 (captcha, messenger, Jabber columns) and #44 (validation fixes).

Changes

  • composer.json: version 1.6.1-dev, and the phpBB requirement in require and soft-require goes from >=3.3.19,<4.0.0@dev to >=3.3.19,<4.1.0@dev.
  • The header and footer "Contact us" links showed an empty box instead of the envelope on phpBB 4.0, because 4.0's icons need Font Awesome 6's classes. The links now carry both sets of classes (icon o-icon o-icon-font fa-fw fa-envelope fas), which works on 3.3 and 4.0.
  • tests.yml also runs the basic checks (code sniffer, EPV) on phpBB's master branch with PHP 8.2, the minimum PHP for phpBB 4.0. The phpBB 3.3 job keeps its check name, PHP 7.4 - none; the new one is PHP 8.2 - none - phpBB 4.0. EPV's dev-master needs symfony/yaml 6 or older, which phpBB 4.0's Symfony 7 rules out, so the 4.0 job installs EPV's dev-epv-phpbb4 branch with phpBB's own composer.phar, as phpbb-extensions/test-framework does for phpBB 4.0. The 3.3 job's EPV command is unchanged.
  • phpBB 4.0's code sniffer is stricter than 3.3's, so:
    • The five released migrations declared depends_on() as static public; they now say public static. Only the modifier order changes, which PHP treats the same, so migration names, dependencies and data are unchanged.
    • The core class's optional $messenger_methods argument used the ?type shortcut, and the union form the 4.0 sniffer asks for needs PHP 8.0. The argument is now untyped, with its type in the docblock.
  • The board contact mailto: links use utf8_htmlspecialchars(). EPV flagged plain htmlspecialchars() in one, and the three in the core class's error messages had no escaping at all.
  • README requirements now list phpBB 4.0, and lint.yml's comment says what tests.yml covers.

Testing

Claude tested on seed-forum boards with phpBB 4.0.0-a3-dev (master) and phpBB 3.3.19:

  • On 4.0: disabling, deleting the data (every setting, config_text row and migration removed) and enabling again (all 6 migrations installed) logged no errors.
  • On 4.0: ACP save, the guest form with captcha for the post, PM and email methods (email went to a local SMTP sink), a member's message, and the Fix the phpBB.com validation findings #44 checks all pass, with no new errors in the board's log.
  • The envelope icon renders in the header and footer on both boards (Font Awesome 6 on 4.0, FontAwesome 4.7 on 3.3).
  • None of the core functions the extension calls is marked @deprecated in phpBB 4.0.
  • A logged-in member's message with a PNG attached and a file comment, sent by forum post, is saved with its attachment on both boards.
  • php-lint.sh --strict is clean on PHP 7.4 and 8.4, phpBB 4.0's and 3.3's code sniffers find nothing locally, and composer.json validates.
  • EPV now reports one fewer error. What it still lists is the "Packaging structure" false positive it gives when pointed at the extension folder itself, unserialize() in ext.php (it reads phpBB's own migration data with allowed_classes off), and two md5() notices (submit_post() needs the message checksum). EPV exits 0 either way, so these don't fail the job.

Not covered: the scaffoldBB templates on phpBB 4.0, because that third-party style wasn't installed on a 4.0 board here. Their icons were not changed.


Investigated and written by Claude on behalf of William Jacoby (bonelifer).

🤖 Generated with Claude Code

bonelifer and others added 4 commits October 18, 2026 20:51
- composer.json: version 1.6.1-dev, and phpBB >=3.3.19,<4.1.0@dev (was
  <4.0.0@dev) in require and soft-require.
- The header and footer "Contact us" links showed an empty box instead of
  the envelope on phpBB 4.0, whose icons need Font Awesome 6's classes.
  They now carry both sets of classes, which works on 3.3 and 4.0.
- tests.yml also runs the basic checks (code sniffer, EPV) on phpBB's
  master branch with PHP 8.2. The phpBB 3.3 job keeps its check name.
- README requirements list phpBB 4.0, and lint.yml's comment says what
  tests.yml covers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EPV's dev-master needs symfony/yaml 6 or older, which phpBB 4.0's
Symfony 7 packages rule out, so the new phpBB 4.0 job failed to install
it. That job now installs phpbb/epv:dev-epv-phpbb4 with phpBB's own
composer.phar, as phpbb-extensions/test-framework does for phpBB 4.0.
The phpBB 3.3 job's command is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The five released migrations declared depends_on() as "static public";
  phpBB 4.0's sniffer requires "public static". Only the modifier order
  changes, which PHP treats the same, so migration names, dependencies
  and data are unchanged.
- The core class's optional messenger methods argument used the ?type
  shortcut, which phpBB 4.0's sniffer rejects; its union-type form needs
  PHP 8.0, so the argument is now untyped, with its type in the docblock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EPV flags plain htmlspecialchars() in the "email is disabled" message.
That link and the three similar ones in the core class's error messages,
which had no escaping at all, now use phpBB's utf8_htmlspecialchars().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bonelifer
bonelifer merged commit ec972fd into master Oct 19, 2026
4 checks passed
@bonelifer
bonelifer deleted the phpbb4-support branch October 19, 2026 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant