Skip to content

Commit 58fb2d9

Browse files
committed
Merge pull request #206 from WouterJ/patch-1
[1.x] Allow Symfony 3
2 parents 539a6ac + 5d4bfdf commit 58fb2d9

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ matrix:
1313
env: SYMFONY_VERSION='2.3.*'
1414
- php: 5.6
1515
env: SYMFONY_VERSION='2.5.*'
16+
- php: 5.6
17+
env: SYMFONY_VERSION='3.0.*'
1618

1719
sudo: false
1820

Controller/Controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function indexAction(Request $request, $_format)
9090
$serializedRoutes = $this->serializer->serialize($exposedRoutes, 'json');
9191
$cache->write($serializedRoutes, $this->exposedRoutesExtractor->getResources());
9292
} else {
93-
$serializedRoutes = file_get_contents((string) $cache);
93+
$serializedRoutes = file_get_contents(method_exists($cache, 'getPath') ? $cache->getPath() : (string) $cache);
9494
$exposedRoutes = json_decode($serializedRoutes, true);
9595
}
9696

composer.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,16 @@
1717
],
1818
"require": {
1919
"php": ">=5.3.2",
20-
"symfony/framework-bundle": "~2.0",
21-
"symfony/serializer": "~2.0",
22-
"symfony/console": "~2.0",
20+
"symfony/framework-bundle": "~2.0|3.*",
21+
"symfony/serializer": "~2.0|3.*",
22+
"symfony/console": "~2.0|3.*",
2323
"willdurand/jsonp-callback-validator": "~1.0"
2424
},
2525
"require-dev": {
26-
"symfony/expression-language": "~2.4"
26+
"symfony/expression-language": "~2.4|3.*"
2727
},
28+
"minimum-stability": "dev",
29+
"prefer-stable": true,
2830
"autoload": {
2931
"psr-4": { "FOS\\JsRoutingBundle\\": "" }
3032
},

0 commit comments

Comments
 (0)