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

Commit bd0c417

Browse files
committed
API-20: Bundle compatible with both Symfony 2 & 3
1 parent 9eae98e commit bd0c417

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
## SendinBlue Symfony3 Bundle
1+
## SendinBlue Symfony Bundle
22

3-
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.
3+
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.
44

55

66
## Prerequisites
77

8-
This version of the bundle requires Symfony 3.x.
8+
This version of the bundle requires Symfony 2.x OR 3.x.
99

1010
## Installation
1111

Wrapper/Mailin.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace SendinBlue\SendinBlueApiBundle\Wrapper;
44

5-
use Symfony\Component\Config\Definition\Exception\Exception;
5+
use RuntimeException;
66
/**
77
* SendinBlue REST client
88
*
@@ -22,7 +22,7 @@ public function __construct($api_key)
2222
{
2323
if(!function_exists('curl_init'))
2424
{
25-
throw new Exception('Mailin requires CURL module');
25+
throw new RuntimeException('Mailin requires CURL module');
2626
}
2727
$this->base_url = "https://api.sendinblue.com/v2.0";
2828
$this->api_key = $api_key;
@@ -51,7 +51,7 @@ private function do_request($resource,$method,$input)
5151
$info = curl_getinfo($ch);
5252
if(curl_errno($ch))
5353
{
54-
echo 'Curl error: ' . curl_error($ch). '\n';
54+
throw new RuntimeException('Curl error: ' . curl_error($ch). '\n');
5555
}
5656
curl_close($ch);
5757
return json_decode($data,true);

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "sendinblue/sendinblue-api-bundle",
33
"type": "symfony-bundle",
4-
"description": "Official SendinBlue provided API V2 Symfony3 Bundle",
4+
"description": "Official SendinBlue provided API V2 Symfony Bundle",
55
"keywords": ["Sendinblue", "api", "Bundle"],
66
"homepage": "https://github.com/mailin-api/sendinblue-api-bundle",
77
"license": "MIT",
@@ -13,8 +13,8 @@
1313
}
1414
],
1515
"require": {
16-
"php": ">=5.5",
17-
"symfony/framework-bundle": "3.*"
16+
"php": ">=5.3",
17+
"symfony/framework-bundle": "2.*|3.*"
1818
},
1919
"autoload": {
2020
"psr-4": { "SendinBlue\\SendinBlueApiBundle\\": "" }

0 commit comments

Comments
 (0)