Skip to content

Commit 550b290

Browse files
committed
Add support for PHP versions up to 8.4
1 parent 30779ed commit 550b290

File tree

4 files changed

+26
-9
lines changed

4 files changed

+26
-9
lines changed

.github/workflows/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
--health-retries 5
2121
strategy:
2222
matrix:
23-
php-versions: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
23+
php-versions: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
2424
redis-versions: ['5', '6', '7']
2525
name: PHP ${{ matrix.php-versions }} (Redis ${{ matrix.redis-versions }})
2626
steps:

composer.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,18 @@
2424
}
2525
],
2626
"require": {
27-
"php": ">=7.1 < 8.3",
27+
"php": "^7.4 || ^8.1",
2828
"ext-json": "*",
2929
"ext-pcntl": "*",
3030
"ext-pcre": "*",
3131
"ext-posix": "*",
3232
"ext-sockets": "*",
33-
"monolog/monolog": "^1.23 || ^2.0",
34-
"predis/predis": "^1.1.10",
33+
"ext-intl": "*",
34+
"monolog/monolog": "^1.23 || ^2.0 || ^3.0",
35+
"predis/predis": "^1.1.10 || ^3.0",
3536
"psr/log": "^1 || ^2 || ^3",
3637
"ramsey/uuid": "^3.7 || ^4",
37-
"seld/signal-handler": "1.1.*"
38+
"seld/signal-handler": "1.1.*",
3839
},
3940
"conflict": {
4041
"contatta/qless-php": "*"

src/Workers/ForkingWorker.php

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,13 @@ protected function performWork(BaseJob $job): void
9090
$this->childStart();
9191
$this->watchdogStart($this->client->createSubscriber(['ql:log']));
9292

93-
$this->title(sprintf('Forked %d at %s', $this->childPID, strftime('%F %T')));
93+
$this->title(
94+
sprintf(
95+
'Forked %d at %s',
96+
$this->childPID,
97+
(new \DateTime())->format('Y-m-d H:i:s')
98+
)
99+
);
94100

95101
// Parent process, sit and wait
96102
while ($this->childProcesses > 0) {
@@ -340,7 +346,7 @@ private function childStart(): void
340346
$this->who = 'child:' . $this->name;
341347
$this->logContext = ['type' => $this->who];
342348

343-
$this->title('Processing ' . $jid . ' since ' . strftime('%F %T'));
349+
$this->title('Processing ' . $jid . ' since ' . (new \DateTime())->format('Y-m-d H:i:s'));
344350
$this->childPerform($this->job);
345351

346352
socket_close($socket);
@@ -453,7 +459,13 @@ private function watchdogStart(WatchdogSubscriber $subscriber): void
453459
$this->who = 'watchdog:' . $this->name;
454460
$this->logContext = ['type' => $this->who];
455461

456-
$this->title(sprintf('Watching events for %s since %s', $this->job->jid, strftime('%F %T')));
462+
$this->title(
463+
sprintf(
464+
'Watching events for %s since %s',
465+
$this->job->jid,
466+
(new \DateTime())->format('Y-m-d H:i:s')
467+
)
468+
);
457469
$subscriber->watchdog($this->job->jid, $this->name, $this->childPID);
458470

459471
socket_close($socket);

src/Workers/SimpleWorker.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ public function setLogger(LoggerInterface $logger): void
4444
*/
4545
protected function performWork(BaseJob $job): void
4646
{
47-
$this->title(sprintf('Processing %s since %s', $job->jid, strftime('%F %T')));
47+
$this->title(sprintf(
48+
'Processing %s since %s',
49+
$job->jid,
50+
(new \DateTime())->format('Y-m-d H:i:s')
51+
));
4852

4953
try {
5054
$this->performJob($job, $this->logContext);

0 commit comments

Comments
 (0)