Skip to content

Commit 054e622

Browse files
author
James Moey
committed
Remove ContainerAwareTrait to be Symfony 2.3 compatible.
1 parent ea81d01 commit 054e622

4 files changed

Lines changed: 76 additions & 8 deletions

File tree

src/Command/QueueBuildCommand.php

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,31 @@
2727
use Symfony\Component\Console\Input\InputInterface;
2828
use Symfony\Component\Console\Output\OutputInterface;
2929
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
30-
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
30+
use Symfony\Component\DependencyInjection\ContainerInterface;
3131

3232
/**
3333
* @author Keith Kirk <kkirk@undergroundelephant.com>
3434
*/
3535
class QueueBuildCommand extends Command implements ContainerAwareInterface
3636
{
37-
use ContainerAwareTrait;
37+
/**
38+
* @var ContainerInterface
39+
*
40+
* @api
41+
*/
42+
protected $container;
43+
44+
/**
45+
* Sets the Container associated with this Controller.
46+
*
47+
* @param ContainerInterface $container A ContainerInterface instance
48+
*
49+
* @api
50+
*/
51+
public function setContainer(ContainerInterface $container = null)
52+
{
53+
$this->container = $container;
54+
}
3855

3956
protected $output;
4057

src/Command/QueueDestroyCommand.php

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,31 @@
2828
use Symfony\Component\Console\Input\InputOption;
2929
use Symfony\Component\Console\Output\OutputInterface;
3030
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
31-
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
31+
use Symfony\Component\DependencyInjection\ContainerInterface;
3232

3333
/**
3434
* @author Keith Kirk <kkirk@undergroundelephant.com>
3535
*/
3636
class QueueDestroyCommand extends Command implements ContainerAwareInterface
3737
{
38-
use ContainerAwareTrait;
38+
/**
39+
* @var ContainerInterface
40+
*
41+
* @api
42+
*/
43+
protected $container;
44+
45+
/**
46+
* Sets the Container associated with this Controller.
47+
*
48+
* @param ContainerInterface $container A ContainerInterface instance
49+
*
50+
* @api
51+
*/
52+
public function setContainer(ContainerInterface $container = null)
53+
{
54+
$this->container = $container;
55+
}
3956

4057
protected $output;
4158

src/Command/QueuePublishCommand.php

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,31 @@
2727
use Symfony\Component\Console\Input\InputInterface;
2828
use Symfony\Component\Console\Output\OutputInterface;
2929
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
30-
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
30+
use Symfony\Component\DependencyInjection\ContainerInterface;
3131

3232
/**
3333
* @author Keith Kirk <kkirk@undergroundelephant.com>
3434
*/
3535
class QueuePublishCommand extends Command implements ContainerAwareInterface
3636
{
37-
use ContainerAwareTrait;
37+
/**
38+
* @var ContainerInterface
39+
*
40+
* @api
41+
*/
42+
protected $container;
43+
44+
/**
45+
* Sets the Container associated with this Controller.
46+
*
47+
* @param ContainerInterface $container A ContainerInterface instance
48+
*
49+
* @api
50+
*/
51+
public function setContainer(ContainerInterface $container = null)
52+
{
53+
$this->container = $container;
54+
}
3855

3956
protected $output;
4057

src/Command/QueueReceiveCommand.php

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
use Symfony\Component\Console\Input\InputInterface;
2828
use Symfony\Component\Console\Output\OutputInterface;
2929
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
30-
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
30+
use Symfony\Component\DependencyInjection\ContainerInterface;
3131
use Uecode\Bundle\QPushBundle\Event\Events;
3232
use Uecode\Bundle\QPushBundle\Event\MessageEvent;
3333

@@ -36,7 +36,24 @@
3636
*/
3737
class QueueReceiveCommand extends Command implements ContainerAwareInterface
3838
{
39-
use ContainerAwareTrait;
39+
/**
40+
* @var ContainerInterface
41+
*
42+
* @api
43+
*/
44+
protected $container;
45+
46+
/**
47+
* Sets the Container associated with this Controller.
48+
*
49+
* @param ContainerInterface $container A ContainerInterface instance
50+
*
51+
* @api
52+
*/
53+
public function setContainer(ContainerInterface $container = null)
54+
{
55+
$this->container = $container;
56+
}
4057

4158
protected $output;
4259

0 commit comments

Comments
 (0)