Skip to content

Commit

Permalink
Merge pull request #1 from clippings/feature/symfony-4
Browse files Browse the repository at this point in the history
[Fixes silexphp#131] Upgrade to Symfony 4
  • Loading branch information
Rusi Papazov authored Mar 17, 2020
2 parents 57488d3 + 25c0433 commit f8a5deb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 21 deletions.
8 changes: 1 addition & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,10 @@ cache:

matrix:
include:
- php: 5.5
- php: 5.6
- php: 7.0
- php: 7.1
env: SYMFONY_DEPS_VERSION=3
- php: hhvm
- php: 7.2

before_script:
- sh -c "if [ '$SYMFONY_DEPS_VERSION' = '3.0' ]; then sed -i 's/~2\.8|3\.0\.\*/3.0.*@dev/g' composer.json; composer update; fi"
- sh -c "if [ '$SYMFONY_DEPS_VERSION' = '' ]; then sed -i 's/~2\.8|3\.0\.\*/2.8.*@dev/g' composer.json; composer update; fi"
- travis_retry composer install

script:
Expand Down
5 changes: 2 additions & 3 deletions WebProfilerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public function register(Container $app)
}

$app['web_profiler.controller.profiler'] = function ($app) use ($baseDir) {
return new ProfilerController($app['url_generator'], $app['profiler'], $app['twig'], $app['data_collector.templates'], $app['web_profiler.debug_toolbar.position'], null, $baseDir);
return new ProfilerController($app['url_generator'], $app['profiler'], $app['twig'], $app['data_collector.templates'], null, $baseDir);
};

$app['web_profiler.controller.router'] = function ($app) {
Expand All @@ -251,7 +251,7 @@ public function register(Container $app)
$app['web_profiler.toolbar.listener'] = function ($app) {
$mode = $app['web_profiler.debug_toolbar.enable'] ? WebDebugToolbarListener::ENABLED : WebDebugToolbarListener::DISABLED;

return new WebDebugToolbarListener($app['twig'], $app['web_profiler.debug_toolbar.intercept_redirects'], $mode, $app['web_profiler.debug_toolbar.position'], $app['url_generator']);
return new WebDebugToolbarListener($app['twig'], $app['web_profiler.debug_toolbar.intercept_redirects'], $mode, $app['url_generator']);
};

$app['profiler'] = function ($app) {
Expand All @@ -272,7 +272,6 @@ public function register(Container $app)
$app['profiler.only_exceptions'] = false;
$app['profiler.only_master_requests'] = false;
$app['web_profiler.debug_toolbar.enable'] = true;
$app['web_profiler.debug_toolbar.position'] = 'bottom';
$app['web_profiler.debug_toolbar.intercept_redirects'] = false;

$app['profiler.listener'] = function ($app) {
Expand Down
23 changes: 12 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,23 @@
],
"require": {
"silex/silex": "^2.0",
"symfony/web-profiler-bundle": "^2.8|^3.0",
"symfony/twig-bundle": "^2.8|^3.0",
"symfony/twig-bridge": "^2.8|^3.0",
"symfony/stopwatch": "^2.8|^3.0"
"symfony/web-profiler-bundle": "^4.0",
"symfony/twig-bundle": "^4.0",
"symfony/twig-bridge": "^4.0",
"symfony/stopwatch": "^4.0"
},
"conflict": {
"symfony/web-profiler-bundle": "3.1.0"
},
"require-dev": {
"symfony/browser-kit": "^2.8|^3.0",
"symfony/css-selector": "^2.8|^3.0",
"symfony/debug-bundle": "^2.8|^3.0",
"symfony/phpunit-bridge": "~3.2",
"symfony/security": "^2.8|^3.0",
"symfony/security-bundle": "^2.8|^3.0",
"symfony/translation": "^2.8|^3.0"
"phpunit/phpunit": "4.x|5.x|6.x",
"symfony/browser-kit": "^4.0",
"symfony/css-selector": "^4.0",
"symfony/debug-bundle": "^4.0",
"symfony/phpunit-bridge": "^4.0",
"symfony/security": "^4.0",
"symfony/security-bundle": "^4.0",
"symfony/translation": "^4.0"
},
"autoload": {
"psr-4": { "Silex\\Provider\\": "" }
Expand Down

0 comments on commit f8a5deb

Please sign in to comment.