Skip to content

Commit aff6576

Browse files
authored
Merge pull request #1 from Orkin/develop
[REMOVE] zend service manager dependency
2 parents 8a40457 + 1ccca4d commit aff6576

File tree

4 files changed

+16
-31
lines changed

4 files changed

+16
-31
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"require": {
1313
"sentry/sentry": "^1.7",
1414
"zendframework/zend-stratigility": "^3.0",
15-
"zendframework/zend-servicemanager": "^3.3"
15+
"psr/container": "^1.0"
1616
},
1717
"autoload": {
1818
"psr-4": {

src/Listener/ListenerFactory.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,19 @@
55

66
namespace Stickee\Sentry\Listener;
77

8-
use Interop\Container\ContainerInterface;
9-
use Zend\ServiceManager\Factory\FactoryInterface;
8+
use Psr\Container\ContainerInterface;
109

11-
class ListenerFactory implements FactoryInterface
10+
class ListenerFactory
1211
{
1312
/**
1413
* Create an object
1514
*
16-
* @param \Interop\Container\ContainerInterface $container
17-
* @param string $requestedName
18-
* @param array|null $options
15+
* @param ContainerInterface $container
1916
*
20-
* @return \Stickee\Sentry\Listener\Listener
17+
* @return Listener
2118
*
22-
* @throws \Psr\Container\ContainerExceptionInterface
23-
* @throws \Psr\Container\NotFoundExceptionInterface
2419
*/
25-
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
20+
public function __invoke(ContainerInterface $container)
2621
{
2722
/** @var \Raven_Client $raven */
2823
$raven = $container->get(\Raven_Client::class);

src/ListenerDelegator.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55

66
namespace Stickee\Sentry;
77

8-
use Interop\Container\ContainerInterface;
8+
use Psr\Container\ContainerInterface;
99
use Stickee\Sentry\Listener\Listener;
10-
use Zend\ServiceManager\Factory\DelegatorFactoryInterface;
10+
use Zend\Stratigility\Middleware\ErrorHandler;
1111

12-
class ListenerDelegator implements DelegatorFactoryInterface
12+
;
13+
14+
class ListenerDelegator
1315
{
1416
/**
1517
* A factory that creates delegates of a given service
@@ -19,16 +21,13 @@ class ListenerDelegator implements DelegatorFactoryInterface
1921
* @param callable $callback
2022
* @param null|array $options
2123
*
22-
* @return \Zend\Stratigility\Middleware\ErrorHandler
23-
*
24-
* @throws \Psr\Container\ContainerExceptionInterface
25-
* @throws \Psr\Container\NotFoundExceptionInterface
24+
* @return ErrorHandler
2625
*/
2726
public function __invoke(ContainerInterface $container, $name, callable $callback, array $options = null)
2827
{
2928
$listener = $container->get(Listener::class);
3029

31-
/** @var \Zend\Stratigility\Middleware\ErrorHandler $errorHandler */
30+
/** @var ErrorHandler $errorHandler */
3231
$errorHandler = $callback();
3332

3433
$errorHandler->attachListener($listener);

src/Raven/RavenFactory.php

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,19 @@
55

66
namespace Stickee\Sentry\Raven;
77

8-
use Interop\Container\ContainerInterface;
9-
use Interop\Container\Exception\ContainerException;
8+
use Psr\Container\ContainerInterface;
109
use Raven_Client;
11-
use Zend\ServiceManager\Exception\ServiceNotCreatedException;
12-
use Zend\ServiceManager\Exception\ServiceNotFoundException;
13-
use Zend\ServiceManager\Factory\FactoryInterface;
1410

15-
class RavenFactory implements FactoryInterface
11+
class RavenFactory
1612
{
1713
/**
1814
* Create an object
1915
*
2016
* @param ContainerInterface $container
21-
* @param string $requestedName
22-
* @param null|array $options
2317
*
2418
* @return Raven_Client
25-
*
26-
* @throws \Psr\Container\ContainerExceptionInterface
27-
* @throws \Psr\Container\NotFoundExceptionInterface
2819
*/
29-
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
20+
public function __invoke(ContainerInterface $container)
3021
{
3122
$config = $container->get('config');
3223

0 commit comments

Comments
 (0)