diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 901fdd3..9f94958 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -7,6 +7,7 @@ on: jobs: run: + name: PHP ${{ matrix.php-versions }} (Redis ${{ matrix.redis-versions }}) runs-on: ubuntu-latest container: shivammathur/node services: @@ -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 @@ -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') }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 3550636..68e096d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/LICENSE.txt b/LICENSE.txt index 654415c..9410b5c 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -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 diff --git a/README.md b/README.md index dc68ed3..aefd811 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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
+© 2018-2025 PDFfiller
© 2013-2015 Ryver, Inc
All rights reserved. diff --git a/composer.json b/composer.json index 8a6d515..77b6764 100644 --- a/composer.json +++ b/composer.json @@ -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.*" diff --git a/src/Workers/ForkingWorker.php b/src/Workers/ForkingWorker.php index 06f8d5a..cc1241d 100644 --- a/src/Workers/ForkingWorker.php +++ b/src/Workers/ForkingWorker.php @@ -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) { @@ -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); @@ -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); diff --git a/src/Workers/SimpleWorker.php b/src/Workers/SimpleWorker.php index 92863da..239a03d 100644 --- a/src/Workers/SimpleWorker.php +++ b/src/Workers/SimpleWorker.php @@ -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);