Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Refactors to use a response factory instead of prototype #31

Merged
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
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,51 @@ All notable changes to this project will be documented in this file, in reverse

Versions prior to 0.4.0 were released as the package "weierophinney/hal".

## 1.0.0alpha1 - 2018-02-27

### Added

- Nothing.

### Changed

- [#31](https://github.com/zendframework/zend-expressive-hal/pull/31) changes
the constructor signature of `Zend\Expressive\Hal\HalResponseFactory` to read:

```php
public function __construct(
callable $responseFactory,
Renderer\JsonRenderer $jsonRenderer = null,
Renderer\XmlRenderer $xmlRenderer = null
)
```

Previously, the `$responseFactory` argument was a
`Psr\Http\Message\ResponseInterface $responsePrototype`; it is now a PHP
callable capable of producing a new, empty instance of that type.

Additionally, the signature previously included a callable `$streamFactory`;
this has been removed.

- [#31](https://github.com/zendframework/zend-expressive-hal/pull/31) updates
the `HalResponseFactoryFactory` to follow the changes made to the
`HalResponseFactory` constructor. It now **requires** that a
`Psr\Http\Message\ResponseInterface` service be registered, and that the
service resolve to a `callable` capable of producing a `ResponseInterface`
instance.

### Deprecated

- Nothing.

### Removed

- Nothing.

### Fixed

- Nothing.

## 0.6.2 - 2018-01-03

### Added
Expand Down
9 changes: 4 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,17 @@
"slack": "https://zendframework-slack.herokuapp.com",
"forum": "https://discourse.zendframework.com/c/questions/expressive"
},
"minimum-stability": "alpha",
"require": {
"php": "^7.1",
"psr/http-message": "^1.0.1",
"psr/http-message-implementation": "^1.0",
"psr/link": "^1.0",
"willdurand/negotiation": "^2.3.1"
},
"require-dev": {
"phpunit/phpunit": "^6.4.3",
"phpunit/phpunit": "^7.0.1",
"zendframework/zend-coding-standard": "~1.0.0",
"zendframework/zend-diactoros": "^1.6",
"zendframework/zend-expressive-helpers": "^4.2 || ^5.0.0-dev || ^5.0.0",
"zendframework/zend-expressive-helpers": "^5.0.0alpha3",
"zendframework/zend-hydrator": "^2.3.1",
"zendframework/zend-paginator": "^2.7"
},
Expand All @@ -43,7 +42,7 @@
},
"suggest": {
"psr/container-implementation": "^1.0 in order to use the provided PSR-11 factories",
"zendframework/zend-expressive-helpers": "^4.2 in order to use UrlHelper/ServerUrlHelper-based ExpressiveUrlGenerator with the LinkGenerator",
"zendframework/zend-expressive-helpers": "^5.0 in order to use UrlHelper/ServerUrlHelper-based ExpressiveUrlGenerator with the LinkGenerator",
"zendframework/zend-hydrator": "^2.3.1 in order to use the ResourceGenerator to create Resource instances from objects",
"zendframework/zend-paginator": "^2.7 in order to provide paginated collections"
},
Expand Down
Loading