User tests: Successful: Unsuccessful:
Based on the problem of saving data with different types.
[4.0] Error when saving an object in JTable->save()
I've done a great job of implementing a typizations sub-framework for a Table
class.
The problem is that before you could not create properties of the Table
class with different types, you were forced to create properties without types. You had to use the default types.
But now in the modern world, you can use the Table
class with fully typed properties. You don't need to worry that a DateTime property will cause an error. The DateTime property and other properties will be automatically converted to the database type before being saved. When the Table
is loaded, all properties will be automatically converted to objects, such as a DateTime object.
Now, when programming, you will focus only on business logic.
.
At the same time, the updated Table
class supports the previous usage scenarios. You don't need to redo the programs you've already created.
.
Bonus: The update made it possible to stop using the methods of the deprecated CMSObject class. The new Table
class still inherits the CMSObject class, but now no method is used from this parent class.
.
The new Table
class will allow you to discard the parent CMSObject class without loss in the future.
I checked this class, it does not violate the CMS in any way. But I still think that the code requires minor optimization.
.
I ask you not to ban my work, but to help solve the problem of complete typizations of classes, since technologies do not stand still.
In the modern world, typizations is a basic feature for frameworks.
The new typed Table class requires a minimum PHP 7.4
Status | New | ⇒ | Pending |
Category | ⇒ | Unit Tests Administration com_tags com_users Language & Strings Modules Libraries Front End Plugins |
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-08-20 07:17:00 |
Closed_By | ⇒ | korenevskiy | |
Labels |
Added:
?
Language Change
?
|