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

PHP-DI bootstrap configuration #65

Merged
merged 1 commit into from
Sep 23, 2015
Merged

Conversation

gianarb
Copy link
Contributor

@gianarb gianarb commented Sep 23, 2015

App::buildContainer is a static method that helps to build a basic container
this update helps to create mocks (you can use it into the test to build
perfect container for our tests) and now the container builder is more clear

This PR maybe unlocks decorator feature (php-di) and follow this feedback (thanks @mnapoli)
pennyphp/penny-skeleton-app#21 (comment)

ping @samsonasik :)

@gianarb gianarb added this to the 0.4.0 milestone Sep 23, 2015
@samsonasik
Copy link
Member

👍

@@ -44,7 +44,7 @@ class App
*/
public function __construct($router = null, ContainerInterface $container = null)
{
$this->container = $container ?: $this->buildContainer(Loader::load());
$this->container = $container ?: self::buildContainer(Loader::load());
Copy link
Member

Choose a reason for hiding this comment

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

can be static:: instead of self::

App::buildContainer is a static method that helps to build a basic container
this update helps to create mocks (you can use it into the test to build
perfect container for our tests) and now the container builder is more clear
@gianarb gianarb force-pushed the feature/improve-php-di-bootstrap branch from 95874b0 to 4ae0ba0 Compare September 23, 2015 22:51
gianarb pushed a commit that referenced this pull request Sep 23, 2015
@gianarb gianarb merged commit 8569b20 into master Sep 23, 2015
@gianarb gianarb deleted the feature/improve-php-di-bootstrap branch October 10, 2015 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants