Skip to content

Commit 6bfc82a

Browse files
committed
Initial commit
0 parents  commit 6bfc82a

File tree

12 files changed

+230
-0
lines changed

12 files changed

+230
-0
lines changed

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
indent_size = 4
9+
indent_style = space
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
13+
[*.md]
14+
trim_trailing_whitespace = false

.gitattributes

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/.github export-ignore
2+
/docs export-ignore
3+
/tests export-ignore
4+
/.editorconfig export-ignore
5+
/.gitattributes export-ignore
6+
/.gitignore export-ignore
7+
/.scrutinizer.yml export-ignore
8+
/.travis.yml export-ignore
9+
/phpcs.xml export-ignore
10+
/phpunit.xml.dist export-ignore

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
composer.lock
2+
phpunit.xml
3+
vendor

.scrutinizer.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
build:
2+
nodes:
3+
analysis:
4+
tests:
5+
override:
6+
- php-scrutinizer-run
7+
8+
checks:
9+
php: true
10+
tools:
11+
php_code_coverage:
12+
enabled: true
13+
external_code_coverage:
14+
timeout: 600

.travis.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
language: php
2+
3+
sudo: false
4+
5+
env:
6+
global:
7+
- DEFAULT_COMPOSER_FLAGS="--prefer-dist --no-interaction --no-progress --optimize-autoloader"
8+
- TASK_STATIC_ANALYSIS=0
9+
- TASK_TESTS_COVERAGE=0
10+
11+
matrix:
12+
include:
13+
- php: "7.4"
14+
env:
15+
- TASK_STATIC_ANALYSIS=0
16+
- TASK_TESTS_COVERAGE=1
17+
18+
cache:
19+
directories:
20+
- $HOME/.composer/cache
21+
22+
before_install:
23+
- |
24+
if [[ $TASK_TESTS_COVERAGE != 1 ]]; then
25+
phpenv config-rm xdebug.ini || echo "xdebug is not installed"
26+
fi
27+
28+
install:
29+
- travis_retry composer self-update && composer --version
30+
- export PATH="$HOME/.composer/vendor/bin:$PATH"
31+
- travis_retry composer install $DEFAULT_COMPOSER_FLAGS
32+
- |
33+
if [ $TASK_STATIC_ANALYSIS == 1 ]; then
34+
pecl install ast
35+
fi
36+
37+
before_script:
38+
- php --version
39+
- composer --version
40+
- |
41+
if [ $TASK_TESTS_COVERAGE == 1 ]; then
42+
PHPUNIT_COVERAGE_FLAG="--coverage-clover=coverage.clover"
43+
fi
44+
45+
script:
46+
- vendor/bin/phpunit --verbose $PHPUNIT_COVERAGE_FLAG
47+
- |
48+
if [ $TASK_STATIC_ANALYSIS == 1 ]; then
49+
composer phan
50+
fi
51+
- |
52+
if [ $TASK_STATIC_ANALYSIS == 1 ]; then
53+
cat analysis.txt
54+
fi
55+
56+
after_script:
57+
- |
58+
if [ $TASK_TESTS_COVERAGE == 1 ]; then
59+
travis_retry wget https://scrutinizer-ci.com/ocular.phar
60+
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
61+
fi

LICENSE.md

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

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# HTTP Request
2+
3+
The repository is under development, and the description will appear later.

composer.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"name": "httpsoft/http-request",
3+
"description": "PSR-7 implementation for Request, ServerRequest and UploadedFile",
4+
"keywords": ["php", "http", "http-request", "http-server-request", "psr-7", "http-message"],
5+
"homepage": "https://httpsoft.org/",
6+
"type": "library",
7+
"license": "MIT",
8+
"authors": [
9+
{
10+
"name": "Evgeniy Zyubin",
11+
"email": "[email protected]",
12+
"homepage": "https://devanych.ru/",
13+
"role": "Founder and lead developer"
14+
}
15+
],
16+
"support": {
17+
"issues": "https://github.com/httpsoft/http-request/issues",
18+
"source": "https://github.com/httpsoft/http-request",
19+
"docs": "https://httpsoft.org/docs/request"
20+
},
21+
"require": {
22+
"php": "^7.4",
23+
"httpsoft/http-stream": "^1.0"
24+
},
25+
"require-dev": {
26+
"phpunit/phpunit": "^9.1",
27+
"squizlabs/php_codesniffer": "^3.5"
28+
},
29+
"autoload": {
30+
"psr-4": {
31+
"HttpSoft\\Request\\": "src/"
32+
}
33+
},
34+
"autoload-dev": {
35+
"psr-4": {
36+
"HttpSoft\\Tests\\Request\\": "tests/"
37+
}
38+
},
39+
"scripts": {
40+
"test": "phpunit --colors=always",
41+
"cs-check": "phpcs",
42+
"cs-fix": "phpcbf",
43+
"check": [
44+
"@cs-check",
45+
"@test"
46+
]
47+
}
48+
}

phpcs.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="HttpSoft Request Coding Standard">
3+
<description>HttpSoft Request Coding Standard</description>
4+
5+
<!-- display progress -->
6+
<arg value="p"/>
7+
<arg name="colors"/>
8+
9+
<!-- inherit rules from: -->
10+
<rule ref="PSR12"/>
11+
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
12+
<rule ref="Squiz.WhiteSpace.OperatorSpacing">
13+
<properties>
14+
<property name="ignoreNewlines" value="true"/>
15+
</properties>
16+
</rule>
17+
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
18+
<properties>
19+
<property name="ignoreBlankLines" value="false"/>
20+
</properties>
21+
</rule>
22+
23+
<!-- Paths to check -->
24+
<file>src</file>
25+
<file>tests</file>
26+
</ruleset>

phpunit.xml.dist

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<phpunit
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.5/phpunit.xsd"
5+
bootstrap="./vendor/autoload.php"
6+
executionOrder="depends,defects"
7+
beStrictAboutCoversAnnotation="true"
8+
beStrictAboutOutputDuringTests="true"
9+
beStrictAboutTodoAnnotatedTests="true"
10+
convertWarningsToExceptions="true"
11+
convertNoticesToExceptions="true"
12+
convertErrorsToExceptions="true"
13+
stopOnFailure="false"
14+
verbose="true"
15+
colors="true"
16+
>
17+
<php>
18+
<ini name="error_reporting" value="-1" />
19+
</php>
20+
21+
<testsuites>
22+
<testsuite name="HttpSoft Request Test Suite">
23+
<directory>./tests/</directory>
24+
</testsuite>
25+
</testsuites>
26+
27+
<filter>
28+
<whitelist>
29+
<directory suffix=".php">./src/</directory>
30+
</whitelist>
31+
</filter>
32+
</phpunit>

0 commit comments

Comments
 (0)