From 408deea4743e091b7933e559941c5e62b99a7792 Mon Sep 17 00:00:00 2001 From: Veaceslav Medvedev Date: Sat, 8 Dec 2018 21:47:53 +0100 Subject: [PATCH 01/17] Change files docblocks --- src/BadFunctionCallException.php | 10 +--------- src/BadMethodCallException.php | 7 +------ src/DomainException.php | 7 +------ src/InvalidArgumentException.php | 7 +------ src/LengthException.php | 7 +------ src/LogicException.php | 7 +------ src/OutOfBoundsException.php | 7 +------ src/OutOfRangeException.php | 7 +------ src/OverflowException.php | 7 +------ src/RangeException.php | 7 +------ src/RuntimeException.php | 7 +------ src/Throwable.php | 7 +------ src/ThrowableContextTrait.php | 7 +------ src/UnderflowException.php | 7 +------ src/UnexpectedValueException.php | 7 +------ tests/ReadExceptionContextTest.php | 11 +++-------- 16 files changed, 18 insertions(+), 101 deletions(-) diff --git a/src/BadFunctionCallException.php b/src/BadFunctionCallException.php index 127b53f..fb313f8 100644 --- a/src/BadFunctionCallException.php +++ b/src/BadFunctionCallException.php @@ -1,20 +1,12 @@ 'bar']; - + $exception = new $exceptionClass($message, $context, $code); - + if ($exception instanceof Exceptions\Throwable) { self::assertSame($message, $exception->getMessage()); self::assertSame($context, $exception->getContext()); From 7b1c9c60f9186fde466dbb513a3bf4b14739359e Mon Sep 17 00:00:00 2001 From: Veaceslav Medvedev Date: Sat, 8 Dec 2018 21:49:55 +0100 Subject: [PATCH 02/17] Remove useless phpdocs --- src/BadMethodCallException.php | 3 --- src/DomainException.php | 3 --- src/InvalidArgumentException.php | 3 --- src/LengthException.php | 3 --- src/LogicException.php | 3 --- src/OutOfBoundsException.php | 3 --- src/OutOfRangeException.php | 3 --- src/OverflowException.php | 3 --- src/RangeException.php | 3 --- src/RuntimeException.php | 3 --- src/Throwable.php | 3 --- src/ThrowableContextTrait.php | 15 --------------- src/UnderflowException.php | 3 --- src/UnexpectedValueException.php | 3 --- tests/ReadExceptionContextTest.php | 5 ----- 15 files changed, 59 deletions(-) diff --git a/src/BadMethodCallException.php b/src/BadMethodCallException.php index 480ad6b..a97c99c 100644 --- a/src/BadMethodCallException.php +++ b/src/BadMethodCallException.php @@ -7,9 +7,6 @@ use BadMethodCallException as BaseException; -/** - * Class BadMethodCallException. - */ class BadMethodCallException extends BaseException implements Throwable { use ThrowableContextTrait; diff --git a/src/DomainException.php b/src/DomainException.php index ca223f3..9a9fb68 100644 --- a/src/DomainException.php +++ b/src/DomainException.php @@ -7,9 +7,6 @@ use DomainException as BaseException; -/** - * Class DomainException. - */ class DomainException extends BaseException implements Throwable { use ThrowableContextTrait; diff --git a/src/InvalidArgumentException.php b/src/InvalidArgumentException.php index 78718f5..c3bb5a3 100644 --- a/src/InvalidArgumentException.php +++ b/src/InvalidArgumentException.php @@ -7,9 +7,6 @@ use InvalidArgumentException as BaseException; -/** - * Class InvalidArgumentException. - */ class InvalidArgumentException extends BaseException implements Throwable { use ThrowableContextTrait; diff --git a/src/LengthException.php b/src/LengthException.php index c4a04ca..c7a12c9 100644 --- a/src/LengthException.php +++ b/src/LengthException.php @@ -7,9 +7,6 @@ use LengthException as BaseException; -/** - * Class LengthException. - */ class LengthException extends BaseException implements Throwable { use ThrowableContextTrait; diff --git a/src/LogicException.php b/src/LogicException.php index 584b548..d0054bd 100644 --- a/src/LogicException.php +++ b/src/LogicException.php @@ -7,9 +7,6 @@ use LogicException as BaseException; -/** - * Class LogicException. - */ class LogicException extends BaseException implements Throwable { use ThrowableContextTrait; diff --git a/src/OutOfBoundsException.php b/src/OutOfBoundsException.php index c3d5d6e..949ff44 100644 --- a/src/OutOfBoundsException.php +++ b/src/OutOfBoundsException.php @@ -7,9 +7,6 @@ use OutOfBoundsException as BaseException; -/** - * Class OutOfBoundsException. - */ class OutOfBoundsException extends BaseException implements Throwable { use ThrowableContextTrait; diff --git a/src/OutOfRangeException.php b/src/OutOfRangeException.php index d847f90..52db3a5 100644 --- a/src/OutOfRangeException.php +++ b/src/OutOfRangeException.php @@ -7,9 +7,6 @@ use OutOfRangeException as BaseException; -/** - * Class OutOfRangeException. - */ class OutOfRangeException extends BaseException implements Throwable { use ThrowableContextTrait; diff --git a/src/OverflowException.php b/src/OverflowException.php index a2dbad6..283d755 100644 --- a/src/OverflowException.php +++ b/src/OverflowException.php @@ -7,9 +7,6 @@ use OverflowException as BaseException; -/** - * Class OverflowException. - */ class OverflowException extends BaseException implements Throwable { use ThrowableContextTrait; diff --git a/src/RangeException.php b/src/RangeException.php index 8c9943f..7749d67 100644 --- a/src/RangeException.php +++ b/src/RangeException.php @@ -7,9 +7,6 @@ use RangeException as BaseException; -/** - * Class RangeException. - */ class RangeException extends BaseException implements Throwable { use ThrowableContextTrait; diff --git a/src/RuntimeException.php b/src/RuntimeException.php index 020c6da..124e9c0 100644 --- a/src/RuntimeException.php +++ b/src/RuntimeException.php @@ -7,9 +7,6 @@ use RuntimeException as BaseException; -/** - * Class RuntimeException. - */ class RuntimeException extends BaseException implements Throwable { use ThrowableContextTrait; diff --git a/src/Throwable.php b/src/Throwable.php index ce0f359..0afc4d1 100644 --- a/src/Throwable.php +++ b/src/Throwable.php @@ -12,8 +12,5 @@ */ interface Throwable extends BaseThrowable { - /** - * @return array - */ public function getContext() : array; } diff --git a/src/ThrowableContextTrait.php b/src/ThrowableContextTrait.php index 7ebf0c5..f177b59 100644 --- a/src/ThrowableContextTrait.php +++ b/src/ThrowableContextTrait.php @@ -5,22 +5,10 @@ namespace Zee\Exceptions; -/** - * Trait ThrowableContextTrait. - */ trait ThrowableContextTrait { - /** - * @var array - */ private $context = []; - /** - * @param string $message - * @param array $context - * @param int $code - * @param Throwable|null $previous - */ public function __construct(string $message = '', array $context = [], int $code = 0, Throwable $previous = null) { parent::__construct($message, $code, $previous); @@ -28,9 +16,6 @@ public function __construct(string $message = '', array $context = [], int $code $this->context = $context; } - /** - * @return array - */ public function getContext() : array { return $this->context; diff --git a/src/UnderflowException.php b/src/UnderflowException.php index b6fdd7b..fc64e7e 100644 --- a/src/UnderflowException.php +++ b/src/UnderflowException.php @@ -7,9 +7,6 @@ use UnderflowException as BaseException; -/** - * Class UnderflowException. - */ class UnderflowException extends BaseException implements Throwable { use ThrowableContextTrait; diff --git a/src/UnexpectedValueException.php b/src/UnexpectedValueException.php index 41b1f54..82d7678 100644 --- a/src/UnexpectedValueException.php +++ b/src/UnexpectedValueException.php @@ -7,9 +7,6 @@ use UnexpectedValueException as BaseException; -/** - * Class UnexpectedValueException. - */ class UnexpectedValueException extends BaseException implements Throwable { use ThrowableContextTrait; diff --git a/tests/ReadExceptionContextTest.php b/tests/ReadExceptionContextTest.php index 56bfc56..85cb006 100644 --- a/tests/ReadExceptionContextTest.php +++ b/tests/ReadExceptionContextTest.php @@ -8,16 +8,11 @@ use PHPUnit\Framework\TestCase; use Zee\Exceptions; -/** - * Class ReadExceptionContextTest. - */ class ReadExceptionContextTest extends TestCase { /** * @test * @dataProvider provideExceptionClasses - * - * @param string $exceptionClass */ public function exceptionObjectShouldContainContext(string $exceptionClass) { From 1c5bdd8a3d2c687c89089a6e1034eb1b8b4fe3ef Mon Sep 17 00:00:00 2001 From: Veaceslav Medvedev Date: Sat, 8 Dec 2018 21:51:53 +0100 Subject: [PATCH 03/17] Add missing return-types --- tests/ReadExceptionContextTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ReadExceptionContextTest.php b/tests/ReadExceptionContextTest.php index 85cb006..f0a6b0c 100644 --- a/tests/ReadExceptionContextTest.php +++ b/tests/ReadExceptionContextTest.php @@ -14,7 +14,7 @@ class ReadExceptionContextTest extends TestCase * @test * @dataProvider provideExceptionClasses */ - public function exceptionObjectShouldContainContext(string $exceptionClass) + public function exceptionObjectShouldContainContext(string $exceptionClass): void { $message = 'Something went wrong'; $code = PHP_INT_MAX; @@ -31,7 +31,7 @@ public function exceptionObjectShouldContainContext(string $exceptionClass) } } - public function provideExceptionClasses() + public function provideExceptionClasses(): array { return [ [Exceptions\LogicException::class], From dda7eb3df9f5275cb674c06dae41298accdeeba9 Mon Sep 17 00:00:00 2001 From: Veaceslav Medvedev Date: Sat, 8 Dec 2018 22:07:50 +0100 Subject: [PATCH 04/17] Fix vendor name --- README.md | 6 +++--- composer.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 668ed97..33bc8b0 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ because often the message and the code are not enough to debug. Using [Composer](https://getcomposer.org): ```bash -composer require z-ee/exceptions +composer require zeeproject/exceptions ``` ## Usage @@ -85,13 +85,13 @@ Contributions are welcome and will be fully credited. Please see [CONTRIBUTING]( The BSD 2-Clause License. Please see [LICENSE][link-license] for more information. -[ico-version]: https://img.shields.io/packagist/v/z-ee/exceptions.svg?style=flat-square +[ico-version]: https://img.shields.io/packagist/v/zeeproject/exceptions.svg?style=flat-square [ico-license]: https://img.shields.io/badge/License-BSD%202--Clause-blue.svg?style=flat-square [ico-travis]: https://img.shields.io/travis/zee/exceptions/master.svg?style=flat-square [ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/zee/exceptions.svg?style=flat-square [ico-code-quality]: https://img.shields.io/scrutinizer/g/zee/exceptions.svg?style=flat-square -[link-packagist]: https://packagist.org/packages/z-ee/exceptions +[link-packagist]: https://packagist.org/packages/zeeproject/exceptions [link-license]: LICENSE [link-travis]: https://travis-ci.org/zee/exceptions [link-scrutinizer]: https://scrutinizer-ci.com/g/zee/exceptions/code-structure diff --git a/composer.json b/composer.json index 0361267..8e25828 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "z-ee/exceptions", + "name": "zeeproject/exceptions", "description": "Set of the base exceptions", "license": "BSD-2-Clause", "keywords": [ From 2a8e84012797f4feb78e8f1a94f6c54e2d5e10c8 Mon Sep 17 00:00:00 2001 From: Veaceslav Medvedev Date: Sat, 8 Dec 2018 22:11:09 +0100 Subject: [PATCH 05/17] Fix typos and update the README --- README.md | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 33bc8b0..3c4775c 100644 --- a/README.md +++ b/README.md @@ -29,27 +29,18 @@ throw new InvalidArgumentException('Something went wrong', [ ]); ~~~ -Now you can handle this exception, i.q. your error handler may log error details: +Now you can handle this exception, e.q. your error handler may log error details: ~~~php -class ErrorHandler +final class ErrorHandler { - /** - * @var LoggerInterface - */ private $logger; - /** - * @param LoggerInterface $logger - */ - public function __construct(LoggerInterface $logger) + public function __construct(Psr\Log\LoggerInterface $logger) { $this->logger = $logger; } - /** - * @param Exception $exception - */ public function handleException(Exception $exception) { if ($exception instanceof Zee\Exceptions\Throwable) { @@ -64,11 +55,6 @@ class ErrorHandler ## Testing ```bash -# install required files -composer self-update -composer install - -# run the test (from project root) phpunit ``` From 7ea4a88b1546cad1da82abffc2b82c6586e51334 Mon Sep 17 00:00:00 2001 From: Veaceslav Medvedev Date: Sat, 8 Dec 2018 22:11:54 +0100 Subject: [PATCH 06/17] Bump min PHP version to v7.1 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8e25828..5450147 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ } ], "require": { - "php": "^7.0", + "php": "^7.1", "ext-json": "*" }, "require-dev": { From 93f312e977665f241be00eca88937a5db36b7885 Mon Sep 17 00:00:00 2001 From: Veaceslav Medvedev Date: Sat, 8 Dec 2018 22:12:14 +0100 Subject: [PATCH 07/17] Remove unneeded requirement --- composer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 5450147..8c0a56f 100644 --- a/composer.json +++ b/composer.json @@ -13,8 +13,7 @@ } ], "require": { - "php": "^7.1", - "ext-json": "*" + "php": "^7.1" }, "require-dev": { "phpunit/phpunit": "^6.0", From e1f77ed6a849b69f705119b2fd6fb61da4699da2 Mon Sep 17 00:00:00 2001 From: Veaceslav Medvedev Date: Sat, 8 Dec 2018 22:12:37 +0100 Subject: [PATCH 08/17] Bump coular library to v1.5 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8c0a56f..75f5149 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ }, "require-dev": { "phpunit/phpunit": "^6.0", - "scrutinizer/ocular": "~1.1" + "scrutinizer/ocular": "~1.5" }, "autoload": { "psr-4": { From 25be6d75bec85dca2114b6786c152312e0492520 Mon Sep 17 00:00:00 2001 From: Veaceslav Medvedev Date: Sat, 8 Dec 2018 22:13:14 +0100 Subject: [PATCH 09/17] Bump phpunit to v7.5 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 75f5149..6b73b8c 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^6.0", + "phpunit/phpunit": "^7.5", "scrutinizer/ocular": "~1.5" }, "autoload": { From c3ed0cf7bb459bcacd158cbf46e8129cdb91a1c0 Mon Sep 17 00:00:00 2001 From: Veaceslav Medvedev Date: Sat, 8 Dec 2018 22:14:54 +0100 Subject: [PATCH 10/17] Update Travis CI config --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 40af35e..c7f0baa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,10 +5,11 @@ language: php matrix: fast_finish: true include: - - php: 7.0 + - php: 7.1 env: - EXECUTE_COVERAGE=true - - php: 7.1 + - php: 7.2 + - php: 7.3 notifications: email: false From 285819dee0ec6828a5ba3941ef5efc51d94e7634 Mon Sep 17 00:00:00 2001 From: Veaceslav Medvedev Date: Sat, 8 Dec 2018 22:17:06 +0100 Subject: [PATCH 11/17] Change files docblocks again --- src/BadFunctionCallException.php | 2 +- src/BadMethodCallException.php | 2 +- src/DomainException.php | 2 +- src/InvalidArgumentException.php | 2 +- src/LengthException.php | 2 +- src/LogicException.php | 2 +- src/OutOfBoundsException.php | 2 +- src/OutOfRangeException.php | 2 +- src/OverflowException.php | 2 +- src/RangeException.php | 2 +- src/RuntimeException.php | 2 +- src/Throwable.php | 2 +- src/ThrowableContextTrait.php | 2 +- src/UnderflowException.php | 2 +- src/UnexpectedValueException.php | 2 +- tests/ReadExceptionContextTest.php | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/BadFunctionCallException.php b/src/BadFunctionCallException.php index fb313f8..4c13ca8 100644 --- a/src/BadFunctionCallException.php +++ b/src/BadFunctionCallException.php @@ -1,6 +1,6 @@ Date: Sat, 8 Dec 2018 22:18:22 +0100 Subject: [PATCH 12/17] Update GIT config --- .gitattributes | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitattributes b/.gitattributes index 094a0ff..a84d38d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -23,3 +23,9 @@ phpunit.xml.dist export-ignore .travis.yml export-ignore .codeclimate.yml export-ignore .styleci.yml export-ignore + +# Ignore Github files +CODE_OF_CONDUCT.md export-ignore +CONTRIBUTING.md export-ignore +ISSUE_TEMPLATE.md export-ignore +PULL_REQUEST_TEMPLATE.md export-ignore From 58e9ae949510c8f22b56dce178dc155e5eddcb54 Mon Sep 17 00:00:00 2001 From: Veaceslav Medvedev Date: Sat, 8 Dec 2018 22:20:50 +0100 Subject: [PATCH 13/17] Remove imports of standard classes --- src/BadFunctionCallException.php | 4 +--- src/BadMethodCallException.php | 4 +--- src/DomainException.php | 4 +--- src/InvalidArgumentException.php | 4 +--- src/LengthException.php | 4 +--- src/LogicException.php | 4 +--- src/OutOfBoundsException.php | 4 +--- src/OutOfRangeException.php | 4 +--- src/OverflowException.php | 4 +--- src/RangeException.php | 4 +--- src/RuntimeException.php | 4 +--- src/Throwable.php | 4 +--- src/UnderflowException.php | 4 +--- src/UnexpectedValueException.php | 4 +--- 14 files changed, 14 insertions(+), 42 deletions(-) diff --git a/src/BadFunctionCallException.php b/src/BadFunctionCallException.php index 4c13ca8..d519e91 100644 --- a/src/BadFunctionCallException.php +++ b/src/BadFunctionCallException.php @@ -5,9 +5,7 @@ namespace Zee\Exceptions; -use BadFunctionCallException as BaseException; - -class BadFunctionCallException extends BaseException implements Throwable +class BadFunctionCallException extends \BadFunctionCallException implements Throwable { use ThrowableContextTrait; } diff --git a/src/BadMethodCallException.php b/src/BadMethodCallException.php index 11b5230..7e4c00a 100644 --- a/src/BadMethodCallException.php +++ b/src/BadMethodCallException.php @@ -5,9 +5,7 @@ namespace Zee\Exceptions; -use BadMethodCallException as BaseException; - -class BadMethodCallException extends BaseException implements Throwable +class BadMethodCallException extends \BadMethodCallException implements Throwable { use ThrowableContextTrait; } diff --git a/src/DomainException.php b/src/DomainException.php index a74a9b4..d64870b 100644 --- a/src/DomainException.php +++ b/src/DomainException.php @@ -5,9 +5,7 @@ namespace Zee\Exceptions; -use DomainException as BaseException; - -class DomainException extends BaseException implements Throwable +class DomainException extends \DomainException implements Throwable { use ThrowableContextTrait; } diff --git a/src/InvalidArgumentException.php b/src/InvalidArgumentException.php index f72c6ad..16d23be 100644 --- a/src/InvalidArgumentException.php +++ b/src/InvalidArgumentException.php @@ -5,9 +5,7 @@ namespace Zee\Exceptions; -use InvalidArgumentException as BaseException; - -class InvalidArgumentException extends BaseException implements Throwable +class InvalidArgumentException extends \InvalidArgumentException implements Throwable { use ThrowableContextTrait; } diff --git a/src/LengthException.php b/src/LengthException.php index e0d79a1..d657aa8 100644 --- a/src/LengthException.php +++ b/src/LengthException.php @@ -5,9 +5,7 @@ namespace Zee\Exceptions; -use LengthException as BaseException; - -class LengthException extends BaseException implements Throwable +class LengthException extends \LengthException implements Throwable { use ThrowableContextTrait; } diff --git a/src/LogicException.php b/src/LogicException.php index bb35a0d..2f9aef9 100644 --- a/src/LogicException.php +++ b/src/LogicException.php @@ -5,9 +5,7 @@ namespace Zee\Exceptions; -use LogicException as BaseException; - -class LogicException extends BaseException implements Throwable +class LogicException extends \LogicException implements Throwable { use ThrowableContextTrait; } diff --git a/src/OutOfBoundsException.php b/src/OutOfBoundsException.php index f1a041b..823aea5 100644 --- a/src/OutOfBoundsException.php +++ b/src/OutOfBoundsException.php @@ -5,9 +5,7 @@ namespace Zee\Exceptions; -use OutOfBoundsException as BaseException; - -class OutOfBoundsException extends BaseException implements Throwable +class OutOfBoundsException extends \OutOfBoundsException implements Throwable { use ThrowableContextTrait; } diff --git a/src/OutOfRangeException.php b/src/OutOfRangeException.php index e067d61..980c2e3 100644 --- a/src/OutOfRangeException.php +++ b/src/OutOfRangeException.php @@ -5,9 +5,7 @@ namespace Zee\Exceptions; -use OutOfRangeException as BaseException; - -class OutOfRangeException extends BaseException implements Throwable +class OutOfRangeException extends \OutOfRangeException implements Throwable { use ThrowableContextTrait; } diff --git a/src/OverflowException.php b/src/OverflowException.php index 886a2cd..2ba2af7 100644 --- a/src/OverflowException.php +++ b/src/OverflowException.php @@ -5,9 +5,7 @@ namespace Zee\Exceptions; -use OverflowException as BaseException; - -class OverflowException extends BaseException implements Throwable +class OverflowException extends \OverflowException implements Throwable { use ThrowableContextTrait; } diff --git a/src/RangeException.php b/src/RangeException.php index 474602f..a60b3c7 100644 --- a/src/RangeException.php +++ b/src/RangeException.php @@ -5,9 +5,7 @@ namespace Zee\Exceptions; -use RangeException as BaseException; - -class RangeException extends BaseException implements Throwable +class RangeException extends \RangeException implements Throwable { use ThrowableContextTrait; } diff --git a/src/RuntimeException.php b/src/RuntimeException.php index 2ca72a9..65496c0 100644 --- a/src/RuntimeException.php +++ b/src/RuntimeException.php @@ -5,9 +5,7 @@ namespace Zee\Exceptions; -use RuntimeException as BaseException; - -class RuntimeException extends BaseException implements Throwable +class RuntimeException extends \RuntimeException implements Throwable { use ThrowableContextTrait; } diff --git a/src/Throwable.php b/src/Throwable.php index 05f6dbe..5f75c02 100644 --- a/src/Throwable.php +++ b/src/Throwable.php @@ -5,12 +5,10 @@ namespace Zee\Exceptions; -use Throwable as BaseThrowable; - /** * Marker interface for exceptions with context information. */ -interface Throwable extends BaseThrowable +interface Throwable extends \Throwable { public function getContext() : array; } diff --git a/src/UnderflowException.php b/src/UnderflowException.php index 2f82f1c..7fcb23f 100644 --- a/src/UnderflowException.php +++ b/src/UnderflowException.php @@ -5,9 +5,7 @@ namespace Zee\Exceptions; -use UnderflowException as BaseException; - -class UnderflowException extends BaseException implements Throwable +class UnderflowException extends \UnderflowException implements Throwable { use ThrowableContextTrait; } diff --git a/src/UnexpectedValueException.php b/src/UnexpectedValueException.php index ed98d52..aeb6f5d 100644 --- a/src/UnexpectedValueException.php +++ b/src/UnexpectedValueException.php @@ -5,9 +5,7 @@ namespace Zee\Exceptions; -use UnexpectedValueException as BaseException; - -class UnexpectedValueException extends BaseException implements Throwable +class UnexpectedValueException extends \UnexpectedValueException implements Throwable { use ThrowableContextTrait; } From 6754b35df235b54ed7769252ce4264a13fff7d36 Mon Sep 17 00:00:00 2001 From: Veaceslav Medvedev Date: Sat, 8 Dec 2018 22:22:25 +0100 Subject: [PATCH 14/17] update phpunit config --- phpunit.xml.dist | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 541e9d0..2079816 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,6 +1,6 @@ - From d360869588fcb6177afe4550a4870f284608367b Mon Sep 17 00:00:00 2001 From: Veaceslav Medvedev Date: Sat, 8 Dec 2018 22:25:36 +0100 Subject: [PATCH 15/17] update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3c4775c..ee01c7d 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ Contributions are welcome and will be fully credited. Please see [CONTRIBUTING]( ## License -The BSD 2-Clause License. Please see [LICENSE][link-license] for more information. +It's [BSD 2-Clause][link-license]. [ico-version]: https://img.shields.io/packagist/v/zeeproject/exceptions.svg?style=flat-square [ico-license]: https://img.shields.io/badge/License-BSD%202--Clause-blue.svg?style=flat-square From 4086179da6440504b5bd8d175fb35c7f25386bee Mon Sep 17 00:00:00 2001 From: Veaceslav Medvedev Date: Sat, 8 Dec 2018 22:26:02 +0100 Subject: [PATCH 16/17] Remove unnecessary dir --- build/.gitignore | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 build/.gitignore diff --git a/build/.gitignore b/build/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/build/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore From c145ab81619111593657018483b6070c82d4d1c9 Mon Sep 17 00:00:00 2001 From: Veaceslav Medvedev Date: Sat, 8 Dec 2018 22:27:01 +0100 Subject: [PATCH 17/17] Remove PSR-5 from standards --- CONTRIBUTING.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 37f5757..d76659d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,7 +34,6 @@ $ phpunit * [PSR-1: Basic Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md) * [PSR-2: Coding Style Guide](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) * [PSR-4: Autoloading Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md) - * [PSR-5: PHPDoc (draft)](https://github.com/phpDocumentor/fig-standards/blob/master/proposed/phpdoc.md) * Keep the order of class elements: static properties, instance properties, constructor (or setUp for PHPUnit), destructor (or tearDown for PHPUnit), static methods, instance methods, magic static methods, magic instance methods.