diff options
| author | Damien Regad <dregad@mantisbt.org> | 2025-04-26 10:19:55 +0200 |
|---|---|---|
| committer | Damien Regad <dregad@mantisbt.org> | 2025-04-26 10:19:55 +0200 |
| commit | 8659a3e34b5b144a54c24827e94e94f1ccf9492c (patch) | |
| tree | dbab6808d3aed5db70b54bf0a94891f3c5744a5e | |
| parent | cdaa6e04c794c10f030e7dae072092e5de5871f0 (diff) | |
| download | adodb-8659a3e34b5b144a54c24827e94e94f1ccf9492c.tar.gz adodb-8659a3e34b5b144a54c24827e94e94f1ccf9492c.tar.bz2 adodb-8659a3e34b5b144a54c24827e94e94f1ccf9492c.zip | |
Active record: Fix PHP 8.2 deprecation warning
Creation of dynamic property MyClass::$column is deprecated in
.../adodb/adodb-active-record.inc.php on line 115
Creation of dynamic property MyClass::$column is deprecated in
.../adodb/adodb-active-recordx.inc.php on line 119
Fixes #1068
| -rw-r--r-- | adodb-active-record.inc.php | 1 | ||||
| -rw-r--r-- | adodb-active-recordx.inc.php | 1 | ||||
| -rw-r--r-- | docs/changelog.md | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/adodb-active-record.inc.php b/adodb-active-record.inc.php index 558e3ce3..08f7ca8d 100644 --- a/adodb-active-record.inc.php +++ b/adodb-active-record.inc.php @@ -74,6 +74,7 @@ function ADODB_SetDatabaseAdapter(&$db, $index=false) } +#[\AllowDynamicProperties] class ADODB_Active_Record { static $_changeNames = true; // dynamically pluralize table names diff --git a/adodb-active-recordx.inc.php b/adodb-active-recordx.inc.php index cee95c66..18e2a189 100644 --- a/adodb-active-recordx.inc.php +++ b/adodb-active-recordx.inc.php @@ -82,6 +82,7 @@ function ADODB_SetDatabaseAdapter(&$db) } +#[\AllowDynamicProperties] class ADODB_Active_Record { static $_changeNames = true; // dynamically pluralize table names static $_foreignSuffix = '_id'; // diff --git a/docs/changelog.md b/docs/changelog.md index b089d06d..6ef58360 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -22,6 +22,8 @@ Older changelogs: [#1055](https://github.com/ADOdb/ADOdb/issues/1055) - sqlite: fix error reporting [#1061](https://github.com/ADOdb/ADOdb/issues/1061) +- Creation of dynamic property deprecated warning with PHP 8.2 + [#1068](https://github.com/ADOdb/ADOdb/issues/1068) ## [5.22.8] - 2025-01-25 |
