Skip to content

Commit

Permalink
1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hultberg committed May 27, 2018
1 parent c44b64a commit 9168168
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.6.1

`Container::has()` will no longer call `make()`. This is not seen as a breaking change because the `has` method is documented to not always predict if `get` can return something.

## 1.6.0

* Bug: Argument resolver did not resolve Definitions
Expand Down
8 changes: 1 addition & 7 deletions src/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,6 @@ private function classNameExists($className): bool
*/
public function has($id)
{
try {
$this->make($id);
} catch (\ReflectionException|ContainerException $e) {
return false;
}

return true;
return array_key_exists($id, $this->definitions);
}
}

0 comments on commit 9168168

Please sign in to comment.