Merge branch 'master' into development

* master:
  Adjust API to work with Guzzle 6
  Change guzzle version to ~6.0
  Added docs to explain how to use markdown to display images

# Conflicts:
#	composer.lock
Cette révision appartient à :
Stéphane Goetz 2016-04-14 21:28:52 +02:00
révision a2f5d89201
7 fichiers modifiés avec 108 ajouts et 65 suppressions

1
.gitignore externe
Voir le fichier

@ -1,5 +1,6 @@
node_modules
.DS_Store
.idea
/sftp-config.json
static

Voir le fichier

@ -14,7 +14,7 @@
"require": {
"php": ">=5.4",
"league/plates": "~3.1",
"guzzlehttp/guzzle": "~5.3",
"guzzlehttp/guzzle": "~6.0",
"league/commonmark": "^0.13",
"symfony/console": "~3.0",
"symfony/finder": "~3.0",

141
composer.lock générée
Voir le fichier

@ -4,39 +4,43 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "5d99c57e9efe49df55a765026a15f586",
"content-hash": "88197b6eaf8fc4b266eb8c72b115580a",
"hash": "bd4fe65872a143039090e3c62b4c5a40",
"content-hash": "de3684c6c65b1602b52e6534aa5e6eda",
"packages": [
{
"name": "guzzlehttp/guzzle",
"version": "5.3.0",
"version": "6.2.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "f3c8c22471cb55475105c14769644a49c3262b93"
"reference": "d094e337976dff9d8e2424e8485872194e768662"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/f3c8c22471cb55475105c14769644a49c3262b93",
"reference": "f3c8c22471cb55475105c14769644a49c3262b93",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/d094e337976dff9d8e2424e8485872194e768662",
"reference": "d094e337976dff9d8e2424e8485872194e768662",
"shasum": ""
},
"require": {
"guzzlehttp/ringphp": "^1.1",
"php": ">=5.4.0"
"guzzlehttp/promises": "~1.0",
"guzzlehttp/psr7": "~1.1",
"php": ">=5.5.0"
},
"require-dev": {
"ext-curl": "*",
"phpunit/phpunit": "^4.0",
"psr/log": "^1.0"
"phpunit/phpunit": "~4.0",
"psr/log": "~1.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
"dev-master": "6.2-dev"
}
},
"autoload": {
"files": [
"src/functions_include.php"
],
"psr-4": {
"GuzzleHttp\\": "src/"
}
@ -52,7 +56,7 @@
"homepage": "https://github.com/mtdowling"
}
],
"description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients",
"description": "Guzzle is a PHP HTTP client library",
"homepage": "http://guzzlephp.org/",
"keywords": [
"client",
@ -63,44 +67,41 @@
"rest",
"web service"
],
"time": "2015-05-20 03:47:55"
"time": "2016-03-21 20:02:09"
},
{
"name": "guzzlehttp/ringphp",
"name": "guzzlehttp/promises",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/RingPHP.git",
"reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b"
"url": "https://github.com/guzzle/promises.git",
"reference": "bb9024c526b22f3fe6ae55a561fd70653d470aa8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/RingPHP/zipball/dbbb91d7f6c191e5e405e900e3102ac7f261bc0b",
"reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b",
"url": "https://api.github.com/repos/guzzle/promises/zipball/bb9024c526b22f3fe6ae55a561fd70653d470aa8",
"reference": "bb9024c526b22f3fe6ae55a561fd70653d470aa8",
"shasum": ""
},
"require": {
"guzzlehttp/streams": "~3.0",
"php": ">=5.4.0",
"react/promise": "~2.0"
"php": ">=5.5.0"
},
"require-dev": {
"ext-curl": "*",
"phpunit/phpunit": "~4.0"
},
"suggest": {
"ext-curl": "Guzzle will use specific adapters if cURL is present"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.1-dev"
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-4": {
"GuzzleHttp\\Ring\\": "src/"
}
"GuzzleHttp\\Promise\\": "src/"
},
"files": [
"src/functions_include.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@ -113,25 +114,32 @@
"homepage": "https://github.com/mtdowling"
}
],
"description": "Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function.",
"time": "2015-05-20 03:37:09"
"description": "Guzzle promises library",
"keywords": [
"promise"
],
"time": "2016-03-08 01:15:46"
},
{
"name": "guzzlehttp/streams",
"version": "3.0.0",
"name": "guzzlehttp/psr7",
"version": "1.3.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/streams.git",
"reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5"
"url": "https://github.com/guzzle/psr7.git",
"reference": "31382fef2889136415751badebbd1cb022a4ed72"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/streams/zipball/47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5",
"reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/31382fef2889136415751badebbd1cb022a4ed72",
"reference": "31382fef2889136415751badebbd1cb022a4ed72",
"shasum": ""
},
"require": {
"php": ">=5.4.0"
"php": ">=5.4.0",
"psr/http-message": "~1.0"
},
"provide": {
"psr/http-message-implementation": "1.0"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
@ -139,13 +147,16 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-4": {
"GuzzleHttp\\Stream\\": "src/"
}
"GuzzleHttp\\Psr7\\": "src/"
},
"files": [
"src/functions_include.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@ -158,13 +169,14 @@
"homepage": "https://github.com/mtdowling"
}
],
"description": "Provides a simple abstraction over streams of data",
"homepage": "http://guzzlephp.org/",
"description": "PSR-7 message implementation",
"keywords": [
"Guzzle",
"stream"
"http",
"message",
"stream",
"uri"
],
"time": "2014-10-12 19:18:40"
"time": "2016-04-13 19:56:01"
},
{
"name": "league/commonmark",
@ -329,35 +341,32 @@
"time": "2015-11-07 22:20:37"
},
{
"name": "react/promise",
"version": "v2.4.0",
"name": "psr/http-message",
"version": "1.0",
"source": {
"type": "git",
"url": "https://github.com/reactphp/promise.git",
"reference": "f942da7b505d1a294284ab343d05df42d02ad6d9"
"url": "https://github.com/php-fig/http-message.git",
"reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/reactphp/promise/zipball/f942da7b505d1a294284ab343d05df42d02ad6d9",
"reference": "f942da7b505d1a294284ab343d05df42d02ad6d9",
"url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298",
"reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298",
"shasum": ""
},
"require": {
"php": ">=5.4.0"
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"React\\Promise\\": "src/"
},
"files": [
"src/functions_include.php"
]
"Psr\\Http\\Message\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@ -365,12 +374,20 @@
],
"authors": [
{
"name": "Jan Sorgalla",
"email": "jsorgalla@gmail.com"
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "A lightweight implementation of CommonJS Promises/A for PHP",
"time": "2016-03-31 13:10:33"
"description": "Common interface for HTTP messages",
"keywords": [
"http",
"http-message",
"psr",
"psr-7",
"request",
"response"
],
"time": "2015-05-04 20:22:00"
},
{
"name": "symfony/console",

Voir le fichier

@ -104,4 +104,13 @@ I get 10 times more traffic from [Google] [1] than from
[2]: http://search.yahoo.com/ "Yahoo Search"
[3]: http://search.msn.com/ "MSN Search"
Images
------
Here's an image.
![This is an image](sampleimage.png)
Note: to use images on a landing page (index.md), prefix the image URL with the name of the directory it appears in, omitting the numerical prefix used to order the sections. For example in this section, to display this image on the landing page (index.md), the URL for the image would be "Features/sampleimage.png" to display the same image.
*View the [source of this content](http://github.github.com/github-flavored-markdown/sample_content.html).*

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 3.1 KiB

Voir le fichier

@ -24,10 +24,14 @@ class Api
$this->space = $space_id;
}
protected function getClient()
/**
* This method is public due to test purposes
* @return Client
*/
public function getClient()
{
$options = [
'base_url' => $this->base_url . 'rest/api/',
'base_uri' => $this->base_url . 'rest/api/',
'defaults' => [
'auth' => [$this->user, $this->pass]
]

Voir le fichier

@ -0,0 +1,12 @@
<?php
namespace Todaymade\Daux\Format\Confluence;
class BuilderTest extends \PHPUnit_Framework_TestCase
{
// this test supports upgrade Guzzle to version 6
public function testClientOptions()
{
$api = new Api("http://test.com/", "user", "pass");
$this->assertEquals("test.com", $api->getClient()->getConfig()['base_uri']->getHost());
}
}