diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 47c18ba..bdaa331 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,2 @@ patreon: andrey_helldar -tidelift: "packagist/andrey-helldar/contracts" custom: [ "https://paypal.me/helldar", "https://yoomoney.ru/to/410012608840929" ] diff --git a/README.md b/README.md index cf6e2dc..43820cf 100644 --- a/README.md +++ b/README.md @@ -7,24 +7,22 @@ A set of contracts for any project. [![Total Downloads][badge_downloads]][link_packagist] [![License][badge_license]][link_license] +## Upgrade from `andrey-helldar/contracts` + +1. Replace `"andrey-helldar/contracts": "^1.0"` with `"dragon-code/contracts": "^2.0"` in the `composer.json` file; +2. Replace `Helldar\Contracts` namespace prefix with `DragonCode\Contracts`; +3. Call the `composer update` console command. ## License This package is licensed under the [MIT License](LICENSE). -## For Enterprise - -Available as part of the Tidelift Subscription. - -The maintainers of `andrey-helldar/contracts` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. [Learn more](https://tidelift.com/subscription/pkg/packagist-andrey-helldar-contracts?utm_source=packagist-andrey-helldar-contracts&utm_medium=referral&utm_campaign=enterprise&utm_term=repo). - - -[badge_downloads]: https://img.shields.io/packagist/dt/andrey-helldar/contracts.svg?style=flat-square +[badge_downloads]: https://img.shields.io/packagist/dt/dragon-code/contracts.svg?style=flat-square -[badge_license]: https://img.shields.io/packagist/l/andrey-helldar/contracts.svg?style=flat-square +[badge_license]: https://img.shields.io/packagist/l/dragon-code/contracts.svg?style=flat-square -[badge_stable]: https://img.shields.io/github/v/release/andrey-helldar/contracts?label=stable&style=flat-square +[badge_stable]: https://img.shields.io/github/v/release/dragon-code/contracts?label=stable&style=flat-square [badge_styleci]: https://styleci.io/repos/119022335/shield @@ -32,4 +30,4 @@ The maintainers of `andrey-helldar/contracts` and thousands of other packages ar [link_license]: LICENSE -[link_packagist]: https://packagist.org/packages/andrey-helldar/contracts +[link_packagist]: https://packagist.org/packages/dragon-code/contracts diff --git a/composer.json b/composer.json index 7ac31f5..2b336a8 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "andrey-helldar/contracts", + "name": "dragon-code/contracts", "description": "A set of contracts for any project", "type": "library", "license": "MIT", @@ -14,7 +14,7 @@ } ], "support": { - "source": "https://github.com/andrey-helldar/contracts" + "source": "https://github.com/TheDragonCode/contracts" }, "require": { "php": "^7.2.5|^8.0", @@ -27,7 +27,7 @@ }, "autoload": { "psr-4": { - "Helldar\\Contracts\\": "src" + "DragonCode\\Contracts\\": "src" } }, "config": { diff --git a/src/Cashier/Auth/Auth.php b/src/Cashier/Auth/Auth.php index 2a6b370..0e951f2 100644 --- a/src/Cashier/Auth/Auth.php +++ b/src/Cashier/Auth/Auth.php @@ -17,10 +17,10 @@ declare(strict_types=1); -namespace Helldar\Contracts\Cashier\Auth; +namespace DragonCode\Contracts\Cashier\Auth; -use Helldar\Contracts\Cashier\Http\Request; -use Helldar\Contracts\Cashier\Resources\Model; +use DragonCode\Contracts\Cashier\Http\Request; +use DragonCode\Contracts\Cashier\Resources\Model; /** @method static Auth make(Model $model, Request $request, bool $hash = true, array $extra = []) */ interface Auth diff --git a/src/Cashier/Config/Details.php b/src/Cashier/Config/Details.php index 64b7f9a..a536e59 100644 --- a/src/Cashier/Config/Details.php +++ b/src/Cashier/Config/Details.php @@ -17,7 +17,7 @@ declare(strict_types=1); -namespace Helldar\Contracts\Cashier\Config; +namespace DragonCode\Contracts\Cashier\Config; interface Details { diff --git a/src/Cashier/Config/Driver.php b/src/Cashier/Config/Driver.php index d375a3d..72d869e 100644 --- a/src/Cashier/Config/Driver.php +++ b/src/Cashier/Config/Driver.php @@ -17,17 +17,17 @@ declare(strict_types=1); -namespace Helldar\Contracts\Cashier\Config; +namespace DragonCode\Contracts\Cashier\Config; -use Helldar\Contracts\DataTransferObject\DataTransferObject; +use DragonCode\Contracts\DataTransferObject\DataTransferObject; /** @method static Driver make(array $items = []) */ interface Driver extends DataTransferObject { - /** @return \Helldar\Contracts\Cashier\Driver|string */ + /** @return \DragonCode\Contracts\Cashier\Driver|string */ public function getDriver(): string; - /** @return \Helldar\Contracts\Cashier\Resources\Model|string */ + /** @return \DragonCode\Contracts\Cashier\Resources\Model|string */ public function getDetails(): string; public function getClientId(): ?string; diff --git a/src/Cashier/Config/Logs.php b/src/Cashier/Config/Logs.php index 965ecd1..8edcf65 100644 --- a/src/Cashier/Config/Logs.php +++ b/src/Cashier/Config/Logs.php @@ -1,8 +1,23 @@ + * + * @copyright 2021 Andrey Helldar + * + * @license MIT + * + * @see https://github.com/andrey-helldar/contracts + */ + declare(strict_types=1); -namespace Helldar\Contracts\Cashier\Config; +namespace DragonCode\Contracts\Cashier\Config; interface Logs { diff --git a/src/Cashier/Config/Main.php b/src/Cashier/Config/Main.php index 162740f..a3e507d 100644 --- a/src/Cashier/Config/Main.php +++ b/src/Cashier/Config/Main.php @@ -17,7 +17,7 @@ declare(strict_types=1); -namespace Helldar\Contracts\Cashier\Config; +namespace DragonCode\Contracts\Cashier\Config; interface Main { diff --git a/src/Cashier/Config/Payment.php b/src/Cashier/Config/Payment.php index 1066ea1..2931376 100644 --- a/src/Cashier/Config/Payment.php +++ b/src/Cashier/Config/Payment.php @@ -17,11 +17,11 @@ declare(strict_types=1); -namespace Helldar\Contracts\Cashier\Config; +namespace DragonCode\Contracts\Cashier\Config; -use Helldar\Contracts\Cashier\Config\Payments\Attributes; -use Helldar\Contracts\Cashier\Config\Payments\Map; -use Helldar\Contracts\Cashier\Config\Payments\Statuses; +use DragonCode\Contracts\Cashier\Config\Payments\Attributes; +use DragonCode\Contracts\Cashier\Config\Payments\Map; +use DragonCode\Contracts\Cashier\Config\Payments\Statuses; interface Payment { diff --git a/src/Cashier/Config/Payments/Attributes.php b/src/Cashier/Config/Payments/Attributes.php index 08e15fe..97c80a6 100644 --- a/src/Cashier/Config/Payments/Attributes.php +++ b/src/Cashier/Config/Payments/Attributes.php @@ -17,9 +17,9 @@ declare(strict_types=1); -namespace Helldar\Contracts\Cashier\Config\Payments; +namespace DragonCode\Contracts\Cashier\Config\Payments; -use Helldar\Contracts\DataTransferObject\DataTransferObject; +use DragonCode\Contracts\DataTransferObject\DataTransferObject; interface Attributes extends DataTransferObject { diff --git a/src/Cashier/Config/Payments/Map.php b/src/Cashier/Config/Payments/Map.php index 2a87aa6..6779079 100644 --- a/src/Cashier/Config/Payments/Map.php +++ b/src/Cashier/Config/Payments/Map.php @@ -17,9 +17,9 @@ declare(strict_types=1); -namespace Helldar\Contracts\Cashier\Config\Payments; +namespace DragonCode\Contracts\Cashier\Config\Payments; -use Helldar\Contracts\DataTransferObject\DataTransferObject; +use DragonCode\Contracts\DataTransferObject\DataTransferObject; interface Map extends DataTransferObject { diff --git a/src/Cashier/Config/Payments/Statuses.php b/src/Cashier/Config/Payments/Statuses.php index 8c0e584..6a11b76 100644 --- a/src/Cashier/Config/Payments/Statuses.php +++ b/src/Cashier/Config/Payments/Statuses.php @@ -17,9 +17,9 @@ declare(strict_types=1); -namespace Helldar\Contracts\Cashier\Config\Payments; +namespace DragonCode\Contracts\Cashier\Config\Payments; -use Helldar\Contracts\DataTransferObject\DataTransferObject; +use DragonCode\Contracts\DataTransferObject\DataTransferObject; interface Statuses extends DataTransferObject { diff --git a/src/Cashier/Config/Queue.php b/src/Cashier/Config/Queue.php index 038cc06..7bde3b5 100644 --- a/src/Cashier/Config/Queue.php +++ b/src/Cashier/Config/Queue.php @@ -17,10 +17,10 @@ declare(strict_types=1); -namespace Helldar\Contracts\Cashier\Config; +namespace DragonCode\Contracts\Cashier\Config; -use Helldar\Contracts\Cashier\Config\Queues\Names; -use Helldar\Contracts\Cashier\Config\Queues\Unique; +use DragonCode\Contracts\Cashier\Config\Queues\Names; +use DragonCode\Contracts\Cashier\Config\Queues\Unique; interface Queue { diff --git a/src/Cashier/Config/Queues/Names.php b/src/Cashier/Config/Queues/Names.php index 6b0b9ad..2779483 100644 --- a/src/Cashier/Config/Queues/Names.php +++ b/src/Cashier/Config/Queues/Names.php @@ -17,7 +17,7 @@ declare(strict_types=1); -namespace Helldar\Contracts\Cashier\Config\Queues; +namespace DragonCode\Contracts\Cashier\Config\Queues; interface Names { diff --git a/src/Cashier/Config/Queues/Unique.php b/src/Cashier/Config/Queues/Unique.php index 445ec30..f5ad0f1 100644 --- a/src/Cashier/Config/Queues/Unique.php +++ b/src/Cashier/Config/Queues/Unique.php @@ -1,8 +1,23 @@ + * + * @copyright 2021 Andrey Helldar + * + * @license MIT + * + * @see https://github.com/andrey-helldar/contracts + */ + declare(strict_types=1); -namespace Helldar\Contracts\Cashier\Config\Queues; +namespace DragonCode\Contracts\Cashier\Config\Queues; interface Unique { diff --git a/src/Cashier/Driver.php b/src/Cashier/Driver.php index 9660820..3efbbee 100644 --- a/src/Cashier/Driver.php +++ b/src/Cashier/Driver.php @@ -17,11 +17,11 @@ declare(strict_types=1); -namespace Helldar\Contracts\Cashier; +namespace DragonCode\Contracts\Cashier; -use Helldar\Contracts\Cashier\Helpers\Statuses; -use Helldar\Contracts\Cashier\Http\Response; -use Helldar\Contracts\Cashier\Resources\Details; +use DragonCode\Contracts\Cashier\Helpers\Statuses; +use DragonCode\Contracts\Cashier\Http\Response; +use DragonCode\Contracts\Cashier\Resources\Details; use Illuminate\Database\Eloquent\Model; /** @method static Driver make(Config\Driver $config, Model $payment) */ diff --git a/src/Cashier/Helpers/Statuses.php b/src/Cashier/Helpers/Statuses.php index fa10024..e834099 100644 --- a/src/Cashier/Helpers/Statuses.php +++ b/src/Cashier/Helpers/Statuses.php @@ -17,7 +17,7 @@ declare(strict_types=1); -namespace Helldar\Contracts\Cashier\Helpers; +namespace DragonCode\Contracts\Cashier\Helpers; use Illuminate\Database\Eloquent\Model; diff --git a/src/Cashier/Http/Request.php b/src/Cashier/Http/Request.php index c260733..19df336 100644 --- a/src/Cashier/Http/Request.php +++ b/src/Cashier/Http/Request.php @@ -17,10 +17,10 @@ declare(strict_types=1); -namespace Helldar\Contracts\Cashier\Http; +namespace DragonCode\Contracts\Cashier\Http; -use Helldar\Contracts\Cashier\Resources\Model; -use Helldar\Contracts\Http\Builder; +use DragonCode\Contracts\Cashier\Resources\Model; +use DragonCode\Contracts\Http\Builder; /** * @method static Request make(Model $model) diff --git a/src/Cashier/Http/Response.php b/src/Cashier/Http/Response.php index 108ac1c..e1ee255 100644 --- a/src/Cashier/Http/Response.php +++ b/src/Cashier/Http/Response.php @@ -17,10 +17,10 @@ declare(strict_types=1); -namespace Helldar\Contracts\Cashier\Http; +namespace DragonCode\Contracts\Cashier\Http; -use Helldar\Contracts\DataTransferObject\DataTransferObject; -use Helldar\Contracts\Support\Arrayable; +use DragonCode\Contracts\DataTransferObject\DataTransferObject; +use DragonCode\Contracts\Support\Arrayable; /** @method static Response make(array $items = []) */ interface Response extends DataTransferObject, Arrayable diff --git a/src/Cashier/Resources/AccessToken.php b/src/Cashier/Resources/AccessToken.php index 2d34522..7b5e129 100644 --- a/src/Cashier/Resources/AccessToken.php +++ b/src/Cashier/Resources/AccessToken.php @@ -17,7 +17,7 @@ declare(strict_types=1); -namespace Helldar\Contracts\Cashier\Resources; +namespace DragonCode\Contracts\Cashier\Resources; use Illuminate\Support\Carbon; diff --git a/src/Cashier/Resources/Details.php b/src/Cashier/Resources/Details.php index ecbcc94..bc2a38a 100644 --- a/src/Cashier/Resources/Details.php +++ b/src/Cashier/Resources/Details.php @@ -17,11 +17,11 @@ declare(strict_types=1); -namespace Helldar\Contracts\Cashier\Resources; +namespace DragonCode\Contracts\Cashier\Resources; -use Helldar\Contracts\DataTransferObject\DataTransferObject; -use Helldar\Contracts\Support\Arrayable; -use Helldar\Contracts\Support\Jsonable; +use DragonCode\Contracts\DataTransferObject\DataTransferObject; +use DragonCode\Contracts\Support\Arrayable; +use DragonCode\Contracts\Support\Jsonable; /** @method static make(array $details = []) */ interface Details extends DataTransferObject, Jsonable, Arrayable diff --git a/src/Cashier/Resources/Model.php b/src/Cashier/Resources/Model.php index 7755cf9..ccb0529 100644 --- a/src/Cashier/Resources/Model.php +++ b/src/Cashier/Resources/Model.php @@ -17,10 +17,10 @@ declare(strict_types=1); -namespace Helldar\Contracts\Cashier\Resources; +namespace DragonCode\Contracts\Cashier\Resources; -use Helldar\Contracts\Cashier\Config\Driver; -use Helldar\Contracts\Cashier\Http\Request; +use DragonCode\Contracts\Cashier\Config\Driver; +use DragonCode\Contracts\Cashier\Http\Request; use Illuminate\Database\Eloquent\Model as EloquentModel; /** diff --git a/src/DataTransferObject/DataTransferObject.php b/src/DataTransferObject/DataTransferObject.php index 1322613..76cf20e 100644 --- a/src/DataTransferObject/DataTransferObject.php +++ b/src/DataTransferObject/DataTransferObject.php @@ -17,7 +17,7 @@ declare(strict_types=1); -namespace Helldar\Contracts\DataTransferObject; +namespace DragonCode\Contracts\DataTransferObject; interface DataTransferObject { diff --git a/src/Exceptions/Http/ClientException.php b/src/Exceptions/Http/ClientException.php index 854f240..81194f9 100644 --- a/src/Exceptions/Http/ClientException.php +++ b/src/Exceptions/Http/ClientException.php @@ -17,9 +17,9 @@ declare(strict_types=1); -namespace Helldar\Contracts\Exceptions\Http; +namespace DragonCode\Contracts\Exceptions\Http; -use Helldar\Contracts\Http\Builder; +use DragonCode\Contracts\Http\Builder; use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; interface ClientException extends HttpExceptionInterface diff --git a/src/Exceptions/Http/ServerException.php b/src/Exceptions/Http/ServerException.php index 4580345..2469394 100644 --- a/src/Exceptions/Http/ServerException.php +++ b/src/Exceptions/Http/ServerException.php @@ -17,9 +17,9 @@ declare(strict_types=1); -namespace Helldar\Contracts\Exceptions\Http; +namespace DragonCode\Contracts\Exceptions\Http; -use Helldar\Contracts\Http\Builder; +use DragonCode\Contracts\Http\Builder; use Throwable; interface ServerException extends Throwable diff --git a/src/Exceptions/LogicException.php b/src/Exceptions/LogicException.php index 2769a1b..0c20a86 100644 --- a/src/Exceptions/LogicException.php +++ b/src/Exceptions/LogicException.php @@ -17,7 +17,7 @@ declare(strict_types=1); -namespace Helldar\Contracts\Exceptions; +namespace DragonCode\Contracts\Exceptions; use Throwable; diff --git a/src/Exceptions/Manager.php b/src/Exceptions/Manager.php index 3ccc983..7f200f6 100644 --- a/src/Exceptions/Manager.php +++ b/src/Exceptions/Manager.php @@ -17,9 +17,9 @@ declare(strict_types=1); -namespace Helldar\Contracts\Exceptions; +namespace DragonCode\Contracts\Exceptions; -use Helldar\Contracts\Http\Builder; +use DragonCode\Contracts\Http\Builder; interface Manager { diff --git a/src/Exceptions/RuntimeException.php b/src/Exceptions/RuntimeException.php index 1a07ea2..e200785 100644 --- a/src/Exceptions/RuntimeException.php +++ b/src/Exceptions/RuntimeException.php @@ -17,7 +17,7 @@ declare(strict_types=1); -namespace Helldar\Contracts\Exceptions; +namespace DragonCode\Contracts\Exceptions; use Throwable; diff --git a/src/Http/Builder.php b/src/Http/Builder.php index d25df5b..0c3c879 100644 --- a/src/Http/Builder.php +++ b/src/Http/Builder.php @@ -17,9 +17,9 @@ declare(strict_types=1); -namespace Helldar\Contracts\Http; +namespace DragonCode\Contracts\Http; -use Helldar\Contracts\Support\Arrayable; +use DragonCode\Contracts\Support\Arrayable; use Psr\Http\Message\UriInterface; interface Builder extends UriInterface, Arrayable @@ -83,7 +83,7 @@ public function getPassword(): string; /** * Remove the fragment component from the URI. * - * @return \Helldar\Contracts\Http\Builder + * @return \DragonCode\Contracts\Http\Builder */ public function removeFragment(): self; @@ -93,7 +93,7 @@ public function removeFragment(): self; * @param string $key * @param mixed $value * - * @return \Helldar\Contracts\Http\Builder + * @return \DragonCode\Contracts\Http\Builder */ public function putQuery(string $key, $value): self; @@ -102,7 +102,7 @@ public function putQuery(string $key, $value): self; * * @param string $key * - * @return \Helldar\Contracts\Http\Builder + * @return \DragonCode\Contracts\Http\Builder */ public function removeQuery(string $key): self; @@ -111,7 +111,7 @@ public function removeQuery(string $key): self; * * @param \Psr\Http\Message\UriInterface $uri * - * @return \Helldar\Contracts\Http\Builder + * @return \DragonCode\Contracts\Http\Builder */ public function fromPsr(UriInterface $uri): self; diff --git a/src/LangPublisher/Comparator.php b/src/LangPublisher/Comparator.php index 5297ebd..988ab6f 100644 --- a/src/LangPublisher/Comparator.php +++ b/src/LangPublisher/Comparator.php @@ -17,7 +17,7 @@ declare(strict_types=1); -namespace Helldar\Contracts\LangPublisher; +namespace DragonCode\Contracts\LangPublisher; interface Comparator { diff --git a/src/LangPublisher/Plugin.php b/src/LangPublisher/Plugin.php index d0993be..7dd51e2 100644 --- a/src/LangPublisher/Plugin.php +++ b/src/LangPublisher/Plugin.php @@ -17,7 +17,7 @@ declare(strict_types=1); -namespace Helldar\Contracts\LangPublisher; +namespace DragonCode\Contracts\LangPublisher; interface Plugin { diff --git a/src/LangPublisher/Processor.php b/src/LangPublisher/Processor.php index 0f9326c..6ba609c 100644 --- a/src/LangPublisher/Processor.php +++ b/src/LangPublisher/Processor.php @@ -17,7 +17,7 @@ declare(strict_types=1); -namespace Helldar\Contracts\LangPublisher; +namespace DragonCode\Contracts\LangPublisher; interface Processor { diff --git a/src/LangPublisher/Provider.php b/src/LangPublisher/Provider.php index e0658d2..69b9bb7 100644 --- a/src/LangPublisher/Provider.php +++ b/src/LangPublisher/Provider.php @@ -17,7 +17,7 @@ declare(strict_types=1); -namespace Helldar\Contracts\LangPublisher; +namespace DragonCode\Contracts\LangPublisher; interface Provider { @@ -27,7 +27,7 @@ interface Provider public function basePath(): string; /** - * @return \Helldar\Contracts\LangPublisher\Plugin[] + * @return \DragonCode\Contracts\LangPublisher\Plugin[] */ public function plugins(): array; } diff --git a/src/LangPublisher/Translation.php b/src/LangPublisher/Translation.php index 9128ef8..7245463 100644 --- a/src/LangPublisher/Translation.php +++ b/src/LangPublisher/Translation.php @@ -17,7 +17,7 @@ declare(strict_types=1); -namespace Helldar\Contracts\LangPublisher; +namespace DragonCode\Contracts\LangPublisher; /** * @method static Translation make() diff --git a/src/Support/Arrayable.php b/src/Support/Arrayable.php index 47df132..49e1f82 100644 --- a/src/Support/Arrayable.php +++ b/src/Support/Arrayable.php @@ -17,7 +17,7 @@ declare(strict_types=1); -namespace Helldar\Contracts\Support; +namespace DragonCode\Contracts\Support; interface Arrayable { diff --git a/src/Support/Filesystem.php b/src/Support/Filesystem.php index 6472c0b..a046296 100644 --- a/src/Support/Filesystem.php +++ b/src/Support/Filesystem.php @@ -17,7 +17,7 @@ declare(strict_types=1); -namespace Helldar\Contracts\Support; +namespace DragonCode\Contracts\Support; interface Filesystem { diff --git a/src/Support/Jsonable.php b/src/Support/Jsonable.php index 6740d09..26d0035 100644 --- a/src/Support/Jsonable.php +++ b/src/Support/Jsonable.php @@ -17,7 +17,7 @@ declare(strict_types=1); -namespace Helldar\Contracts\Support; +namespace DragonCode\Contracts\Support; interface Jsonable { diff --git a/src/Support/Stringable.php b/src/Support/Stringable.php index cff9481..a45d923 100644 --- a/src/Support/Stringable.php +++ b/src/Support/Stringable.php @@ -17,7 +17,7 @@ declare(strict_types=1); -namespace Helldar\Contracts\Support; +namespace DragonCode\Contracts\Support; interface Stringable extends \Stringable {