Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
run:
name: PHP ${{ matrix.php-versions }} (Redis ${{ matrix.redis-versions }})
runs-on: ubuntu-latest
container: shivammathur/node
services:
Expand All @@ -19,13 +20,14 @@ jobs:
--health-timeout 5s
--health-retries 5
strategy:
fail-fast: false
matrix:
php-versions: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
php-versions: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
redis-versions: ['5', '6', '7']
name: PHP ${{ matrix.php-versions }} (Redis ${{ matrix.redis-versions }})

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -35,10 +37,10 @@ jobs:

- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [3.23.0] - 2025-06-10
### Changes
- PHP 8.3, 8.4 support
- Laravel 12 support
- Add `monolog/monolog` 3.0 support
- Add `predis/predis` 2.0 support
- Use `DateTime()` instead of deprecated `strftime`

## [3.22.0] - 2023-02-24
### Changes
- PHP 8.2 support
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018-2019 PDFfiller
Copyright (c) 2018-2025 PDFfiller
Copyright (c) 2013-2015 Ryver, Inc

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# qless-php

[![PHP Version](https://img.shields.io/badge/supported->%3D7.1%20<8.2-blue?logo=php)](https://php.net/)
[![PHP Version](https://img.shields.io/badge/supported->%3D7.1%20<=8.4-blue?logo=php)](https://php.net/)
[![Workflow Status](https://github.com/pdffiller/qless-php/actions/workflows/pr.yml/badge.svg)](https://github.com/pdffiller/qless-php/actions/workflows/pr.yml)
[![Infection MSI](https://badge.stryker-mutator.io/github.com/pdffiller/qless-php/master)](https://infection.github.io)

PHP Bindings for qless.

Expand Down Expand Up @@ -947,7 +946,7 @@ qless-php is open-sourced software licensed under the MIT License.
See the [`LICENSE.txt`](https://github.com/pdffiller/qless-php/blob/master/LICENSE.txt) file for more.


© 2018-2022 PDFfiller<br>
© 2018-2025 PDFfiller<br>
© 2013-2015 Ryver, Inc <br>

All rights reserved.
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@
}
],
"require": {
"php": ">=7.1 < 8.3",
"php": "^7.1 || ^8.0",
"ext-json": "*",
"ext-pcntl": "*",
"ext-pcre": "*",
"ext-posix": "*",
"ext-sockets": "*",
"monolog/monolog": "^1.23 || ^2.0",
"predis/predis": "^1.1.10",
"ext-intl": "*",
"monolog/monolog": "^1.23 || ^2.0 || ^3.0",
"predis/predis": "^1.1.10 || ^2.0",
"psr/log": "^1 || ^2 || ^3",
"ramsey/uuid": "^3.7 || ^4",
"seld/signal-handler": "1.1.*"
Expand Down
18 changes: 15 additions & 3 deletions src/Workers/ForkingWorker.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,13 @@ protected function performWork(BaseJob $job): void
$this->childStart();
$this->watchdogStart($this->client->createSubscriber(['ql:log']));

$this->title(sprintf('Forked %d at %s', $this->childPID, strftime('%F %T')));
$this->title(
sprintf(
'Forked %d at %s',
$this->childPID,
(new \DateTime())->format('Y-m-d H:i:s')
)
);

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

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

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

$this->title(sprintf('Watching events for %s since %s', $this->job->jid, strftime('%F %T')));
$this->title(
sprintf(
'Watching events for %s since %s',
$this->job->jid,
(new \DateTime())->format('Y-m-d H:i:s')
)
);
$subscriber->watchdog($this->job->jid, $this->name, $this->childPID);

socket_close($socket);
Expand Down
6 changes: 5 additions & 1 deletion src/Workers/SimpleWorker.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ public function setLogger(LoggerInterface $logger): void
*/
protected function performWork(BaseJob $job): void
{
$this->title(sprintf('Processing %s since %s', $job->jid, strftime('%F %T')));
$this->title(sprintf(
'Processing %s since %s',
$job->jid,
(new \DateTime())->format('Y-m-d H:i:s')
));

try {
$this->performJob($job, $this->logContext);
Expand Down