Skip to content

Commit ab1a6ab

Browse files
committed
Merge pull request #136 from DZunke/3.0
Remove isScopeActive() cause of deprecation
2 parents ff94798 + dd56aa1 commit ab1a6ab

3 files changed

Lines changed: 22 additions & 24 deletions

File tree

.travis.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
language: php
22

33
php:
4-
- 5.4
54
- 5.5
65
- 5.6
76
- 7.0
@@ -16,16 +15,14 @@ cache:
1615

1716
matrix:
1817
allow_failures:
19-
- php:
20-
- 7.0
21-
- hhvm
18+
php:
19+
7.0
20+
hhvm
2221
fast_finish: true
2322

2423
env:
25-
- SYMFONY_VERSION="2.1.*" DECODA_VERSION="6.0.*"
26-
- SYMFONY_VERSION="2.1.*" DECODA_VERSION="6.*"
27-
- SYMFONY_VERSION="2.*" DECODA_VERSION="6.0.*"
28-
- SYMFONY_VERSION="2.*" DECODA_VERSION="6.*"
24+
- SYMFONY_VERSION="3.0.*" DECODA_VERSION="6.0.*"
25+
- SYMFONY_VERSION="3.0.*" DECODA_VERSION="6.*"
2926

3027
before_install:
3128
- composer self-update

Decoda/DecodaManager.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,9 @@ private function getPhpEngine()
490490
private function getLocale()
491491
{
492492
if (null === $this->locale) {
493-
if ($this->container->isScopeActive('request') && $this->container->has('request')) {
494-
$this->locale = $this->container->get('request')->getLocale();
493+
$request = $this->container->get('request_stack')->getCurrentRequest();
494+
if (null !== $request) {
495+
$this->locale = $request->getLocale();
495496
} else {
496497
$this->locale = $this->options['default_locale'];
497498
}

composer.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@
1212
}
1313
],
1414
"require": {
15-
"php": ">=5.3.2",
15+
"php": ">=5.5",
1616
"mjohnson/decoda": "6.*",
17-
"symfony/twig-bundle": "~2.0",
18-
"symfony/assetic-bundle": "~2.0",
19-
"symfony/config": "~2.0",
20-
"symfony/console": "~2.0",
21-
"symfony/dependency-injection": "~2.0",
22-
"symfony/framework-bundle": "~2.1",
23-
"symfony/http-foundation": "~2.1",
24-
"symfony/http-kernel": "~2.0",
25-
"symfony/process": "~2.0",
26-
"symfony/templating": "~2.0",
27-
"symfony/yaml": "~2.0",
28-
"sensio/distribution-bundle": ">=2.1"
17+
"symfony/twig-bundle": "~3.0",
18+
"symfony/assetic-bundle": "~2.4",
19+
"symfony/config": "~3.0",
20+
"symfony/console": "~3.0",
21+
"symfony/dependency-injection": "~3.0",
22+
"symfony/framework-bundle": "~3.0",
23+
"symfony/http-foundation": "~3.0",
24+
"symfony/http-kernel": "~3.0",
25+
"symfony/process": "~3.0",
26+
"symfony/templating": "~3.0",
27+
"symfony/yaml": "~3.0",
28+
"sensio/distribution-bundle": "~5.0"
2929
},
3030
"require-dev": {
31-
"symfony/symfony": "~2.1",
31+
"symfony/symfony": "~3.0",
3232
"satooshi/php-coveralls": "dev-master"
3333
},
3434
"autoload": {

0 commit comments

Comments
 (0)