Added deprecation notices (#295)

This commit is contained in:
Tobias Nyholm 2017-03-14 10:58:47 +01:00 committed by GitHub
parent 2e9f56e694
commit 83a20afbfb
7 changed files with 39 additions and 0 deletions

View File

@ -11,6 +11,9 @@ namespace Mailgun\Connection\Exceptions;
use Mailgun\Exception; use Mailgun\Exception;
/**
* @deprecated Will be removed in 3.0
*/
class GenericHTTPError extends \Exception implements Exception class GenericHTTPError extends \Exception implements Exception
{ {
protected $httpResponseCode; protected $httpResponseCode;

View File

@ -11,6 +11,9 @@ namespace Mailgun\Connection\Exceptions;
use Mailgun\Exception; use Mailgun\Exception;
/**
* @deprecated Will be removed in 3.0
*/
class InvalidCredentials extends \Exception implements Exception class InvalidCredentials extends \Exception implements Exception
{ {
} }

View File

@ -11,6 +11,9 @@ namespace Mailgun\Connection\Exceptions;
use Mailgun\Exception; use Mailgun\Exception;
/**
* @deprecated Will be removed in 3.0
*/
class MissingEndpoint extends \Exception implements Exception class MissingEndpoint extends \Exception implements Exception
{ {
} }

View File

@ -11,6 +11,9 @@ namespace Mailgun\Connection\Exceptions;
use Mailgun\Exception; use Mailgun\Exception;
/**
* @deprecated Will be removed in 3.0
*/
class MissingRequiredParameters extends \Exception implements Exception class MissingRequiredParameters extends \Exception implements Exception
{ {
} }

View File

@ -11,6 +11,9 @@ namespace Mailgun\Connection\Exceptions;
use Mailgun\Exception; use Mailgun\Exception;
/**
* @deprecated Will be removed in 3.0
*/
class NoDomainsConfigured extends \Exception implements Exception class NoDomainsConfigured extends \Exception implements Exception
{ {
} }

View File

@ -23,6 +23,8 @@ use Psr\Http\Message\ResponseInterface;
/** /**
* This class is a wrapper for the HTTP client. * This class is a wrapper for the HTTP client.
*
* @deprecated Will be removed in 3.0
*/ */
class RestClient class RestClient
{ {

View File

@ -104,6 +104,8 @@ class Mailgun
* @throws Exceptions\MissingRequiredMIMEParameters * @throws Exceptions\MissingRequiredMIMEParameters
* *
* @return \stdClass * @return \stdClass
*
* @deprecated Use Mailgun->message() instead. Will be removed in 3.0
*/ */
public function sendMessage($workingDomain, $postData, $postFiles = []) public function sendMessage($workingDomain, $postData, $postFiles = [])
{ {
@ -137,6 +139,8 @@ class Mailgun
* @param array|null $postData * @param array|null $postData
* *
* @return bool * @return bool
*
* @deprecated Use Mailgun->webhook() instead. Will be removed in 3.0
*/ */
public function verifyWebhookSignature($postData = null) public function verifyWebhookSignature($postData = null)
{ {
@ -162,6 +166,8 @@ class Mailgun
* @param array $files * @param array $files
* *
* @return \stdClass * @return \stdClass
*
* @deprecated Will be removed in 3.0
*/ */
public function post($endpointUrl, $postData = [], $files = []) public function post($endpointUrl, $postData = [], $files = [])
{ {
@ -173,6 +179,8 @@ class Mailgun
* @param array $queryString * @param array $queryString
* *
* @return \stdClass * @return \stdClass
*
* @deprecated Will be removed in 3.0
*/ */
public function get($endpointUrl, $queryString = []) public function get($endpointUrl, $queryString = [])
{ {
@ -183,6 +191,8 @@ class Mailgun
* @param string $url * @param string $url
* *
* @return \stdClass * @return \stdClass
*
* @deprecated Will be removed in 3.0
*/ */
public function getAttachment($url) public function getAttachment($url)
{ {
@ -193,6 +203,8 @@ class Mailgun
* @param string $endpointUrl * @param string $endpointUrl
* *
* @return \stdClass * @return \stdClass
*
* @deprecated Will be removed in 3.0
*/ */
public function delete($endpointUrl) public function delete($endpointUrl)
{ {
@ -204,6 +216,8 @@ class Mailgun
* @param array $putData * @param array $putData
* *
* @return \stdClass * @return \stdClass
*
* @deprecated Will be removed in 3.0
*/ */
public function put($endpointUrl, $putData) public function put($endpointUrl, $putData)
{ {
@ -214,6 +228,8 @@ class Mailgun
* @param string $apiVersion * @param string $apiVersion
* *
* @return Mailgun * @return Mailgun
*
* @deprecated Will be removed in 3.0
*/ */
public function setApiVersion($apiVersion) public function setApiVersion($apiVersion)
{ {
@ -238,6 +254,8 @@ class Mailgun
/** /**
* @return MessageBuilder * @return MessageBuilder
*
* @deprecated Will be removed in 3.0
*/ */
public function MessageBuilder() public function MessageBuilder()
{ {
@ -246,6 +264,8 @@ class Mailgun
/** /**
* @return OptInHandler * @return OptInHandler
*
* @deprecated Will be removed in 3.0
*/ */
public function OptInHandler() public function OptInHandler()
{ {
@ -257,6 +277,8 @@ class Mailgun
* @param bool $autoSend * @param bool $autoSend
* *
* @return BatchMessage * @return BatchMessage
*
* @deprecated Will be removed in 3.0
*/ */
public function BatchMessage($workingDomain, $autoSend = true) public function BatchMessage($workingDomain, $autoSend = true)
{ {