Skip to content

Commit

Permalink
Merge branch 'master' into feature/composer-test
Browse files Browse the repository at this point in the history
* master:
  Fix logo image
  Travis: skip phpcs in case of integration tests
  stream_lock operation can use strict type checking when it's 0
  PHP 7.1: Fixed issue with php-cs-fixer
  Fix bug with StreamProcessor::stream_lock explained here antecedent/patchwork#27
  Test php 7.1
  test for setting post method when CURLOPT_POSTFIELDS set
  Adds github pull request template
  Set POST method when CURLOPT_POSTFIELDS is set
  Fix parallel cURL requests:  - Make sure all handles are inside an array so they can be removed properly when done  - Remove handle as soon as done  - Fix behaviour of curl_multi_exec to return last curl info  - Also fix test, check for the second to last curl info and make sure the third returns false, not the second  - CS fixes
  php-cs-fixer introduced (php-vcr#173)
  • Loading branch information
tstuttard committed Aug 25, 2017
2 parents f4e00fb + 5797258 commit 2ca2293
Show file tree
Hide file tree
Showing 39 changed files with 707 additions and 118 deletions.
24 changes: 24 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,24 @@
### Context


### What has been done

-
-

### How to test

-
-

### Todo

- [ ]
- [ ]

### Notes

-
-


1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -4,3 +4,4 @@
coverage/*
notes.md
tests/fixtures/cassette*
/.php_cs.cache
23 changes: 23 additions & 0 deletions .php_cs
@@ -0,0 +1,23 @@
<?php
$config = Symfony\CS\Config\Config::create()
->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
->fixers(
array(
'single_blank_line_before_namespace',
'concat_with_spaces',
'single_quote',
'braces',
)
)
->finder(
Symfony\CS\Finder::create()
->exclude('vendor')
->exclude('docs')
->in(__DIR__)
)
->setUsingCache(true);

$cacheDir = getenv('TRAVIS') ? getenv('HOME') . '/.php-cs-fixer' : __DIR__;
$config->setDir($cacheDir);

return $config;
6 changes: 6 additions & 0 deletions .travis.yml
Expand Up @@ -19,6 +19,10 @@ matrix:
php: 7.0
- env: TEST_DIR=. COMPOSER_FLAGS="--prefer-lowest"
php: 7.0
- env: TEST_DIR=.
php: 7.1
- env: TEST_DIR=. COMPOSER_FLAGS="--prefer-lowest"
php: 7.1
- env: TEST_DIR=tests/integration/guzzle/3
php: 5.6
- env: TEST_DIR=tests/integration/guzzle/4
Expand All @@ -34,11 +38,13 @@ before_install:
install:
- composer update --prefer-source -o $COMPOSER_FLAGS
- PHPUNIT_BIN=$(pwd)/vendor/bin/phpunit
- PHPCS_FIXER_BIN=$(pwd)/vendor/bin/php-cs-fixer
- cd ${TEST_DIR}
- composer update --prefer-source -o $COMPOSER_FLAGS

script:
- $PHPUNIT_BIN --coverage-clover=coverage.clover
- test $TEST_DIR = "." && $PHPCS_FIXER_BIN fix --config-file=.php_cs --dry-run --diff $TRAVIS_BUILD_DIR || echo "Continue without php-cs-fixer"

after_success:
- wget https://scrutinizer-ci.com/ocular.phar
Expand Down
2 changes: 1 addition & 1 deletion README.md
@@ -1,4 +1,4 @@
![PHP-VCR](https://dl.dropbox.com/u/13186339/blog/php-vcr.png)
![PHP-VCR](https://user-images.githubusercontent.com/133832/27151811-0d95c6c4-514c-11e7-834e-eff1eec2ea16.png)

[![Build Status](https://travis-ci.org/php-vcr/php-vcr.svg?branch=master)](https://travis-ci.org/php-vcr/php-vcr)
[![Dependency Status](http://www.versioneye.com/user/projects/525a6160632bac1e35000001/badge.png)](http://www.versioneye.com/user/projects/525a6160632bac1e35000001)
Expand Down
7 changes: 5 additions & 2 deletions composer.json
Expand Up @@ -4,7 +4,9 @@
"license": "MIT",

"scripts": {
"test": "./vendor/bin/phpunit"
"test": "./vendor/bin/phpunit",
"lint": "./vendor/bin/php-cs-fixer fix --verbose --diff --dry-run --config-file=.php_cs",
"fix": "./vendor/bin/php-cs-fixer fix --verbose --diff --config-file=.php_cs"
},

"authors": [
Expand All @@ -25,7 +27,8 @@
"phpunit/phpunit": "^4.8|^5.0",
"sebastian/version": "^1.0.3|^2.0",
"mikey179/vfsStream": "^1.2",
"lapistano/proxy-object": "dev-master#d7184a479f502d5a0f96d0bae73566dbb498da8f"
"lapistano/proxy-object": "dev-master#d7184a479f502d5a0f96d0bae73566dbb498da8f",
"friendsofphp/php-cs-fixer": "^1.12"
},

"autoload": {
Expand Down

0 comments on commit 2ca2293

Please sign in to comment.