Skip to content
This repository was archived by the owner on Jul 15, 2021. It is now read-only.

Commit a6a8716

Browse files
committed
Initial commit
0 parents  commit a6a8716

27 files changed

+2921
-0
lines changed

.gitattributes

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Path-based git attributes
2+
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
3+
4+
# Ignore all test and documentation with "export-ignore".
5+
/.gitattributes export-ignore
6+
/.gitignore export-ignore
7+
/.travis.yml export-ignore
8+
/.styleci.yml export-ignore
9+
/appveyor.yml export-ignore
10+
/phpunit.xml.dist export-ignore
11+
/.scrutinizer.yml export-ignore
12+
/tests export-ignore

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/vendor
2+
/build
3+
/node_modules
4+
/coverage
5+
/bower_components
6+
/.sass-cache

CONTRIBUTING.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
Contributing Guidelines
2+
=======================
3+
4+
Choosing the right branch
5+
-------------------------
6+
7+
Before working on a patch, you must determine on which branch you need to work:
8+
9+
* `1.3`, if you are fixing a bug for an existing feature (you may have to choose a higher branch if the feature you are fixing was introduced in a later version)
10+
* `master`, if you are adding a new and backward incompatible feature.
11+
12+
Working on your code
13+
--------------------
14+
15+
Fork, then clone the repo:
16+
17+
git clone git@github.com/your-username/CsaGuzzleBundle.git
18+
19+
Create your working branch, based on the correct branch (replace `1.3` with the correct target branch):
20+
21+
git checkout -b BRANCH_NAME -t origin/1.3
22+
23+
`BRANCH_NAME` should be descriptive (`ticket_XXX` where `XXX` is the ticket number is a good convention for bug fixes).
24+
25+
Install dependencies:
26+
27+
composer update
28+
29+
Make sure the tests pass:
30+
31+
vendor/bin/phpunit
32+
33+
Push to your fork and [submit a pull request](https://github.com/csarrazi/CsaGuzzleBundle/compare/).
34+
35+
At this point you're waiting on me. I like to at least comment on pull requests within
36+
three business days (and, typically, one business day). I may suggest some changes or
37+
improvements or alternatives.
38+
39+
Some things that will increase the chance that your pull request is accepted:
40+
41+
* Write tests.
42+
* Follow [PSR-1](http://www.php-fig.org/psr/psr-1/) and [PSR-2](http://www.php-fig.org/psr/psr-2/).
43+
* Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
44+
45+
Pull request template
46+
---------------------
47+
48+
```markdown
49+
| Q | A
50+
| ------------- | ---
51+
| Bug fix? | [yes|no]
52+
| New feature? | [yes|no]
53+
| BC breaks? | [yes|no]
54+
| Deprecations? | [yes|no]
55+
| Tests pass? | [yes|no]
56+
| Fixed tickets | [comma separated list of tickets fixed by the PR]
57+
| License | Apache License 2.0
58+
```
59+
60+
Notes
61+
-----
62+
63+
All bug fixes merged into maintenance branches are also merged into more recent
64+
branches on a regular basis. For instance, if you submit a patch for the 1.3 branch,
65+
the patch will also be applied by the core team on the master branch.

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Guzzle Cache Middleware
2+
=======================
3+
4+
Installation
5+
------------
6+
7+
```
8+
composer req csa/guzzle-cache-middleware
9+
```
10+
11+
Upgrade
12+
-------
13+
14+
Although I try to guarantee forward-compatibility of the bundle with previous versions.
15+
Here are the upgrade notes between each version.
16+
17+
See [Upgrade.md](UPGRADE.md).
18+
19+
Documentation
20+
-------------
21+
22+
Contributing
23+
------------
24+
25+
The Guzzle Cache Middleware is an open source project. If you'd like to contribute, please read
26+
the [Contributing Guidelines](CONTRIBUTING.md).
27+
28+
License
29+
-------
30+
31+
This library is under Apache License 2.0. For the full copyright and license
32+
information, please view the [LICENSE](src/Resources/meta/LICENSE) file that was
33+
distributed with this source code.
34+

appveyor.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
build: false
2+
clone_depth: 10
3+
platform: x64
4+
clone_folder: c:\projects\guzzle-bundle
5+
6+
cache:
7+
- c:\php -> appveyor.yml
8+
9+
init:
10+
- SET PATH=c:\php;%PATH%
11+
- SET COMPOSER_NO_INTERACTION=1
12+
- SET SYMFONY_DEPRECATIONS_HELPER=strict
13+
- SET PHP=1
14+
- SET ANSICON=121x90 (121x90)
15+
16+
install:
17+
- IF EXIST c:\php (SET PHP=0) ELSE (mkdir c:\php)
18+
- cd c:\php
19+
- IF %PHP%==1 appveyor DownloadFile http://windows.php.net/downloads/releases/archives/php-7.1.5-Win32-VC14-x64.zip
20+
- IF %PHP%==1 7z x php-7.1.5-Win32-VC14-x64.zip -y >nul
21+
- IF %PHP%==1 del /Q *.zip
22+
- IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat
23+
- IF %PHP%==1 copy /Y php.ini-development php.ini
24+
- IF %PHP%==1 echo max_execution_time=1200 >> php.ini
25+
- IF %PHP%==1 echo date.timezone="UTC" >> php.ini
26+
- IF %PHP%==1 echo extension_dir=ext >> php.ini
27+
- IF %PHP%==1 echo extension=php_openssl.dll >> php.ini
28+
- IF %PHP%==1 echo extension=php_mbstring.dll >> php.ini
29+
- IF %PHP%==1 echo extension=php_fileinfo.dll >> php.ini
30+
- IF %PHP%==1 echo extension=php_curl.dll >> php.ini
31+
- appveyor DownloadFile https://getcomposer.org/composer.phar
32+
- cd c:\projects\guzzle-bundle
33+
- composer install --prefer-dist
34+
35+
test_script:
36+
- cd c:\projects\guzzle-bundle
37+
- vendor\bin\phpunit.bat
38+
39+
branches:
40+
only:
41+
- master
42+
- 1.3

composer.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "csa/guzzle-cache-middleware",
3+
"description": "A Cache middleware for GuzzleHttp >= 6.0",
4+
"license": "Apache-2.0",
5+
"type": "library",
6+
"authors": [
7+
{ "name": "Charles Sarrazin", "email": "charles@sarraz.in" }
8+
],
9+
"require": {
10+
"php": ">=5.6.0",
11+
"guzzlehttp/guzzle": "^6.1",
12+
"symfony/filesystem": "^2.7|^3.0|^4.0"
13+
},
14+
"suggest": {
15+
"doctrine/cache": "Allows caching of responses",
16+
"psr/cache": "Allows caching of responses",
17+
"namshi/cuzzle": "Output command to repeat request in command line",
18+
"tolerance/tolerance": "Allows retrying failed requests"
19+
},
20+
"require-dev": {
21+
"phpunit/phpunit": "^4.8",
22+
"doctrine/cache": "^1.1",
23+
"psr/cache": "^1.0",
24+
"symfony/phpunit-bridge": "^2.7|^3.0|^4.0"
25+
},
26+
"autoload": {
27+
"psr-4": { "Csa\\GuzzleHttp\\Middleware\\Cache\\": "src" }
28+
},
29+
"autoload-dev": {
30+
"psr-4": { "Csa\\Tests\\GuzzleHttp\\Middleware\\Cache\\": "tests" }
31+
},
32+
"minimum-stability": "dev",
33+
"extra": {
34+
"branch-alias": {
35+
"dev-master": "1.0-dev"
36+
}
37+
}
38+
}

0 commit comments

Comments
 (0)