Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

Update V9.3.2 To V1...
 
Notifications
Clear all

Update V9.3.2 To V10.0.3 in PHP8.2

3 Posts
2 Users
0 Reactions
1,355 Views
(@francky95)
Posts: 2
New Member
Topic starter
 
[#8535]

Hello,

I have 2 problems with the update process,

#1 : Access to a static variable not initialized is depreciated.

log :
2022-09-29 09:28:58.170 ===== TRACE ===== =====================================
2022-09-29 09:28:58.170 ===== TRACE =====
2022-09-29 09:28:58.170 ===== TRACE ===== VERSION V10.0.3
2022-09-29 09:28:58.170 ===== TRACE =====
2022-09-29 09:28:58.171 ===== TRACE =====  0 lines updated into table "menu".
2022-09-29 09:28:58.173 ===== TRACE =====  3 lines updated into table "accessright".
2022-09-29 09:28:58.177 ===== TRACE =====  1 lines updated into table "accessright".
2022-09-29 09:28:58.179 ===== TRACE =====  2 lines updated into table "accessright".
2022-09-29 09:28:58.181 ===== TRACE =====  6 lines deleted from table "accessright".
2022-09-29 09:28:58.182 ===== TRACE =====  0 lines updated into table "menu".
2022-09-29 09:28:58.182 ===== TRACE =====  0 lines updated into table "menu".
2022-09-29 09:28:58.184 ===== TRACE =====  1 lines updated into table "accessright".
2022-09-29 09:28:58.185 ===== TRACE =====  6 lines deleted from table "accessright".
2022-09-29 09:28:58.185 ===== TRACE =====
2022-09-29 09:28:58.185 ===== TRACE ===== DATABASE UPDATED
2022-09-29 09:28:58.185 ===== TRACE =====  WITH NO ERROR
2022-09-29 09:28:58.185 ===== TRACE =====
2022-09-29 09:28:58.194 ** ERROR ** [V9.3.2] ERROR **
2022-09-29 09:28:58.194
** ERROR ** [V9.3.2] on file '....../tool/projeqtor.php' at line (4840)
2022-09-29 09:28:58.194
** ERROR ***** [V9.3.2] cause = Creation of dynamic property User::$_isRetreivedFromSession is deprecated

My fix in Model/UserMain

class UserMain extends SqlElement {

  //FIX PHP8.2
  public $_isRetreivedFromSession
;

  // extends SqlElement, so has $id
  public $_sec_Description;

#2 Next ERROR : I think, it's in relation with an incomplete process (See logs)

 


 
Posted : 29 Sep 2022 12H18
(@francky95)
Posts: 2
New Member
Topic starter
 

I found the solution . We must add #[AllowDynamicProperties] before an object ( https://kinsta.com/blog/php-8-2/#deprecate-dynamic-properties-and-new-allowdynamicproperties-attribute)

#[AllowDynamicProperties]

abstract class SqlElement {
// List of fields that will be exposed in general user interface
public $id;
// every SqlElement have an id !!!
public static $_evaluationString = '###EVAL###';

public static $_evaluationStringForbiddenKeywords = array(
'paramDb',
.................


 
Posted : 29 Sep 2022 13H20
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

It is what we have begun to do on V10.1
V10.0 will never be compatible with PHP 8.2 (a projeqtor version may not be compatible with PHP version that was deployed after...)


 
Posted : 29 Sep 2022 16H00
Share:

Scroll to Top