Skip to content

Commit 09cfbb2

Browse files
committed
wip
1 parent 380b33f commit 09cfbb2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+3945
-1
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
vendor/
21
composer.phar
32
composer.lock
3+
vendor/composer
4+
vendor/php-http
5+
.git

vendor/autoload.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
// autoload.php @generated by Composer
4+
5+
require_once __DIR__ . '/composer/autoload_real.php';
6+
7+
return ComposerAutoloaderInit5eeaf7f95bcc7609b7c64262f10ae8ae::getLoader();
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file, in reverse chronological order by release.
4+
5+
## 0.3.0
6+
7+
### Added
8+
9+
- `ServerRequestCreator` is final
10+
11+
### Fixed
12+
13+
- Fallback to an empty Stream if UploadedFileFactory fails.
14+
15+
## 0.2.0
16+
17+
### Changed
18+
19+
- Make sure we use psr/http-factory
20+
21+
## 0.1.2
22+
23+
### Added
24+
25+
- `ServerRequestCreatorInterface`
26+
- `ServerRequestCreator::getHeadersFromServer`
27+
28+
## 0.1.1
29+
30+
### Added
31+
32+
Better testing
33+
34+
## 0.1.0
35+
36+
First release

vendor/nyholm/psr7-server/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 Tobias Nyholm
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

vendor/nyholm/psr7-server/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Helper class to create PSR-7 server request
2+
3+
[![Latest Version](https://img.shields.io/github/release/Nyholm/psr7-server.svg?style=flat-square)](https://github.com/Nyholm/psr7-server/releases)
4+
[![Build Status](https://img.shields.io/travis/Nyholm/psr7-server/master.svg?style=flat-square)](https://travis-ci.org/Nyholm/psr7-server)
5+
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/Nyholm/psr7-server.svg?style=flat-square)](https://scrutinizer-ci.com/g/Nyholm/psr7-server)
6+
[![Quality Score](https://img.shields.io/scrutinizer/g/Nyholm/psr7-server.svg?style=flat-square)](https://scrutinizer-ci.com/g/Nyholm/psr7-server)
7+
[![Total Downloads](https://poser.pugx.org/nyholm/psr7-server/downloads)](https://packagist.org/packages/nyholm/psr7-server)
8+
[![Monthly Downloads](https://poser.pugx.org/nyholm/psr7-server/d/monthly.png)](https://packagist.org/packages/nyholm/psr7-server)
9+
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
10+
11+
A helper class that can create ANY PSR-7 server request.
12+
13+
## Installation
14+
15+
```bash
16+
composer require nyholm/psr7-server
17+
```
18+
19+
## Usage
20+
21+
```php
22+
// Instanciate ANY PSR-17 factory implementations. Here is nyholm/psr7 as an example
23+
$psr17Factory = new \Nyholm\Psr7\Factory\Psr17Factory();
24+
25+
$creator = new \Nyholm\Psr7Server\ServerRequestCreator(
26+
$psr17Factory, // ServerRequestFactory
27+
$psr17Factory, // UriFactory
28+
$psr17Factory, // UploadedFileFactory
29+
$psr17Factory // StreamFactory
30+
);
31+
32+
$serverRequest = $creator->fromGlobals();
33+
```
34+
35+
## Other packages
36+
37+
* [nyholm/psr7](https://github.com/Nyholm/psr7) - A super fast PSR-7 implementation.
38+
* [zendframework/zend-httphandlerrunner](https://github.com/zendframework/zend-httphandlerrunner) - To send/emit PSR-7 responses
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "nyholm/psr7-server",
3+
"description": "Helper classes to handle PSR-7 server requests",
4+
"license": "MIT",
5+
"keywords": ["psr-7", "psr-17"],
6+
"homepage": "http://tnyholm.se",
7+
"authors": [
8+
{
9+
"name": "Tobias Nyholm",
10+
"email": "[email protected]"
11+
},
12+
{
13+
"name": "Martijn van der Ven",
14+
"email": "[email protected]"
15+
}
16+
],
17+
"require": {
18+
"php": "^7.1",
19+
"psr/http-message": "^1.0",
20+
"psr/http-factory": "^1.0"
21+
},
22+
"require-dev": {
23+
"phpunit/phpunit": "^7.0",
24+
"nyholm/psr7": "^1.0",
25+
"nyholm/nsa": "^1.1"
26+
},
27+
"autoload": {
28+
"psr-4": {
29+
"Nyholm\\Psr7Server\\": "src/"
30+
}
31+
},
32+
"autoload-dev": {
33+
"psr-4": {
34+
"Tests\\Nyholm\\Psr7Server\\": "tests/"
35+
}
36+
},
37+
"scripts": {
38+
"test": "vendor/bin/phpunit",
39+
"test-ci": "vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml"
40+
}
41+
}

0 commit comments

Comments
 (0)