Page 1 of 1
Creation of dynamic property is deprecated with PHP 8.2 (v2022)
Posted: Thu Dec 15, 2022 8:43 am
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.
Re: Creation of dynamic property is deprecated (PHP 8.2)
Posted: Fri Jan 27, 2023 8:18 pm
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.)
Re: Creation of dynamic property is deprecated (PHP 8.2)
Posted: Sat Jan 28, 2023 3:32 pm
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
Re: Creation of dynamic property is deprecated (PHP 8.2)
Posted: Sun Jan 29, 2023 12:12 pm
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.
Re: Creation of dynamic property is deprecated (PHP 8.2)
Posted: Wed Jun 14, 2023 9:40 pm
by sonc
Hello,
same problem with php 8.2.4 and phpmaker v2022.12.4
Any update for v2022 ?
Re: Creation of dynamic property is deprecated with PHP 8.2 (v2022)
Posted: Thu Jun 15, 2023 10:40 am
by mobhar
Instead of using v2022, I suggest you to use the latest version as of today is v2023.