PHPMaker 2024 is major upgrade from previous version, it includes a long list of new features. If you upgrade from v2021 or newer, there are no big changes. However, if you upgrade from version prior to v2019, please be reminded that v2019-2022 introduced some new features which are not fully compatible with old versions, make sure you read the following first:
Migrating to v2019
Migrating to v2020
Migrating to v2021
Migrating to v2022
Migrating to v2023
When opening an old project in v2024, PHPMaker will try to convert the changes for you. However, the conversion cannot be 100% and you'll need to do some updates yourself. Please read the follows carefully, review your code, update and test it before deploying the new scripts to your production server.
PHP >= 8.0.2
Requires PHP 8.0.2 or higher. Since security support for PHP 8.0 will end on 2023/11/26 (see [Supported Versions](https://www.php.net/supported-versions.php) on PHP official site), using PHP 8.1 or 8.2 is highly recommended.
Language Files
v2024 supports multiple languages files for each language. However, you need to include the language ID
in the file name (e.g. ``
You can put more than one language files in the language folder (C:\Users\\\
As usual there are new or changed phrases in new major version, make sure you update your non-English language files, otherwise some phrases will be missing. The new or changed phrases are marked with ```` in the default language file.
Email Templates
Similarly, the email templates are renamed with the language ID included, e.g. *Notify.en-US.php*. If you made email templates in other languages, make sure you rename your files with language ID, e.g. Spanish version of *Notify.en-US.php* should be renamed as *Notify.es-ES.php*.
To detach the email templates from the main template, they are now moved to the language folder also. Make sure you put your translated files in the correct folder.
In addition, the email templates were enhanced to support PHP tags so you can write more dynamic contents. Make sure you update the tags in your files. You can refer to the files under the language folder as examples. In general, you change the tags from ```` to PHP tag <?= $Foobar ?>, see [Notification Templates](multilang.html?id=notification-templates) for more details.
Bootstrap 5.3 with Dark Mode
v2024 uses [Bootstrap 5.3.1](https://getbootstrap.com/) with [Dark Mode](https://getbootstrap.com/docs/5.3/customize/color-modes/#dark-mode) support, the theme variables are different from previous versions. When opening an old project in v2024, PHPMaker will try to update the variables for you. In most cases it should be fine. If not, you should go to the **HTML -> Theme** tab to re-select a theme. If you have added any custom CSS styles in your project (under the **HTML -> Styles -> User** tab) for Bootstrap 4, 5.1 or 5.2 previously, you may need to update your styles.
There are some major changes in Bootstrap 5.3, see [Migrating to v5.3](https://getbootstrap.com/docs/5.3/migration/).
MenuItem_Adding and Menu_Rendering Server Event
v2024 adds support for [Event Listeners](customscripts.html?id=event-listeners), introducing breaking changes to the **Menu_Rendering** and **MenuItem_Adding** server events.
**Menu_Rendering** - There is no need for the ``$menu`` argument anymore, now you can use ``$this`` instead of ``$menu`` to reference the menu object.
**MenuItem_Adding** - In previous versions you could return ``true`` or ``false`` to determine if the menu item is allowed, now you need to set the $item->Allowed property instead. (And you can also use ``$this`` to reference the menu object.)
RemoveXSS Extension
In previous versions you might have set the ``Raw`` property of field objects by server events to prevent the field values being sanitized, v2024 makes it easier by the new [RemoveXSS Extension](extension.html?id=removexss). Although server event still works (at runtime), it is recommended that you use this extension instead so PHPMaker knows the settings beforehand and generates code with them taken into account. Please check your server events, and remove all code like $this->MyField->Raw = true
. (You can open your project file in a text editor and looks for "Raw".) Then set the **Raw** setting of the fields again in the new extension.
PHP Enumerations
v2024 use native PHP [Enumerations](https://www.php.net/manual/en/language.enumerations.php). The follows are converted from constants to enums: - ``ALLOW_XXX`` => ``Allow::XXX`` - ``DATATYPE_XXX`` => ``DataType::XXX`` - ``ROWSUMMARY_XXX`` => ``RowSummary::XXX`` - ``ROWTOTAL_XXX`` => ``RowTotal::XXX`` - ``ROWTYPE_XXX`` => ``RowType::XXX`` If you used above constants in your server events, you need to update them to enums accordingly, e.g.
Note that native PHP enums was only introduced in PHP 8.1. PHPMaker uses a third-party package for PHP 8.0, you need to use the ``value`` property to get the enum value.
Deprecated and Removed
Also See
Migrating to v2023
Migrating to v2022
Migrating to v2021
Migrating to v2020
Migrating to v2019