diff --git a/CHANGELOG.md b/CHANGELOG.md index 891c296..6684c03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 6.0.0 (released 2016-11-23) + +- Move the exception + ## 5.0.0 (released 2016-11-04) - Drop PHP 5.6 support diff --git a/composer.json b/composer.json index 7e0a04e..5129e04 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ }, "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "6.0-dev" } }, "minimum-stability": "dev", diff --git a/src/Exceptions/NotFoundException.php b/src/Exceptions/NotFoundException.php deleted file mode 100644 index f7a8b55..0000000 --- a/src/Exceptions/NotFoundException.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -declare(strict_types=1); - -namespace Vinkla\Instagram\Exceptions; - -use Exception; - -/** - * This is the not found exception class. - * - * @author Vincent Klaiber - */ -class NotFoundException extends Exception implements InstagramExceptionInterface -{ - // -} diff --git a/src/Instagram.php b/src/Instagram.php index 04299ef..c81e005 100644 --- a/src/Instagram.php +++ b/src/Instagram.php @@ -16,7 +16,6 @@ use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\RequestException; -use Vinkla\Instagram\Exceptions\NotFoundException; /** * This is the instagram class. @@ -49,7 +48,7 @@ public function __construct(ClientInterface $client = null) * * @param string $user * - * @throws \Vinkla\Instagram\Exceptions\NotFoundException + * @throws \Vinkla\Instagram\InstagramException * * @return array */ @@ -62,7 +61,7 @@ public function get(string $user): array return json_decode((string) $response->getBody(), true)['items']; } catch (RequestException $e) { - throw new NotFoundException(sprintf('The user [%s] was not found.', $user)); + throw new InstagramException(sprintf('The user [%s] was not found.', $user)); } } } diff --git a/src/Exceptions/InstagramExceptionInterface.php b/src/InstagramException.php similarity index 69% rename from src/Exceptions/InstagramExceptionInterface.php rename to src/InstagramException.php index 8d3b247..06110f7 100644 --- a/src/Exceptions/InstagramExceptionInterface.php +++ b/src/InstagramException.php @@ -11,14 +11,16 @@ declare(strict_types=1); -namespace Vinkla\Instagram\Exceptions; +namespace Vinkla\Instagram; + +use RuntimeException; /** - * This is the instagram exception interface. + * This is the instagram exception class. * * @author Vincent Klaiber */ -interface InstagramExceptionInterface +class InstagramException extends RuntimeException { // } diff --git a/tests/InstagramTest.php b/tests/InstagramTest.php index 1907664..3ac50ef 100644 --- a/tests/InstagramTest.php +++ b/tests/InstagramTest.php @@ -32,7 +32,7 @@ public function testGet() } /** - * @expectedException \Vinkla\Instagram\Exceptions\NotFoundException + * @expectedException \Vinkla\Instagram\InstagramException */ public function testNotFound() {