Creation of dynamic property is deprecated with PHP 8.2 (v2022)

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
craigbert
User
Posts: 91

Creation of dynamic property is deprecated with PHP 8.2 (v2022)

Post by craigbert »

Hi All,

I am running the PHP server in my application directory and I am seeing a lot of error messages at the top of the page:
Deprecated: Creation of dynamic property PHPMaker2023\MyApp\DbField::$ExportFieldCaption is deprecated in C:\myapp\src\DbField.php on line 172

I am running PHP 8.2 and I am using the latest version of PHPMaker. (I am on 2023.)

I have downgraded PHP to 8.1.13, ran composer update, and regenerated my project (no errors or warnings) and it works now.


arbei
User
Posts: 9288

Post by arbei »

Make sure you use the latest version of v2023 (i.e. v2023.9 as of today) and you have updated to the latest template. (Older versions did not support PHP 8.2 which was not released yet.)


maestroit
User
Posts: 7

Post by maestroit »

I am using latest version and latest templates, and I did a full generate of everything.

I don't know exactly, but the file "src\AdvancedSearch.php" contains

public $SearchOperator2Default = ""; // Search operator 2 default

instead of

public $SearchOperatorDefault2 = "";

PHPMaker seems to have changed the variable name and didn't update the app correctly


mobhar
User
Posts: 11660

Post by mobhar »

You may update the template to the latest version from Tools -> Update Template, then try to re-generate ALL the script files, and try again.


sonc
User
Posts: 30
Location: Belgium

Post by sonc »

Hello,

same problem with php 8.2.4 and phpmaker v2022.12.4
Any update for v2022 ?


mobhar
User
Posts: 11660

Post by mobhar »

Instead of using v2022, I suggest you to use the latest version as of today is v2023.


Post Reply