User tests: Successful: Unsuccessful:
Pull Request for Issue #28765.
Change the type of registerDate
and lastvisitDate
from \DateTime
to string
inside the DocBlocks of \Joomla\CMS\User\User
.
We should verify that registerDate
and lastvisitDate
really are strings regardless of e.g. the database driver.
jtest.zip is a simple user plugin that can be used for testing. Just install and enable it, then the types of the current user object are shown on each login.
The message should contain:
lastvisitDate: string
registerDate: string
I tested this on J3.9.18 using MySQLi as well as J3.9.18 using MySQL PDO and in both cases the actual result was as expected.
Well, these are the (API) documentation changes.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Title |
|
Title |
|
Well, I should probably have done this before but here is a quick&dirty test plugin: jtest.zip
This is a simple user plugin that enqueues messages containing the types of the two properties right after login. With that I could confirm the error on J3.9.18 using MySQL PDO.
Probably I still have to learn how to write proper tests but I guess the plugin suits our needs.
Will test tomorrow or on weekend.
Well it seems the fileds are defined as datetime fileds in the database:
joomla-cms/installation/sql/mysql/joomla.sql
Line 2065 in 2e2188d
joomla-cms/installation/sql/postgresql/joomla.sql
Line 2043 in 2e2188d
joomla-cms/installation/sql/sqlazure/joomla.sql
Line 2936 in 2e2188d
But it also seems they are just strings with a defined format so this looks correct good.
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
rtc
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-08-17 08:53:05 |
Closed_By | ⇒ | HLeithner | |
Labels |
Added:
?
?
|
Thanks
@mbabker Could you have a look on this PR? Is not a big thing, but I am not sure if it's right.