Skip to content

Commit ea78137

Browse files
updated symfony components
1 parent 1c341d7 commit ea78137

File tree

3 files changed

+46
-17
lines changed

3 files changed

+46
-17
lines changed

.travis.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,31 @@ language: php
33
matrix:
44
fast_finish: true
55
include:
6+
- php: 5.5
7+
env:
8+
- STORAGE=doctrine
9+
- COMPOSER_FLAGS="--prefer-lowest --prefer-dist --no-interaction"
610
- php: 5.5
711
env:
812
- STORAGE=doctrine
913
- php: 5.5
1014
env:
1115
- STORAGE=array
16+
- php: 5.6
17+
env:
18+
- STORAGE=doctrine
19+
- COMPOSER_FLAGS="--prefer-lowest --prefer-dist --no-interaction"
1220
- php: 5.6
1321
env:
1422
- STORAGE=doctrine
1523
- CODE_COVERAGE=true
1624
- php: 5.6
1725
env:
1826
- STORAGE=array
27+
- php: 7.0
28+
env:
29+
- STORAGE=doctrine
30+
- COMPOSER_FLAGS="--prefer-lowest --prefer-dist --no-interaction"
1931
- php: 7.0
2032
env:
2133
- STORAGE=doctrine
@@ -25,7 +37,7 @@ matrix:
2537

2638
install:
2739
- composer self-update
28-
- composer update
40+
- composer update $COMPOSER_FLAGS
2941
- composer info
3042

3143
before_script:

composer.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@
1111
],
1212
"require": {
1313
"php": "~5.5 || ~7.0",
14-
"php-task/php-task": "^1.2",
15-
"symfony/http-kernel": "^2.6 || ^3.0",
16-
"symfony/dependency-injection": "^2.6 || ^3.0",
17-
"symfony/expression-language": "^2.6 || ^3.0",
18-
"symfony/config": "^2.6 || ^3.0",
19-
"symfony/console": "^2.6 || ^3.0",
20-
"symfony/process": "^2.6 || ^3.0",
14+
"php-task/php-task": "dev-upgrade/symfony-4",
15+
"symfony/http-kernel": "^3.4 || ^4.0",
16+
"symfony/dependency-injection": "^3.4 || ^4.0",
17+
"symfony/expression-language": "^3.4 || ^4.0",
18+
"symfony/config": "^3.4 || ^4.0",
19+
"symfony/console": "^3.4 || ^4.0",
20+
"symfony/process": "^3.4 || ^4.0",
2121
"doctrine/orm": "^2.5"
2222
},
2323
"require-dev": {
2424
"phpunit/phpunit": "^4.8",
25-
"symfony/framework-bundle": "^2.6",
26-
"symfony/finder": "^2.6",
25+
"symfony/framework-bundle": "^3.4 || ^4.0",
26+
"symfony/finder": "^3.4 || ^4.0",
2727
"doctrine/doctrine-bundle": "^1.5",
2828
"doctrine/data-fixtures": "^1.1"
2929
},

tests/app/TestKernel.php

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ protected function buildContainer()
6262
$loader->load('services.xml');
6363

6464
$container->setParameter('kernel.storage', $this->storage);
65+
$container->setParameter('container.build_id', hash('crc32', 'Abc123423456789'));
6566

6667
return $container;
6768
}
@@ -71,16 +72,32 @@ protected function buildContainer()
7172
*/
7273
protected function initializeContainer()
7374
{
74-
$fresh = false;
75+
static $first = true;
7576

76-
$container = $this->buildContainer();
77-
$container->compile();
77+
if ('test' !== $this->getEnvironment()) {
78+
parent::initializeContainer();
7879

79-
$this->container = $container;
80-
$this->container->set('kernel', $this);
80+
return;
81+
}
82+
83+
$debug = $this->debug;
8184

82-
if (!$fresh && $this->container->has('cache_warmer')) {
83-
$this->container->get('cache_warmer')->warmUp($this->container->getParameter('kernel.cache_dir'));
85+
if (!$first) {
86+
// disable debug mode on all but the first initialization
87+
$this->debug = false;
8488
}
89+
90+
// will not work with --process-isolation
91+
$first = false;
92+
93+
try {
94+
parent::initializeContainer();
95+
} catch (\Exception $e) {
96+
$this->debug = $debug;
97+
98+
throw $e;
99+
}
100+
101+
$this->debug = $debug;
85102
}
86103
}

0 commit comments

Comments
 (0)