Skip to content

Commit

Permalink
Merge pull request #23 from sunrise-php/release/v2.1.2
Browse files Browse the repository at this point in the history
v2.1.2
  • Loading branch information
fenric authored Apr 18, 2022
2 parents 140918d + 92e715a commit 3dc018b
Show file tree
Hide file tree
Showing 12 changed files with 158 additions and 132 deletions.
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,39 @@ jobs:
steps:
- checkout
- run: php -v
- run: composer install --no-interaction --no-suggest --prefer-source
- run: composer install --no-interaction
- run: XDEBUG_MODE=coverage php vendor/bin/phpunit --coverage-text
php72:
docker:
- image: circleci/php:7.2-cli-node-browsers
steps:
- checkout
- run: php -v
- run: composer install --no-interaction --no-suggest --prefer-source
- run: composer install --no-interaction
- run: XDEBUG_MODE=coverage php vendor/bin/phpunit --coverage-text
php73:
docker:
- image: circleci/php:7.3-cli-node-browsers
steps:
- checkout
- run: php -v
- run: composer install --no-interaction --no-suggest --prefer-source
- run: composer install --no-interaction
- run: XDEBUG_MODE=coverage php vendor/bin/phpunit --coverage-text
php74:
docker:
- image: circleci/php:7.4-cli-node-browsers
steps:
- checkout
- run: php -v
- run: composer install --no-interaction --no-suggest --prefer-source
- run: composer install --no-interaction
- run: XDEBUG_MODE=coverage php vendor/bin/phpunit --coverage-text
php80:
docker:
- image: circleci/php:8.0-cli-node-browsers
steps:
- checkout
- run: php -v
- run: composer install --no-interaction --no-suggest --prefer-source
- run: composer install --no-interaction
- run: XDEBUG_MODE=coverage php vendor/bin/phpunit --coverage-text
workflows:
version: 2
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
/phpbench.json
/phpcs.xml
/phpunit.xml
/psalm.xml
/vendor/
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ composer require 'sunrise/http-message:^2.0'

## How to use?

#### HTTP Request Message
#### Request message

```php
use Sunrise\Http\Message\RequestFactory;
Expand All @@ -27,7 +27,7 @@ $message = (new RequestFactory)->createRequest('GET', 'http://php.net/');
// just use PSR-7 methods...
```

#### HTTP Response Message
#### Response message

```php
use Sunrise\Http\Message\ResponseFactory;
Expand All @@ -37,16 +37,16 @@ $message = (new ResponseFactory)->createResponse(200, 'OK');
// just use PSR-7 methods...
```

#### HTTP Headers as Objects

* https://github.com/sunrise-php/http-header-kit

#### Related PSR-7 packages
#### Related packages

* https://github.com/sunrise-php/http-server-request
* https://github.com/sunrise-php/stream
* https://github.com/sunrise-php/uri

#### Headers as objects

* https://github.com/sunrise-php/http-header-kit

---

## Test run
Expand Down
19 changes: 10 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "sunrise/http-message",
"homepage": "https://github.com/sunrise-php/http-message",
"description": "Sunrise // HTTP message wrapper for PHP 7.1+ based on RFC-7230, PSR-7 and PSR-17",
"description": "HTTP message wrapper for PHP 7.1+ based on RFC-7230, PSR-7 and PSR-17",
"license": "MIT",
"keywords": [
"fenric",
"sunrise",
"http",
"http-message",
"http-request",
"http-response",
"message",
"request",
"response",
"rfc-7230",
"psr-7",
"psr-17",
Expand All @@ -19,10 +19,13 @@
"authors": [
{
"name": "Anatoly Fenric",
"email": "[email protected]",
"homepage": "https://anatoly.fenric.ru/"
"email": "[email protected]",
"homepage": "https://github.com/fenric"
}
],
"provide": {
"psr/http-message-implementation": "1.0"
},
"require": {
"php": "^7.1|^8.0",
"fig/http-message-util": "^1.1",
Expand All @@ -36,9 +39,6 @@
"phpunit/phpunit": "7.5.20|9.5.0",
"sunrise/coding-standard": "1.0.0"
},
"provide": {
"psr/http-message-implementation": "1.0"
},
"autoload": {
"files": [
"constants/REASON_PHRASES.php"
Expand All @@ -50,6 +50,7 @@
"scripts": {
"test": [
"phpcs",
"psalm",
"XDEBUG_MODE=coverage phpunit --coverage-text --colors=always"
],
"build": [
Expand Down
2 changes: 2 additions & 0 deletions constants/REASON_PHRASES.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
/**
* List of Reason Phrases
*
* @var array<int, string>
*
* @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
*/
const REASON_PHRASES = [
Expand Down
7 changes: 5 additions & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<?xml version="1.0"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
>
<coverage>
<include>
<directory>./src</directory>
</include>
</coverage>
<testsuites>
<testsuite name="sunrise.http.message.testSuite">
<testsuite name="sunrise/http-message">
<directory>./tests/</directory>
</testsuite>
</testsuites>
Expand Down
14 changes: 14 additions & 0 deletions psalm.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<psalm
errorLevel="1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="src" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
</psalm>
Loading

0 comments on commit 3dc018b

Please sign in to comment.