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
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ php:
- hhvm

matrix:
exclude:
- php: 5.4
env: SYMFONY_VERSION=3.0.*
allow_failures:
- php: hhvm

Expand All @@ -21,6 +24,9 @@ env:
- SYMFONY_VERSION=2.4.*
- SYMFONY_VERSION=2.5.*
- SYMFONY_VERSION=2.6.*
- SYMFONY_VERSION=2.7.*
- SYMFONY_VERSION=2.8.*
- SYMFONY_VERSION=3.0.*

install:
- composer self-update
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@
"require": {
"php": ">=5.4.0",
"doctrine/common": "~2.4",
"symfony/dependency-injection": "~2.3, <3.0.0@dev",
"symfony/config": "~2.3, <3.0.0@dev",
"symfony/http-kernel": "~2.3, <3.0.0@dev",
"symfony/console": "~2.3, <3.0.0@dev",
"symfony/monolog-bundle": "~2.3, <3.0.0@dev"
"symfony/dependency-injection": "~2.3|^3.0",
"symfony/config": "~2.3|^3.0",
"symfony/http-kernel": "~2.3|^3.0",
"symfony/console": "~2.3|^3.0",
"symfony/monolog-bundle": "~2.3|^3.0"
},
"require-dev": {
"phpunit/phpunit": "~3.7",
"aws/aws-sdk-php": "~2.5",
"iron-io/iron_mq": "~1.5",
"symfony/finder": "~2.3",
"symfony/filesystem": "~2.3"
"symfony/finder": "~2.3|^3.0",
"symfony/filesystem": "~2.3|^3.0"
},
"suggest": {
"aws/aws-sdk-php": "Required to use AWS as a Queue Provider",
Expand Down
2 changes: 1 addition & 1 deletion src/Command/QueueReceiveCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private function pollQueue($registry, $name)
);
}

$dispatcher = $this->getContainer()->get('event_dispatcher');
$dispatcher = $this->container->get('event_dispatcher');
$messages = $registry->get($name)->receive();

foreach ($messages as $message) {
Expand Down
1 change: 0 additions & 1 deletion src/DependencyInjection/UecodeQPushExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

namespace Uecode\Bundle\QPushBundle\DependencyInjection;

use Uecode\Bundle\QPushBundle\DependencyInjection\Configuration;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Reference;
Expand Down
1 change: 0 additions & 1 deletion src/EventListener/RequestListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Uecode\Bundle\QPushBundle\Message\Message;
use Uecode\Bundle\QPushBundle\Message\Notification;
use Uecode\Bundle\QPushBundle\Event\Events;
use Uecode\Bundle\QPushBundle\Event\NotificationEvent;
Expand Down
3 changes: 1 addition & 2 deletions src/Provider/AbstractProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
use Doctrine\Common\Cache\Cache;
use Symfony\Bridge\Monolog\Logger;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Uecode\Bundle\QPushBundle\Provider\ProviderInterface;
use Uecode\Bundle\QPushBundle\Event\MessageEvent;
use Uecode\Bundle\QPushBundle\Event\NotificationEvent;

Expand Down Expand Up @@ -118,7 +117,7 @@ public function log($level, $message, array $context = [])
// Add the queue name and provider to the context
$context = array_merge(['queue' => $this->name, 'provider' => $this->getProvider()], $context);

$this->logger->addRecord($level, $message, $context);
return $this->logger->addRecord($level, $message, $context);
}

/**
Expand Down
2 changes: 0 additions & 2 deletions src/Provider/AwsProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@

namespace Uecode\Bundle\QPushBundle\Provider;

use Aws\Common\Aws;
use Aws\Sns\SnsClient;
use Aws\Sqs\SqsClient;
use Aws\Sqs\Exception\SqsException;
use Doctrine\Common\Cache\Cache;
use Symfony\Bridge\Monolog\Logger;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
Expand Down
2 changes: 1 addition & 1 deletion src/Provider/FileProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class FileProvider extends AbstractProvider

public function __construct($name, array $options, $client, Cache $cache, Logger $logger) {
$this->name = $name;
/** @var md5 only contain numeric and A to F, so it is file system safe */
/* md5 only contain numeric and A to F, so it is file system safe */
$this->queuePath = $options['path'].DIRECTORY_SEPARATOR.str_replace('-', '', hash('md5', $name));
$this->options = $options;
$this->cache = $cache;
Expand Down
4 changes: 2 additions & 2 deletions src/Provider/IronMqProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class IronMqProvider extends AbstractProvider
/**
* IronMQ Queue
*
* @var stdObject
* @var object
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

object isn't a valid type in PHP, \stdClass may make more sense

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stdObject doesn't exist, only stdClass. object is a typeint (see PHP doc object).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, alright, nvm then

*/
private $queue;

Expand Down Expand Up @@ -209,7 +209,7 @@ public function receive(array $options = [])
public function delete($id)
{
try {
$result = $this->ironmq->deleteMessage($this->getNameWithPrefix(), $id);
$this->ironmq->deleteMessage($this->getNameWithPrefix(), $id);
$this->log(200, "Message deleted.", ['message_id' => $id]);
} catch ( \Exception $e) {
if (false !== strpos($e->getMessage(), "Queue not found")) {
Expand Down