From 51ac08cdb595267fc2ee97f50abb02afdfa183eb Mon Sep 17 00:00:00 2001 From: David Lombera Date: Wed, 19 Jul 2023 15:20:42 -0600 Subject: [PATCH] chore!: change namespace to `Phetit\DependencyInjection` --- CHANGELOG.md | 1 + README.md | 2 +- composer.json | 4 ++-- src/Container.php | 6 +++--- src/Exception/ContainerException.php | 2 +- src/Exception/EntryNotFoundException.php | 2 +- src/Exception/InvalidEntryIdentifierException.php | 2 +- src/Exception/NotFoundException.php | 2 +- tests/ContainerTest.php | 8 ++++---- tests/Fixtures/Service.php | 2 +- 10 files changed, 16 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 296bf68..93de4ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Changed +- **Breaking:** change namespace from `Phetit\Container` to `Phetit\DependencyInjection` - **Breaking:** rename package from `phetit/container` to `phetit/dependency-injection` ## [0.4.0] - 2023-07-14 diff --git a/README.md b/README.md index 0112bcd..b2e6887 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ composer require phetit/dependency-injection Create an instance of `Container` class. ```php -use Phetit\Container\Container; +use Phetit\DependencyInjection\Container; $container = new Container(); ``` diff --git a/composer.json b/composer.json index 88697cf..db1f5a9 100644 --- a/composer.json +++ b/composer.json @@ -18,12 +18,12 @@ ], "autoload": { "psr-4": { - "Phetit\\Container\\": "src/" + "Phetit\\DependencyInjection\\": "src/" } }, "autoload-dev": { "psr-4": { - "Phetit\\Container\\Tests\\": "tests/" + "Phetit\\DependencyInjection\\Tests\\": "tests/" } }, "require": { diff --git a/src/Container.php b/src/Container.php index 641ea40..2370f8e 100644 --- a/src/Container.php +++ b/src/Container.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace Phetit\Container; +namespace Phetit\DependencyInjection; -use Phetit\Container\Exception\EntryNotFoundException; -use Phetit\Container\Exception\InvalidEntryIdentifierException; +use Phetit\DependencyInjection\Exception\EntryNotFoundException; +use Phetit\DependencyInjection\Exception\InvalidEntryIdentifierException; use Psr\Container\ContainerInterface; class Container implements ContainerInterface diff --git a/src/Exception/ContainerException.php b/src/Exception/ContainerException.php index 4de3f0a..b5d5987 100644 --- a/src/Exception/ContainerException.php +++ b/src/Exception/ContainerException.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Phetit\Container\Exception; +namespace Phetit\DependencyInjection\Exception; use Psr\Container\ContainerExceptionInterface; use RuntimeException; diff --git a/src/Exception/EntryNotFoundException.php b/src/Exception/EntryNotFoundException.php index d7027b1..a79ede8 100644 --- a/src/Exception/EntryNotFoundException.php +++ b/src/Exception/EntryNotFoundException.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Phetit\Container\Exception; +namespace Phetit\DependencyInjection\Exception; /** * This exceptions is thrown when no-existent entry is requested. diff --git a/src/Exception/InvalidEntryIdentifierException.php b/src/Exception/InvalidEntryIdentifierException.php index 69fc990..c61aefd 100644 --- a/src/Exception/InvalidEntryIdentifierException.php +++ b/src/Exception/InvalidEntryIdentifierException.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Phetit\Container\Exception; +namespace Phetit\DependencyInjection\Exception; use InvalidArgumentException; use Psr\Container\ContainerExceptionInterface; diff --git a/src/Exception/NotFoundException.php b/src/Exception/NotFoundException.php index b78e9c7..5f2f77f 100644 --- a/src/Exception/NotFoundException.php +++ b/src/Exception/NotFoundException.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Phetit\Container\Exception; +namespace Phetit\DependencyInjection\Exception; use InvalidArgumentException; use Psr\Container\NotFoundExceptionInterface; diff --git a/tests/ContainerTest.php b/tests/ContainerTest.php index de2e1c7..72b2658 100644 --- a/tests/ContainerTest.php +++ b/tests/ContainerTest.php @@ -2,13 +2,13 @@ declare(strict_types=1); -namespace Phetit\Container\Tests; +namespace Phetit\DependencyInjection\Tests; use Closure; use InvalidArgumentException; -use Phetit\Container\Container; -use Phetit\Container\Exception\EntryNotFoundException; -use Phetit\Container\Tests\Fixtures\Service; +use Phetit\DependencyInjection\Container; +use Phetit\DependencyInjection\Exception\EntryNotFoundException; +use Phetit\DependencyInjection\Tests\Fixtures\Service; use PHPUnit\Framework\TestCase; class ContainerTest extends TestCase diff --git a/tests/Fixtures/Service.php b/tests/Fixtures/Service.php index 00854a0..d6be89b 100644 --- a/tests/Fixtures/Service.php +++ b/tests/Fixtures/Service.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Phetit\Container\Tests\Fixtures; +namespace Phetit\DependencyInjection\Tests\Fixtures; class Service {