Skip to content
This repository has been archived by the owner on May 10, 2019. It is now read-only.

Commit

Permalink
Merge pull request #8 from Dhii/release/0.1.1
Browse files Browse the repository at this point in the history
Version 0.1.1
  • Loading branch information
XedinUnknown authored Feb 3, 2017
2 parents aeef1e0 + 4b996e6 commit 52efd50
Show file tree
Hide file tree
Showing 7 changed files with 185 additions and 45 deletions.
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test export-ignore
nbproject export-ignore
.codeclimate.yml export-ignore
.php_cs export-ignore
.travis.yml export-ignore
composer.lock export-ignore
phpunit.xml export-ignore
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/nbproject/private/
/test/coverage/
/test/log/
/build/
10 changes: 9 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,12 @@ script:
- vendor/bin/phpunit

after_script:
- vendor/bin/test-reporter --coverage-report="test/coverage/clover.xml"
- vendor/bin/test-reporter --coverage-report="test/coverage/clover.xml"

notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/155f53c8074ea0a9073e
on_success: always
on_failure: always
on_start: never
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,19 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [0.1.1] - 2017-02-03
Non-BC-breaking bugfixes.
Reduced size of dist archive.
Added Gitter notifications of Travis events, and Gitter badge.

### Fixed
- `CompositeContainer#__construct()` not accepting interop containers.
- `CompositeContainer#add()` not implementing interface method.
- `CompositeContainer` not throwing exceptions correctly.

## [0.1] - 2017-02-02
Initial release, containing concrete implementations.

### Added
- Implementations of regular and compound containers, with service provider support.
- Tests.
- Tests.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
## Dhii - DI ##

[![Build Status](https://travis-ci.org/Dhii/di.svg?branch=master)](https://travis-ci.org/Dhii/di)
[![Code Climate](https://codeclimate.com/github/Dhii/di/badges/gpa.svg)](https://codeclimate.com/github/Dhii/di)
[![Test Coverage](https://codeclimate.com/github/Dhii/di/badges/coverage.svg)](https://codeclimate.com/github/Dhii/di/coverage)
[![Join the chat at https://gitter.im/Dhii/di](https://badges.gitter.im/Dhii/di.svg)](https://gitter.im/Dhii/di?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

A simple, granular, standards-compliant dependency injection container and factory implementation.

Expand Down
13 changes: 8 additions & 5 deletions src/CompositeContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
namespace Dhii\Di;

use Exception;
use Dhii\Di\Exception\ContainerException;
use Dhii\Di\Exception\NotFoundException;
use Interop\Container\ContainerInterface as BaseContainerInterface;

/**
* Concrete implementation of a container that can have child containers.
Expand All @@ -11,16 +14,16 @@
*/
class CompositeContainer extends AbstractCompositeContainer implements
ParentAwareContainerInterface,
CompositeContainerInterface
WritableCompositeContainerInterface
{
/**
* Constructor.
*
* @since 0.1
*
* @param ContainerInterface $parent The parent container of this instance.
* @param BaseContainerInterface $parent The parent container of this instance.
*/
public function __construct(ContainerInterface $parent = null)
public function __construct(BaseContainerInterface $parent = null)
{
$this->_setParentContainer($parent);
}
Expand Down Expand Up @@ -70,11 +73,11 @@ public function getContainers()
*
* @since 0.1
*
* @param ContainerInterface $container The container to add.
* @param BaseContainerInterface $container The container to add.
*
* @return $this This instance.
*/
public function add(ContainerInterface $container)
public function add(BaseContainerInterface $container)
{
$this->_add($container);

Expand Down
Loading

0 comments on commit 52efd50

Please sign in to comment.