Skip to content

Commit

Permalink
Merge pull request #8 from TheDragonCode/2.x
Browse files Browse the repository at this point in the history
[2.x] Changed the namespace when transferring to the organization
  • Loading branch information
Andrey Helldar authored Oct 22, 2021
2 parents 807f5e8 + c761444 commit 32bee92
Show file tree
Hide file tree
Showing 38 changed files with 111 additions and 84 deletions.
1 change: 0 additions & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
patreon: andrey_helldar
tidelift: "packagist/andrey-helldar/contracts"
custom: [ "https://paypal.me/helldar", "https://yoomoney.ru/to/410012608840929" ]
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,27 @@ 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

[link_styleci]: https://github.styleci.io/repos/119022335

[link_license]: LICENSE

[link_packagist]: https://packagist.org/packages/andrey-helldar/contracts
[link_packagist]: https://packagist.org/packages/dragon-code/contracts
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "andrey-helldar/contracts",
"name": "dragon-code/contracts",
"description": "A set of contracts for any project",
"type": "library",
"license": "MIT",
Expand All @@ -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",
Expand All @@ -27,7 +27,7 @@
},
"autoload": {
"psr-4": {
"Helldar\\Contracts\\": "src"
"DragonCode\\Contracts\\": "src"
}
},
"config": {
Expand Down
6 changes: 3 additions & 3 deletions src/Cashier/Auth/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Cashier/Config/Details.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

declare(strict_types=1);

namespace Helldar\Contracts\Cashier\Config;
namespace DragonCode\Contracts\Cashier\Config;

interface Details
{
Expand Down
8 changes: 4 additions & 4 deletions src/Cashier/Config/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
17 changes: 16 additions & 1 deletion src/Cashier/Config/Logs.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
<?php

/*
* This file is part of the "andrey-helldar/contracts" project.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author Andrey Helldar <[email protected]>
*
* @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
{
Expand Down
2 changes: 1 addition & 1 deletion src/Cashier/Config/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

declare(strict_types=1);

namespace Helldar\Contracts\Cashier\Config;
namespace DragonCode\Contracts\Cashier\Config;

interface Main
{
Expand Down
8 changes: 4 additions & 4 deletions src/Cashier/Config/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
4 changes: 2 additions & 2 deletions src/Cashier/Config/Payments/Attributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
4 changes: 2 additions & 2 deletions src/Cashier/Config/Payments/Map.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
4 changes: 2 additions & 2 deletions src/Cashier/Config/Payments/Statuses.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
6 changes: 3 additions & 3 deletions src/Cashier/Config/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion src/Cashier/Config/Queues/Names.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

declare(strict_types=1);

namespace Helldar\Contracts\Cashier\Config\Queues;
namespace DragonCode\Contracts\Cashier\Config\Queues;

interface Names
{
Expand Down
17 changes: 16 additions & 1 deletion src/Cashier/Config/Queues/Unique.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
<?php

/*
* This file is part of the "andrey-helldar/contracts" project.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author Andrey Helldar <[email protected]>
*
* @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
{
Expand Down
8 changes: 4 additions & 4 deletions src/Cashier/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) */
Expand Down
2 changes: 1 addition & 1 deletion src/Cashier/Helpers/Statuses.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

declare(strict_types=1);

namespace Helldar\Contracts\Cashier\Helpers;
namespace DragonCode\Contracts\Cashier\Helpers;

use Illuminate\Database\Eloquent\Model;

Expand Down
6 changes: 3 additions & 3 deletions src/Cashier/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions src/Cashier/Http/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Cashier/Resources/AccessToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

declare(strict_types=1);

namespace Helldar\Contracts\Cashier\Resources;
namespace DragonCode\Contracts\Cashier\Resources;

use Illuminate\Support\Carbon;

Expand Down
8 changes: 4 additions & 4 deletions src/Cashier/Resources/Details.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/Cashier/Resources/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/DataTransferObject/DataTransferObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

declare(strict_types=1);

namespace Helldar\Contracts\DataTransferObject;
namespace DragonCode\Contracts\DataTransferObject;

interface DataTransferObject
{
Expand Down
4 changes: 2 additions & 2 deletions src/Exceptions/Http/ClientException.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/Exceptions/Http/ServerException.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/LogicException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

declare(strict_types=1);

namespace Helldar\Contracts\Exceptions;
namespace DragonCode\Contracts\Exceptions;

use Throwable;

Expand Down
4 changes: 2 additions & 2 deletions src/Exceptions/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Loading

0 comments on commit 32bee92

Please sign in to comment.