Forum

Update V9.3.2 To V1...
 
Notifications
Retirer tout

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

3 Posts
2 Utilisateurs
0 Reactions
1,342 Vu
(@francky95)
Posts: 2
New Member
Début du sujet
 
[#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)

 


 
Posté : 29/09/2022 12:18 pm
(@francky95)
Posts: 2
New Member
Début du sujet
 

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',
.................


 
Posté : 29/09/2022 1:20 pm
(@babynus)
Posts: 14952
Membre 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...)


 
Posté : 29/09/2022 4:00 pm
Share:
Retour en haut