Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for Silex 2 #55

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
}
],
"require": {
"silex/silex": "~1.0"
"silex/silex": "~2.0"
},
"require-dev": {
"phpunit/phpunit": "^4.0",
"symfony/yaml": "~2.1",
"jamesmoss/toml": "~0.1"
},
Expand Down
5 changes: 3 additions & 2 deletions src/Igorw/Silex/ConfigServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@

namespace Igorw\Silex;

use Pimple\Container;
use Pimple\ServiceProviderInterface;
use Silex\Application;
Copy link

@chuanma chuanma Oct 19, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we shouldn't depend on Silex\Application anymore. Note Silex\Application extends Pimple\Container.

We should remove this line and update any reference to ``Silex\Application`.

Also Pimple\ServiceProviderInterface doesn't define a boot() method. So should we also remove that method?

use Silex\ServiceProviderInterface;

class ConfigServiceProvider implements ServiceProviderInterface
{
Expand Down Expand Up @@ -40,7 +41,7 @@ public function __construct($filename, array $replacements = array(), ConfigDriv
));
}

public function register(Application $app)
public function register(Container $app)
{
$config = $this->readConfig();

Expand Down