Skip to content

Commit fc22a45

Browse files
author
Christoph Singer
authored
Merge pull request #18 from JasonMiesionczek/master
Updates for Symfony 3
2 parents 1a084a3 + 09713ef commit fc22a45

4 files changed

Lines changed: 9 additions & 6 deletions

File tree

Controller/JsonRpcController.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
66
use Symfony\Component\HttpFoundation\Request;
77
use Symfony\Component\HttpFoundation\Response;
8-
use Symfony\Component\DependencyInjection\ContainerAware;
8+
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
9+
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
910

1011
/**
1112
* Controller for executing JSON-RPC 2.0 requests
@@ -41,8 +42,10 @@
4142
* @author Christoph Singer
4243
*
4344
*/
44-
class JsonRpcController extends ContainerAware
45+
class JsonRpcController implements ContainerAwareInterface
4546
{
47+
use ContainerAwareTrait;
48+
4649
const PARSE_ERROR = -32700;
4750
const INVALID_REQUEST = -32600;
4851
const METHOD_NOT_FOUND = -32601;

Resources/config/routing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
wa72_json_rpc:
2-
pattern: "{optionalTrailingSlash}"
2+
path: /
33
defaults: { _controller: wa72_jsonrpc.jsonrpccontroller:execute, optionalTrailingSlash : "/" }
44
requirements: { optionalTrailingSlash : "[/]{0,1}" }

Resources/config/services.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ parameters:
44
services:
55
wa72_jsonrpc.jsonrpccontroller:
66
class: %wa72_jsonrpc.jsonrpccontroller.class%
7-
arguments: [@service_container, %wa72.jsonrpc%]
7+
arguments: ['@service_container', %wa72.jsonrpc%]

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
],
1515
"require":{
1616
"php":">=5.3.1",
17-
"symfony/symfony":"~2.3",
18-
"jms/serializer-bundle":"~0.13"
17+
"symfony/symfony":"~3.0",
18+
"jms/serializer-bundle":"~1.1"
1919
},
2020
"autoload":{
2121
"psr-0":{

0 commit comments

Comments
 (0)