diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68423d7..ca3f81e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ jobs: runs-on: ubuntu-latest container: php:8.5 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: Install composer run: apt-get update -yq && apt-get install git wget procps unzip -y && pecl install -o -f redis && rm -rf /tmp/pear && docker-php-ext-enable redis && wget https://getcomposer.org/composer.phar && php composer.phar install --dev - name: Validate composer.json and composer.lock @@ -20,7 +20,7 @@ jobs: container: php:${{ matrix.php_version }} strategy: matrix: - php_version: [8.2, 8.3, 8.4, 8.5] + php_version: [8.3, 8.4, 8.5] services: redis: image: redis:8.4 @@ -30,10 +30,10 @@ jobs: --health-timeout 5s --health-retries 5 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: Install composer run: apt-get update -yq && apt-get install git wget procps unzip -y && pecl install -o -f redis && rm -rf /tmp/pear && docker-php-ext-enable redis && wget https://getcomposer.org/composer.phar && php composer.phar install --dev - - name: Run PHP ${{ matrix.php_version }}} Unit Tests + - name: Run PHP ${{ matrix.php_version }} Unit Tests run: php vendor/bin/phpunit --configuration phpunit.xml diff --git a/CHANGELOG.md b/CHANGELOG.md index e9e9923..b56b18c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 3.0.0 (2026-05-04) +- Update PHP to >=8.3 +- Update packages +- Improve PHP8.5 support + # 2.6.2 (2026-02-07) - Update packages - Remove setproctitle in favour of cli_set_process_title @@ -137,7 +142,7 @@ Changes by iskandar introduce improved support for using DSNs to connect to Redi * Restructure tests and test bootstrapping. Autoload tests via Composer (install test dependencies with `composer install --dev`) * Add `SETEX` to list of commands which supply a key as the first argument in Redisent (danhunsaker) * Fix an issue where a lost connection to Redis could cause an infinite loop (atorres757) -* Add a helper method to `Resque_Redis` to remove the namespace applied to Redis keys (tonypiper) +* Add a helper method to `\Resque\Redis` to remove the namespace applied to Redis keys (tonypiper) * Call beforePerform hook before retrieivng an instance of the job class (allows beforePerform to cancel a job with DontPerform before initialising your application) * Add `beforeEnqueue` hook, called before a job is placed on a queue @@ -158,7 +163,7 @@ Changes by iskandar introduce improved support for using DSNs to connect to Redi * Allow UNIX socket to be passed to Resque when connecting to Redis (pedroarnal) * Fix typographical errors in PHP docblocks (chaitanyakuber) * Set the queue name on job instances when jobs are executed (chaitanyakuber) -* Fix and add tests for Resque_Event::stopListening (ebernhardson) +* Fix and add tests for \Resque\Event::stopListening (ebernhardson) * Documentation cleanup (maetl) * Pass queue name to afterEvent callback * Only declare RedisException if it doesn't already exist (Matt Heath) diff --git a/HOWITWORKS.md b/HOWITWORKS.md index 7168926..66fbbfa 100644 --- a/HOWITWORKS.md +++ b/HOWITWORKS.md @@ -6,20 +6,20 @@ The following is a step-by-step breakdown of how php-resque operates. What happens when you call `Resque::enqueue()`? -1. `Resque::enqueue()` calls `Resque_Job::create()` with the same arguments it +1. `Resque::enqueue()` calls `\Resque\Job::create()` with the same arguments it received. -2. `Resque_Job::create()` checks that your `$args` (the third argument) are +2. `\Resque\Job::create()` checks that your `$args` (the third argument) are either `null` or in an array -3. `Resque_Job::create()` generates a job ID (a "token" in most of the docs) -4. `Resque_Job::create()` pushes the job to the requested queue (first +3. `\Resque\Job::create()` generates a job ID (a "token" in most of the docs) +4. `\Resque\Job::create()` pushes the job to the requested queue (first argument) -5. `Resque_Job::create()`, if status monitoring is enabled for the job (fourth +5. `\Resque\Job::create()`, if status monitoring is enabled for the job (fourth argument), calls `\Resque\Job\Status::create()` with the job ID as its only argument 6. `\Resque\Job\Status::create()` creates a key in Redis with the job ID in its name, and the current status (as well as a couple of timestamps) as its - value, then returns control to `Resque_Job::create()` -7. `Resque_Job::create()` returns control to `Resque::enqueue()`, with the job + value, then returns control to `\Resque\Job::create()` +7. `\Resque\Job::create()` returns control to `Resque::enqueue()`, with the job ID as a return value 8. `Resque::enqueue()` triggers the `afterEnqueue` event, then returns control to your application, again with the job ID as its return value @@ -28,130 +28,130 @@ What happens when you call `Resque::enqueue()`? How do the workers process the queues? -1. `Resque_Worker::work()`, the main loop of the worker process, calls - `Resque_Worker->reserve()` to check for a job -2. `Resque_Worker->reserve()` checks whether to use blocking pops or not (from +1. `\Resque\Worker::work()`, the main loop of the worker process, calls + `\Resque\Worker->reserve()` to check for a job +2. `\Resque\Worker->reserve()` checks whether to use blocking pops or not (from `BLOCKING`), then acts accordingly: * Blocking Pop - 1. `Resque_Worker->reserve()` calls `Resque_Job::reserveBlocking()` with + 1. `\Resque\Worker->reserve()` calls `\Resque\Job::reserveBlocking()` with the entire queue list and the timeout (from `INTERVAL`) as arguments - 2. `Resque_Job::reserveBlocking()` calls `Resque::blpop()` (which in turn + 2. `\Resque\Job::reserveBlocking()` calls `Resque::blpop()` (which in turn calls Redis' `blpop`, after prepping the queue list for the call, then processes the response for consistency with other aspects of the library, before finally returning control [and the queue/content of the - retrieved job, if any] to `Resque_Job::reserveBlocking()`) - 3. `Resque_Job::reserveBlocking()` checks whether the job content is an + retrieved job, if any] to `\Resque\Job::reserveBlocking()`) + 3. `\Resque\Job::reserveBlocking()` checks whether the job content is an array (it should contain the job's type [class], payload [args], and ID), and aborts processing if not - 4. `Resque_Job::reserveBlocking()` creates a new `Resque_Job` object with + 4. `\Resque\Job::reserveBlocking()` creates a new `\Resque\Job` object with the queue and content as constructor arguments to initialize the job itself, and returns it, along with control of the process, to - `Resque_Worker->reserve()` + `\Resque\Worker->reserve()` * Queue Polling - 1. `Resque_Worker->reserve()` iterates through the queue list, calling - `Resque_Job::reserve()` with the current queue's name as the sole + 1. `\Resque\Worker->reserve()` iterates through the queue list, calling + `\Resque\Job::reserve()` with the current queue's name as the sole argument on each pass - 2. `Resque_Job::reserve()` passes the queue name on to `Resque::pop()`, + 2. `\Resque\Job::reserve()` passes the queue name on to `Resque::pop()`, which in turn calls Redis' `lpop` with the same argument, then returns - control (and the job content, if any) to `Resque_Job::reserve()` - 3. `Resque_Job::reserve()` checks whether the job content is an array (as + control (and the job content, if any) to `\Resque\Job::reserve()` + 3. `\Resque\Job::reserve()` checks whether the job content is an array (as before, it should contain the job's type [class], payload [args], and ID), and aborts processing if not - 4. `Resque_Job::reserve()` creates a new `Resque_Job` object in the same + 4. `\Resque\Job::reserve()` creates a new `\Resque\Job` object in the same manner as above, and also returns this object (along with control of - the process) to `Resque_Worker->reserve()` -3. In either case, `Resque_Worker->reserve()` returns the new `Resque_Job` - object, along with control, up to `Resque_Worker::work()`; if no job is + the process) to `\Resque\Worker->reserve()` +3. In either case, `\Resque\Worker->reserve()` returns the new `\Resque\Job` + object, along with control, up to `\Resque\Worker::work()`; if no job is found, it simply returns `FALSE` * No Jobs - 1. If blocking mode is not enabled, `Resque_Worker::work()` sleeps for + 1. If blocking mode is not enabled, `\Resque\Worker::work()` sleeps for `INTERVAL` seconds; it calls `usleep()` for this, so fractional seconds *are* supported * Job Reserved - 1. `Resque_Worker::work()` triggers a `beforeFork` event - 2. `Resque_Worker::work()` calls `Resque_Worker->workingOn()` with the new - `Resque_Job` object as its argument - 3. `Resque_Worker->workingOn()` does some reference assignments to help keep + 1. `\Resque\Worker::work()` triggers a `beforeFork` event + 2. `\Resque\Worker::work()` calls `\Resque\Worker->workingOn()` with the new + `\Resque\Job` object as its argument + 3. `\Resque\Worker->workingOn()` does some reference assignments to help keep track of the worker/job relationship, then updates the job status from `WAITING` to `RUNNING` - 4. `Resque_Worker->workingOn()` stores the new `Resque_Job` object's payload + 4. `\Resque\Worker->workingOn()` stores the new `\Resque\Job` object's payload in a Redis key associated to the worker itself (this is to prevent the job from being lost indefinitely, but does rely on that PID never being allocated on that host to a different worker process), then returns control - to `Resque_Worker::work()` - 5. `Resque_Worker::work()` forks a child process to run the actual `perform()` + to `\Resque\Worker::work()` + 5. `\Resque\Worker::work()` forks a child process to run the actual `perform()` 6. The next steps differ between the worker and the child, now running in separate processes: * Worker 1. The worker waits for the job process to complete - 2. If the exit status is not 0, the worker calls `Resque_Job->fail()` with + 2. If the exit status is not 0, the worker calls `\Resque\Job->fail()` with a `Resque\Job\DirtyExitException` as its only argument. - 3. `Resque_Job->fail()` triggers an `onFailure` event - 4. `Resque_Job->fail()` updates the job status from `RUNNING` to `FAILED` - 5. `Resque_Job->fail()` calls `Resque_Failure::create()` with the job + 3. `\Resque\Job->fail()` triggers an `onFailure` event + 4. `\Resque\Job->fail()` updates the job status from `RUNNING` to `FAILED` + 5. `\Resque\Job->fail()` calls `\Resque\Failure::create()` with the job payload, the `Resque\Job\DirtyExitException`, the internal ID of the worker, and the queue name as arguments - 6. `Resque_Failure::create()` creates a new object of whatever type has - been set as the `Resque_Failure` "backend" handler; by default, this is + 6. `\Resque\Failure::create()` creates a new object of whatever type has + been set as the `\Resque\Failure` "backend" handler; by default, this is a `ResqueFailureRedis` object, whose constructor simply collects the - data passed into `Resque_Failure::create()` and pushes it into Redis + data passed into `\Resque\Failure::create()` and pushes it into Redis in the `failed` queue - 7. `Resque_Job->fail()` increments two failure counters in Redis: one for + 7. `\Resque\Job->fail()` increments two failure counters in Redis: one for a total count, and one for the worker - 8. `Resque_Job->fail()` returns control to the worker (still in - `Resque_Worker::work()`) without a value + 8. `\Resque\Job->fail()` returns control to the worker (still in + `\Resque\Worker::work()`) without a value * Job - 1. The job calls `Resque_Worker->perform()` with the `Resque_Job` as its + 1. The job calls `\Resque\Worker->perform()` with the `\Resque\Job` as its only argument. - 2. `Resque_Worker->perform()` sets up a `try...catch` block so it can + 2. `\Resque\Worker->perform()` sets up a `try...catch` block so it can properly handle exceptions by marking jobs as failed (by calling - `Resque_Job->fail()`, as above) - 3. Inside the `try...catch`, `Resque_Worker->perform()` triggers an + `\Resque\Job->fail()`, as above) + 3. Inside the `try...catch`, `\Resque\Worker->perform()` triggers an `afterFork` event - 4. Still inside the `try...catch`, `Resque_Worker->perform()` calls - `Resque_Job->perform()` with no arguments - 5. `Resque_Job->perform()` calls `Resque_Job->getInstance()` with no + 4. Still inside the `try...catch`, `\Resque\Worker->perform()` calls + `\Resque\Job->perform()` with no arguments + 5. `\Resque\Job->perform()` calls `\Resque\Job->getInstance()` with no arguments - 6. If `Resque_Job->getInstance()` has already been called, it returns the + 6. If `\Resque\Job->getInstance()` has already been called, it returns the existing instance; otherwise: - 7. `Resque_Job->getInstance()` checks that the job's class (type) exists + 7. `\Resque\Job->getInstance()` checks that the job's class (type) exists and has a `perform()` method; if not, in either case, it throws an - exception which will be caught by `Resque_Worker->perform()` - 8. `Resque_Job->getInstance()` creates an instance of the job's class, and - initializes it with a reference to the `Resque_Job` itself, the job's - arguments (which it gets by calling `Resque_Job->getArguments()`, which + exception which will be caught by `\Resque\Worker->perform()` + 8. `\Resque\Job->getInstance()` creates an instance of the job's class, and + initializes it with a reference to the `\Resque\Job` itself, the job's + arguments (which it gets by calling `\Resque\Job->getArguments()`, which in turn simply returns the value of `args[0]`, or an empty array if no arguments were passed), and the queue name - 9. `Resque_Job->getInstance()` returns control, along with the job class - instance, to `Resque_Job->perform()` - 10. `Resque_Job->perform()` sets up its own `try...catch` block to handle - `Resque_Job_DontPerform` exceptions; any other exceptions are passed - up to `Resque_Worker->perform()` - 11. `Resque_Job->perform()` triggers a `beforePerform` event - 12. `Resque_Job->perform()` calls `setUp()` on the instance, if it exists - 13. `Resque_Job->perform()` calls `perform()` on the instance - 14. `Resque_Job->perform()` calls `tearDown()` on the instance, if it + 9. `\Resque\Job->getInstance()` returns control, along with the job class + instance, to `\Resque\Job->perform()` + 10. `\Resque\Job->perform()` sets up its own `try...catch` block to handle + `\Resque\Job_DontPerform` exceptions; any other exceptions are passed + up to `\Resque\Worker->perform()` + 11. `\Resque\Job->perform()` triggers a `beforePerform` event + 12. `\Resque\Job->perform()` calls `setUp()` on the instance, if it exists + 13. `\Resque\Job->perform()` calls `perform()` on the instance + 14. `\Resque\Job->perform()` calls `tearDown()` on the instance, if it exists - 15. `Resque_Job->perform()` triggers an `afterPerform` event - 16. The `try...catch` block ends, suppressing `Resque_Job_DontPerform` + 15. `\Resque\Job->perform()` triggers an `afterPerform` event + 16. The `try...catch` block ends, suppressing `\Resque\Job_DontPerform` exceptions by returning control, and the value `FALSE`, to - `Resque_Worker->perform()`; any other situation returns the value + `\Resque\Worker->perform()`; any other situation returns the value `TRUE` along with control, instead - 17. The `try...catch` block in `Resque_Worker->perform()` ends - 18. `Resque_Worker->perform()` updates the job status from `RUNNING` to + 17. The `try...catch` block in `\Resque\Worker->perform()` ends + 18. `\Resque\Worker->perform()` updates the job status from `RUNNING` to `COMPLETE`, then returns control, with no value, to the worker (again - still in `Resque_Worker::work()`) - 19. `Resque_Worker::work()` calls `exit(0)` to terminate the job process + still in `\Resque\Worker::work()`) + 19. `\Resque\Worker::work()` calls `exit(0)` to terminate the job process cleanly * SPECIAL CASE: Non-forking OS (Windows) 1. Same as the job above, except it doesn't call `exit(0)` when done - 7. `Resque_Worker::work()` calls `Resque_Worker->doneWorking()` with no + 7. `\Resque\Worker::work()` calls `\Resque\Worker->doneWorking()` with no arguments - 8. `Resque_Worker->doneWorking()` increments two processed counters in Redis: + 8. `\Resque\Worker->doneWorking()` increments two processed counters in Redis: one for a total count, and one for the worker - 9. `Resque_Worker->doneWorking()` deletes the Redis key set in - `Resque_Worker->workingOn()`, then returns control, with no value, to - `Resque_Worker::work()` -4. `Resque_Worker::work()` returns control to the beginning of the main loop, + 9. `\Resque\Worker->doneWorking()` deletes the Redis key set in + `\Resque\Worker->workingOn()`, then returns control, with no value, to + `\Resque\Worker::work()` +4. `\Resque\Worker::work()` returns control to the beginning of the main loop, where it will wait for the next job to become available, and start this process all over again \ No newline at end of file diff --git a/README.md b/README.md index 38dad15..d05ae2b 100644 --- a/README.md +++ b/README.md @@ -171,17 +171,17 @@ echo $token; To fetch the status of a job: ```php -$status = new Resque_Job_Status($token); +$status = new \Resque\Job_Status($token); echo $status->get(); // Outputs the status ``` -Job statuses are defined as constants in the `Resque_Job_Status` class. +Job statuses are defined as constants in the `\Resque\Job_Status` class. Valid statuses include: -* `Resque_Job_Status::STATUS_WAITING` - Job is still queued -* `Resque_Job_Status::STATUS_RUNNING` - Job is currently running -* `Resque_Job_Status::STATUS_FAILED` - Job has failed -* `Resque_Job_Status::STATUS_COMPLETE` - Job is complete +* `\Resque\Job_Status::STATUS_WAITING` - Job is still queued +* `\Resque\Job_Status::STATUS_RUNNING` - Job is currently running +* `\Resque\Job_Status::STATUS_FAILED` - Job has failed +* `\Resque\Job_Status::STATUS_COMPLETE` - Job is complete * `false` - Failed to fetch the status - is the token valid? Statuses are available for up to 24 hours after a job has completed @@ -331,12 +331,12 @@ automatically detect and use it. php-resque has a basic event system that can be used by your application to customize how some of the php-resque internals behave. -You listen in on events (as listed below) by registering with `Resque_Event` +You listen in on events (as listed below) by registering with `\Resque\Event` and supplying a callback that you would like triggered when the event is raised: ```php -Resque_Event::listen('eventName', [callback]); +\Resque\Event::listen('eventName', [callback]); ``` `[callback]` may be anything in PHP that is callable by `call_user_func_array`: @@ -349,12 +349,12 @@ Resque_Event::listen('eventName', [callback]); Events may pass arguments (documented below), so your callback should accept these arguments. -You can stop listening to an event by calling `Resque_Event::stopListening` -with the same arguments supplied to `Resque_Event::listen`. +You can stop listening to an event by calling `\Resque\Event::stopListening` +with the same arguments supplied to `\Resque\Event::listen`. It is up to your application to register event listeners. When enqueuing events in your application, it should be as easy as making sure php-resque is loaded -and calling `Resque_Event::listen`. +and calling `\Resque\Event::listen`. When running workers, if you run workers via the default `bin/resque` script, your `APP_INCLUDE` script should initialize and register any listeners required @@ -365,13 +365,13 @@ responsibility to register listeners. #### beforeFirstFork #### -Called once, as a worker initializes. Argument passed is the instance of `Resque_Worker` +Called once, as a worker initializes. Argument passed is the instance of `\Resque\Worker` that was just initialized. #### beforeFork #### Called before php-resque forks to run a job. Argument passed contains the instance of -`Resque_Job` for the job about to be run. +`\Resque\Job` for the job about to be run. `beforeFork` is triggered in the **parent** process. Any changes made will be permanent for as long as the **worker** lives. @@ -379,7 +379,7 @@ for as long as the **worker** lives. #### afterFork #### Called after php-resque forks to run a job (but before the job is run). Argument -passed contains the instance of `Resque_Job` for the job about to be run. +passed contains the instance of `\Resque\Job` for the job about to be run. `afterFork` is triggered in the **child** process after forking out to complete a job. Any changes made will only live as long as the **job** is being processed. @@ -387,16 +387,16 @@ changes made will only live as long as the **job** is being processed. #### beforePerform #### Called before the `setUp` and `perform` methods on a job are run. Argument passed -contains the instance of `Resque_Job` for the job about to be run. +contains the instance of `\Resque\Job` for the job about to be run. -You can prevent execution of the job by throwing an exception of `Resque_Job_DontPerform`. +You can prevent execution of the job by throwing an exception of `\Resque\Job_DontPerform`. Any other exceptions thrown will be treated as if they were thrown in a job, causing the job to fail. #### afterPerform #### Called after the `perform` and `tearDown` methods on a job are run. Argument passed -contains the instance of `Resque_Job` that was just run. +contains the instance of `\Resque\Job` that was just run. Any exceptions thrown will be treated as if they were thrown in a job, causing the job to be marked as having failed. @@ -406,7 +406,7 @@ to be marked as having failed. Called whenever a job fails. Arguments passed (in this order) include: * Exception - The exception that was thrown when the job failed -* Resque_Job - The job that failed +* \Resque\Job - The job that failed #### beforeEnqueue #### @@ -418,7 +418,7 @@ Arguments passed (in this order) include: * Queue - string containing the name of the queue the job is to be enqueued in * ID - string containing the token of the job to be enqueued -You can prevent enqueing of the job by throwing an exception of `Resque_Job_DontCreate`. +You can prevent enqueing of the job by throwing an exception of `\Resque\Job_DontCreate`. #### afterEnqueue #### diff --git a/composer.json b/composer.json index 4a4fb21..3597727 100644 --- a/composer.json +++ b/composer.json @@ -16,13 +16,13 @@ } ], "require": { - "php": ">=8.1", + "php": ">=8.3", "psr/log": "^1.1 || ^2.0 || ^3.0", - "colinmollenhour/credis": "^1.17.0" + "colinmollenhour/credis": "^1.17.1" }, "require-dev": { - "phpunit/phpunit": "^10", - "squizlabs/php_codesniffer": "3.*" + "phpunit/phpunit": "^12.5.24", + "squizlabs/php_codesniffer": "^4.0.1" }, "bin": [ "bin/resque" diff --git a/composer.lock b/composer.lock index 7897d14..bbed7cc 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "27faf0711591276da2fe208796c4b5fb", + "content-hash": "45e2443a490ab31b8de5db76a4de4257", "packages": [ { "name": "colinmollenhour/credis", - "version": "v1.17.0", + "version": "v1.17.1", "source": { "type": "git", "url": "https://github.com/colinmollenhour/credis.git", - "reference": "f4930b426f6b1238b687a1ffe6ee5af7f835b40a" + "reference": "418f7031f31d1481c3ac19c918348e131bf8d3bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/f4930b426f6b1238b687a1ffe6ee5af7f835b40a", - "reference": "f4930b426f6b1238b687a1ffe6ee5af7f835b40a", + "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/418f7031f31d1481c3ac19c918348e131bf8d3bf", + "reference": "418f7031f31d1481c3ac19c918348e131bf8d3bf", "shasum": "" }, "require": { @@ -49,9 +49,9 @@ "homepage": "https://github.com/colinmollenhour/credis", "support": { "issues": "https://github.com/colinmollenhour/credis/issues", - "source": "https://github.com/colinmollenhour/credis/tree/v1.17.0" + "source": "https://github.com/colinmollenhour/credis/tree/v1.17.1" }, - "time": "2025-02-10T18:58:46+00:00" + "time": "2026-03-03T06:50:28+00:00" }, { "name": "psr/log", @@ -343,35 +343,33 @@ }, { "name": "phpunit/php-code-coverage", - "version": "10.1.16", + "version": "12.5.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "7e308268858ed6baedc8704a304727d20bc07c77" + "reference": "876099a072646c7745f673d7aeab5382c4439691" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7e308268858ed6baedc8704a304727d20bc07c77", - "reference": "7e308268858ed6baedc8704a304727d20bc07c77", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/876099a072646c7745f673d7aeab5382c4439691", + "reference": "876099a072646c7745f673d7aeab5382c4439691", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.19.1 || ^5.1.0", - "php": ">=8.1", - "phpunit/php-file-iterator": "^4.1.0", - "phpunit/php-text-template": "^3.0.1", - "sebastian/code-unit-reverse-lookup": "^3.0.0", - "sebastian/complexity": "^3.2.0", - "sebastian/environment": "^6.1.0", - "sebastian/lines-of-code": "^2.0.2", - "sebastian/version": "^4.0.1", - "theseer/tokenizer": "^1.2.3" + "nikic/php-parser": "^5.7.0", + "php": ">=8.3", + "phpunit/php-text-template": "^5.0", + "sebastian/complexity": "^5.0", + "sebastian/environment": "^8.0.3", + "sebastian/lines-of-code": "^4.0", + "sebastian/version": "^6.0", + "theseer/tokenizer": "^2.0.1" }, "require-dev": { - "phpunit/phpunit": "^10.1" + "phpunit/phpunit": "^12.5.1" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -380,7 +378,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "10.1.x-dev" + "dev-main": "12.5.x-dev" } }, "autoload": { @@ -409,40 +407,52 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.16" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/12.5.6" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-code-coverage", + "type": "tidelift" } ], - "time": "2024-08-22T04:31:57+00:00" + "time": "2026-04-15T08:23:17+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "4.1.0", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c" + "reference": "3d1cd096ef6bea4bf2762ba586e35dbd317cbfd5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c", - "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3d1cd096ef6bea4bf2762ba586e35dbd317cbfd5", + "reference": "3d1cd096ef6bea4bf2762ba586e35dbd317cbfd5", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^12.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -470,36 +480,48 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/6.0.1" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-file-iterator", + "type": "tidelift" } ], - "time": "2023-08-31T06:24:48+00:00" + "time": "2026-02-02T14:04:18+00:00" }, { "name": "phpunit/php-invoker", - "version": "4.0.0", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" + "reference": "12b54e689b07a25a9b41e57736dfab6ec9ae5406" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", - "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/12b54e689b07a25a9b41e57736dfab6ec9ae5406", + "reference": "12b54e689b07a25a9b41e57736dfab6ec9ae5406", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.3" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^12.0" }, "suggest": { "ext-pcntl": "*" @@ -507,7 +529,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -533,7 +555,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" + "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/6.0.0" }, "funding": [ { @@ -541,32 +564,32 @@ "type": "github" } ], - "time": "2023-02-03T06:56:09+00:00" + "time": "2025-02-07T04:58:58+00:00" }, { "name": "phpunit/php-text-template", - "version": "3.0.1", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748" + "reference": "e1367a453f0eda562eedb4f659e13aa900d66c53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748", - "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/e1367a453f0eda562eedb4f659e13aa900d66c53", + "reference": "e1367a453f0eda562eedb4f659e13aa900d66c53", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^12.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -593,7 +616,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1" + "source": "https://github.com/sebastianbergmann/php-text-template/tree/5.0.0" }, "funding": [ { @@ -601,32 +624,32 @@ "type": "github" } ], - "time": "2023-08-31T14:07:24+00:00" + "time": "2025-02-07T04:59:16+00:00" }, { "name": "phpunit/php-timer", - "version": "6.0.0", + "version": "8.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" + "reference": "f258ce36aa457f3aa3339f9ed4c81fc66dc8c2cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d", - "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/f258ce36aa457f3aa3339f9ed4c81fc66dc8c2cc", + "reference": "f258ce36aa457f3aa3339f9ed4c81fc66dc8c2cc", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^12.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "8.0-dev" } }, "autoload": { @@ -652,7 +675,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" + "security": "https://github.com/sebastianbergmann/php-timer/security/policy", + "source": "https://github.com/sebastianbergmann/php-timer/tree/8.0.0" }, "funding": [ { @@ -660,20 +684,20 @@ "type": "github" } ], - "time": "2023-02-03T06:57:52+00:00" + "time": "2025-02-07T04:59:38+00:00" }, { "name": "phpunit/phpunit", - "version": "10.5.63", + "version": "12.5.24", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "33198268dad71e926626b618f3ec3966661e4d90" + "reference": "d75dd30597caa80e72fad2ef7904601a30ef1046" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/33198268dad71e926626b618f3ec3966661e4d90", - "reference": "33198268dad71e926626b618f3ec3966661e4d90", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d75dd30597caa80e72fad2ef7904601a30ef1046", + "reference": "d75dd30597caa80e72fad2ef7904601a30ef1046", "shasum": "" }, "require": { @@ -686,26 +710,23 @@ "myclabs/deep-copy": "^1.13.4", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", - "php": ">=8.1", - "phpunit/php-code-coverage": "^10.1.16", - "phpunit/php-file-iterator": "^4.1.0", - "phpunit/php-invoker": "^4.0.0", - "phpunit/php-text-template": "^3.0.1", - "phpunit/php-timer": "^6.0.0", - "sebastian/cli-parser": "^2.0.1", - "sebastian/code-unit": "^2.0.0", - "sebastian/comparator": "^5.0.5", - "sebastian/diff": "^5.1.1", - "sebastian/environment": "^6.1.0", - "sebastian/exporter": "^5.1.4", - "sebastian/global-state": "^6.0.2", - "sebastian/object-enumerator": "^5.0.0", - "sebastian/recursion-context": "^5.0.1", - "sebastian/type": "^4.0.0", - "sebastian/version": "^4.0.1" - }, - "suggest": { - "ext-soap": "To be able to generate mocks based on WSDL files" + "php": ">=8.3", + "phpunit/php-code-coverage": "^12.5.6", + "phpunit/php-file-iterator": "^6.0.1", + "phpunit/php-invoker": "^6.0.0", + "phpunit/php-text-template": "^5.0.0", + "phpunit/php-timer": "^8.0.0", + "sebastian/cli-parser": "^4.2.0", + "sebastian/comparator": "^7.1.6", + "sebastian/diff": "^7.0.0", + "sebastian/environment": "^8.1.0", + "sebastian/exporter": "^7.0.2", + "sebastian/global-state": "^8.0.2", + "sebastian/object-enumerator": "^7.0.0", + "sebastian/recursion-context": "^7.0.1", + "sebastian/type": "^6.0.3", + "sebastian/version": "^6.0.0", + "staabm/side-effects-detector": "^1.0.5" }, "bin": [ "phpunit" @@ -713,7 +734,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "10.5-dev" + "dev-main": "12.5-dev" } }, "autoload": { @@ -745,56 +766,40 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.63" + "source": "https://github.com/sebastianbergmann/phpunit/tree/12.5.24" }, "funding": [ { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", - "type": "tidelift" + "url": "https://phpunit.de/sponsoring.html", + "type": "other" } ], - "time": "2026-01-27T05:48:37+00:00" + "time": "2026-05-01T04:21:04+00:00" }, { "name": "sebastian/cli-parser", - "version": "2.0.1", + "version": "4.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084" + "reference": "90f41072d220e5c40df6e8635f5dafba2d9d4d04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084", - "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/90f41072d220e5c40df6e8635f5dafba2d9d4d04", + "reference": "90f41072d220e5c40df6e8635f5dafba2d9d4d04", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^12.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.0-dev" + "dev-main": "4.2-dev" } }, "autoload": { @@ -818,155 +823,59 @@ "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.1" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/4.2.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" - } - ], - "time": "2024-03-02T07:12:49+00:00" - }, - { - "name": "sebastian/code-unit", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", - "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "require-dev": { - "phpunit/phpunit": "^10.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" - }, - "funding": [ + }, { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2023-02-03T06:58:43+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", - "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "require-dev": { - "phpunit/phpunit": "^10.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" - }, - "funding": [ + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, { - "url": "https://github.com/sebastianbergmann", - "type": "github" + "url": "https://tidelift.com/funding/github/packagist/sebastian/cli-parser", + "type": "tidelift" } ], - "time": "2023-02-03T06:59:15+00:00" + "time": "2025-09-14T09:36:45+00:00" }, { "name": "sebastian/comparator", - "version": "5.0.5", + "version": "7.1.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55dfef806eb7dfeb6e7a6935601fef866f8ca48d" + "reference": "c769009dee98f494e0edc3fd4f4087501688f11e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55dfef806eb7dfeb6e7a6935601fef866f8ca48d", - "reference": "55dfef806eb7dfeb6e7a6935601fef866f8ca48d", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/c769009dee98f494e0edc3fd4f4087501688f11e", + "reference": "c769009dee98f494e0edc3fd4f4087501688f11e", "shasum": "" }, "require": { "ext-dom": "*", "ext-mbstring": "*", - "php": ">=8.1", - "sebastian/diff": "^5.0", - "sebastian/exporter": "^5.0" + "php": ">=8.3", + "sebastian/diff": "^7.0", + "sebastian/exporter": "^7.0" }, "require-dev": { - "phpunit/phpunit": "^10.5" + "phpunit/phpunit": "^12.2" + }, + "suggest": { + "ext-bcmath": "For comparing BcMath\\Number objects" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "7.1-dev" } }, "autoload": { @@ -1006,7 +915,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.5" + "source": "https://github.com/sebastianbergmann/comparator/tree/7.1.6" }, "funding": [ { @@ -1026,33 +935,33 @@ "type": "tidelift" } ], - "time": "2026-01-24T09:25:16+00:00" + "time": "2026-04-14T08:23:15+00:00" }, { "name": "sebastian/complexity", - "version": "3.2.0", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "68ff824baeae169ec9f2137158ee529584553799" + "reference": "bad4316aba5303d0221f43f8cee37eb58d384bbb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799", - "reference": "68ff824baeae169ec9f2137158ee529584553799", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/bad4316aba5303d0221f43f8cee37eb58d384bbb", + "reference": "bad4316aba5303d0221f43f8cee37eb58d384bbb", "shasum": "" }, "require": { - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=8.1" + "nikic/php-parser": "^5.0", + "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^12.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.2-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -1076,7 +985,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", "security": "https://github.com/sebastianbergmann/complexity/security/policy", - "source": "https://github.com/sebastianbergmann/complexity/tree/3.2.0" + "source": "https://github.com/sebastianbergmann/complexity/tree/5.0.0" }, "funding": [ { @@ -1084,33 +993,33 @@ "type": "github" } ], - "time": "2023-12-21T08:37:17+00:00" + "time": "2025-02-07T04:55:25+00:00" }, { "name": "sebastian/diff", - "version": "5.1.1", + "version": "7.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e" + "reference": "7ab1ea946c012266ca32390913653d844ecd085f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e", - "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7ab1ea946c012266ca32390913653d844ecd085f", + "reference": "7ab1ea946c012266ca32390913653d844ecd085f", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^10.0", - "symfony/process": "^6.4" + "phpunit/phpunit": "^12.0", + "symfony/process": "^7.2" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.1-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -1143,7 +1052,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/5.1.1" + "source": "https://github.com/sebastianbergmann/diff/tree/7.0.0" }, "funding": [ { @@ -1151,27 +1060,27 @@ "type": "github" } ], - "time": "2024-03-02T07:15:17+00:00" + "time": "2025-02-07T04:55:46+00:00" }, { "name": "sebastian/environment", - "version": "6.1.0", + "version": "8.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "8074dbcd93529b357029f5cc5058fd3e43666984" + "reference": "b121608b28a13f721e76ffbbd386d08eff58f3f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984", - "reference": "8074dbcd93529b357029f5cc5058fd3e43666984", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/b121608b28a13f721e76ffbbd386d08eff58f3f6", + "reference": "b121608b28a13f721e76ffbbd386d08eff58f3f6", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^12.0" }, "suggest": { "ext-posix": "*" @@ -1179,7 +1088,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "6.1-dev" + "dev-main": "8.1-dev" } }, "autoload": { @@ -1207,42 +1116,54 @@ "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/6.1.0" + "source": "https://github.com/sebastianbergmann/environment/tree/8.1.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/environment", + "type": "tidelift" } ], - "time": "2024-03-23T08:47:14+00:00" + "time": "2026-04-15T12:13:01+00:00" }, { "name": "sebastian/exporter", - "version": "5.1.4", + "version": "7.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "0735b90f4da94969541dac1da743446e276defa6" + "reference": "016951ae10980765e4e7aee491eb288c64e505b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0735b90f4da94969541dac1da743446e276defa6", - "reference": "0735b90f4da94969541dac1da743446e276defa6", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/016951ae10980765e4e7aee491eb288c64e505b7", + "reference": "016951ae10980765e4e7aee491eb288c64e505b7", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": ">=8.1", - "sebastian/recursion-context": "^5.0" + "php": ">=8.3", + "sebastian/recursion-context": "^7.0" }, "require-dev": { - "phpunit/phpunit": "^10.5" + "phpunit/phpunit": "^12.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.1-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -1285,7 +1206,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.4" + "source": "https://github.com/sebastianbergmann/exporter/tree/7.0.2" }, "funding": [ { @@ -1305,35 +1226,35 @@ "type": "tidelift" } ], - "time": "2025-09-24T06:09:11+00:00" + "time": "2025-09-24T06:16:11+00:00" }, { "name": "sebastian/global-state", - "version": "6.0.2", + "version": "8.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9" + "reference": "ef1377171613d09edd25b7816f05be8313f9115d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", - "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/ef1377171613d09edd25b7816f05be8313f9115d", + "reference": "ef1377171613d09edd25b7816f05be8313f9115d", "shasum": "" }, "require": { - "php": ">=8.1", - "sebastian/object-reflector": "^3.0", - "sebastian/recursion-context": "^5.0" + "php": ">=8.3", + "sebastian/object-reflector": "^5.0", + "sebastian/recursion-context": "^7.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^12.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "8.0-dev" } }, "autoload": { @@ -1359,41 +1280,53 @@ "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", "security": "https://github.com/sebastianbergmann/global-state/security/policy", - "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.2" + "source": "https://github.com/sebastianbergmann/global-state/tree/8.0.2" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/global-state", + "type": "tidelift" } ], - "time": "2024-03-02T07:19:19+00:00" + "time": "2025-08-29T11:29:25+00:00" }, { "name": "sebastian/lines-of-code", - "version": "2.0.2", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0" + "reference": "97ffee3bcfb5805568d6af7f0f893678fc076d2f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0", - "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/97ffee3bcfb5805568d6af7f0f893678fc076d2f", + "reference": "97ffee3bcfb5805568d6af7f0f893678fc076d2f", "shasum": "" }, "require": { - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=8.1" + "nikic/php-parser": "^5.0", + "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^12.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1417,7 +1350,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.2" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/4.0.0" }, "funding": [ { @@ -1425,34 +1358,34 @@ "type": "github" } ], - "time": "2023-12-21T08:38:20+00:00" + "time": "2025-02-07T04:57:28+00:00" }, { "name": "sebastian/object-enumerator", - "version": "5.0.0", + "version": "7.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" + "reference": "1effe8e9b8e068e9ae228e542d5d11b5d16db894" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", - "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1effe8e9b8e068e9ae228e542d5d11b5d16db894", + "reference": "1effe8e9b8e068e9ae228e542d5d11b5d16db894", "shasum": "" }, "require": { - "php": ">=8.1", - "sebastian/object-reflector": "^3.0", - "sebastian/recursion-context": "^5.0" + "php": ">=8.3", + "sebastian/object-reflector": "^5.0", + "sebastian/recursion-context": "^7.0" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^12.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -1474,7 +1407,8 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" + "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/7.0.0" }, "funding": [ { @@ -1482,32 +1416,32 @@ "type": "github" } ], - "time": "2023-02-03T07:08:32+00:00" + "time": "2025-02-07T04:57:48+00:00" }, { "name": "sebastian/object-reflector", - "version": "3.0.0", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" + "reference": "4bfa827c969c98be1e527abd576533293c634f6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", - "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/4bfa827c969c98be1e527abd576533293c634f6a", + "reference": "4bfa827c969c98be1e527abd576533293c634f6a", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^12.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -1529,7 +1463,8 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" + "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/5.0.0" }, "funding": [ { @@ -1537,32 +1472,32 @@ "type": "github" } ], - "time": "2023-02-03T07:06:18+00:00" + "time": "2025-02-07T04:58:17+00:00" }, { "name": "sebastian/recursion-context", - "version": "5.0.1", + "version": "7.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "47e34210757a2f37a97dcd207d032e1b01e64c7a" + "reference": "0b01998a7d5b1f122911a66bebcb8d46f0c82d8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/47e34210757a2f37a97dcd207d032e1b01e64c7a", - "reference": "47e34210757a2f37a97dcd207d032e1b01e64c7a", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/0b01998a7d5b1f122911a66bebcb8d46f0c82d8c", + "reference": "0b01998a7d5b1f122911a66bebcb8d46f0c82d8c", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^10.5" + "phpunit/phpunit": "^12.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -1593,7 +1528,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.1" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/7.0.1" }, "funding": [ { @@ -1613,32 +1548,32 @@ "type": "tidelift" } ], - "time": "2025-08-10T07:50:56+00:00" + "time": "2025-08-13T04:44:59+00:00" }, { "name": "sebastian/type", - "version": "4.0.0", + "version": "6.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" + "reference": "e549163b9760b8f71f191651d22acf32d56d6d4d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", - "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/e549163b9760b8f71f191651d22acf32d56d6d4d", + "reference": "e549163b9760b8f71f191651d22acf32d56d6d4d", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^12.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1661,37 +1596,50 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" + "security": "https://github.com/sebastianbergmann/type/security/policy", + "source": "https://github.com/sebastianbergmann/type/tree/6.0.3" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/type", + "type": "tidelift" } ], - "time": "2023-02-03T07:10:45+00:00" + "time": "2025-08-09T06:57:12+00:00" }, { "name": "sebastian/version", - "version": "4.0.1", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" + "reference": "3e6ccf7657d4f0a59200564b08cead899313b53c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", - "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/3e6ccf7657d4f0a59200564b08cead899313b53c", + "reference": "3e6ccf7657d4f0a59200564b08cead899313b53c", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1714,7 +1662,8 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" + "security": "https://github.com/sebastianbergmann/version/security/policy", + "source": "https://github.com/sebastianbergmann/version/tree/6.0.0" }, "funding": [ { @@ -1722,30 +1671,30 @@ "type": "github" } ], - "time": "2023-02-07T11:34:05+00:00" + "time": "2025-02-07T05:00:38+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.13.5", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4" + "reference": "0525c73950de35ded110cffafb9892946d7771b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0ca86845ce43291e8f5692c7356fccf3bcf02bf4", - "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0525c73950de35ded110cffafb9892946d7771b5", + "reference": "0525c73950de35ded110cffafb9892946d7771b5", "shasum": "" }, "require": { "ext-simplexml": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": ">=5.4.0" + "php": ">=7.2.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" + "phpunit/phpunit": "^8.4.0 || ^9.3.4 || ^10.5.32 || 11.3.3 - 11.5.28 || ^11.5.31" }, "bin": [ "bin/phpcbf", @@ -1770,7 +1719,7 @@ "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" } ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "description": "PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.", "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", "keywords": [ "phpcs", @@ -1801,27 +1750,79 @@ "type": "thanks_dev" } ], - "time": "2025-11-04T16:30:35+00:00" + "time": "2025-11-10T16:43:36+00:00" + }, + { + "name": "staabm/side-effects-detector", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/staabm/side-effects-detector.git", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.6", + "phpunit/phpunit": "^9.6.21", + "symfony/var-dumper": "^5.4.43", + "tomasvotruba/type-coverage": "1.0.0", + "tomasvotruba/unused-public": "1.0.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "lib/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A static analysis tool to detect side effects in PHP code", + "keywords": [ + "static analysis" + ], + "support": { + "issues": "https://github.com/staabm/side-effects-detector/issues", + "source": "https://github.com/staabm/side-effects-detector/tree/1.0.5" + }, + "funding": [ + { + "url": "https://github.com/staabm", + "type": "github" + } + ], + "time": "2024-10-20T05:08:20+00:00" }, { "name": "theseer/tokenizer", - "version": "1.3.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "b7489ce515e168639d17feec34b8847c326b0b3c" + "reference": "7989e43bf381af0eac72e4f0ca5bcbfa81658be4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b7489ce515e168639d17feec34b8847c326b0b3c", - "reference": "b7489ce515e168639d17feec34b8847c326b0b3c", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/7989e43bf381af0eac72e4f0ca5bcbfa81658be4", + "reference": "7989e43bf381af0eac72e4f0ca5bcbfa81658be4", "shasum": "" }, "require": { "ext-dom": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" + "php": "^8.1" }, "type": "library", "autoload": { @@ -1843,7 +1844,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.3.1" + "source": "https://github.com/theseer/tokenizer/tree/2.0.1" }, "funding": [ { @@ -1851,7 +1852,7 @@ "type": "github" } ], - "time": "2025-11-17T20:03:58+00:00" + "time": "2025-12-08T11:19:18+00:00" } ], "aliases": [], @@ -1860,7 +1861,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=8.1" + "php": ">=8.3" }, "platform-dev": {}, "plugin-api-version": "2.9.0" diff --git a/examples/SampleResquePlugin.php b/examples/SampleResquePlugin.php index 1c2b2b3..b071a54 100644 --- a/examples/SampleResquePlugin.php +++ b/examples/SampleResquePlugin.php @@ -3,13 +3,13 @@ namespace Resque\Example; // Somewhere in our application, we need to register: -// \Resque\Event::listen('afterEnqueue', ['My_Resque_Plugin', 'afterEnqueue']); -// \Resque\Event::listen('beforeFirstFork', ['My_Resque_Plugin', 'beforeFirstFork']); -// \Resque\Event::listen('beforeFork', ['My_Resque_Plugin', 'beforeFork']); -// \Resque\Event::listen('afterFork', ['My_Resque_Plugin', 'afterFork']); -// \Resque\Event::listen('beforePerform', ['My_Resque_Plugin', 'beforePerform']); -// \Resque\Event::listen('afterPerform', ['My_Resque_Plugin', 'afterPerform']); -// \Resque\Event::listen('onFailure', ['My_Resque_Plugin', 'onFailure']); +// \Resque\Event::listen('afterEnqueue', ['My_\Resque\Plugin', 'afterEnqueue']); +// \Resque\Event::listen('beforeFirstFork', ['My_\Resque\Plugin', 'beforeFirstFork']); +// \Resque\Event::listen('beforeFork', ['My_\Resque\Plugin', 'beforeFork']); +// \Resque\Event::listen('afterFork', ['My_\Resque\Plugin', 'afterFork']); +// \Resque\Event::listen('beforePerform', ['My_\Resque\Plugin', 'beforePerform']); +// \Resque\Event::listen('afterPerform', ['My_\Resque\Plugin', 'afterPerform']); +// \Resque\Event::listen('onFailure', ['My_\Resque\Plugin', 'onFailure']); class SampleResquePlugin { @@ -37,7 +37,7 @@ public static function afterFork($job) public static function beforePerform($job) { echo "Cancelling " . $job . "\n"; - // throw new Resque_Job_DontPerform; + // throw new \Resque\Job_DontPerform; } public static function afterPerform($job) diff --git a/ruleset.xml b/ruleset.xml index 5012faa..b7fe5de 100644 --- a/ruleset.xml +++ b/ruleset.xml @@ -1,6 +1,6 @@ - - PHP8.2 Ruleset + + PHP8.3 Ruleset . vendor @@ -17,8 +17,8 @@ - - + + diff --git a/src/Resque/Failure/Failure.php b/src/Resque/Failure/Failure.php index 1a0b17f..826cc86 100644 --- a/src/Resque/Failure/Failure.php +++ b/src/Resque/Failure/Failure.php @@ -22,7 +22,7 @@ class Failure * * @param array $payload The contents of the job that has just failed. * @param \Exception $exception The exception generated when the job failed to run. - * @param \Resque\Worker $worker Instance of Resque_Worker that was running this job when it failed. + * @param \Resque\Worker $worker Instance of \Resque\Worker that was running this job when it failed. * @param string $queue The name of the queue that this job was fetched from. */ public static function create( diff --git a/src/Resque/Failure/ResqueFailureInterface.php b/src/Resque/Failure/ResqueFailureInterface.php index 980e656..bdfcbf5 100644 --- a/src/Resque/Failure/ResqueFailureInterface.php +++ b/src/Resque/Failure/ResqueFailureInterface.php @@ -16,7 +16,7 @@ interface ResqueFailureInterface * * @param object $payload Object containing details of the failed job. * @param object $exception Instance of the exception that was thrown by the failed job. - * @param object $worker Instance of Resque_Worker that received the job. + * @param object $worker Instance of \Resque\Worker that received the job. * @param string $queue The name of the queue the job was fetched from. */ public function __construct($payload, $exception, $worker, $queue); diff --git a/src/Resque/Failure/ResqueFailureRedis.php b/src/Resque/Failure/ResqueFailureRedis.php index 33a9cc1..fda3b1b 100644 --- a/src/Resque/Failure/ResqueFailureRedis.php +++ b/src/Resque/Failure/ResqueFailureRedis.php @@ -17,7 +17,7 @@ class ResqueFailureRedis implements ResqueFailureInterface * * @param object $payload Object containing details of the failed job. * @param object $exception Instance of the exception that was thrown by the failed job. - * @param object $worker Instance of Resque_Worker that received the job. + * @param object $worker Instance of \Resque\Worker that received the job. * @param string $queue The name of the queue the job was fetched from. * @throws \Resque\RedisException */ diff --git a/src/Resque/Redis.php b/src/Resque/Redis.php index 5537b55..13e174f 100644 --- a/src/Resque/Redis.php +++ b/src/Resque/Redis.php @@ -238,7 +238,7 @@ public static function parseDsn($dsn): array * * @return mixed Return value from Resident::call() based on the command. * - * @throws Resque_RedisException + * @throws \Resque\RedisException */ public function __call($name, $args) { diff --git a/src/Resque/Resque.php b/src/Resque/Resque.php index 8d57fbd..b69ed8e 100644 --- a/src/Resque/Resque.php +++ b/src/Resque/Resque.php @@ -12,12 +12,12 @@ class Resque { - public const VERSION = '2.6.2'; + public const VERSION = '3.0.0'; public const DEFAULT_INTERVAL = 5; /** - * @var Resque_Redis Instance of Resque_Redis that talks to redis. + * @var \Resque\Redis Instance of Redis that talks to redis. */ public static $redis = null; @@ -38,7 +38,7 @@ class Resque * * @param mixed $server Host/port combination separated by a colon, DSN-formatted URI, or * a callable that receives the configured database ID - * and returns a Resque_Redis instance, or + * and returns a \Resque\Redis instance, or * a nested array of servers with host/port pairs. * @param int $database */ @@ -50,9 +50,9 @@ public static function setBackend($server, $database = 0) } /** - * Return an instance of the Resque_Redis class instantiated for Resque. + * Return an instance of the Redis class instantiated for Resque. * - * @return \Resque\Redis Instance of Resque_Redis. + * @return \Resque\Redis Instance of Redis. * * @throws \Resque\RedisException */ @@ -196,7 +196,7 @@ public static function blpop(array $queues, $timeout) } /** - * Normally the Resque_Redis class returns queue names without the prefix + * Normally the \Resque\Redis class returns queue names without the prefix * But the blpop is a bit different. It returns the name as prefix:queue:name * So we need to strip off the prefix:queue: part */ diff --git a/src/Resque/Worker.php b/src/Resque/Worker.php index 0f6d0a5..accc0b0 100644 --- a/src/Resque/Worker.php +++ b/src/Resque/Worker.php @@ -104,7 +104,7 @@ public function setId($workerId): void * * @return void * - * @throws Resque_RedisException + * @throws \Resque\RedisException */ public function work($interval = Resque::DEFAULT_INTERVAL, $blocking = false): void { @@ -449,7 +449,7 @@ public function unregisterWorker(): void * * @return void * - * @throws Resque_RedisException + * @throws \Resque\RedisException */ public function workingOn(\Resque\Job\Job $job): void { diff --git a/tests/Resque/Tests/EventTest.php b/tests/Resque/Tests/EventTest.php index 45caf93..c642f19 100644 --- a/tests/Resque/Tests/EventTest.php +++ b/tests/Resque/Tests/EventTest.php @@ -12,8 +12,8 @@ class EventTest extends TestCase { - private $callbacksHit = []; - private $worker; + private array $callbacksHit = []; + private \Resque\Worker $worker; public function setUp(): void { @@ -53,11 +53,7 @@ public static function eventCallbackProvider() ]; } - /** - * @dataProvider eventCallbackProvider - * @param $event - * @param $callback - */ + #[\PHPUnit\Framework\Attributes\DataProvider('eventCallbackProvider')] public function testEventCallbacksFire($event, $callback) { \Resque\Event::listen($event, [$this, $callback]); @@ -104,7 +100,7 @@ public function testBeforePerformEventCanStopWork() $this->assertFalse($job->perform()); $this->assertContains($callback, $this->callbacksHit, $callback . ' callback was not called'); - $this->assertFalse(TestJob::$called, 'Job was still performed though Resque_Job_DontPerform was thrown'); + $this->assertFalse(TestJob::$called, 'Job was still performed though \Resque\Job_DontPerform was thrown'); } public function testBeforeEnqueueEventStopsJobCreation() @@ -144,7 +140,7 @@ public function testStopListeningRemovesListener() $this->worker->work(0); $this->assertNotContains($callback, $this->callbacksHit, - $event . ' callback (' . $callback . ') was called though Resque_Event::stopListening was called' + $event . ' callback (' . $callback . ') was called though \Resque\Event::stopListening was called' ); } diff --git a/tests/Resque/Tests/JobTest.php b/tests/Resque/Tests/JobTest.php index 7ab596b..0e3655d 100644 --- a/tests/Resque/Tests/JobTest.php +++ b/tests/Resque/Tests/JobTest.php @@ -12,7 +12,7 @@ class JobTest extends TestCase { - protected $worker; + protected \Resque\Worker $worker; public function setUp(): void { @@ -41,9 +41,6 @@ public function testQeueuedJobCanBeReserved() $this->assertEquals('\Resque\Test\TestJob', $job->payload['class']); } - /** - * @expectedException \InvalidArgumentException - */ public function testObjectArgumentsCannotBePassedToJob() { $this->expectException(\InvalidArgumentException::class); @@ -120,9 +117,6 @@ public function testFailedJobExceptionsAreCaught() $this->assertEquals(1, \Resque\Stat::get('failed:' . $this->worker)); } - /** - * @expectedException \Resque\Exception - */ public function testJobWithoutPerformMethodThrowsException() { $this->expectException(\Resque\Exception::class); @@ -132,9 +126,6 @@ public function testJobWithoutPerformMethodThrowsException() $job->perform(); } - /** - * @expectedException \Resque\Exception - */ public function testInvalidJobThrowsException() { $this->expectException(\Resque\Exception::class); diff --git a/tests/Resque/Tests/RedisTest.php b/tests/Resque/Tests/RedisTest.php index 4584d97..c3ff1c4 100644 --- a/tests/Resque/Tests/RedisTest.php +++ b/tests/Resque/Tests/RedisTest.php @@ -3,7 +3,7 @@ namespace Resque\Test; /** - * Resque_Event tests. + * \Resque\Event tests. * * @package Resque/Tests * @author Daniel Mason @@ -175,24 +175,14 @@ public static function bogusDsnStringProvider() ]; } - /** - * @dataProvider validDsnStringProvider - * @param $dsn - * @param $expected - */ + #[\PHPUnit\Framework\Attributes\DataProvider('validDsnStringProvider')] public function testParsingValidDsnString($dsn, $expected) { $result = \Resque\Redis::parseDsn($dsn); $this->assertEquals($expected, $result); } - /** - * @dataProvider bogusDsnStringProvider - * - * @expectedException \InvalidArgumentException - * - * @param $dsn - */ + #[\PHPUnit\Framework\Attributes\DataProvider('bogusDsnStringProvider')] public function testParsingBogusDsnStringThrowsException($dsn) { $this->expectException(\InvalidArgumentException::class);