You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: development/development/upgrade.rst
+4-6Lines changed: 4 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,11 @@
2
2
Upgrade Guide
3
3
=============
4
4
5
-
This document outlines changes introduced in different versions of phpBB. These changes may require adjustments to your
6
-
existing custom PHP code or Extension code when upgrading to specific versions from a prior versions of phpBB.
7
-
It is mainly meant to be used by core and Extension developers and does not provide end user documentation for upgrading.
5
+
This guide summarizes code-level changes introduced in various phpBB versions that may require updates to your custom PHP code, extensions, or styles during an upgrade.
8
6
9
-
Unless explicitly stated otherwise, each version describes the changes compared to the previous major or minor version
10
-
that directly preceded it. For example the upgrade guide for 4.0 will describe the changes compared to 3.3 whereas an upgrade guide
11
-
for 4.1 will describe the changes compared to 4.0.
7
+
It is intended primarily for core developers, extension authors, and style creators. **It does not cover instructions for end users performing a board upgrade.**
8
+
9
+
Unless otherwise noted, each upgrade entry documents changes relative to the immediately preceding major or minor release.
Copy file name to clipboardExpand all lines: development/development/upgrade/400.rst
+71-18Lines changed: 71 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,8 @@
2
2
phpBB 3.3 to 4.0
3
3
================
4
4
5
-
phpBB 4.0 is a major release that contains backward compatibility breaks and also introduces some deprecations.
5
+
phpBB 4.0 is a major release that includes backward-incompatible changes and new deprecations.
6
+
This guide highlights the most important changes and resources to help extension and style developers adapt their code.
6
7
7
8
.. contents:: Table of Contents
8
9
:depth: 2
@@ -14,42 +15,56 @@ Basics
14
15
15
16
PHP
16
17
---
17
-
The minimum required version of PHP for phpBB 4.0 is ``8.1`` with full support for versions ``8.2`` and ``8.3``.
18
-
PHP code that worked with the supported versions of phpBB 3.3 should work with phpBB 4.0 as well but might require minor adjustments.Recommendation
18
+
phpBB 4.0 requires PHP 8.1 or higher. Most PHP code compatible with phpBB 3.3 should work in phpBB 4.0 with minimal changes,
19
+
but you may need to make adjustments depending on deprecated or changed functionality.
19
20
20
21
Symfony
21
22
-------
22
-
phpBB 4.0 ships with Symfony 6.4. There are quite a few changes to the standard Symfony version that came with phpBB 3.3.
23
-
The following upgrade guides provides by Symfony might help with resolving some of the issues you might encounter when upgrading
24
-
custom PHP or Extension code for phpBB 4.0:
23
+
phpBB 4.0 uses Symfony 6.4, a significant upgrade from the version bundled with phpBB 3.3. As Symfony introduced breaking
24
+
changes across versions, we recommend reviewing the following Symfony upgrade guides when updating custom code or extensions:
25
25
26
26
- `Upgrade Symfony from 3.x to 4.0 <https://github.com/symfony/symfony/blob/4.4/UPGRADE-4.0.md>`_
27
27
- `Upgrade Symfony from 4.4 to 5.0 <https://github.com/symfony/symfony/blob/5.4/UPGRADE-5.0.md>`_
28
28
- `Upgrade Symfony from 5.x to 6.0 <https://github.com/symfony/symfony/blob/6.4/UPGRADE-6.0.md>`_
29
29
30
-
You can find more upgrade guides in the `Symfony Repository <https://github.com/symfony/symfony/tree/6.4>`_ on GitHub.
30
+
Additional guides are available in the `Symfony GitHub repository <https://github.com/symfony/symfony/tree/6.4>`_.
31
+
32
+
Twig
33
+
----
34
+
phpBB 4.0 uses Twig 3.14, which introduces deprecations that may impact extension and style development.
35
+
We recommend reviewing the official Twig deprecation guide when updating your custom templates or Twig-related code:
36
+
37
+
- `Twig 3.x Deprecated Features <https://twig.symfony.com/doc/3.x/deprecated.html>`_
31
38
32
39
Major changes
33
40
=============
34
41
35
42
Ban system
36
43
----------
37
-
The ban system has been greatly refactored for phpBB 4.0. As part of this, the following changes were introduced:
44
+
The ban system has been significantly refactored in phpBB 4.0. Key changes include:
38
45
39
-
- Added support for banning `CIDR blocks<https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_blocks>`_
40
-
- Added support for IPv6 banning
41
-
- Removed "exclude" functionality which resulted in ambiguous settings
46
+
- `CIDR block<https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_blocks>`_ support for banning IP ranges.
47
+
- IPv6 banning is now supported.
48
+
- “Exclude” functionality has been removed due to ambiguity and inconsistent behavior.
42
49
43
50
Removal of Jabber/XMPP
44
51
----------------------
45
-
The Jabber/XMPP functionality has been removed from phpBB 4.0. This includes the Jabber/XMPP settings in the ACP and the Jabber/XMPP notification system.
46
-
Users with Jabber/XMPP accounts will no longer receive notifications via Jabber/XMPP and have instead been migrated to email notifications.
47
-
The Jabber/XMPP functionality was removed due to the lack of support for the XMPP protocol in modern browsers and the fact that it was not widely used by phpBB users.
52
+
All Jabber/XMPP features have been removed in phpBB 4.0:
53
+
54
+
- Jabber/XMPP settings in the ACP are gone.
55
+
- XMPP-based notifications have been discontinued.
56
+
- Users who previously used Jabber/XMPP will now receive notifications via email.
57
+
58
+
This removal was driven by lack of browser support for XMPP and limited adoption within the phpBB community.
48
59
49
60
Class and function changes
50
61
==========================
62
+
Several classes and functions have been changed or removed. If your extension or code uses phpBB internals, you’ll want to:
63
+
64
+
- Review the updated `phpBB 4.0 API documentation <https://area51.phpbb.com/docs/code/master/>`_
65
+
- Audit your code for usages of deprecated or removed methods/classes
66
+
51
67
The following table lists class and function changes that might affect custom PHP or Extension code.
52
-
Also have a look at the `phpBB API documentation <https://area51.phpbb.com/docs/code/master/>`_ for further insight into the class and function API in phpBB 4.0.
53
68
54
69
.. list-table::
55
70
:widths: 15 15 10 10 50
@@ -145,6 +160,12 @@ Also have a look at the `phpBB API documentation <https://area51.phpbb.com/docs/
145
160
- ``4.0.0-a1``
146
161
- Use ``\bantu\IniGetWrapper\IniGetWrapper`` instead.
147
162
163
+
* - ``\phpbb\event\dispatcher::dispatch()``
164
+
- ``phpbb/event/dispatcher.php``
165
+
- Refactored
166
+
- ``4.0.0-a1``
167
+
- Use ``\phpbb\event\dispatcher::trigger_event()`` instead.
168
+
148
169
* - ``bbcode_second_pass_by_extension``
149
170
- ``includes/bbcode.php``
150
171
- Removed in ``4.0.0-a1``, deprecated in ``3.2.10``
@@ -281,7 +302,7 @@ Also have a look at the `phpBB API documentation <https://area51.phpbb.com/docs/
281
302
- ``includes/functions_compatibility.php``
282
303
- Removed
283
304
- ``4.0.0-a1``
284
-
- Use ``phpbb_delete_user_pms`` instead. Pay attention to pay array instead of single user id.
305
+
- Use ``phpbb_delete_users_pms()`` instead. Expects an array of users ids instead of single user id.
285
306
286
307
* - ``phpbb_to_numeric``
287
308
- ``includes/functions_compatibility.php``
@@ -389,13 +410,19 @@ Also have a look at the `phpBB API documentation <https://area51.phpbb.com/docs/
389
410
- ``includes/functions_acp.php``
390
411
- Removed
391
412
- ``4.0.0-a1``
392
-
- Use phpbb_build_cfg_template() instead.
413
+
- Use ``phpbb_build_cfg_template()`` instead.
393
414
394
415
* - ``h_radio``
395
416
- ``includes/functions_acp.php``
396
417
- Removed
397
418
- ``4.0.0-a1``
398
-
- Use phpbb_build_radio() instead.
419
+
- Use ``phpbb_build_radio()`` instead.
420
+
421
+
* - ``build_select``
422
+
- ``includes/functions_acp.php``
423
+
- Refactored
424
+
- ``4.0.0-a1``
425
+
- Now ``build_select()`` returns an array of select options instead of a string of HTML.
399
426
400
427
* - ``messenger``
401
428
- ``includes/functions_messenger.php``
@@ -410,3 +437,29 @@ Also have a look at the `phpBB API documentation <https://area51.phpbb.com/docs/
410
437
* **Type of change:** The type of change, e.g. added, changed, deprecated, or removed in this version.
411
438
* **Version:** Version in which this change was introduced.
412
439
* **Explanation:** The suggested approach to handle the change. This could involve using an alternative function, migrating code to a new approach, or providing additional information.
440
+
441
+
Template function changes
442
+
=========================
443
+
The following table lists function changes that might affect custom Style or Extension code.
444
+
445
+
.. list-table::
446
+
:widths: 15 10 10 65
447
+
:header-rows: 1
448
+
449
+
* - Function
450
+
- Type of change
451
+
- Version
452
+
- Explanation
453
+
* - ``Icon()``
454
+
- Added
455
+
- ``4.0.0-a1``
456
+
- Icons may be rendered using ``{{ Icon('font', 'bold') }}`` in Twig instead of manually writing HTML like ``<i class="fa-bold icon"></i>``.
457
+
458
+
Arguments:
459
+
460
+
- Icon type ('font' | 'png' | 'svg')
461
+
- Icon name (e.g.: 'bold')
462
+
- Icon title; optional, default: empty ``''``
463
+
- Hide the icon title from view; optional, default: ``false``
- Additional attributes for the icon, where the key is the attribute, ``{'data-ajax': 'mark_forums'}`` results in ``data-ajax="mark_forums"``; optional, default: ``{}``
0 commit comments