Skip to content
This repository has been archived by the owner on May 18, 2020. It is now read-only.

Commit

Permalink
API-20: Bundle compatible with both Symfony 2 & 3
Browse files Browse the repository at this point in the history
  • Loading branch information
ekta-slit committed Mar 18, 2016
1 parent 9eae98e commit bd0c417
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## SendinBlue Symfony3 Bundle
## SendinBlue Symfony Bundle

This is [SendinBlue](https://www.sendinblue.com) provided API V2 Symfony3 Bundle. It implements the various exposed APIs that you can read more about on https://apidocs.sendinblue.com.
This is [SendinBlue](https://www.sendinblue.com) provided API V2 Symfony Bundle. It implements the various exposed APIs that you can read more about on https://apidocs.sendinblue.com.


## Prerequisites

This version of the bundle requires Symfony 3.x.
This version of the bundle requires Symfony 2.x OR 3.x.

## Installation

Expand Down
6 changes: 3 additions & 3 deletions Wrapper/Mailin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SendinBlue\SendinBlueApiBundle\Wrapper;

use Symfony\Component\Config\Definition\Exception\Exception;
use RuntimeException;

This comment has been minimized.

Copy link
@MatTheCat

MatTheCat Mar 18, 2016

Contributor

You can write \RuntimeException and get rid of this use.

/**
* SendinBlue REST client
*
Expand All @@ -22,7 +22,7 @@ public function __construct($api_key)
{
if(!function_exists('curl_init'))
{
throw new Exception('Mailin requires CURL module');
throw new RuntimeException('Mailin requires CURL module');

This comment has been minimized.

Copy link
@MatTheCat

MatTheCat Mar 18, 2016

Contributor

The module is cURL.

}
$this->base_url = "https://api.sendinblue.com/v2.0";
$this->api_key = $api_key;
Expand Down Expand Up @@ -51,7 +51,7 @@ private function do_request($resource,$method,$input)
$info = curl_getinfo($ch);
if(curl_errno($ch))
{
echo 'Curl error: ' . curl_error($ch). '\n';
throw new RuntimeException('Curl error: ' . curl_error($ch). '\n');

This comment has been minimized.

Copy link
@MatTheCat

MatTheCat Mar 18, 2016

Contributor

Do you really need to add \n to the error message?

}
curl_close($ch);
return json_decode($data,true);
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sendinblue/sendinblue-api-bundle",
"type": "symfony-bundle",
"description": "Official SendinBlue provided API V2 Symfony3 Bundle",
"description": "Official SendinBlue provided API V2 Symfony Bundle",
"keywords": ["Sendinblue", "api", "Bundle"],
"homepage": "https://github.com/mailin-api/sendinblue-api-bundle",
"license": "MIT",
Expand All @@ -13,8 +13,8 @@
}
],
"require": {
"php": ">=5.5",
"symfony/framework-bundle": "3.*"
"php": ">=5.3",
"symfony/framework-bundle": "2.*|3.*"
},
"autoload": {
"psr-4": { "SendinBlue\\SendinBlueApiBundle\\": "" }
Expand Down

0 comments on commit bd0c417

Please sign in to comment.