- ๐ฎ๐ณIndia Charchil Khandelwal
Charchil Khandelwal โ made their first commit to this issueโs fork.
- Merge request !7Issue #3332923: Use dynamic query instead of SQL Query for the count โ (Merged) created by Ranjit1032002
- Open on Drupal.org โCore: 9.5.x + Environment: PHP 8.1 & MySQL 5.7last update
almost 2 years ago Waiting for branch to pass - First commit to issue fork.
- Open on Drupal.org โCore: 9.5.x + Environment: PHP 8.1 & MySQL 5.7last update
almost 2 years ago Waiting for branch to pass - Status changed to Needs review
almost 2 years ago 2:34pm 4 May 2023 - ๐ฎ๐ณIndia Ranjit1032002
Created MR!7 for the issue mentioned, please review.
Thank you. - ๐ฉ๐ชGermany Anybody Porta Westfalica
@LRWebks could you please review this and try if both queries have the exactly same result?
- Status changed to Needs work
over 1 year ago 11:29am 29 November 2023 - Assigned to lrwebks
- Open on Drupal.org โCore: 9.5.x + Environment: PHP 8.1 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - Status changed to Needs review
over 1 year ago 10:50am 1 December 2023 - ๐ฉ๐ชGermany lrwebks Porta Westfalica
Removed the deprecated command and replaced it with an injected Drupal service call. To review it is!
- ๐ฉ๐ชGermany lrwebks Porta Westfalica
Someone else has to resolve the thread though, as I'm not maintainer
- Open on Drupal.org โCore: 9.5.x + Environment: PHP 8.1 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org โCore: 9.5.x + Environment: PHP 8.1 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - Issue was unassigned.
- Assigned to nevergone
- ๐ฉ๐ชGermany Anybody Porta Westfalica
The benefit of the used DI is that it allows easier testing, for example injecting a different time. So I think that would be the perfect, but also most complex solution. I really like it, but it adds complexity.
The more simple one might be:
$query->condition('w.timestamp', strtotime('-1 hour'), '>');
which uses global system time. So I think the taken approach is even better.
I also looked if there's another way using the prior SQL:
BETWEEN UNIX_TIMESTAMP(DATE_ADD(NOW(), INTERVAL -1 HOUR)) AND UNIX_TIMESTAMP()
as parameter for->condition()
to keep the code, but that doesn't seem to be allowed.So my vote is RTBC for this, even if it looks complex, but for testing it makes sense to also inject time!
Documentation: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Component%21Date...
I'd like to have this signed-off by @nevergone.
- Status changed to RTBC
over 1 year ago 7:27pm 1 December 2023 - ๐ญ๐บHungary nevergone Nyรญregyhรกza, Hungary, Europe
The current solution is definitely wrong. UNIX_TIMESTAMP() a MySQL-related (MariaDB, Percona) function, It does not work in other database systems (SQLite, PostgreSQL).
I think that the chosen solution (getRequestTime()) works properly, is easy to understand and helps with testing.
- ๐ฉ๐ชGermany Anybody Porta Westfalica
Perfect, thank you!
I think we should then merge both RTBC'd issues, but before tagging a new release, give it some time and testing. Quite a lot of changes recently. But nice!! :)
- Issue was unassigned.
- Status changed to Fixed
over 1 year ago 5:32am 4 December 2023 - ๐ฉ๐ชGermany Anybody Porta Westfalica
Merging this RTBC'd issue, thanks all!
- Status changed to Needs work
over 1 year ago 5:40am 4 December 2023 - ๐ฉ๐ชGermany Anybody Porta Westfalica
Sorry I didn't see this needs a local rebase!
- First commit to issue fork.
- last update
over 1 year ago run-tests.sh fatal error - Status changed to Needs review
over 1 year ago 8:47am 4 December 2023 - ๐ฎ๐ณIndia ankithashetty Karnataka, India
Rabsed the MR, it's ready for review now.
Thanks! - Status changed to RTBC
over 1 year ago 9:35am 4 December 2023 - ๐ฉ๐ชGermany Anybody Porta Westfalica
Thanks @ankithashetty well done!
- last update
over 1 year ago run-tests.sh fatal error - Status changed to Fixed
over 1 year ago 9:36am 4 December 2023 -
Anybody โ
committed 88a558a7 on 2.0.x authored by
Ranjit1032002 โ
Issue #3332923 by Anybody, LRWebks, ankithashetty, nevergone: Use...
-
Anybody โ
committed 88a558a7 on 2.0.x authored by
Ranjit1032002 โ
Automatically closed - issue fixed for 2 weeks with no activity.