Skip to content

Commit

Permalink
Depend on the standard library
Browse files Browse the repository at this point in the history
  • Loading branch information
Riimu committed Jul 31, 2018
1 parent 41df92c commit 2d61bcb
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 29 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.2.0] - 2018-07-31
### Added
- The `ApplicationProvider` now adds container entries for the standard http factories.

### Changed
- The `ErrorHandler`, `NotFoundHandler` and `RouterMiddleware` now depend on the standard http factory interfaces.
- The library now depends on PSR-17 standard library instead of the interop library

## 0.1.0 - 2018-07-16
### Added
- Initial development release

[Unreleased]: https://github.com/simply-framework/application/compare/v0.1.0...HEAD
[Unreleased]: https://github.com/simply-framework/application/compare/v0.2.0...HEAD
[0.2.0]: https://github.com/simply-framework/application/compare/v0.1.0...v0.2.0
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
This package provides a bare-bones middleware framework that implements the different PSR standards and
takes advantage of the Simply Router and Container to create a coherent whole.

The application framework takes advantage of the [PSR-7 HTTP Message Interface], [PSR-11 Container Interface]
and [PSR-15 HTTP Handlers] while also looking into being compatible with upcoming [PSR-17 HTTP Factories] via
the http-factory interop.
The application framework takes advantage of the [PSR-7 HTTP Message Interface], [PSR-11 Container Interface],
[PSR-15 HTTP Handlers] and [PSR-17 HTTP Factories] standards in order to create an interoperable framework
based on the community best practices and standards.

NOTE: This package is part of a framework that is still highly experimental in nature. Stable api or proper
documentation are not to be expected until the framework has been tested in practice.
Expand All @@ -26,4 +26,4 @@ See LICENSE for license and copying information.
[PSR-7 HTTP Message Interface]: https://www.php-fig.org/psr/psr-7
[PSR-11 Container Interface]: https://www.php-fig.org/psr/psr-11
[PSR-15 HTTP Handlers]: https://www.php-fig.org/psr/psr-15
[PSR-17 HTTP Factories]: https://github.com/php-fig/fig-standards/tree/master/proposed/http-factory/
[PSR-17 HTTP Factories]: https://www.php-fig.org/psr/psr-17
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"type": "library",
"description": "A simple middleware application framework based on PSR standards",
"keywords": [
"psr-17",
"psr-15",
"psr-11",
"psr-7",
Expand All @@ -22,7 +23,7 @@
"psr/http-server-middleware": "^1.0",
"psr/container": "^1.0",
"psr/http-message": "^1.0",
"http-interop/http-factory": "dev-master",
"psr/http-factory": "^1.0",
"simply/router": "^0.2.3",
"simply/container": "^0.2.1",
"zendframework/zend-diactoros": "^1.8"
Expand Down
12 changes: 6 additions & 6 deletions src/ApplicationProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

namespace Simply\Application;

use Interop\Http\Factory\RequestFactoryInterface;
use Interop\Http\Factory\ResponseFactoryInterface;
use Interop\Http\Factory\ServerRequestFactoryInterface;
use Interop\Http\Factory\StreamFactoryInterface;
use Interop\Http\Factory\UploadedFileFactoryInterface;
use Interop\Http\Factory\UriFactoryInterface;
use Psr\Container\ContainerInterface;
use Psr\Http\Message\RequestFactoryInterface;
use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ServerRequestFactoryInterface;
use Psr\Http\Message\StreamFactoryInterface;
use Psr\Http\Message\UploadedFileFactoryInterface;
use Psr\Http\Message\UriFactoryInterface;
use Simply\Application\Handler\ErrorHandler;
use Simply\Application\Handler\MiddlewareHandler;
use Simply\Application\Handler\NotFoundHandler;
Expand Down
4 changes: 2 additions & 2 deletions src/Handler/ErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Simply\Application\Handler;

use Interop\Http\Factory\ResponseFactoryInterface;
use Interop\Http\Factory\StreamFactoryInterface;
use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\StreamFactoryInterface;
use Psr\Http\Server\RequestHandlerInterface;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Handler/NotFoundHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Simply\Application\Handler;

use Interop\Http\Factory\ResponseFactoryInterface;
use Interop\Http\Factory\StreamFactoryInterface;
use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\StreamFactoryInterface;
use Psr\Http\Server\RequestHandlerInterface;

/**
Expand Down
14 changes: 7 additions & 7 deletions src/HttpFactory/HttpFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

namespace Simply\Application\HttpFactory;

use Interop\Http\Factory\RequestFactoryInterface;
use Interop\Http\Factory\ResponseFactoryInterface;
use Interop\Http\Factory\ServerRequestFactoryInterface;
use Interop\Http\Factory\StreamFactoryInterface;
use Interop\Http\Factory\UploadedFileFactoryInterface;
use Interop\Http\Factory\UriFactoryInterface;
use Psr\Http\Message\RequestFactoryInterface;
use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ServerRequestFactoryInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\StreamFactoryInterface;
use Psr\Http\Message\UploadedFileFactoryInterface;
use Psr\Http\Message\UriFactoryInterface;

/**
* A union interface for http factory interop interfaces.
* A union interface for http factory standard interfaces.
* @author Riikka Kalliomäki <[email protected]>
* @copyright Copyright (c) 2018 Riikka Kalliomäki
* @license http://opensource.org/licenses/mit-license.php MIT License
Expand Down
4 changes: 2 additions & 2 deletions src/Middleware/RouterMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace Simply\Application\Middleware;

use Interop\Http\Factory\ResponseFactoryInterface;
use Interop\Http\Factory\StreamFactoryInterface;
use Psr\Container\ContainerInterface;
use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\StreamFactoryInterface;
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Simply\Application\Handler\MiddlewareHandler;
Expand Down
8 changes: 4 additions & 4 deletions tests/tests/ApplicationProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace Simply\Application;

use Interop\Http\Factory\RequestFactoryInterface;
use Interop\Http\Factory\ServerRequestFactoryInterface;
use Interop\Http\Factory\UploadedFileFactoryInterface;
use Interop\Http\Factory\UriFactoryInterface;
use PHPUnit\Framework\TestCase;
use Psr\Http\Message\RequestFactoryInterface;
use Psr\Http\Message\ServerRequestFactoryInterface;
use Psr\Http\Message\UploadedFileFactoryInterface;
use Psr\Http\Message\UriFactoryInterface;
use Simply\Container\ContainerBuilder;

/**
Expand Down

0 comments on commit 2d61bcb

Please sign in to comment.