Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Changed
- Aligned param names with those of PSR interfaces (#37).
- Added more generics (#38).
- Added `mixed` typehints where missing (#38).
- Factories now return Dhii `ContainerInterface` (#39).
A small inconvenience for type safety.

## [0.5.0-beta1] - 2026-03-23
### Changed
Expand Down
8 changes: 5 additions & 3 deletions src/ContainerFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace Dhii\Collection;

use Exception;
use Psr\Container\ContainerInterface;

/**
* Creates containers based on data maps.
Expand All @@ -15,9 +14,12 @@ interface ContainerFactoryInterface
/**
* Creates a container based on data.
*
* @param array<string, mixed> $data The data for the container.
* @template K of string
* @template V of mixed
*
* @return ContainerInterface The new container.
* @param array<K, V> $data The data for the container.
*
* @return ContainerInterface<K, V> The new container.
*
* @throws Exception If problem creating.
*
Expand Down
7 changes: 5 additions & 2 deletions src/MapFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ interface MapFactoryInterface extends ContainerFactoryInterface
/**
* Creates a map based on data in an array.
*
* @param array<string, mixed> $data The data to base the map on.
* @template K of string
* @template V of mixed
*
* @return MapInterface The new map.
* @param array<K, V> $data The data for the container.
*
* @return MapInterface<K, V> The new container.
*
* @throws Exception If problem creating.
*/
Expand Down
2 changes: 0 additions & 2 deletions src/WritableContainerFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

namespace Dhii\Collection;

use Psr\Container\ContainerInterface;

/**
* A map that can create a writable container.
*/
Expand Down
Loading