Skip to content

Commit

Permalink
Downgrade to silex 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhicetea committed Jul 11, 2015
1 parent 2f89ac9 commit 677a226
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 81 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
"require": {
"php": ">=5.5.9",
"silex/silex": "~2.0@dev",
"silex/silex": "~1.3",
"symfony/form": "~2.7,<2.8",
"symfony/security-csrf": "~2.7,<2.8",
"symfony/security": "~2.7,<2.8",
Expand All @@ -27,7 +27,7 @@
"illuminate/cache": "~5.1"
},
"require-dev": {
"silex/web-profiler": "~2.0@dev",
"silex/web-profiler": "~1.0",
"symfony/monolog-bridge": "~2.7,<2.8"
},
"autoload": {
Expand Down
113 changes: 50 additions & 63 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions src/Sifoni/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,4 @@
use Silex\Application as SilexApplication;

class Application extends SilexApplication {
public function __construct(array $values = array())
{
parent::__construct();

$this['request'] = $this['request_stack']->getCurrentRequest();
}
}
11 changes: 1 addition & 10 deletions src/Sifoni/Engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

namespace Sifoni;

use Silex\Provider\HttpFragmentServiceProvider;
use Silex\Provider\MonologServiceProvider;
use Silex\Provider\HttpCacheServiceProvider;
use Silex\Provider\RoutingServiceProvider;
use Silex\Provider\SessionServiceProvider;
use Silex\Provider\UrlGeneratorServiceProvider;
use Silex\Provider\ValidatorServiceProvider;
Expand Down Expand Up @@ -111,7 +109,7 @@ public function bootstrap(array $new_options = array()) {
*/
public function getDirPath($name) {
$dir_name = isset($this->app['dir.' . $name]) ? $this->app['dir.' . $name] : $name;
return $this->app['path.root'] . DS . $dir_name;
return $this->app['path.root'] . DS . $this->app['dir.app'] . DS . $dir_name;
}

/**
Expand Down Expand Up @@ -155,13 +153,6 @@ private function registerServices() {
));

if ($app['debug']) {
if (!isset($app['fragment.handler'])) {
$app->register(new HttpFragmentServiceProvider());
}
if (!isset($app['routing.listener'])) {
$app->register(new RoutingServiceProvider());
}

$app->register(new WebProfilerServiceProvider(), array(
'profiler.cache_dir' => $this->getDirPath('cache') . DS . 'profiler' . DS,
'profiler.mount_prefix' => '/_profiler',
Expand Down

0 comments on commit 677a226

Please sign in to comment.