diff --git a/composer.json b/composer.json index 63be9aa..4111a02 100644 --- a/composer.json +++ b/composer.json @@ -1,13 +1,15 @@ { - "name": "gocanto/attributes", + "name": "gocanto/relay", "type": "php-bundle", - "description": "Framework agnostic attributes bag with validations rules.", + "description": "Unify data transfer object that is framework agnostic.", "keywords": [ "php", - "attributes", - "bag" + "data", + "bag", + "transfer", + "object" ], - "homepage": "https://github.com/gocanto/attributes", + "homepage": "https://github.com/gocanto/relay", "license": "MIT", "authors": [ { @@ -35,12 +37,12 @@ }, "autoload": { "psr-4": { - "Gocanto\\Attributes\\": "src" + "Gocanto\\Relay\\": "src" } }, "autoload-dev": { "psr-4": { - "Gocanto\\Attributes\\Tests\\": "tests" + "Gocanto\\Relay\\Tests\\": "tests" } }, "minimum-stability": "dev", @@ -60,7 +62,7 @@ ] }, "support": { - "issues": "https://github.com/gocanto/attributes/issues", - "source": "https://github.com/gocanto/attributes" + "issues": "https://github.com/gocanto/relay/issues", + "source": "https://github.com/gocanto/relay" } } diff --git a/src/Attributes.php b/src/Attributes.php index fc8ad64..3c40355 100644 --- a/src/Attributes.php +++ b/src/Attributes.php @@ -11,11 +11,11 @@ * file that was distributed with this source code. */ -namespace Gocanto\Attributes; +namespace Gocanto\Relay; -use Gocanto\Attributes\Support\AttributesCollection; -use Gocanto\Attributes\Types\Any; -use Gocanto\Attributes\Support\PromotersCollection; +use Gocanto\Relay\Support\AttributesCollection; +use Gocanto\Relay\Types\Any; +use Gocanto\Relay\Support\PromotersCollection; abstract class Attributes { diff --git a/src/AttributesException.php b/src/AttributesException.php index 8e4b815..c0de1a6 100644 --- a/src/AttributesException.php +++ b/src/AttributesException.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Gocanto\Attributes; +namespace Gocanto\Relay; use Exception; use Throwable; diff --git a/src/Builder.php b/src/Builder.php index 9a15f8a..fa31480 100644 --- a/src/Builder.php +++ b/src/Builder.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace Gocanto\Attributes; +namespace Gocanto\Relay; -use Gocanto\Attributes\Support\AttributesCollection; -use Gocanto\Attributes\Support\PromotersCollection; +use Gocanto\Relay\Support\AttributesCollection; +use Gocanto\Relay\Support\PromotersCollection; class Builder { diff --git a/src/Promoter.php b/src/Promoter.php index 36d2eca..324e2f2 100644 --- a/src/Promoter.php +++ b/src/Promoter.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Gocanto\Attributes; +namespace Gocanto\Relay; class Promoter { diff --git a/src/Support/Arr.php b/src/Support/Arr.php index 4c205d6..de515b1 100644 --- a/src/Support/Arr.php +++ b/src/Support/Arr.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Support; +namespace Gocanto\Relay\Support; use ArrayAccess; diff --git a/src/Support/AttributesCollection.php b/src/Support/AttributesCollection.php index 0ad0844..074df64 100644 --- a/src/Support/AttributesCollection.php +++ b/src/Support/AttributesCollection.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Support; +namespace Gocanto\Relay\Support; -use Gocanto\Attributes\AttributesException; -use Gocanto\Attributes\Type; +use Gocanto\Relay\AttributesException; +use Gocanto\Relay\Type; class AttributesCollection { diff --git a/src/Support/PromotersCollection.php b/src/Support/PromotersCollection.php index 6286a19..b9d19aa 100644 --- a/src/Support/PromotersCollection.php +++ b/src/Support/PromotersCollection.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Support; +namespace Gocanto\Relay\Support; -use Gocanto\Attributes\AttributesException; -use Gocanto\Attributes\Promoter; -use Gocanto\Attributes\Type; -use Gocanto\Attributes\Types\Any; +use Gocanto\Relay\AttributesException; +use Gocanto\Relay\Promoter; +use Gocanto\Relay\Type; +use Gocanto\Relay\Types\Any; class PromotersCollection { diff --git a/src/Type.php b/src/Type.php index 6ebbfc8..697f8fd 100644 --- a/src/Type.php +++ b/src/Type.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Gocanto\Attributes; +namespace Gocanto\Relay; interface Type { diff --git a/src/Types/Any.php b/src/Types/Any.php index aac4caa..b7819b3 100644 --- a/src/Types/Any.php +++ b/src/Types/Any.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Types; +namespace Gocanto\Relay\Types; -use Gocanto\Attributes\Type; +use Gocanto\Relay\Type; use JsonException; class Any implements Type diff --git a/src/Types/Assert.php b/src/Types/Assert.php index 380ec69..78472af 100644 --- a/src/Types/Assert.php +++ b/src/Types/Assert.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Types; +namespace Gocanto\Relay\Types; -use Gocanto\Attributes\AttributesException; +use Gocanto\Relay\AttributesException; use Symfony\Component\Validator\Validation; class Assert diff --git a/src/Types/Boolean.php b/src/Types/Boolean.php index 391233d..4a377b9 100644 --- a/src/Types/Boolean.php +++ b/src/Types/Boolean.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Types; +namespace Gocanto\Relay\Types; -use Gocanto\Attributes\AttributesException; -use Gocanto\Attributes\Type; +use Gocanto\Relay\AttributesException; +use Gocanto\Relay\Type; use Symfony\Component\Validator\Constraints\Type as TypeValidator; class Boolean implements Type diff --git a/src/Types/Constraints.php b/src/Types/Constraints.php index e8914ad..811d027 100644 --- a/src/Types/Constraints.php +++ b/src/Types/Constraints.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Types; +namespace Gocanto\Relay\Types; -use Gocanto\Attributes\AttributesException; -use Gocanto\Attributes\Support\Arr; +use Gocanto\Relay\AttributesException; +use Gocanto\Relay\Support\Arr; use Symfony\Component\Validator\Constraint; class Constraints diff --git a/src/Types/Date.php b/src/Types/Date.php index 3ec9e0a..8b73255 100644 --- a/src/Types/Date.php +++ b/src/Types/Date.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Types; +namespace Gocanto\Relay\Types; use Carbon\CarbonImmutable; use Carbon\CarbonInterface; use DateTimeInterface; -use Gocanto\Attributes\AttributesException; -use Gocanto\Attributes\Type; +use Gocanto\Relay\AttributesException; +use Gocanto\Relay\Type; use Throwable; class Date implements Type diff --git a/src/Types/Decimal.php b/src/Types/Decimal.php index 6f882fb..c4e7788 100644 --- a/src/Types/Decimal.php +++ b/src/Types/Decimal.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Types; +namespace Gocanto\Relay\Types; -use Gocanto\Attributes\AttributesException; -use Gocanto\Attributes\Type; +use Gocanto\Relay\AttributesException; +use Gocanto\Relay\Type; class Decimal implements Type { diff --git a/src/Types/Email.php b/src/Types/Email.php index 20a1b8c..438da74 100644 --- a/src/Types/Email.php +++ b/src/Types/Email.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Types; +namespace Gocanto\Relay\Types; -use Gocanto\Attributes\AttributesException; -use Gocanto\Attributes\Type; +use Gocanto\Relay\AttributesException; +use Gocanto\Relay\Type; use Symfony\Component\Validator\Constraints\Email as EmailConstraint; class Email implements Type diff --git a/src/Types/Integer.php b/src/Types/Integer.php index 9aaf978..add9dea 100644 --- a/src/Types/Integer.php +++ b/src/Types/Integer.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Types; +namespace Gocanto\Relay\Types; -use Gocanto\Attributes\AttributesException; -use Gocanto\Attributes\Type; +use Gocanto\Relay\AttributesException; +use Gocanto\Relay\Type; class Integer implements Type { diff --git a/src/Types/Text.php b/src/Types/Text.php index 93bf782..015965e 100644 --- a/src/Types/Text.php +++ b/src/Types/Text.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Types; +namespace Gocanto\Relay\Types; -use Gocanto\Attributes\AttributesException; -use Gocanto\Attributes\Type; +use Gocanto\Relay\AttributesException; +use Gocanto\Relay\Type; use Symfony\Component\Validator\Constraints\Type as TypeValidator; class Text implements Type diff --git a/src/Types/Url.php b/src/Types/Url.php index 5dbaa98..ad41db0 100644 --- a/src/Types/Url.php +++ b/src/Types/Url.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Types; +namespace Gocanto\Relay\Types; -use Gocanto\Attributes\AttributesException; -use Gocanto\Attributes\Type; +use Gocanto\Relay\AttributesException; +use Gocanto\Relay\Type; use Symfony\Component\Validator\Constraints\Url as UrlConstraint; class Url implements Type diff --git a/src/Types/Uuid.php b/src/Types/Uuid.php index 8cc6e79..46a68b8 100644 --- a/src/Types/Uuid.php +++ b/src/Types/Uuid.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Types; +namespace Gocanto\Relay\Types; -use Gocanto\Attributes\AttributesException; -use Gocanto\Attributes\Type; +use Gocanto\Relay\AttributesException; +use Gocanto\Relay\Type; use Symfony\Component\Validator\Constraints\Uuid as UuidConstraint; class Uuid implements Type diff --git a/tests/AttributesExceptionTest.php b/tests/AttributesExceptionTest.php index 28db1ca..9442c26 100644 --- a/tests/AttributesExceptionTest.php +++ b/tests/AttributesExceptionTest.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Tests; +namespace Gocanto\Relay\Tests; use Exception; -use Gocanto\Attributes\AttributesException; +use Gocanto\Relay\AttributesException; use PHPUnit\Framework\TestCase; class AttributesExceptionTest extends TestCase diff --git a/tests/AttributesTest.php b/tests/AttributesTest.php index 052d1a0..11fa29d 100644 --- a/tests/AttributesTest.php +++ b/tests/AttributesTest.php @@ -2,14 +2,14 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Tests; - -use Gocanto\Attributes\AttributesException; -use Gocanto\Attributes\Promoter; -use Gocanto\Attributes\Tests\Stubs\Payload; -use Gocanto\Attributes\Types\Any; -use Gocanto\Attributes\Types\Text; -use Gocanto\Attributes\Types\Url; +namespace Gocanto\Relay\Tests; + +use Gocanto\Relay\AttributesException; +use Gocanto\Relay\Promoter; +use Gocanto\Relay\Tests\Stubs\Payload; +use Gocanto\Relay\Types\Any; +use Gocanto\Relay\Types\Text; +use Gocanto\Relay\Types\Url; use PHPUnit\Framework\TestCase; class AttributesTest extends TestCase diff --git a/tests/PromoterTest.php b/tests/PromoterTest.php index 60e382b..3e2be90 100644 --- a/tests/PromoterTest.php +++ b/tests/PromoterTest.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Tests; +namespace Gocanto\Relay\Tests; -use Gocanto\Attributes\AttributesException; -use Gocanto\Attributes\Promoter; -use Gocanto\Attributes\Tests\Stubs\Payload; -use Gocanto\Attributes\Types\Url; +use Gocanto\Relay\AttributesException; +use Gocanto\Relay\Promoter; +use Gocanto\Relay\Tests\Stubs\Payload; +use Gocanto\Relay\Types\Url; use PHPUnit\Framework\TestCase; class PromoterTest extends TestCase diff --git a/tests/Stubs/Payload.php b/tests/Stubs/Payload.php index 8ccb2bd..da5be28 100644 --- a/tests/Stubs/Payload.php +++ b/tests/Stubs/Payload.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Tests\Stubs; +namespace Gocanto\Relay\Tests\Stubs; -use Gocanto\Attributes\Attributes; +use Gocanto\Relay\Attributes; class Payload extends Attributes { diff --git a/tests/Support/ArrTest.php b/tests/Support/ArrTest.php index d5839a4..ac5df5f 100644 --- a/tests/Support/ArrTest.php +++ b/tests/Support/ArrTest.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Tests\Support; +namespace Gocanto\Relay\Tests\Support; use ArrayAccess; -use Gocanto\Attributes\Support\Arr; +use Gocanto\Relay\Support\Arr; use Mockery; use PHPUnit\Framework\TestCase; diff --git a/tests/Support/AttributesCollectionTest.php b/tests/Support/AttributesCollectionTest.php index 89b6aea..8a1aab2 100644 --- a/tests/Support/AttributesCollectionTest.php +++ b/tests/Support/AttributesCollectionTest.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Tests\Support; +namespace Gocanto\Relay\Tests\Support; -use Gocanto\Attributes\AttributesException; -use Gocanto\Attributes\Support\AttributesCollection; -use Gocanto\Attributes\Type; +use Gocanto\Relay\AttributesException; +use Gocanto\Relay\Support\AttributesCollection; +use Gocanto\Relay\Type; use Mockery; use PHPUnit\Framework\TestCase; diff --git a/tests/Support/PromotersCollectionTest.php b/tests/Support/PromotersCollectionTest.php index 13b0f56..bb08593 100644 --- a/tests/Support/PromotersCollectionTest.php +++ b/tests/Support/PromotersCollectionTest.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Tests\Support; +namespace Gocanto\Relay\Tests\Support; -use Gocanto\Attributes\AttributesException; -use Gocanto\Attributes\Promoter; -use Gocanto\Attributes\Support\PromotersCollection; -use Gocanto\Attributes\Types\Any; -use Gocanto\Attributes\Types\Text; +use Gocanto\Relay\AttributesException; +use Gocanto\Relay\Promoter; +use Gocanto\Relay\Support\PromotersCollection; +use Gocanto\Relay\Types\Any; +use Gocanto\Relay\Types\Text; use PHPUnit\Framework\TestCase; class PromotersCollectionTest extends TestCase diff --git a/tests/Types/AnyTest.php b/tests/Types/AnyTest.php index 3efd229..40198f0 100644 --- a/tests/Types/AnyTest.php +++ b/tests/Types/AnyTest.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Tests\Types; +namespace Gocanto\Relay\Tests\Types; -use Gocanto\Attributes\AttributesException; -use Gocanto\Attributes\Tests\Stubs\Payload; -use Gocanto\Attributes\Type; -use Gocanto\Attributes\Types\Any; +use Gocanto\Relay\AttributesException; +use Gocanto\Relay\Tests\Stubs\Payload; +use Gocanto\Relay\Type; +use Gocanto\Relay\Types\Any; use JsonException; use PHPUnit\Framework\TestCase; diff --git a/tests/Types/BooleanTest.php b/tests/Types/BooleanTest.php index 94b5f3f..6d4abfa 100644 --- a/tests/Types/BooleanTest.php +++ b/tests/Types/BooleanTest.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Tests\Types; +namespace Gocanto\Relay\Tests\Types; -use Gocanto\Attributes\AttributesException; -use Gocanto\Attributes\Promoter; -use Gocanto\Attributes\Tests\Stubs\Payload; -use Gocanto\Attributes\Types\Boolean; +use Gocanto\Relay\AttributesException; +use Gocanto\Relay\Promoter; +use Gocanto\Relay\Tests\Stubs\Payload; +use Gocanto\Relay\Types\Boolean; use PHPUnit\Framework\TestCase; class BooleanTest extends TestCase diff --git a/tests/Types/ConstraintsTest.php b/tests/Types/ConstraintsTest.php index 3d4dad1..f888427 100644 --- a/tests/Types/ConstraintsTest.php +++ b/tests/Types/ConstraintsTest.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Tests\Types; +namespace Gocanto\Relay\Tests\Types; -use Gocanto\Attributes\AttributesException; -use Gocanto\Attributes\Types\Constraints; +use Gocanto\Relay\AttributesException; +use Gocanto\Relay\Types\Constraints; use Mockery; use PHPUnit\Framework\TestCase; use Symfony\Component\Validator\Constraint; diff --git a/tests/Types/DateTest.php b/tests/Types/DateTest.php index d1cfa09..7f571e0 100644 --- a/tests/Types/DateTest.php +++ b/tests/Types/DateTest.php @@ -2,14 +2,14 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Tests\Types; +namespace Gocanto\Relay\Tests\Types; use Carbon\CarbonImmutable; -use Gocanto\Attributes\AttributesException; -use Gocanto\Attributes\Promoter; -use Gocanto\Attributes\Tests\Stubs\Payload; -use Gocanto\Attributes\Type; -use Gocanto\Attributes\Types\Date; +use Gocanto\Relay\AttributesException; +use Gocanto\Relay\Promoter; +use Gocanto\Relay\Tests\Stubs\Payload; +use Gocanto\Relay\Type; +use Gocanto\Relay\Types\Date; use PHPUnit\Framework\TestCase; class DateTest extends TestCase diff --git a/tests/Types/DecimalTest.php b/tests/Types/DecimalTest.php index 7f15276..243dda8 100644 --- a/tests/Types/DecimalTest.php +++ b/tests/Types/DecimalTest.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Tests\Types; +namespace Gocanto\Relay\Tests\Types; -use Gocanto\Attributes\AttributesException; -use Gocanto\Attributes\Promoter; -use Gocanto\Attributes\Tests\Stubs\Payload; -use Gocanto\Attributes\Types\Decimal; +use Gocanto\Relay\AttributesException; +use Gocanto\Relay\Promoter; +use Gocanto\Relay\Tests\Stubs\Payload; +use Gocanto\Relay\Types\Decimal; use PHPUnit\Framework\TestCase; use stdClass; diff --git a/tests/Types/EmailTest.php b/tests/Types/EmailTest.php index 4b74bbe..239400f 100644 --- a/tests/Types/EmailTest.php +++ b/tests/Types/EmailTest.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Tests\Types; +namespace Gocanto\Relay\Tests\Types; -use Gocanto\Attributes\AttributesException; -use Gocanto\Attributes\Promoter; -use Gocanto\Attributes\Tests\Stubs\Payload; -use Gocanto\Attributes\Types\Email; +use Gocanto\Relay\AttributesException; +use Gocanto\Relay\Promoter; +use Gocanto\Relay\Tests\Stubs\Payload; +use Gocanto\Relay\Types\Email; use PHPUnit\Framework\TestCase; class EmailTest extends TestCase diff --git a/tests/Types/IntegerTest.php b/tests/Types/IntegerTest.php index 95aa8f9..b625c4b 100644 --- a/tests/Types/IntegerTest.php +++ b/tests/Types/IntegerTest.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Tests\Types; +namespace Gocanto\Relay\Tests\Types; -use Gocanto\Attributes\AttributesException; -use Gocanto\Attributes\Promoter; -use Gocanto\Attributes\Tests\Stubs\Payload; -use Gocanto\Attributes\Types\Integer; +use Gocanto\Relay\AttributesException; +use Gocanto\Relay\Promoter; +use Gocanto\Relay\Tests\Stubs\Payload; +use Gocanto\Relay\Types\Integer; use PHPUnit\Framework\TestCase; use stdClass; diff --git a/tests/Types/TextTest.php b/tests/Types/TextTest.php index f723c38..bcadf71 100644 --- a/tests/Types/TextTest.php +++ b/tests/Types/TextTest.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Tests\Types; +namespace Gocanto\Relay\Tests\Types; -use Gocanto\Attributes\AttributesException; -use Gocanto\Attributes\Promoter; -use Gocanto\Attributes\Tests\Stubs\Payload; -use Gocanto\Attributes\Type; -use Gocanto\Attributes\Types\Text; +use Gocanto\Relay\AttributesException; +use Gocanto\Relay\Promoter; +use Gocanto\Relay\Tests\Stubs\Payload; +use Gocanto\Relay\Type; +use Gocanto\Relay\Types\Text; use PHPUnit\Framework\TestCase; class TextTest extends TestCase diff --git a/tests/Types/UrlTest.php b/tests/Types/UrlTest.php index 76cf638..ad41eb8 100644 --- a/tests/Types/UrlTest.php +++ b/tests/Types/UrlTest.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Tests\Types; +namespace Gocanto\Relay\Tests\Types; -use Gocanto\Attributes\AttributesException; -use Gocanto\Attributes\Promoter; -use Gocanto\Attributes\Tests\Stubs\Payload; -use Gocanto\Attributes\Type; -use Gocanto\Attributes\Types\Url; +use Gocanto\Relay\AttributesException; +use Gocanto\Relay\Promoter; +use Gocanto\Relay\Tests\Stubs\Payload; +use Gocanto\Relay\Type; +use Gocanto\Relay\Types\Url; use PHPUnit\Framework\TestCase; class UrlTest extends TestCase diff --git a/tests/Types/UuidTest.php b/tests/Types/UuidTest.php index e056698..c972950 100644 --- a/tests/Types/UuidTest.php +++ b/tests/Types/UuidTest.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace Gocanto\Attributes\Tests\Types; +namespace Gocanto\Relay\Tests\Types; -use Gocanto\Attributes\AttributesException; -use Gocanto\Attributes\Promoter; -use Gocanto\Attributes\Tests\Stubs\Payload; -use Gocanto\Attributes\Type; -use Gocanto\Attributes\Types\Uuid; +use Gocanto\Relay\AttributesException; +use Gocanto\Relay\Promoter; +use Gocanto\Relay\Tests\Stubs\Payload; +use Gocanto\Relay\Type; +use Gocanto\Relay\Types\Uuid; use PHPUnit\Framework\TestCase; class UuidTest extends TestCase