Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

Prepared version 2.0.0 #17

Merged
merged 3 commits into from
Jan 30, 2019
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
23 changes: 14 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
sudo: false
language: php

php:
- 5.5
- 5.6
- 7.0
- hhvm
- 7.1
- 7.2
- 7.3

env:
- SYMFONY_VERSION=2.6.*
- SYMFONY_VERSION=2.7.*
- SYMFONY_VERSION=2.8.*
- SYMFONY_VERSION=3.*
- SYMFONY_VERSION=3.4.*
- SYMFONY_VERSION=4.0.*
- SYMFONY_VERSION=4.1.*
- SYMFONY_VERSION=4.2.*

matrix:
fast_finish: true
allow_failures:
- php: hhvm
exclude:
- php: 7.0
env: SYMFONY_VERSION=4.0.*
- php: 7.0
env: SYMFONY_VERSION=4.1.*
- php: 7.0
env: SYMFONY_VERSION=4.2.*

cache:
directories:
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
CHANGELOG
=========

## 2.0.0

### Changes

* Added Symfony 4 support
* #16 catch throwables instead of just exceptions

### Breaking changes

* Dropped support for PHP 5.5 and 5.6
* Dropped support for unmaintained Symfony versions. Supported versions are 2.8, 3.4, 4.1 and up,
as per the [Symfony Roadmap](https://symfony.com/roadmap).

## 1.2.1

* #9 Ensure that a job retains its priority when it is rescheduled
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ For this process, we assume you have a Beanstalk server up and running.
Install via [Composer][composer]:

```bash
$ composer require treehouselabs/worker-bundle:~1.0
$ composer require treehouselabs/worker-bundle
```

[composer]: https://getcomposer.org
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
}
],
"require": {
"php": ">=5.5",
"symfony/symfony": "^2.6|^3.0",
"php": ">=7.0",
"symfony/symfony": "^2.8|^3.0|^4.0",
"pda/pheanstalk": "^3.0"
},
"require-dev": {
"doctrine/orm": "^2.3",
"phpunit/phpunit": "^4.5",
"phpunit/phpunit": "^6.0",
"monolog/monolog": "^1.10.0"
},
"autoload": {
Expand Down
1 change: 1 addition & 0 deletions src/TreeHouse/WorkerBundle/Resources/config/services.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
services:
tree_house.worker.queue_manager:
public: true
class: TreeHouse\WorkerBundle\QueueManager
arguments:
- ~ # injected in extension
Expand Down
3 changes: 2 additions & 1 deletion tests/TreeHouse/WorkerBundle/QueueManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Pheanstalk\Job;
use Pheanstalk\PheanstalkInterface;
use Pheanstalk\Response;
use PHPUnit\Framework\TestCase;
use Symfony\Component\OptionsResolver\OptionsResolver;
use TreeHouse\WorkerBundle\Event\ExecutionEvent;
use TreeHouse\WorkerBundle\Event\JobEvent;
Expand All @@ -18,7 +19,7 @@
use TreeHouse\WorkerBundle\Tests\Mock\EventDispatcherMock;
use TreeHouse\WorkerBundle\WorkerEvents;

class QueueManagerTest extends \PHPUnit_Framework_TestCase
class QueueManagerTest extends TestCase
{
/**
* @var \PHPUnit_Framework_MockObject_MockObject|PheanstalkInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
namespace TreeHouse\WorkerBundle\Tests\DependencyInjection;

use Pheanstalk\Pheanstalk;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\HttpKernel\Tests\Logger;
use TreeHouse\WorkerBundle\DependencyInjection\TreeHouseWorkerExtension;
use TreeHouse\WorkerBundle\TreeHouseWorkerBundle;

class TreeHouseWorkerExtensionTest extends \PHPUnit_Framework_TestCase
class TreeHouseWorkerExtensionTest extends TestCase
{
/**
* @var ContainerBuilder
Expand Down Expand Up @@ -58,7 +59,13 @@ public function testExistingPheanstalkService()
$this->assertTrue($this->container->hasDefinition('tree_house.worker.queue_manager'));

$definition = $this->container->getDefinition('tree_house.worker.queue_manager');
$this->assertEquals($id, (string) $definition->getArgument(0));
$injected = $definition->getArgument(0);

if ($injected instanceof Definition) {
$this->assertEquals(Pheanstalk::class, $injected->getClass());
} else {
$this->assertEquals($id, (string) $injected);
}
}

public function testNewPheanstalkService()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

namespace TreeHouse\WorkerBundle\Tests\Event;

use PHPUnit\Framework\TestCase;
use TreeHouse\WorkerBundle\Event\ExecutionEvent;
use TreeHouse\WorkerBundle\Executor\ExecutorInterface;

class ExecutionEventTest extends \PHPUnit_Framework_TestCase
class ExecutionEventTest extends TestCase
{
public function testEvent()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/TreeHouse/WorkerBundle/Tests/Event/JobEventTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
namespace TreeHouse\WorkerBundle\Tests\Event;

use Pheanstalk\Job;
use PHPUnit\Framework\TestCase;
use TreeHouse\WorkerBundle\Event\JobEvent;

class JobEventTest extends \PHPUnit_Framework_TestCase
class JobEventTest extends TestCase
{
public function testEvent()
{
Expand Down