Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
183 commits
Select commit Hold shift + click to select a range
3967d27
[+]: added ".gitattributes"
voku Apr 29, 2016
3b82723
[+]: fixed code-style / added php-docs / added "alias"-methods ...
voku Apr 29, 2016
1ce3705
Update README.md
voku Apr 29, 2016
46f8ec2
[+]: update "composer.json"
voku Apr 29, 2016
33ef26b
Merge remote-tracking branch 'origin/master'
voku Apr 29, 2016
b6e1c82
Update README.md
voku Apr 29, 2016
605fc98
[+]: move "build" to "build.sh"
voku Apr 29, 2016
742880a
Merge remote-tracking branch 'origin/master'
voku Apr 29, 2016
3b4b36b
[~]: use "portable-utf8"
voku Apr 30, 2016
c94351b
[+]: fix tests for "Windows" ... :/
voku Apr 30, 2016
bc329c9
[+]: "Add connection timeout"
voku Apr 30, 2016
8744eff
[+]: "Link to httpful.phar fixed"
voku Apr 30, 2016
a2a0aad
[*]: "Typo correction"
voku Apr 30, 2016
1bc3e22
[+]: "Added explicit support for expectsXXX"
voku Apr 30, 2016
1eab070
[+]: "ConnectionErrorException cURLError"
voku Apr 30, 2016
6687350
[+]: "Fix for frameworks that use object proxies" + fixes phpdoc
voku Apr 30, 2016
d9ac9ab
[+]: "added support for http_proxy environment variable"
voku Apr 30, 2016
06c8d31
[+]: "Solves issue #170: HTTP Header parsing is inconsistent"
voku Apr 30, 2016
bef5cbf
[+]: "Give more information to the Exception object to enable better …
voku Apr 30, 2016
45d5172
[+]: "Add convenience methods for appending parameters to query string."
voku Apr 30, 2016
3e98e91
[+]: try to fix test for "timeout"
voku Apr 30, 2016
be4491b
Applied fixes from StyleCI
voku Apr 30, 2016
28c5d09
Merge pull request #1 from voku/analysis-XNAOj4
voku Apr 30, 2016
d22e2d9
[+]: try to fix test for "timeout" v2
voku Apr 30, 2016
5957bf3
[+]: try to fix test for "timeout" v2.1
voku Apr 30, 2016
f74d2c3
[+]: fixed some warnings from "scrutinizer-ci.com" ...
voku Apr 30, 2016
f686eb0
Scrutinizer Auto-Fixes
scrutinizer-auto-fixer Apr 30, 2016
f8882fc
Merge pull request #2 from voku/scrutinizer-patch-1
voku Apr 30, 2016
ea5b9e3
[+]: fixed some warnings from "scrutinizer-ci.com" v2
voku Apr 30, 2016
ac30ff8
[+]: try to fix test for "timeout" v2.2
voku Apr 30, 2016
28b8598
[+]: try to fix test for "timeout" v2.3
voku Apr 30, 2016
89cd324
[+]: try to fix test for "timeout" v2.4
voku Apr 30, 2016
257af84
[+]: try to fix test for "timeout" v2.5
voku Apr 30, 2016
30e5da1
[*]: added change-log
voku Apr 30, 2016
f689823
[+]: added more methods (less magic, more auto-completion via IDE)
voku May 6, 2016
1bba81d
[+]: fixed "composer.json"
voku May 6, 2016
237c61e
[+]: "Added reason phrase to response object"
voku May 6, 2016
3847fe1
[-]: skip "timeout"-test for "Travis-CI" ...
voku May 6, 2016
52ef3b0
Applied fixes from StyleCI
voku May 6, 2016
1f87307
Merge pull request #3 from voku/analysis-Xpe3y2
voku May 6, 2016
e0e0bff
[+]: "#227 unset curl handle after it has been closed" | thx @plan2net
Jun 30, 2016
a5ac210
[+]: use "assertSame" instead of "assertEquals"
Jul 20, 2016
025b6c7
[+]: use new version of "portable-utf8" (3.0)
Aug 12, 2016
31cbf76
Update README.md
voku Sep 13, 2016
1872ce2
add missing "finfo_close()"
voku Aug 4, 2017
15a30b7
[+]: use new version of "portable-utf8"
Aug 5, 2017
696b342
Update .travis.yml
voku Aug 10, 2017
1adf226
[!]: "php": ">=7.0" v1
voku Dec 10, 2017
acd4a33
[!]: "php": ">=7.0" v1.1
voku Dec 10, 2017
cc8ed2c
[!]: "php": ">=7.0" v1.1 (fixes for php 7.2)
voku Dec 10, 2017
b5847d8
Apply fixes from StyleCI
voku Dec 10, 2017
5c3a324
Merge pull request #4 from voku/analysis-873adN
voku Dec 10, 2017
db814fe
[!]: update "Portable UTF8" from v4 -> v5
voku Dec 23, 2017
df2396f
Merge remote-tracking branch 'origin/master'
voku Dec 23, 2017
703b033
Update .travis.yml
voku Oct 18, 2018
f9b3f55
[+]: use PSR-3 & PSR-18 & private & final
voku Apr 29, 2019
7e19b56
Merge remote-tracking branch 'origin/master'
voku Apr 29, 2019
c4b9efb
Apply fixes from StyleCI
voku Apr 29, 2019
20689eb
Apply fixes from StyleCI (#5)
voku Apr 29, 2019
45c76f9
Merge remote-tracking branch 'upstream/master'
voku Apr 29, 2019
0d37df2
[+]: fix from @theroch
voku Apr 29, 2019
694709e
[+]: use "RequestInterface"
voku Apr 29, 2019
172915b
[+]: use "RequestInterface" v2
voku Apr 29, 2019
ffbeda2
[*]: update the changelog
voku Apr 29, 2019
725cb0a
[*]: update the changelog v2
voku Apr 29, 2019
32db203
[+]: "Request" -> move main input variables into the "__construct"
voku Apr 29, 2019
4160093
[+]: "Setup" -> sync code style with other classes
voku Apr 29, 2019
4488aff
[+]: do not use generic exception class + use final + private
voku Apr 29, 2019
c613ef7
[+]: "Stream" -> fix arrays usage
voku Apr 30, 2019
9a6dd17
[*]: update the changelog
voku Apr 30, 2019
7aa6e61
[+]: "Request" -> allow multi-array payload
voku Apr 30, 2019
62ceb96
[+]: "Client" -> add more helper functions with return types for auto…
voku Apr 30, 2019
fcd4921
[*]: update the changelog
voku Apr 30, 2019
652e3eb
[~]: auto-fix the code style
voku Apr 30, 2019
6eff497
[+]: "Request" -> fix "addHeaders()" + add tests
voku Apr 30, 2019
c248f78
[*]: update the changelog
voku Apr 30, 2019
e8c900f
[+]: fix implementation of PSR standards + many tests
voku Jul 6, 2019
d15304f
[+]: fix implementation of PSR standards + many tests v2
voku Jul 6, 2019
eda6482
[+]: fix for php 7.0
voku Jul 6, 2019
e3a4f2c
[*]: add some more tests
voku Jul 6, 2019
c436781
[+]: re-write some parts ...
voku Jul 9, 2019
ea91cdd
[+]: re-write some parts ... v2
voku Jul 10, 2019
41cb389
[+]: re-write some parts ... v2.1
voku Jul 10, 2019
4e2001b
Apply fixes from StyleCI
voku Jul 10, 2019
ea8d55b
Merge pull request #6 from voku/analysis-q1QLGP
voku Jul 10, 2019
95fd60a
[+]: re-write some parts ... v2.2
voku Jul 10, 2019
be392ef
Merge remote-tracking branch 'origin/master'
voku Jul 10, 2019
1336620
[+]: re-write some parts ... v3
voku Jul 11, 2019
7232c7e
[+]: re-write some parts ... v3.1
voku Jul 11, 2019
96cdf5b
[+]: re-write some parts ... v3.2
voku Jul 11, 2019
70fefb5
[+]: re-write some parts ... v3.3 + fail test for HTTP2
voku Jul 15, 2019
9f74c3d
[+]: re-write some parts ... v3.4 + fail test for HTTP2
voku Jul 15, 2019
6c7ea3b
[+]: re-write some parts ... v3.5 + fail test for HTTP2
voku Jul 15, 2019
d749fc4
[+]: re-write some parts ... v3.6 -> test for HTTP2
voku Jul 15, 2019
5d77650
[+]: re-write some parts ... v4 -> add "Client::download()"
voku Jul 15, 2019
a60381d
[+]: add "Request->withCacheControl()"
voku Jul 15, 2019
0fe7b71
[*]: fix phpdoc
voku Jul 15, 2019
f42fb74
[*]: fix readme v1
voku Jul 15, 2019
f17d9cd
[*]: update the changelog
voku Jul 16, 2019
013832e
[+]: fix "curl requires a special syntax to send empty headers" for p…
voku Jul 16, 2019
0246381
Update README.md
voku Jul 16, 2019
7efa59c
[+]: add support for async requests via CurlMulti
voku Nov 12, 2019
205d0ae
Merge remote-tracking branch 'origin/master'
voku Nov 12, 2019
90c8a39
[*]: update the changelog
voku Nov 12, 2019
df17ada
[*]: fix test with php 7.0
voku Nov 12, 2019
25b7ecd
[*]: fix test with php 7.0 v2
voku Nov 12, 2019
a229d69
[+]: fix support for async requests
voku Nov 13, 2019
e491837
[*]: update the changelog
voku Nov 13, 2019
78fbb58
[+]: add $params for "GET" / "DELETE" requests
voku Nov 15, 2019
4822fd4
[*]: update the changelog
voku Nov 15, 2019
c78b921
[~]: reduce usleep time for "curl_multi_select" === -1
voku Dec 19, 2019
39dfd36
[+]: update phpstan (0.12)
voku Dec 19, 2019
d447cb1
[*]: update the changelog
voku Dec 19, 2019
4c7c4d2
[+]: implement the "\Http\Client\HttpAsyncClient"-interface
voku Jan 28, 2020
ec6ed12
[*]: update the changelog
voku Jan 28, 2020
34edeee
[+]: optimize "RequestInterface"-integration
voku Jan 28, 2020
7c2ab7c
[+]: optimize "RequestInterface"-integration v2
voku Jan 28, 2020
62da574
[*]: update the changelog
voku Jan 28, 2020
ba389ae
Update README.md
voku Feb 14, 2020
2bea8ac
[*]: add one more test
voku Feb 28, 2020
ffeea5e
Merge remote-tracking branch 'origin/master'
voku Feb 28, 2020
0d45fc6
[+]: merge upstream fixes
voku Feb 29, 2020
ff5ee2b
[*]: update the changelog
voku Feb 29, 2020
ff12c5e
[+]: "ClientMulti" -> "add_html()"
voku Feb 29, 2020
d0ff632
[*]: update the changelog
voku Feb 29, 2020
fd366a8
[+]: add "Request->withPort(int $port)"
voku Mar 6, 2020
a6f831d
[+]: fix errors reported by phpstan
voku Mar 6, 2020
745759b
[*]: fix ".styleci" config
voku Mar 6, 2020
ac36362
[+]: fix "Unable to parse response code from HTTP response due to mal…
voku May 3, 2020
816bf42
[*]: update the changelog
voku May 3, 2020
f9b7509
Update README.md
voku May 11, 2020
755d607
Update README.md
voku May 15, 2020
da3730b
Update README.md
voku May 15, 2020
4a2ab56
Update README.md
voku May 19, 2020
dec2c8b
[+]: update vendor stuff + fix tests
voku Nov 18, 2020
3d68dbb
[+]: update vendor stuff
voku Nov 18, 2020
d4e30a5
Merge branch 'master' of ssh://github.com/voku/httpful into master
voku Nov 18, 2020
ed4c5b3
[*]: fix "styleci" config
voku Nov 18, 2020
780597d
[*]: use github actions
voku Mar 29, 2021
0612bf7
[+]: try to fix bugs, reported by phpstan
voku Mar 29, 2021
c947b84
[~]: update phpunit :/
voku Apr 4, 2021
6fd35ba
[*]: check ci errors: "Could not open input file: vendor/bin/phpunit"
voku Apr 7, 2021
845172e
[*]: check ci errors v2
voku Apr 7, 2021
65734a9
[+]: check ci errors v2.1
voku Apr 7, 2021
ade4a45
[+]: check ci errors v2.2
voku Apr 7, 2021
68ce8fb
[+]: check ci errors v2.3
voku Apr 7, 2021
417ce78
[~]: update phpunit :/ v2
voku Apr 7, 2021
92708e1
[~]: update phpunit :/ v2.1
voku Apr 7, 2021
81eb193
[~]: update phpunit :/ v2.1.1
voku Apr 7, 2021
94c398e
[~]: update phpunit :/ v3 (typo)
voku Apr 7, 2021
bacca22
[~]: update phpunit :/ v2.2
voku Apr 7, 2021
14d6515
[*]: update the README
voku Apr 7, 2021
0270b17
[*]: update the CHANGELOG
voku Apr 7, 2021
724c6e6
[+]: "json_decode" -> will return: true, false, float, int, array, ob…
voku Sep 9, 2021
87f5974
[*]: update the changelog
voku Sep 9, 2021
d7ccae5
[+]: "XmlMimeHandler" -> show the broken xml
voku Sep 14, 2021
531683e
[*]: update the changelog
voku Sep 14, 2021
6dbb0e5
[+]: add more examples
voku Oct 15, 2021
ebfe2f4
[*]: update the changelog
voku Oct 15, 2021
f201413
[+]: update "portable-utf8"
voku Dec 8, 2021
f57bdf2
[*]: update the changelog
voku Dec 8, 2021
0adbfa0
Apply fixes from StyleCI
voku Dec 8, 2021
0c3c2c1
Merge pull request #11 from voku/analysis-orxZ2Q
voku Dec 8, 2021
1927020
[+]: update dependencies for PHP >= 8.1 v1
voku Jul 14, 2023
89e6aef
[*]: update the changelog
voku Jul 14, 2023
c4d6ec4
[+] better support for PHP >= 8.1
voku Jul 14, 2023
ca38457
Fix curly braces in strings
szepeviktor Jul 18, 2023
f8deaa0
Fix typos
szepeviktor Jul 18, 2023
f8a00e1
Fix CS
szepeviktor Jul 18, 2023
39b589d
Fix CS again
szepeviktor Jul 18, 2023
352a962
Merge pull request #15 from szepeviktor/fix-problems
voku Jul 18, 2023
b132855
[~]: fix failing tests only
voku Jul 18, 2023
ae1bc03
Merge branch 'master' of ssh://github.com/voku/httpful
voku Jul 18, 2023
d1a8336
[+]: fixes for psr stuff + clean-up
voku Jul 20, 2023
4400aee
[*]: update the changelog
voku Jul 20, 2023
97c8279
[*]: update the changelog v2
voku Jul 20, 2023
c4502aa
[+]: fix test for the new release
voku Jul 21, 2023
805b5b4
[*]: "composer.json" -> HTTP-Factory is also implemented
voku Jul 22, 2023
a1a1e87
[*]: update the changelog
voku Jul 22, 2023
5b7b712
[*]: "composer.json" -> HTTP-Factory is also implemented v2
voku Jul 22, 2023
290c4fd
Apply fixes from StyleCI
StyleCIBot Jul 22, 2023
e1bfdc7
Merge pull request #16 from voku/analysis-54Dedr
voku Jul 22, 2023
6b09272
Update post_form.php example
voku Jan 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# http://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
#trim_trailing_whitespace = true
insert_final_newline = true
16 changes: 16 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
* text=auto

/examples/ export-ignore
/tests/ export-ignore
/build.sh export-ignore
/.editorconfig export-ignore
/.scrutinizer.yml export-ignore
/.styleci.yml export-ignore
/.gitattributes export-ignore
/.github/ export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/circle.yml export-ignore
/phpcs.php_cs export-ignore
/phpstan.neon export-ignore
/phpunit.xml.dist export-ignore
22 changes: 22 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# How to Contribute

## Pull Requests

1. Create your own [fork](https://help.github.com/articles/fork-a-repo) of this repo
2. Create a new branch for each feature or improvement
3. Send a pull request from each feature branch to the **master** branch

It is very important to separate new features or improvements into separate
feature branches, and to send a pull request for each branch. This allows me to
review and pull in new features or improvements individually.

## Style Guide

All pull requests must adhere to the [PSR-2 standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md).

## Unit Testing

All pull requests must be accompanied by passing PHPUnit unit tests and
complete code coverage.

[Learn about PHPUnit](https://github.com/sebastianbergmann/phpunit/)
5 changes: 5 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
github: [voku]
patreon: voku
open_collective: anti-xss
tidelift: "packagist/voku/httpful"
custom: https://www.paypal.me/moelleken
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#### What is this feature about (expected vs actual behaviour)?

#### How can I reproduce it?

#### Does it take minutes, hours or days to fix?

#### Any additional information?
94 changes: 94 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
on:
push:
branches:
- master
pull_request:
branches:
- master

defaults:
run:
shell: bash

jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
composer: [basic]
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@2.9.0
with:
php-version: ${{ matrix.php }}
coverage: xdebug
extensions: zip
tools: composer

- name: Determine composer cache directory
id: composer-cache
run: echo "::set-output name=directory::$(composer config cache-dir)"

- name: Cache composer dependencies
uses: actions/cache@v2.1.3
with:
path: ${{ steps.composer-cache.outputs.directory }}
key: ${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ matrix.php }}-composer-

- name: Install dependencies
run: |
if [[ "${{ matrix.php }}" == "7.4" ]]; then
composer require phpstan/phpstan --no-update
fi;

if [[ "${{ matrix.composer }}" == "lowest" ]]; then
composer update --prefer-dist --no-interaction --prefer-lowest --prefer-stable
fi;

if [[ "${{ matrix.composer }}" == "basic" ]]; then
composer update --prefer-dist --no-interaction
fi;

composer dump-autoload -o

- name: Run tests
run: |
mkdir -p build/logs
php vendor/bin/phpunit -c phpunit.xml.dist --coverage-clover=build/logs/clover.xml

- name: Run phpstan
continue-on-error: true
if: ${{ matrix.php == '7.4' }}
run: |
php vendor/bin/phpstan analyse

- name: Upload coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=build/logs/clover.xml -v

- name: Upload coverage results to Codecov
uses: codecov/codecov-action@v1
with:
files: build/logs/clover.xml

- name: Archive logs artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: logs_composer-${{ matrix.composer }}_php-${{ matrix.php }}
path: |
build/logs
17 changes: 14 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
.DS_Store
composer.lock
vendor
downloads
.idea/*

# Tests
server.log
.phpunit.result.cache

# Build
/build/

# IDE
/.idea

# Composer
vendor
composer.lock
3 changes: 3 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
tools:
external_code_coverage:
timeout: 800
10 changes: 10 additions & 0 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
preset: psr2

enabled:
- unused_use
- include
- single_quote
- ordered_use

disabled:
- indentation
34 changes: 22 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
language: php

sudo: false

php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- hhvm

matrix:
fast_finish: true
allow_failures:
- php: 7.0

- 7.1
- 7.2
- 7.3

before_script:
- wget https://scrutinizer-ci.com/ocular.phar
- travis_retry composer self-update
- travis_retry composer require satooshi/php-coveralls
- if [ "$(phpenv version-name)" == 7.3 ]; then travis_retry composer require phpstan/phpstan; fi
- travis_retry composer install --no-interaction --prefer-source
- composer dump-autoload -o

script:
- phpunit -c ./tests/phpunit.xml
- mkdir -p build/logs
- php vendor/bin/phpunit -c phpunit.xml.dist
- if [ "$(phpenv version-name)" == 7.3 ]; then php vendor/bin/phpstan analyse; fi

after_script:
- php vendor/bin/coveralls -v
- php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
- bash <(curl -s https://codecov.io/bash)
Loading