Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dusterio/laravel-aws-worker
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.01
Choose a base ref
...
head repository: dusterio/laravel-aws-worker
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 7 commits
  • 4 files changed
  • 4 contributors

Commits on May 27, 2024

  1. Update Laravel8Worker.php

    Fixed Dynamic Properties are deprecated warning
    Sensetivity authored May 27, 2024
    Copy the full SHA
    00d3071 View commit details

Commits on May 29, 2024

  1. Merge pull request #104 from Sensetivity/patch-1

    Update Laravel8Worker.php
    fylzero authored May 29, 2024
    Copy the full SHA
    f3007eb View commit details

Commits on Feb 16, 2025

  1. Copy the full SHA
    5bc6165 View commit details
  2. Merge pull request #105 from laravel-shift/l12-compatibility

    Laravel 12.x Compatibility
    fylzero authored Feb 16, 2025
    Copy the full SHA
    0326978 View commit details

Commits on Mar 27, 2025

  1. Copy the full SHA
    5798312 View commit details
  2. Copy the full SHA
    7bc5cd5 View commit details
  3. Merge pull request #107 from altin7m/master

    Fix: Add Laravel 12 Support
    fylzero authored Mar 27, 2025
    Copy the full SHA
    67e893d View commit details
Showing with 33 additions and 7 deletions.
  1. +4 −4 composer.json
  2. +1 −1 src/Integrations/BindsWorker.php
  3. +18 −2 src/Wrappers/DefaultWorker.php
  4. +10 −0 src/Wrappers/Laravel8Worker.php
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -22,11 +22,11 @@
],
"require": {
"php": ">=5.5.0",
"illuminate/support": "5.*|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0",
"illuminate/queue": "5.*|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0",
"illuminate/bus": "5.*|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0",
"illuminate/support": "5.*|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
"illuminate/queue": "5.*|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
"illuminate/bus": "5.*|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
"aws/aws-sdk-php": "~3.0",
"illuminate/http": "5.*|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0"
"illuminate/http": "5.*|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0"
},
"require-dev": {
"phpunit/phpunit": "3.7.*|^9.5.10|^10.5",
2 changes: 1 addition & 1 deletion src/Integrations/BindsWorker.php
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ trait BindsWorker
protected $workerImplementations = [
'5\.[345678]\.\d+' => Laravel53Worker::class,
'[67]\.\d+\.\d+' => Laravel6Worker::class,
'([89]|10|11)\.\d+\.\d+' => Laravel8Worker::class
'([89]|10|11|12)\.\d+\.\d+' => Laravel8Worker::class
];

/**
20 changes: 18 additions & 2 deletions src/Wrappers/DefaultWorker.php
Original file line number Diff line number Diff line change
@@ -3,19 +3,33 @@
namespace Dusterio\AwsWorker\Wrappers;

use Illuminate\Queue\Worker;
use Illuminate\Queue\WorkerOptions;
use Illuminate\Contracts\Cache\Repository as Cache;

/**
* Class DefaultWorker
* @package Dusterio\AwsWorker\Wrappers
*/
class DefaultWorker implements WorkerInterface
{
/**
* @var Worker
*/
public $worker;

/**
* @var Cache
*/
public $cache;

/**
* DefaultWorker constructor.
* @param Worker $worker
* @param \Illuminate\Contracts\Cache\Repository $cache
*/
public function __construct(Worker $worker)
public function __construct(Worker $worker, Cache $cache)
{
$this->cache = $cache;
$this->worker = $worker;
}

@@ -27,8 +41,10 @@ public function __construct(Worker $worker)
*/
public function process($queue, $job, array $options)
{
$workerOptions = new WorkerOptions('default', $options['delay'], 128, $options['timeout'], 3, $options['maxTries']);

$this->worker->process(
$queue, $job, $options['maxTries'], $options['delay']
$queue, $job, $workerOptions
);
}
}
10 changes: 10 additions & 0 deletions src/Wrappers/Laravel8Worker.php
Original file line number Diff line number Diff line change
@@ -12,6 +12,16 @@
*/
class Laravel8Worker implements WorkerInterface
{
/**
* @var Worker
*/
public $worker;

/**
* @var Cache
*/
public $cache;

/**
* DefaultWorker constructor.
* @param Worker $worker