Skip to content

Commit f14a599

Browse files
authored
Merge pull request #76 from php-http/improve_package
Improve package
2 parents 7dad690 + ceb36a8 commit f14a599

File tree

11 files changed

+113
-40
lines changed

11 files changed

+113
-40
lines changed

.gitattributes

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
spec/ export-ignore
2-
tests/ export-ignore
3-
.editorconfig export-ignore
4-
.gitattributes export-ignore
5-
.gitignore export-ignore
6-
.php_cs export-ignore
7-
.scrutinizer.yml export-ignore
8-
.styleci.yml export-ignore
9-
.travis.yml export-ignore
10-
CONTRIBUTING export-ignore
11-
phpspec.ci.yml export-ignore
12-
phpspec.yml.dist export-ignore
13-
phpunit.xml.dist export-ignore
1+
.editorconfig export-ignore
2+
.gitattributes export-ignore
3+
/.github/ export-ignore
4+
.gitignore export-ignore
5+
/.php_cs export-ignore
6+
/.scrutinizer.yml export-ignore
7+
/.styleci.yml export-ignore
8+
/.travis.yml export-ignore
9+
/behat.yml.dist export-ignore
10+
/features/ export-ignore
11+
/phpspec.ci.yml export-ignore
12+
/phpspec.yml.dist export-ignore
13+
/phpunit.xml.dist export-ignore
14+
/spec/ export-ignore
15+
/tests/ export-ignore

.github/CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Contributing
2+
3+
Please see our [contributing guide](http://docs.php-http.org/en/latest/development/contributing.html).

.github/ISSUE_TEMPLATE.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
| Q | A
2+
| ------------ | ---
3+
| Bug? | no|yes
4+
| New Feature? | no|yes
5+
| Version | Specific version or SHA of a commit
6+
7+
8+
#### Actual Behavior
9+
10+
What is the actual behavior?
11+
12+
13+
#### Expected Behavior
14+
15+
What is the behavior you expect?
16+
17+
18+
#### Steps to Reproduce
19+
20+
What are the steps to reproduce this bug? Please add code examples,
21+
screenshots or links to GitHub repositories that reproduce the problem.
22+
23+
24+
#### Possible Solutions
25+
26+
If you have already ideas how to solve the issue, add them here.
27+
(remove this section if not needed)

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
| Q | A
2+
| --------------- | ---
3+
| Bug fix? | no|yes
4+
| New feature? | no|yes
5+
| BC breaks? | no|yes
6+
| Deprecations? | no|yes
7+
| Related tickets | fixes #X, partially #Y, mentioned in #Z
8+
| Documentation | if this is a new feature, link to pull request in https://github.com/php-http/documentation that adds relevant documentation
9+
| License | MIT
10+
11+
12+
#### What's in this PR?
13+
14+
Explain what the changes in this PR do.
15+
16+
17+
#### Why?
18+
19+
Which problem does the PR fix? (remove this section if you linked an issue above)
20+
21+
22+
#### Example Usage
23+
24+
``` php
25+
// If you added new features, show examples of how to use them here
26+
// (remove this section if not a new feature)
27+
28+
$foo = new Foo();
29+
30+
// Now we can do
31+
$foo->doSomething();
32+
```
33+
34+
35+
#### Checklist
36+
37+
- [ ] Updated CHANGELOG.md to describe BC breaks / deprecations | new feature | bugfix
38+
- [ ] Documentation pull request created (if not simply a bugfix)
39+
40+
41+
#### To Do
42+
43+
- [ ] If the PR is not complete but you want to discuss the approach, list what remains to be done here

.gitignore

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
.puli/
2-
bin/*
3-
!bin/puli.phar
4-
build/
5-
vendor/
6-
composer.lock
7-
phpspec.yml
8-
phpunit.xml
9-
puli.json
1+
/.puli/
2+
/behat.yml
3+
/build/
4+
/composer.lock
5+
/phpspec.yml
6+
/phpunit.xml
7+
/puli.json
8+
/vendor/

.styleci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ finder:
55
- "spec"
66
path:
77
- "src"
8+
- "tests"
89

910
enabled:
1011
- short_array_syntax
12+
13+
disabled:
14+
- phpdoc_annotation_without_dot # This is still buggy: https://github.com/symfony/symfony/pull/19198

.travis.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sudo: false
44

55
cache:
66
directories:
7-
- $HOME/.composer/cache
7+
- $HOME/.composer/cache/files
88

99
php:
1010
- 5.5
@@ -29,14 +29,15 @@ matrix:
2929
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci"
3030

3131
before_install:
32-
- travis_retry composer self-update
32+
- if [[ $COVERAGE != true && $TRAVIS_PHP_VERSION != hhvm ]]; then phpenv config-rm xdebug.ini; fi
3333

3434
install:
35-
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-source --no-interaction
35+
- wget https://github.com/puli/cli/releases/download/1.0.0-beta10/puli.phar && chmod +x puli.phar
36+
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction
3637

3738
script:
3839
- $TEST_COMMAND
3940

4041
after_success:
41-
- if [[ "$COVERAGE" = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
42-
- if [[ "$COVERAGE" = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi
42+
- if [[ $COVERAGE = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
43+
- if [[ $COVERAGE = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi

CONTRIBUTING

Lines changed: 0 additions & 1 deletion
This file was deleted.

bin/puli.phar

-398 KB
Binary file not shown.

composer.json

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
}
1212
],
1313
"require": {
14-
"php": "^5.5|^7.0"
14+
"php": "^5.5 || ^7.0"
1515
},
1616
"require-dev": {
1717
"php-http/httplug": "^1.0",
1818
"php-http/message-factory": "^1.0",
19-
"puli/composer-plugin": "1.0.0-beta9",
19+
"puli/composer-plugin": "1.0.0-beta9 || 1.0.0-beta10",
2020
"phpspec/phpspec": "^2.4",
21-
"henrikbjorn/phpspec-code-coverage" : "^1.0"
21+
"henrikbjorn/phpspec-code-coverage" : "^2.0.2"
2222
},
2323
"suggest": {
2424
"puli/composer-plugin": "Sets up Puli which is recommended for Discovery to work. Check http://docs.php-http.org/en/latest/discovery.html for more details.",
@@ -35,20 +35,14 @@
3535
}
3636
},
3737
"scripts": {
38-
"test": "bin/phpspec run",
39-
"test-ci": "bin/phpspec run -c phpspec.ci.yml"
38+
"test": "vendor/bin/phpspec run",
39+
"test-ci": "vendor/bin/phpspec run -c phpspec.ci.yml"
4040
},
41-
"bin": [
42-
"bin/puli.phar"
43-
],
4441
"extra": {
4542
"branch-alias": {
4643
"dev-master": "1.0-dev"
4744
}
4845
},
49-
"config": {
50-
"bin-dir": "bin"
51-
},
5246
"prefer-stable": true,
5347
"minimum-stability": "beta"
5448
}

phpspec.ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ suites:
22
discovery_suite:
33
namespace: Http\Discovery
44
psr4_prefix: Http\Discovery
5+
formatter.name: pretty
6+
bootstrap: spec/autoload.php
57
extensions:
68
- PhpSpec\Extension\CodeCoverageExtension
79
code_coverage:
810
format: clover
911
output: build/coverage.xml
10-
bootstrap: spec/autoload.php

0 commit comments

Comments
 (0)