Created email senders and integration tests for these senders

This commit is contained in:
Mike Koch 2017-02-19 22:02:10 -05:00
parent 2a145bfa3e
commit 54baa4d6ba
9 changed files with 1172 additions and 22 deletions

View File

@ -26,7 +26,8 @@ class BasicEmailSender implements EmailSender {
$mailer->Password = $heskSettings['smtp_password'];
}
$mailer->FromName = $heskSettings['noreply_name'] ? $heskSettings['noreply_name'] : '';
$mailer->FromName = $heskSettings['noreply_name'] !== null &&
$heskSettings['noreply_name'] !== '' ? $heskSettings['noreply_name'] : '';
$mailer->From = $heskSettings['noreply_mail'];
if ($emailBuilder->to !== null) {
@ -58,6 +59,13 @@ class BasicEmailSender implements EmailSender {
}
$mailer->Timeout = $heskSettings['smtp_timeout'];
if ($emailBuilder->attachments !== null) {
foreach ($emailBuilder->attachments as $attachment) {
$mailer->addAttachment(__DIR__ . '/../../../' . $heskSettings['attach_dir'] . '/' . $attachment->savedName,
$attachment->fileName);
}
}
if ($mailer->send()) {
return true;
}

View File

@ -15,7 +15,7 @@ interface EmailSender {
* @param $heskSettings array
* @param $modsForHeskSettings array
* @param $sendAsHtml bool
* @return bool|string true if message sent successfully, error string otherwise
* @return bool|string|\stdClass true if message sent successfully, string for PHPMail/Smtp error, stdClass for Mailgun error
*/
function sendEmail($emailBuilder, $heskSettings, $modsForHeskSettings, $sendAsHtml);
}

View File

@ -5,25 +5,69 @@ namespace BusinessLogic\Emails;
use BusinessLogic\Tickets\Attachment;
use BusinessLogic\Tickets\Ticket;
use Mailgun\Mailgun;
class MailgunEmailSender implements EmailSender {
/**
* @param $emailBuilder EmailBuilder
* @param $heskSettings array
* @param $modsForHeskSettings array
*/
function sendEmail($emailBuilder, $heskSettings, $modsForHeskSettings) {
// TODO: Implement sendEmail() method.
function sendEmail($emailBuilder, $heskSettings, $modsForHeskSettings, $sendAsHtml) {
$mailgunArray = array();
$mailgunArray['from'] = $heskSettings['noreply_mail']; // Email Address
if ($heskSettings['noreply_name'] !== null && $heskSettings['noreply_name'] !== '') {
$mailgunArray['from'] = "{$heskSettings['noreply_name']} <{$heskSettings['noreply_mail']}>"; // Name and address
}
$mailgunArray['to'] = implode(',', $emailBuilder->to);
if ($emailBuilder->cc !== null) {
$mailgunArray['cc'] = implode(',', $emailBuilder->cc);
}
if ($emailBuilder->bcc !== null) {
$mailgunArray['bcc'] = implode(',', $emailBuilder->bcc);
}
$mailgunArray['subject'] = $emailBuilder->subject;
$mailgunArray['text'] = $emailBuilder->message;
if ($sendAsHtml) {
$mailgunArray['html'] = $emailBuilder->htmlMessage;
}
$mailgunAttachments = array();
if ($emailBuilder->attachments !== null) {
foreach ($emailBuilder->attachments as $attachment) {
$mailgunAttachments[] = array(
'remoteName' => $attachment->fileName,
'filePath' => __DIR__ . '/../../../' . $heskSettings['attach_dir'] . '/' . $attachment->savedName
);
}
}
var_dump($mailgunArray);
$result = $this->sendMessage($mailgunArray, $mailgunAttachments, $modsForHeskSettings);
if (isset($result->http_response_code)
&& $result->http_response_code === 200) {
return true;
}
return $result;
}
/**
* @param $emailBuilder EmailBuilder
* @param $ticket Ticket
* @param $attachments Attachment[]
* @param $heskSettings array
* @param $modsForHeskSettings array
*/
function sendEmailWithTicket($emailBuilder, $ticket, $attachments, $heskSettings, $modsForHeskSettings) {
// TODO: Implement sendEmailWithTicket() method.
private function sendMessage($mailgunArray, $attachments, $modsForHeskSettings) {
$messageClient = new Mailgun($modsForHeskSettings['mailgun_api_key']);
$mailgunAttachments = array();
if (count($attachments) > 0) {
$mailgunAttachments = array(
'attachment' => $attachments
);
}
$result = $messageClient->sendMessage($modsForHeskSettings['mailgun_domain'], $mailgunArray, $mailgunAttachments);
return $result;
}
}

View File

@ -2,9 +2,10 @@
namespace BusinessLogic\Emails;
use PHPUnit\Framework\TestCase;
use BusinessLogic\IntegrationTestCaseBase;
use BusinessLogic\Tickets\Attachment;
class BasicEmailSenderIntegrationTest extends TestCase {
class BasicEmailSenderIntegrationTest extends IntegrationTestCaseBase {
/**
* @var $emailSender BasicEmailSender;
*/
@ -20,9 +21,16 @@ class BasicEmailSenderIntegrationTest extends TestCase {
*/
private $modsForHeskSettings;
/**
* @var $attachmentsToPurge string[]
*/
private $attachmentsToPurge;
protected function setUp() {
global $hesk_settings, $modsForHesk_settings;
$this->skip();
if (!defined('IN_SCRIPT')) {
define('IN_SCRIPT', 1);
}
@ -32,6 +40,13 @@ class BasicEmailSenderIntegrationTest extends TestCase {
$this->emailSender = new BasicEmailSender();
$this->heskSettings = $hesk_settings;
$this->modsForHeskSettings = $modsForHesk_settings;
$this->attachmentsToPurge = array();
}
protected function tearDown() {
foreach ($this->attachmentsToPurge as $file) {
unlink($file);
}
}
function testItCanSendHtmlMail() {
@ -45,6 +60,24 @@ class BasicEmailSenderIntegrationTest extends TestCase {
$emailBuilder->htmlMessage = "Test <b>HTML</b> <i>message</i>";
$emailBuilder->subject = "BasicEmailSenderIntegrationTest";
// Uncomment to test attachments.
$attachment = new Attachment();
$attachment->id = 1;
$attachment->fileName = "file.txt";
$attachment->savedName = "test1.txt";
$filename1 = __DIR__ . '/../../../../' . $this->heskSettings['attach_dir'] . '/' . $attachment->savedName;
file_put_contents($filename1, 'TEST DATA');
$otherAttachment = new Attachment();
$otherAttachment->id = 2;
$otherAttachment->fileName = "file2.txt";
$otherAttachment->savedName = "test2.txt";
$filename2 = __DIR__ . '/../../../../' . $this->heskSettings['attach_dir'] . '/' . $otherAttachment->savedName;
file_put_contents($filename2, 'TEST DATA 2');
$emailBuilder->attachments = array($attachment, $otherAttachment);
$this->attachmentsToPurge = array($filename1, $filename2);
//-- Act
$result = $this->emailSender->sendEmail($emailBuilder, $this->heskSettings, $this->modsForHeskSettings, true);

View File

@ -0,0 +1,109 @@
<?php
namespace BusinessLogic\Emails;
use BusinessLogic\IntegrationTestCaseBase;
use BusinessLogic\Tickets\Attachment;
class MailgunEmailSenderIntegrationTest extends IntegrationTestCaseBase {
/**
* @var $emailSender MailgunEmailSender;
*/
private $emailSender;
/**
* @var $heskSettings array
*/
private $heskSettings;
/**
* @var $modsForHeskSettings array
*/
private $modsForHeskSettings;
/**
* @var $attachmentsToPurge string[]
*/
private $attachmentsToPurge;
protected function setUp() {
global $hesk_settings, $modsForHesk_settings;
$this->skip();
if (!defined('IN_SCRIPT')) {
define('IN_SCRIPT', 1);
}
require(__DIR__ . '/../../../../hesk_settings.inc.php');
require(__DIR__ . '/../../integration_test_mfh_settings.php');
$this->emailSender = new MailgunEmailSender();
$this->heskSettings = $hesk_settings;
$this->modsForHeskSettings = $modsForHesk_settings;
$this->attachmentsToPurge = array();
}
protected function tearDown() {
foreach ($this->attachmentsToPurge as $file) {
unlink($file);
}
}
function testItCanSendMail() {
//-- Arrange
$emailBuilder = new EmailBuilder();
$emailBuilder->to = array('mfh1@mailinator.com');
$emailBuilder->cc = array('mfh2@mailinator.com');
$emailBuilder->bcc = array('mfh3@mailinator.com');
$emailBuilder->message = "Test PLAIN TEXT message";
$emailBuilder->htmlMessage = "Test <b>HTML</b> <i>message</i>";
$emailBuilder->subject = "MailgunEmailSenderIntegrationTest";
// Uncomment to test attachments.
$attachment = new Attachment();
$attachment->id = 1;
$attachment->fileName = "file.txt";
$attachment->savedName = "test1.txt";
$filename1 = __DIR__ . '/../../../../' . $this->heskSettings['attach_dir'] . '/' . $attachment->savedName;
file_put_contents($filename1, 'TEST DATA');
$otherAttachment = new Attachment();
$otherAttachment->id = 2;
$otherAttachment->fileName = "file2.txt";
$otherAttachment->savedName = "test2.txt";
$filename2 = __DIR__ . '/../../../../' . $this->heskSettings['attach_dir'] . '/' . $otherAttachment->savedName;
file_put_contents($filename2, 'TEST DATA 2');
$emailBuilder->attachments = array($attachment, $otherAttachment);
$this->attachmentsToPurge = array($filename1, $filename2);
//-- Act
$result = $this->emailSender->sendEmail($emailBuilder, $this->heskSettings, $this->modsForHeskSettings, true);
//-- Assert
if ($result !== true) {
$this->fail($result);
}
}
function testItCanSendPlaintextMail() {
//-- Arrange
//$hesk_settings['smtp'] = 0 //Uncomment this to use PHPMail
$emailBuilder = new EmailBuilder();
$emailBuilder->to = array('mfh1@mailinator.com');
$emailBuilder->cc = array('mfh2@mailinator.com');
$emailBuilder->bcc = array('mfh3@mailinator.com');
$emailBuilder->message = "Test PLAIN TEXT message";
$emailBuilder->subject = "MailgunEmailSenderIntegrationTest";
//-- Act
$result = $this->emailSender->sendEmail($emailBuilder, $this->heskSettings, $this->modsForHeskSettings, false);
//-- Assert
if ($result !== true) {
$this->fail($result);
}
}
}

View File

@ -0,0 +1,10 @@
<?php
namespace BusinessLogic;
use PHPUnit\Framework\TestCase;
class IntegrationTestCaseBase extends TestCase {
function skip() {
$this->markTestSkipped(sprintf("Skipping Integration Test %s", get_class($this)));
}
}

View File

@ -1,2 +1,3 @@
<?php
require_once(__DIR__ . '/BusinessLogic/IntegrationTestCaseBase.php');
require_once(__DIR__ . '/../bootstrap.php');

View File

@ -11,6 +11,11 @@
],
"require": {
"phpunit/phpunit": "5.7.9",
"phpmailer/phpmailer": "^5.2"
"phpmailer/phpmailer": "^5.2",
"mailgun/mailgun-php": "^2.1",
"php-http/guzzle6-adapter": "^1.1",
"php-http/message": "^1.5",
"php-http/curl-client": "^1.7",
"guzzlehttp/psr7": "^1.3"
}
}

942
api/composer.lock generated
View File

@ -4,8 +4,57 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "daddd21e73d89f981995c60d0188767d",
"content-hash": "d7fe662ac2836f7d979fd4117ec8bca6",
"packages": [
{
"name": "clue/stream-filter",
"version": "v1.3.0",
"source": {
"type": "git",
"url": "https://github.com/clue/php-stream-filter.git",
"reference": "e3bf9415da163d9ad6701dccb407ed501ae69785"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/clue/php-stream-filter/zipball/e3bf9415da163d9ad6701dccb407ed501ae69785",
"reference": "e3bf9415da163d9ad6701dccb407ed501ae69785",
"shasum": ""
},
"require": {
"php": ">=5.3"
},
"type": "library",
"autoload": {
"psr-4": {
"Clue\\StreamFilter\\": "src/"
},
"files": [
"src/functions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Christian Lück",
"email": "christian@lueck.tv"
}
],
"description": "A simple and modern approach to stream filtering in PHP",
"homepage": "https://github.com/clue/php-stream-filter",
"keywords": [
"bucket brigade",
"callback",
"filter",
"php_user_filter",
"stream",
"stream_filter_append",
"stream_filter_register"
],
"time": "2015-11-08T23:41:30+00:00"
},
{
"name": "doctrine/instantiator",
"version": "dev-master",
@ -60,6 +109,327 @@
],
"time": "2017-01-23 09:23:06"
},
{
"name": "guzzle/guzzle",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle3.git",
"reference": "f7778ed85e3db90009d79725afd6c3a82dab32fe"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle3/zipball/f7778ed85e3db90009d79725afd6c3a82dab32fe",
"reference": "f7778ed85e3db90009d79725afd6c3a82dab32fe",
"shasum": ""
},
"require": {
"ext-curl": "*",
"php": ">=5.3.3",
"symfony/event-dispatcher": "~2.1"
},
"replace": {
"guzzle/batch": "self.version",
"guzzle/cache": "self.version",
"guzzle/common": "self.version",
"guzzle/http": "self.version",
"guzzle/inflection": "self.version",
"guzzle/iterator": "self.version",
"guzzle/log": "self.version",
"guzzle/parser": "self.version",
"guzzle/plugin": "self.version",
"guzzle/plugin-async": "self.version",
"guzzle/plugin-backoff": "self.version",
"guzzle/plugin-cache": "self.version",
"guzzle/plugin-cookie": "self.version",
"guzzle/plugin-curlauth": "self.version",
"guzzle/plugin-error-response": "self.version",
"guzzle/plugin-history": "self.version",
"guzzle/plugin-log": "self.version",
"guzzle/plugin-md5": "self.version",
"guzzle/plugin-mock": "self.version",
"guzzle/plugin-oauth": "self.version",
"guzzle/service": "self.version",
"guzzle/stream": "self.version"
},
"require-dev": {
"doctrine/cache": "~1.3",
"monolog/monolog": "~1.0",
"phpunit/phpunit": "3.7.*",
"psr/log": "~1.0",
"symfony/class-loader": "~2.1",
"zendframework/zend-cache": "2.*,<2.3",
"zendframework/zend-log": "2.*,<2.3"
},
"suggest": {
"guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated."
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.9-dev"
}
},
"autoload": {
"psr-0": {
"Guzzle": "src/",
"Guzzle\\Tests": "tests/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
},
{
"name": "Guzzle Community",
"homepage": "https://github.com/guzzle/guzzle/contributors"
}
],
"description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle",
"homepage": "http://guzzlephp.org/",
"keywords": [
"client",
"curl",
"framework",
"http",
"http client",
"rest",
"web service"
],
"abandoned": "guzzlehttp/guzzle",
"time": "2016-10-26 18:22:07"
},
{
"name": "guzzlehttp/guzzle",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "6a99df94a22f01b4b9c32ed8789cf30d05bdba92"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/6a99df94a22f01b4b9c32ed8789cf30d05bdba92",
"reference": "6a99df94a22f01b4b9c32ed8789cf30d05bdba92",
"shasum": ""
},
"require": {
"guzzlehttp/promises": "^1.0",
"guzzlehttp/psr7": "^1.3.1",
"php": ">=5.5"
},
"require-dev": {
"ext-curl": "*",
"phpunit/phpunit": "^4.0",
"psr/log": "^1.0"
},
"suggest": {
"psr/log": "Required for using the Log middleware"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "6.2-dev"
}
},
"autoload": {
"files": [
"src/functions_include.php"
],
"psr-4": {
"GuzzleHttp\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
}
],
"description": "Guzzle is a PHP HTTP client library",
"homepage": "http://guzzlephp.org/",
"keywords": [
"client",
"curl",
"framework",
"http",
"http client",
"rest",
"web service"
],
"time": "2017-02-19 15:59:27"
},
{
"name": "guzzlehttp/promises",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
"shasum": ""
},
"require": {
"php": ">=5.5.0"
},
"require-dev": {
"phpunit/phpunit": "^4.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4-dev"
}
},
"autoload": {
"psr-4": {
"GuzzleHttp\\Promise\\": "src/"
},
"files": [
"src/functions_include.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
}
],
"description": "Guzzle promises library",
"keywords": [
"promise"
],
"time": "2016-12-20 10:07:11"
},
{
"name": "guzzlehttp/psr7",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "41972f428b31bc3ebff0707f63dd2165d3ac4cf6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/41972f428b31bc3ebff0707f63dd2165d3ac4cf6",
"reference": "41972f428b31bc3ebff0707f63dd2165d3ac4cf6",
"shasum": ""
},
"require": {
"php": ">=5.4.0",
"psr/http-message": "~1.0"
},
"provide": {
"psr/http-message-implementation": "1.0"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4-dev"
}
},
"autoload": {
"psr-4": {
"GuzzleHttp\\Psr7\\": "src/"
},
"files": [
"src/functions_include.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
},
{
"name": "Tobias Schultze",
"homepage": "https://github.com/Tobion"
}
],
"description": "PSR-7 message implementation that also provides common utility methods",
"keywords": [
"http",
"message",
"request",
"response",
"stream",
"uri",
"url"
],
"time": "2017-02-18 11:43:27"
},
{
"name": "mailgun/mailgun-php",
"version": "v2.1.2",
"source": {
"type": "git",
"url": "https://github.com/mailgun/mailgun-php.git",
"reference": "54b7f851b8e0241d593897dc2d50906bf4a43995"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mailgun/mailgun-php/zipball/54b7f851b8e0241d593897dc2d50906bf4a43995",
"reference": "54b7f851b8e0241d593897dc2d50906bf4a43995",
"shasum": ""
},
"require": {
"php": "^5.5|^7.0",
"php-http/discovery": "^1.0",
"php-http/httplug": "^1.0",
"php-http/message": "^1.0",
"php-http/multipart-stream-builder": "^0.1"
},
"require-dev": {
"php-http/guzzle6-adapter": "^1.0",
"phpunit/phpunit": "~4.6"
},
"type": "library",
"autoload": {
"psr-0": {
"Mailgun": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Travis Swientek",
"email": "travis@mailgunhq.com"
}
],
"description": "The Mailgun SDK provides methods for all API functions.",
"time": "2016-08-10T16:58:18+00:00"
},
{
"name": "myclabs/deep-copy",
"version": "1.6.0",
@ -102,6 +472,466 @@
],
"time": "2017-01-26T22:05:40+00:00"
},
{
"name": "php-http/curl-client",
"version": "v1.7.0",
"source": {
"type": "git",
"url": "https://github.com/php-http/curl-client.git",
"reference": "0972ad0d7d37032a52077a5cbe27cf370f2007d8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-http/curl-client/zipball/0972ad0d7d37032a52077a5cbe27cf370f2007d8",
"reference": "0972ad0d7d37032a52077a5cbe27cf370f2007d8",
"shasum": ""
},
"require": {
"ext-curl": "*",
"php": "^5.5 || ^7.0",
"php-http/discovery": "^1.0",
"php-http/httplug": "^1.0",
"php-http/message": "^1.2",
"php-http/message-factory": "^1.0.2"
},
"provide": {
"php-http/async-client-implementation": "1.0",
"php-http/client-implementation": "1.0"
},
"require-dev": {
"guzzlehttp/psr7": "^1.0",
"php-http/client-integration-tests": "^0.5.1",
"phpunit/phpunit": "^4.8.27",
"zendframework/zend-diactoros": "^1.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Http\\Client\\Curl\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Михаил Красильников",
"email": "m.krasilnikov@yandex.ru"
}
],
"description": "cURL client for PHP-HTTP",
"homepage": "http://php-http.org",
"keywords": [
"curl",
"http"
],
"time": "2017-02-09T15:18:33+00:00"
},
{
"name": "php-http/discovery",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/php-http/discovery.git",
"reference": "cc5669d9cb51170ad0278a3b984cd3c7894d6ff9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-http/discovery/zipball/cc5669d9cb51170ad0278a3b984cd3c7894d6ff9",
"reference": "cc5669d9cb51170ad0278a3b984cd3c7894d6ff9",
"shasum": ""
},
"require": {
"php": "^5.5 || ^7.0"
},
"require-dev": {
"henrikbjorn/phpspec-code-coverage": "^2.0.2",
"php-http/httplug": "^1.0",
"php-http/message-factory": "^1.0",
"phpspec/phpspec": "^2.4",
"puli/composer-plugin": "1.0.0-beta10"
},
"suggest": {
"php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories",
"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."
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.3-dev"
}
},
"autoload": {
"psr-4": {
"Http\\Discovery\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Márk Sági-Kazár",
"email": "mark.sagikazar@gmail.com"
}
],
"description": "Finds installed HTTPlug implementations and PSR-7 message factories",
"homepage": "http://php-http.org",
"keywords": [
"adapter",
"client",
"discovery",
"factory",
"http",
"message",
"psr7"
],
"time": "2017-02-12 08:49:24"
},
{
"name": "php-http/guzzle6-adapter",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/php-http/guzzle6-adapter.git",
"reference": "c0168c6e5fa286c3837310d591114d2683b9b9a5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-http/guzzle6-adapter/zipball/c0168c6e5fa286c3837310d591114d2683b9b9a5",
"reference": "c0168c6e5fa286c3837310d591114d2683b9b9a5",
"shasum": ""
},
"require": {
"guzzlehttp/guzzle": "^6.0",
"php": "^5.5 || ^7.0",
"php-http/httplug": "^1.0"
},
"provide": {
"php-http/async-client-implementation": "1.0",
"php-http/client-implementation": "1.0"
},
"require-dev": {
"ext-curl": "*",
"php-http/client-integration-tests": "^0.5.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.2-dev"
}
},
"autoload": {
"psr-4": {
"Http\\Adapter\\Guzzle6\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Márk Sági-Kazár",
"email": "mark.sagikazar@gmail.com"
},
{
"name": "David de Boer",
"email": "david@ddeboer.nl"
}
],
"description": "Guzzle 6 HTTP Adapter",
"homepage": "http://httplug.io",
"keywords": [
"Guzzle",
"http"
],
"time": "2016-08-02 09:03:17"
},
{
"name": "php-http/httplug",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/php-http/httplug.git",
"reference": "f32fefee51cb96e99edb0c4bb1d11b5026ad5069"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-http/httplug/zipball/f32fefee51cb96e99edb0c4bb1d11b5026ad5069",
"reference": "f32fefee51cb96e99edb0c4bb1d11b5026ad5069",
"shasum": ""
},
"require": {
"php": ">=5.4",
"php-http/promise": "^1.0",
"psr/http-message": "^1.0"
},
"require-dev": {
"henrikbjorn/phpspec-code-coverage": "^1.0",
"phpspec/phpspec": "^2.4"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.2-dev"
}
},
"autoload": {
"psr-4": {
"Http\\Client\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Eric GELOEN",
"email": "geloen.eric@gmail.com"
},
{
"name": "Márk Sági-Kazár",
"email": "mark.sagikazar@gmail.com"
}
],
"description": "HTTPlug, the HTTP client abstraction for PHP",
"homepage": "http://httplug.io",
"keywords": [
"client",
"http"
],
"time": "2017-01-02 06:37:42"
},
{
"name": "php-http/message",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/php-http/message.git",
"reference": "13df8c48f40ca7925303aa336f19be4b80984f01"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-http/message/zipball/13df8c48f40ca7925303aa336f19be4b80984f01",
"reference": "13df8c48f40ca7925303aa336f19be4b80984f01",
"shasum": ""
},
"require": {
"clue/stream-filter": "^1.3",
"php": ">=5.4",
"php-http/message-factory": "^1.0.2",
"psr/http-message": "^1.0"
},
"require-dev": {
"akeneo/phpspec-skip-example-extension": "^1.0",
"coduo/phpspec-data-provider-extension": "^1.0",
"ext-zlib": "*",
"guzzlehttp/psr7": "^1.0",
"henrikbjorn/phpspec-code-coverage": "^1.0",
"phpspec/phpspec": "^2.4",
"slim/slim": "^3.0",
"zendframework/zend-diactoros": "^1.0"
},
"suggest": {
"ext-zlib": "Used with compressor/decompressor streams",
"guzzlehttp/psr7": "Used with Guzzle PSR-7 Factories",
"slim/slim": "Used with Slim Framework PSR-7 implementation",
"zendframework/zend-diactoros": "Used with Diactoros Factories"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.6-dev"
}
},
"autoload": {
"psr-4": {
"Http\\Message\\": "src/"
},
"files": [
"src/filters.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Márk Sági-Kazár",
"email": "mark.sagikazar@gmail.com"
}
],
"description": "HTTP Message related tools",
"homepage": "http://php-http.org",
"keywords": [
"http",
"message",
"psr-7"
],
"time": "2017-02-14 08:58:37"
},
{
"name": "php-http/message-factory",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/php-http/message-factory.git",
"reference": "a2809d4fe294ebe8879aec8d4d5bf21faa029344"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-http/message-factory/zipball/a2809d4fe294ebe8879aec8d4d5bf21faa029344",
"reference": "a2809d4fe294ebe8879aec8d4d5bf21faa029344",
"shasum": ""
},
"require": {
"php": ">=5.4",
"psr/http-message": "^1.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-4": {
"Http\\Message\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Márk Sági-Kazár",
"email": "mark.sagikazar@gmail.com"
}
],
"description": "Factory interfaces for PSR-7 HTTP Message",
"homepage": "http://php-http.org",
"keywords": [
"factory",
"http",
"message",
"stream",
"uri"
],
"time": "2016-02-03 08:16:31"
},
{
"name": "php-http/multipart-stream-builder",
"version": "0.1.6",
"source": {
"type": "git",
"url": "https://github.com/php-http/multipart-stream-builder.git",
"reference": "74d5ac517778ae87a065c6f4076316c35b58a777"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-http/multipart-stream-builder/zipball/74d5ac517778ae87a065c6f4076316c35b58a777",
"reference": "74d5ac517778ae87a065c6f4076316c35b58a777",
"shasum": ""
},
"require": {
"php": "^5.5 || ^7.0",
"php-http/discovery": "^1.0",
"php-http/message-factory": "^1.0.2",
"psr/http-message": "^1.0"
},
"require-dev": {
"php-http/message": "^1.5",
"phpunit/phpunit": "^4.8 || ^5.4",
"zendframework/zend-diactoros": "^1.3.5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "0.2-dev"
}
},
"autoload": {
"psr-4": {
"Http\\Message\\MultipartStream\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Tobias Nyholm",
"email": "tobias.nyholm@gmail.com"
}
],
"description": "A builder class that help you create a multipart stream",
"homepage": "http://php-http.org",
"keywords": [
"factory",
"http",
"message",
"multipart stream",
"stream"
],
"time": "2017-02-16T08:52:59+00:00"
},
{
"name": "php-http/promise",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/php-http/promise.git",
"reference": "810b30da8bcf69e4b82c4b9bc6b31518234293ab"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-http/promise/zipball/810b30da8bcf69e4b82c4b9bc6b31518234293ab",
"reference": "810b30da8bcf69e4b82c4b9bc6b31518234293ab",
"shasum": ""
},
"require-dev": {
"henrikbjorn/phpspec-code-coverage": "^1.0",
"phpspec/phpspec": "^2.4"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-4": {
"Http\\Promise\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Márk Sági-Kazár",
"email": "mark.sagikazar@gmail.com"
},
{
"name": "Joel Wurtz",
"email": "joel.wurtz@gmail.com"
}
],
"description": "Promise used for asynchronous HTTP requests",
"homepage": "http://httplug.io",
"keywords": [
"promise"
],
"time": "2016-01-28 07:54:12"
},
{
"name": "phpdocumentor/reflection-common",
"version": "dev-master",
@ -756,6 +1586,56 @@
],
"time": "2016-12-08 20:27:08"
},
{
"name": "psr/http-message",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-message.git",
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Http\\Message\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for HTTP messages",
"homepage": "https://github.com/php-fig/http-message",
"keywords": [
"http",
"http-message",
"psr",
"psr-7",
"request",
"response"
],
"time": "2016-08-06 14:39:51"
},
{
"name": "sebastian/code-unit-reverse-lookup",
"version": "dev-master",
@ -1269,6 +2149,66 @@
"homepage": "https://github.com/sebastianbergmann/version",
"time": "2016-10-03 07:35:21"
},
{
"name": "symfony/event-dispatcher",
"version": "2.8.x-dev",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "3178c0e247b81da8a0265b460ac23bec6d2e6627"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3178c0e247b81da8a0265b460ac23bec6d2e6627",
"reference": "3178c0e247b81da8a0265b460ac23bec6d2e6627",
"shasum": ""
},
"require": {
"php": ">=5.3.9"
},
"require-dev": {
"psr/log": "~1.0",
"symfony/config": "^2.0.5|~3.0.0",
"symfony/dependency-injection": "~2.6|~3.0.0",
"symfony/expression-language": "~2.6|~3.0.0",
"symfony/stopwatch": "~2.3|~3.0.0"
},
"suggest": {
"symfony/dependency-injection": "",
"symfony/http-kernel": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.8-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\EventDispatcher\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
"time": "2017-02-18 19:13:35"
},
{
"name": "symfony/yaml",
"version": "dev-master",