From 0120116309ca61e5668dffff2113afe4408a090e Mon Sep 17 00:00:00 2001 From: Oleksii Bulba Date: Fri, 4 Aug 2023 23:24:44 +0300 Subject: [PATCH] [HttpCore] Prepare for 2.x: - Moved all classes to root folder; - Renamed namespace to Micro\Plugin\HttpCore; - Removed GitHub workflow; - Removed static analysis configuration files; --- .github/workflows/.editorconfig | 2 - .github/workflows/ci.yaml | 48 --------------- .php-cs-fixer.dist.php | 30 ---------- .../Executor/RouteExecutor.php | 14 ++--- .../Executor/RouteExecutorFactory.php | 10 ++-- .../RouteExecutorFactoryInterface.php | 2 +- .../Executor/RouteExecutorInterface.php | 4 +- .../Generator/UrlGenerator.php | 4 +- .../Generator/UrlGeneratorFactory.php | 4 +- .../UrlGeneratorFactoryInterface.php | 2 +- .../Generator/UrlGeneratorInterface.php | 4 +- .../Locator/RouteLocatorFactory.php | 6 +- .../Locator/RouteLocatorFactoryInterface.php | 2 +- .../Locator/RouteLocatorInterface.php | 4 +- .../Matcher/Route/Matchers/MethodMatcher.php | 9 +-- .../Matcher/Route/Matchers/UriMatcher.php | 9 +-- .../Matcher/Route/RouteMatcher.php | 4 +- .../Matcher/Route/RouteMatcherFactory.php | 6 +- .../Route/RouteMatcherFactoryInterface.php | 2 +- .../Matcher/Route/RouteMatcherInterface.php | 4 +- .../Matcher/UrlMatcher.php | 10 ++-- .../Matcher/UrlMatcherFactory.php | 6 +- .../Matcher/UrlMatcherFactoryInterface.php | 2 +- .../Matcher/UrlMatcherInterface.php | 6 +- .../Response/Callback/ResponseCallback.php | 6 +- .../Callback/ResponseCallbackFactory.php | 4 +- .../ResponseCallbackFactoryInterface.php | 4 +- .../Callback/ResponseCallbackInterface.php | 6 +- .../Transformer/ResponseTransformer.php | 2 +- .../ResponseTransformerFactory.php | 4 +- .../ResponseTransformerFactoryInterface.php | 2 +- .../ResponseTransformerInterface.php | 2 +- {src/Business => Business}/Route/Route.php | 15 +---- .../Route/RouteBuilder.php | 4 +- .../Route/RouteBuilderFactory.php | 2 +- .../Route/RouteBuilderFactoryInterface.php | 2 +- .../Route/RouteBuilderInterface.php | 4 +- .../Route/RouteCollection.php | 6 +- .../Route/RouteCollectionFactory.php | 4 +- .../Route/RouteCollectionFactoryInterface.php | 2 +- .../Route/RouteCollectionInterface.php | 6 +- .../Route/RouteInterface.php | 2 +- .../HttpCorePluginConfigurationInterface.php | 2 +- .../HttpBadRequestException.php | 2 +- .../Exception => Exception}/HttpException.php | 2 +- .../HttpForbiddenException.php | 2 +- .../HttpInternalServerException.php | 2 +- .../HttpNotFoundException.php | 2 +- .../HttpUnauthorizedException.php | 2 +- .../ResponseInvalidException.php | 2 +- .../RouteAlreadyDeclaredException.php | 2 +- .../RouteConfigurationException.php | 2 +- .../RouteInvalidConfigurationException.php | 2 +- .../RouteLocatorNotException.php | 2 +- .../RouteNotFoundException.php | 4 +- {src/Facade => Facade}/HttpFacade.php | 16 ++--- .../Facade => Facade}/HttpFacadeInterface.php | 10 ++-- src/HttpCorePlugin.php => HttpCorePlugin.php | 58 +++++++++---------- ...ion.php => HttpCorePluginConfiguration.php | 6 +- .../HttpResponseTransformerPlugin.php | 4 +- .../HttpRouteLocatorPluginInterface.php | 4 +- .../Executor/RouteExecutorFactoryTest.php | 14 ++--- .../Business/Executor/RouteExecutorTest.php | 20 +++---- .../Generator/UrlGeneratorFactoryTest.php | 8 +-- .../Business/Generator/UrlGeneratorTest.php | 8 +-- .../Locator/RouteLocatorFactoryTest.php | 10 ++-- .../Route/Matchers/MethodMatcherTest.php | 6 +- .../Matcher/Route/Matchers/UriMatcherTest.php | 6 +- .../Matcher/Route/RouteMatcherFactoryTest.php | 6 +- .../Matcher/Route/RouteMatcherTest.php | 8 +-- .../Matcher/UrlMatcherFactoryTest.php | 10 ++-- .../Unit/Business/Matcher/UrlMatcherTest.php | 16 ++--- .../Unit/Business/Response/CallbackTest.php | 2 +- .../Response/ResponseCallbackFactoryTest.php | 8 +-- .../Response/ResponseCallbackTest.php | 8 +-- .../Route/RouteBuilderFactoryTest.php | 6 +- .../Unit/Business/Route/RouteBuilderTest.php | 6 +- .../Route/RouteCollectionFactoryTest.php | 12 ++-- .../Business/Route/RouteCollectionTest.php | 12 ++-- .../Unit/Business/Route/RouteTest.php | 6 +- .../Exception/AbstractHttpExceptionTest.php | 4 +- .../Exception/HttpBadRequestExceptionTest.php | 4 +- .../Unit/Exception/HttpExceptionTest.php | 4 +- .../Exception/HttpForbiddenExceptionTest.php | 4 +- .../HttpInternalServerExceptionTest.php | 4 +- .../Exception/HttpNotFoundExceptionTest.php | 4 +- .../HttpUnauthorizedExceptionTest.php | 4 +- .../Unit/Facade/HttpFacadeTest.php | 28 ++++----- .../Unit/HttpCorePluginConfigurationTest.php | 6 +- {tests => Tests}/Unit/HttpCorePluginTest.php | 10 ++-- {tests => Tests}/Unit/HttpTestPlugin.php | 24 ++++---- composer.json | 55 +++++------------- phpstan.neon.dist | 4 -- psalm.xml | 38 ------------ 94 files changed, 298 insertions(+), 464 deletions(-) delete mode 100644 .github/workflows/.editorconfig delete mode 100644 .github/workflows/ci.yaml delete mode 100644 .php-cs-fixer.dist.php rename {src/Business => Business}/Executor/RouteExecutor.php (84%) rename {src/Business => Business}/Executor/RouteExecutorFactory.php (74%) rename {src/Business => Business}/Executor/RouteExecutorFactoryInterface.php (89%) rename {src/Business => Business}/Executor/RouteExecutorInterface.php (85%) rename {src/Business => Business}/Generator/UrlGenerator.php (91%) rename {src/Business => Business}/Generator/UrlGeneratorFactory.php (84%) rename {src/Business => Business}/Generator/UrlGeneratorFactoryInterface.php (89%) rename {src/Business => Business}/Generator/UrlGeneratorInterface.php (84%) rename {src/Business => Business}/Locator/RouteLocatorFactory.php (86%) rename {src/Business => Business}/Locator/RouteLocatorFactoryInterface.php (90%) rename {src/Business => Business}/Locator/RouteLocatorInterface.php (81%) rename {src/Business => Business}/Matcher/Route/Matchers/MethodMatcher.php (73%) rename {src/Business => Business}/Matcher/Route/Matchers/UriMatcher.php (84%) rename {src/Business => Business}/Matcher/Route/RouteMatcher.php (88%) rename {src/Business => Business}/Matcher/Route/RouteMatcherFactory.php (74%) rename {src/Business => Business}/Matcher/Route/RouteMatcherFactoryInterface.php (88%) rename {src/Business => Business}/Matcher/Route/RouteMatcherInterface.php (81%) rename {src/Business => Business}/Matcher/UrlMatcher.php (76%) rename {src/Business => Business}/Matcher/UrlMatcherFactory.php (80%) rename {src/Business => Business}/Matcher/UrlMatcherFactoryInterface.php (89%) rename {src/Business => Business}/Matcher/UrlMatcherInterface.php (76%) rename {src/Business => Business}/Response/Callback/ResponseCallback.php (92%) rename {src/Business => Business}/Response/Callback/ResponseCallbackFactory.php (87%) rename {src/Business => Business}/Response/Callback/ResponseCallbackFactoryInterface.php (79%) rename {src/Business => Business}/Response/Callback/ResponseCallbackInterface.php (74%) rename {src/Business => Business}/Response/Transformer/ResponseTransformer.php (95%) rename {src/Business => Business}/Response/Transformer/ResponseTransformerFactory.php (88%) rename {src/Business => Business}/Response/Transformer/ResponseTransformerFactoryInterface.php (87%) rename {src/Business => Business}/Response/Transformer/ResponseTransformerInterface.php (89%) rename {src/Business => Business}/Route/Route.php (81%) rename {src/Business => Business}/Route/RouteBuilder.php (97%) rename {src/Business => Business}/Route/RouteBuilderFactory.php (91%) rename {src/Business => Business}/Route/RouteBuilderFactoryInterface.php (89%) rename {src/Business => Business}/Route/RouteBuilderInterface.php (90%) rename {src/Business => Business}/Route/RouteCollection.php (94%) rename {src/Business => Business}/Route/RouteCollectionFactory.php (89%) rename {src/Business => Business}/Route/RouteCollectionFactoryInterface.php (90%) rename {src/Business => Business}/Route/RouteCollectionInterface.php (86%) rename {src/Business => Business}/Route/RouteInterface.php (94%) rename {src/Configuration => Configuration}/HttpCorePluginConfigurationInterface.php (90%) rename {src/Exception => Exception}/HttpBadRequestException.php (93%) rename {src/Exception => Exception}/HttpException.php (93%) rename {src/Exception => Exception}/HttpForbiddenException.php (92%) rename {src/Exception => Exception}/HttpInternalServerException.php (92%) rename {src/Exception => Exception}/HttpNotFoundException.php (92%) rename {src/Exception => Exception}/HttpUnauthorizedException.php (92%) rename {src/Exception => Exception}/ResponseInvalidException.php (94%) rename {src/Exception => Exception}/RouteAlreadyDeclaredException.php (93%) rename {src/Exception => Exception}/RouteConfigurationException.php (90%) rename {src/Exception => Exception}/RouteInvalidConfigurationException.php (96%) rename {src/Exception => Exception}/RouteLocatorNotException.php (89%) rename {src/Exception => Exception}/RouteNotFoundException.php (89%) rename {src/Facade => Facade}/HttpFacade.php (79%) rename {src/Facade => Facade}/HttpFacadeInterface.php (66%) rename src/HttpCorePlugin.php => HttpCorePlugin.php (67%) rename src/HttpCorePluginConfiguration.php => HttpCorePluginConfiguration.php (80%) rename {src/Plugin => Plugin}/HttpResponseTransformerPlugin.php (79%) rename {src/Plugin => Plugin}/HttpRouteLocatorPluginInterface.php (82%) rename {tests => Tests}/Unit/Business/Executor/RouteExecutorFactoryTest.php (62%) rename {tests => Tests}/Unit/Business/Executor/RouteExecutorTest.php (82%) rename {tests => Tests}/Unit/Business/Generator/UrlGeneratorFactoryTest.php (69%) rename {tests => Tests}/Unit/Business/Generator/UrlGeneratorTest.php (88%) rename {tests => Tests}/Unit/Business/Locator/RouteLocatorFactoryTest.php (87%) rename {tests => Tests}/Unit/Business/Matcher/Route/Matchers/MethodMatcherTest.php (87%) rename {tests => Tests}/Unit/Business/Matcher/Route/Matchers/UriMatcherTest.php (90%) rename {tests => Tests}/Unit/Business/Matcher/Route/RouteMatcherFactoryTest.php (70%) rename {tests => Tests}/Unit/Business/Matcher/Route/RouteMatcherTest.php (84%) rename {tests => Tests}/Unit/Business/Matcher/UrlMatcherFactoryTest.php (65%) rename {tests => Tests}/Unit/Business/Matcher/UrlMatcherTest.php (86%) rename {tests => Tests}/Unit/Business/Response/CallbackTest.php (90%) rename {tests => Tests}/Unit/Business/Response/ResponseCallbackFactoryTest.php (74%) rename {tests => Tests}/Unit/Business/Response/ResponseCallbackTest.php (95%) rename {tests => Tests}/Unit/Business/Route/RouteBuilderFactoryTest.php (74%) rename {tests => Tests}/Unit/Business/Route/RouteBuilderTest.php (94%) rename {tests => Tests}/Unit/Business/Route/RouteCollectionFactoryTest.php (79%) rename {tests => Tests}/Unit/Business/Route/RouteCollectionTest.php (88%) rename {tests => Tests}/Unit/Business/Route/RouteTest.php (90%) rename {tests => Tests}/Unit/Exception/AbstractHttpExceptionTest.php (86%) rename {tests => Tests}/Unit/Exception/HttpBadRequestExceptionTest.php (81%) rename {tests => Tests}/Unit/Exception/HttpExceptionTest.php (83%) rename {tests => Tests}/Unit/Exception/HttpForbiddenExceptionTest.php (81%) rename {tests => Tests}/Unit/Exception/HttpInternalServerExceptionTest.php (81%) rename {tests => Tests}/Unit/Exception/HttpNotFoundExceptionTest.php (81%) rename {tests => Tests}/Unit/Exception/HttpUnauthorizedExceptionTest.php (81%) rename {tests => Tests}/Unit/Facade/HttpFacadeTest.php (80%) rename {tests => Tests}/Unit/HttpCorePluginConfigurationTest.php (85%) rename {tests => Tests}/Unit/HttpCorePluginTest.php (84%) rename {tests => Tests}/Unit/HttpTestPlugin.php (80%) delete mode 100644 phpstan.neon.dist delete mode 100644 psalm.xml diff --git a/.github/workflows/.editorconfig b/.github/workflows/.editorconfig deleted file mode 100644 index 473df25..0000000 --- a/.github/workflows/.editorconfig +++ /dev/null @@ -1,2 +0,0 @@ -[{*.yaml,*.yml}] -indent_size = 2 \ No newline at end of file diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index fe23261..0000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,48 +0,0 @@ -name: Plugin CI -on: - push: - branches: [ 'master' ] - pull_request: - -env: - PHP_CS_FIXER_IGNORE_ENV: 1 - XDEBUG_MODE: coverage - -jobs: - tests: - name: "Tests ${{ matrix.php-version }} deps ${{ matrix.dependency-versions }}" - runs-on: ubuntu-22.04 - - strategy: - fail-fast: false - matrix: - # normal, highest, non-dev installs - php-version: [ '8.2' ] - dependency-versions: [ 'highest' ] - include: - # testing lowest PHP version with the lowest dependencies - # - php-version: '8.2' - # dependency-versions: 'lowest' - - # testing dev versions with the highest PHP - - php-version: '8.2' - dependency-versions: 'highest' - - steps: - - name: "Checkout code" - uses: "actions/checkout@v2" - - - name: "Install PHP" - uses: "shivammathur/setup-php@v2" - with: - coverage: "none" - php-version: "${{ matrix.php-version }}" - - - name: "Composer install" - uses: "ramsey/composer-install@v2" - with: - dependency-versions: "${{ matrix.dependency-versions }}" - composer-options: "--prefer-dist --no-progress" - - - name: Run tests - run: composer run test \ No newline at end of file diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php deleted file mode 100644 index ded2263..0000000 --- a/.php-cs-fixer.dist.php +++ /dev/null @@ -1,30 +0,0 @@ -in(__DIR__.'/src') - ->in(__DIR__.'/tests') -; - -return (new PhpCsFixer\Config()) - ->setRules(array( - '@Symfony' => true, - '@Symfony:risky' => true, - 'protected_to_private' => false, - 'semicolon_after_instruction' => false, - 'header_comment' => [ - 'header' => << - - For the full copyright and license information, please view the LICENSE - file that was distributed with this source code. -EOF - ] - )) - ->setRiskyAllowed(true) - ->setFinder($finder); \ No newline at end of file diff --git a/src/Business/Executor/RouteExecutor.php b/Business/Executor/RouteExecutor.php similarity index 84% rename from src/Business/Executor/RouteExecutor.php rename to Business/Executor/RouteExecutor.php index cce9ec7..279a622 100644 --- a/src/Business/Executor/RouteExecutor.php +++ b/Business/Executor/RouteExecutor.php @@ -11,14 +11,14 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Executor; +namespace Micro\Plugin\HttpCore\Business\Executor; -use Micro\Component\DependencyInjection\ContainerRegistryInterface; -use Micro\Plugin\Http\Business\Matcher\UrlMatcherInterface; -use Micro\Plugin\Http\Business\Response\Callback\ResponseCallbackFactoryInterface; -use Micro\Plugin\Http\Business\Response\Transformer\ResponseTransformerFactoryInterface; -use Micro\Plugin\Http\Exception\HttpException; -use Micro\Plugin\Http\Exception\HttpInternalServerException; +use Micro\Framework\DependencyInjection\ContainerRegistryInterface; +use Micro\Plugin\HttpCore\Business\Matcher\UrlMatcherInterface; +use Micro\Plugin\HttpCore\Business\Response\Callback\ResponseCallbackFactoryInterface; +use Micro\Plugin\HttpCore\Business\Response\Transformer\ResponseTransformerFactoryInterface; +use Micro\Plugin\HttpCore\Exception\HttpException; +use Micro\Plugin\HttpCore\Exception\HttpInternalServerException; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; diff --git a/src/Business/Executor/RouteExecutorFactory.php b/Business/Executor/RouteExecutorFactory.php similarity index 74% rename from src/Business/Executor/RouteExecutorFactory.php rename to Business/Executor/RouteExecutorFactory.php index 11dd49f..9f80114 100644 --- a/src/Business/Executor/RouteExecutorFactory.php +++ b/Business/Executor/RouteExecutorFactory.php @@ -11,12 +11,12 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Executor; +namespace Micro\Plugin\HttpCore\Business\Executor; -use Micro\Component\DependencyInjection\ContainerRegistryInterface; -use Micro\Plugin\Http\Business\Matcher\UrlMatcherFactoryInterface; -use Micro\Plugin\Http\Business\Response\Callback\ResponseCallbackFactoryInterface; -use Micro\Plugin\Http\Business\Response\Transformer\ResponseTransformerFactoryInterface; +use Micro\Framework\DependencyInjection\ContainerRegistryInterface; +use Micro\Plugin\HttpCore\Business\Matcher\UrlMatcherFactoryInterface; +use Micro\Plugin\HttpCore\Business\Response\Callback\ResponseCallbackFactoryInterface; +use Micro\Plugin\HttpCore\Business\Response\Transformer\ResponseTransformerFactoryInterface; /** * @author Stanislau Komar diff --git a/src/Business/Executor/RouteExecutorFactoryInterface.php b/Business/Executor/RouteExecutorFactoryInterface.php similarity index 89% rename from src/Business/Executor/RouteExecutorFactoryInterface.php rename to Business/Executor/RouteExecutorFactoryInterface.php index 1d5d7de..66a22ff 100644 --- a/src/Business/Executor/RouteExecutorFactoryInterface.php +++ b/Business/Executor/RouteExecutorFactoryInterface.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Executor; +namespace Micro\Plugin\HttpCore\Business\Executor; /** * @author Stanislau Komar diff --git a/src/Business/Executor/RouteExecutorInterface.php b/Business/Executor/RouteExecutorInterface.php similarity index 85% rename from src/Business/Executor/RouteExecutorInterface.php rename to Business/Executor/RouteExecutorInterface.php index c134e1a..f0cf1f3 100644 --- a/src/Business/Executor/RouteExecutorInterface.php +++ b/Business/Executor/RouteExecutorInterface.php @@ -11,9 +11,9 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Executor; +namespace Micro\Plugin\HttpCore\Business\Executor; -use Micro\Plugin\Http\Exception\HttpException; +use Micro\Plugin\HttpCore\Exception\HttpException; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; diff --git a/src/Business/Generator/UrlGenerator.php b/Business/Generator/UrlGenerator.php similarity index 91% rename from src/Business/Generator/UrlGenerator.php rename to Business/Generator/UrlGenerator.php index 23a39d0..7ccb071 100644 --- a/src/Business/Generator/UrlGenerator.php +++ b/Business/Generator/UrlGenerator.php @@ -11,9 +11,9 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Generator; +namespace Micro\Plugin\HttpCore\Business\Generator; -use Micro\Plugin\Http\Business\Route\RouteCollectionInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteCollectionInterface; /** * @author Stanislau Komar diff --git a/src/Business/Generator/UrlGeneratorFactory.php b/Business/Generator/UrlGeneratorFactory.php similarity index 84% rename from src/Business/Generator/UrlGeneratorFactory.php rename to Business/Generator/UrlGeneratorFactory.php index 733f76a..ac1f8ae 100644 --- a/src/Business/Generator/UrlGeneratorFactory.php +++ b/Business/Generator/UrlGeneratorFactory.php @@ -11,9 +11,9 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Generator; +namespace Micro\Plugin\HttpCore\Business\Generator; -use Micro\Plugin\Http\Business\Route\RouteCollectionFactoryInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteCollectionFactoryInterface; /** * @author Stanislau Komar diff --git a/src/Business/Generator/UrlGeneratorFactoryInterface.php b/Business/Generator/UrlGeneratorFactoryInterface.php similarity index 89% rename from src/Business/Generator/UrlGeneratorFactoryInterface.php rename to Business/Generator/UrlGeneratorFactoryInterface.php index 8880583..dc932a5 100644 --- a/src/Business/Generator/UrlGeneratorFactoryInterface.php +++ b/Business/Generator/UrlGeneratorFactoryInterface.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Generator; +namespace Micro\Plugin\HttpCore\Business\Generator; /** * @author Stanislau Komar diff --git a/src/Business/Generator/UrlGeneratorInterface.php b/Business/Generator/UrlGeneratorInterface.php similarity index 84% rename from src/Business/Generator/UrlGeneratorInterface.php rename to Business/Generator/UrlGeneratorInterface.php index c1d1388..51ebdb8 100644 --- a/src/Business/Generator/UrlGeneratorInterface.php +++ b/Business/Generator/UrlGeneratorInterface.php @@ -11,9 +11,9 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Generator; +namespace Micro\Plugin\HttpCore\Business\Generator; -use Micro\Plugin\Http\Exception\RouteNotFoundException; +use Micro\Plugin\HttpCore\Exception\RouteNotFoundException; /** * @author Stanislau Komar diff --git a/src/Business/Locator/RouteLocatorFactory.php b/Business/Locator/RouteLocatorFactory.php similarity index 86% rename from src/Business/Locator/RouteLocatorFactory.php rename to Business/Locator/RouteLocatorFactory.php index 8a35588..adf96b5 100644 --- a/src/Business/Locator/RouteLocatorFactory.php +++ b/Business/Locator/RouteLocatorFactory.php @@ -11,11 +11,11 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Locator; +namespace Micro\Plugin\HttpCore\Business\Locator; use Micro\Framework\Kernel\KernelInterface; -use Micro\Plugin\Http\Configuration\HttpCorePluginConfigurationInterface; -use Micro\Plugin\Http\Plugin\HttpRouteLocatorPluginInterface; +use Micro\Plugin\HttpCore\Configuration\HttpCorePluginConfigurationInterface; +use Micro\Plugin\HttpCore\Plugin\HttpRouteLocatorPluginInterface; /** * @author Stanislau Komar diff --git a/src/Business/Locator/RouteLocatorFactoryInterface.php b/Business/Locator/RouteLocatorFactoryInterface.php similarity index 90% rename from src/Business/Locator/RouteLocatorFactoryInterface.php rename to Business/Locator/RouteLocatorFactoryInterface.php index 774bbc5..5819e0f 100644 --- a/src/Business/Locator/RouteLocatorFactoryInterface.php +++ b/Business/Locator/RouteLocatorFactoryInterface.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Locator; +namespace Micro\Plugin\HttpCore\Business\Locator; /** * @author Stanislau Komar diff --git a/src/Business/Locator/RouteLocatorInterface.php b/Business/Locator/RouteLocatorInterface.php similarity index 81% rename from src/Business/Locator/RouteLocatorInterface.php rename to Business/Locator/RouteLocatorInterface.php index cb9333d..eb8649f 100644 --- a/src/Business/Locator/RouteLocatorInterface.php +++ b/Business/Locator/RouteLocatorInterface.php @@ -11,9 +11,9 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Locator; +namespace Micro\Plugin\HttpCore\Business\Locator; -use Micro\Plugin\Http\Business\Route\RouteInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteInterface; /** * @author Stanislau Komar diff --git a/src/Business/Matcher/Route/Matchers/MethodMatcher.php b/Business/Matcher/Route/Matchers/MethodMatcher.php similarity index 73% rename from src/Business/Matcher/Route/Matchers/MethodMatcher.php rename to Business/Matcher/Route/Matchers/MethodMatcher.php index d66bcdb..eff2835 100644 --- a/src/Business/Matcher/Route/Matchers/MethodMatcher.php +++ b/Business/Matcher/Route/Matchers/MethodMatcher.php @@ -11,10 +11,10 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Matcher\Route\Matchers; +namespace Micro\Plugin\HttpCore\Business\Matcher\Route\Matchers; -use Micro\Plugin\Http\Business\Matcher\Route\RouteMatcherInterface; -use Micro\Plugin\Http\Business\Route\RouteInterface; +use Micro\Plugin\HttpCore\Business\Matcher\Route\RouteMatcherInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteInterface; use Symfony\Component\HttpFoundation\Request; /** @@ -22,9 +22,6 @@ */ class MethodMatcher implements RouteMatcherInterface { - /** - * {@inheritDoc} - */ public function match(RouteInterface $route, Request $request): bool { return \in_array(mb_strtoupper($request->getMethod()), $route->getMethods()); diff --git a/src/Business/Matcher/Route/Matchers/UriMatcher.php b/Business/Matcher/Route/Matchers/UriMatcher.php similarity index 84% rename from src/Business/Matcher/Route/Matchers/UriMatcher.php rename to Business/Matcher/Route/Matchers/UriMatcher.php index a724954..330a4de 100644 --- a/src/Business/Matcher/Route/Matchers/UriMatcher.php +++ b/Business/Matcher/Route/Matchers/UriMatcher.php @@ -11,10 +11,10 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Matcher\Route\Matchers; +namespace Micro\Plugin\HttpCore\Business\Matcher\Route\Matchers; -use Micro\Plugin\Http\Business\Matcher\Route\RouteMatcherInterface; -use Micro\Plugin\Http\Business\Route\RouteInterface; +use Micro\Plugin\HttpCore\Business\Matcher\Route\RouteMatcherInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteInterface; use Symfony\Component\HttpFoundation\Request; /** @@ -22,9 +22,6 @@ */ class UriMatcher implements RouteMatcherInterface { - /** - * {@inheritDoc} - */ public function match(RouteInterface $route, Request $request): bool { $pathInfo = $request->getPathInfo(); diff --git a/src/Business/Matcher/Route/RouteMatcher.php b/Business/Matcher/Route/RouteMatcher.php similarity index 88% rename from src/Business/Matcher/Route/RouteMatcher.php rename to Business/Matcher/Route/RouteMatcher.php index a5b64db..d9da246 100644 --- a/src/Business/Matcher/Route/RouteMatcher.php +++ b/Business/Matcher/Route/RouteMatcher.php @@ -11,9 +11,9 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Matcher\Route; +namespace Micro\Plugin\HttpCore\Business\Matcher\Route; -use Micro\Plugin\Http\Business\Route\RouteInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteInterface; use Symfony\Component\HttpFoundation\Request; /** diff --git a/src/Business/Matcher/Route/RouteMatcherFactory.php b/Business/Matcher/Route/RouteMatcherFactory.php similarity index 74% rename from src/Business/Matcher/Route/RouteMatcherFactory.php rename to Business/Matcher/Route/RouteMatcherFactory.php index a4f52fe..964a906 100644 --- a/src/Business/Matcher/Route/RouteMatcherFactory.php +++ b/Business/Matcher/Route/RouteMatcherFactory.php @@ -11,10 +11,10 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Matcher\Route; +namespace Micro\Plugin\HttpCore\Business\Matcher\Route; -use Micro\Plugin\Http\Business\Matcher\Route\Matchers\MethodMatcher; -use Micro\Plugin\Http\Business\Matcher\Route\Matchers\UriMatcher; +use Micro\Plugin\HttpCore\Business\Matcher\Route\Matchers\MethodMatcher; +use Micro\Plugin\HttpCore\Business\Matcher\Route\Matchers\UriMatcher; /** * @author Stanislau Komar diff --git a/src/Business/Matcher/Route/RouteMatcherFactoryInterface.php b/Business/Matcher/Route/RouteMatcherFactoryInterface.php similarity index 88% rename from src/Business/Matcher/Route/RouteMatcherFactoryInterface.php rename to Business/Matcher/Route/RouteMatcherFactoryInterface.php index dc9ed84..aad42ed 100644 --- a/src/Business/Matcher/Route/RouteMatcherFactoryInterface.php +++ b/Business/Matcher/Route/RouteMatcherFactoryInterface.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Matcher\Route; +namespace Micro\Plugin\HttpCore\Business\Matcher\Route; /** * @author Stanislau Komar diff --git a/src/Business/Matcher/Route/RouteMatcherInterface.php b/Business/Matcher/Route/RouteMatcherInterface.php similarity index 81% rename from src/Business/Matcher/Route/RouteMatcherInterface.php rename to Business/Matcher/Route/RouteMatcherInterface.php index 20f8154..d3fd5c0 100644 --- a/src/Business/Matcher/Route/RouteMatcherInterface.php +++ b/Business/Matcher/Route/RouteMatcherInterface.php @@ -11,9 +11,9 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Matcher\Route; +namespace Micro\Plugin\HttpCore\Business\Matcher\Route; -use Micro\Plugin\Http\Business\Route\RouteInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteInterface; use Symfony\Component\HttpFoundation\Request; /** diff --git a/src/Business/Matcher/UrlMatcher.php b/Business/Matcher/UrlMatcher.php similarity index 76% rename from src/Business/Matcher/UrlMatcher.php rename to Business/Matcher/UrlMatcher.php index 9b95358..1e23708 100644 --- a/src/Business/Matcher/UrlMatcher.php +++ b/Business/Matcher/UrlMatcher.php @@ -11,12 +11,12 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Matcher; +namespace Micro\Plugin\HttpCore\Business\Matcher; -use Micro\Plugin\Http\Business\Matcher\Route\RouteMatcherInterface; -use Micro\Plugin\Http\Business\Route\RouteCollectionInterface; -use Micro\Plugin\Http\Business\Route\RouteInterface; -use Micro\Plugin\Http\Exception\HttpNotFoundException; +use Micro\Plugin\HttpCore\Business\Matcher\Route\RouteMatcherInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteCollectionInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteInterface; +use Micro\Plugin\HttpCore\Exception\HttpNotFoundException; use Symfony\Component\HttpFoundation\Request; /** diff --git a/src/Business/Matcher/UrlMatcherFactory.php b/Business/Matcher/UrlMatcherFactory.php similarity index 80% rename from src/Business/Matcher/UrlMatcherFactory.php rename to Business/Matcher/UrlMatcherFactory.php index 0d66dea..374edb9 100644 --- a/src/Business/Matcher/UrlMatcherFactory.php +++ b/Business/Matcher/UrlMatcherFactory.php @@ -11,10 +11,10 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Matcher; +namespace Micro\Plugin\HttpCore\Business\Matcher; -use Micro\Plugin\Http\Business\Matcher\Route\RouteMatcherFactoryInterface; -use Micro\Plugin\Http\Business\Route\RouteCollectionFactoryInterface; +use Micro\Plugin\HttpCore\Business\Matcher\Route\RouteMatcherFactoryInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteCollectionFactoryInterface; /** * @author Stanislau Komar diff --git a/src/Business/Matcher/UrlMatcherFactoryInterface.php b/Business/Matcher/UrlMatcherFactoryInterface.php similarity index 89% rename from src/Business/Matcher/UrlMatcherFactoryInterface.php rename to Business/Matcher/UrlMatcherFactoryInterface.php index 91e5acf..0190a56 100644 --- a/src/Business/Matcher/UrlMatcherFactoryInterface.php +++ b/Business/Matcher/UrlMatcherFactoryInterface.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Matcher; +namespace Micro\Plugin\HttpCore\Business\Matcher; /** * @author Stanislau Komar diff --git a/src/Business/Matcher/UrlMatcherInterface.php b/Business/Matcher/UrlMatcherInterface.php similarity index 76% rename from src/Business/Matcher/UrlMatcherInterface.php rename to Business/Matcher/UrlMatcherInterface.php index 5642372..6b63ceb 100644 --- a/src/Business/Matcher/UrlMatcherInterface.php +++ b/Business/Matcher/UrlMatcherInterface.php @@ -11,10 +11,10 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Matcher; +namespace Micro\Plugin\HttpCore\Business\Matcher; -use Micro\Plugin\Http\Business\Route\RouteInterface; -use Micro\Plugin\Http\Exception\HttpException; +use Micro\Plugin\HttpCore\Business\Route\RouteInterface; +use Micro\Plugin\HttpCore\Exception\HttpException; use Symfony\Component\HttpFoundation\Request; /** diff --git a/src/Business/Response/Callback/ResponseCallback.php b/Business/Response/Callback/ResponseCallback.php similarity index 92% rename from src/Business/Response/Callback/ResponseCallback.php rename to Business/Response/Callback/ResponseCallback.php index 5008157..26804ca 100644 --- a/src/Business/Response/Callback/ResponseCallback.php +++ b/Business/Response/Callback/ResponseCallback.php @@ -11,11 +11,11 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Response\Callback; +namespace Micro\Plugin\HttpCore\Business\Response\Callback; use Micro\Component\DependencyInjection\Autowire\AutowireHelperInterface; -use Micro\Plugin\Http\Business\Route\RouteInterface; -use Micro\Plugin\Http\Exception\RouteInvalidConfigurationException; +use Micro\Plugin\HttpCore\Business\Route\RouteInterface; +use Micro\Plugin\HttpCore\Exception\RouteInvalidConfigurationException; /** * @author Stanislau Komar diff --git a/src/Business/Response/Callback/ResponseCallbackFactory.php b/Business/Response/Callback/ResponseCallbackFactory.php similarity index 87% rename from src/Business/Response/Callback/ResponseCallbackFactory.php rename to Business/Response/Callback/ResponseCallbackFactory.php index 6c77f12..3f854e7 100644 --- a/src/Business/Response/Callback/ResponseCallbackFactory.php +++ b/Business/Response/Callback/ResponseCallbackFactory.php @@ -11,10 +11,10 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Response\Callback; +namespace Micro\Plugin\HttpCore\Business\Response\Callback; use Micro\Component\DependencyInjection\Autowire\AutowireHelperFactoryInterface; -use Micro\Plugin\Http\Business\Route\RouteInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteInterface; /** * @author Stanislau Komar diff --git a/src/Business/Response/Callback/ResponseCallbackFactoryInterface.php b/Business/Response/Callback/ResponseCallbackFactoryInterface.php similarity index 79% rename from src/Business/Response/Callback/ResponseCallbackFactoryInterface.php rename to Business/Response/Callback/ResponseCallbackFactoryInterface.php index 56c28d2..a97ff68 100644 --- a/src/Business/Response/Callback/ResponseCallbackFactoryInterface.php +++ b/Business/Response/Callback/ResponseCallbackFactoryInterface.php @@ -11,9 +11,9 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Response\Callback; +namespace Micro\Plugin\HttpCore\Business\Response\Callback; -use Micro\Plugin\Http\Business\Route\RouteInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteInterface; /** * @author Stanislau Komar diff --git a/src/Business/Response/Callback/ResponseCallbackInterface.php b/Business/Response/Callback/ResponseCallbackInterface.php similarity index 74% rename from src/Business/Response/Callback/ResponseCallbackInterface.php rename to Business/Response/Callback/ResponseCallbackInterface.php index 6984bb0..d0f68b8 100644 --- a/src/Business/Response/Callback/ResponseCallbackInterface.php +++ b/Business/Response/Callback/ResponseCallbackInterface.php @@ -11,10 +11,10 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Response\Callback; +namespace Micro\Plugin\HttpCore\Business\Response\Callback; -use Micro\Plugin\Http\Exception\HttpException; -use Micro\Plugin\Http\Exception\ResponseInvalidException; +use Micro\Plugin\HttpCore\Exception\HttpException; +use Micro\Plugin\HttpCore\Exception\ResponseInvalidException; /** * @author Stanislau Komar diff --git a/src/Business/Response/Transformer/ResponseTransformer.php b/Business/Response/Transformer/ResponseTransformer.php similarity index 95% rename from src/Business/Response/Transformer/ResponseTransformer.php rename to Business/Response/Transformer/ResponseTransformer.php index bfa814c..230afad 100644 --- a/src/Business/Response/Transformer/ResponseTransformer.php +++ b/Business/Response/Transformer/ResponseTransformer.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Response\Transformer; +namespace Micro\Plugin\HttpCore\Business\Response\Transformer; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; diff --git a/src/Business/Response/Transformer/ResponseTransformerFactory.php b/Business/Response/Transformer/ResponseTransformerFactory.php similarity index 88% rename from src/Business/Response/Transformer/ResponseTransformerFactory.php rename to Business/Response/Transformer/ResponseTransformerFactory.php index 16ecff4..3c75e7d 100644 --- a/src/Business/Response/Transformer/ResponseTransformerFactory.php +++ b/Business/Response/Transformer/ResponseTransformerFactory.php @@ -11,10 +11,10 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Response\Transformer; +namespace Micro\Plugin\HttpCore\Business\Response\Transformer; use Micro\Framework\Kernel\KernelInterface; -use Micro\Plugin\Http\Plugin\HttpResponseTransformerPlugin; +use Micro\Plugin\HttpCore\Plugin\HttpResponseTransformerPlugin; /** * @author Stanislau Komar diff --git a/src/Business/Response/Transformer/ResponseTransformerFactoryInterface.php b/Business/Response/Transformer/ResponseTransformerFactoryInterface.php similarity index 87% rename from src/Business/Response/Transformer/ResponseTransformerFactoryInterface.php rename to Business/Response/Transformer/ResponseTransformerFactoryInterface.php index 38a9872..73f0026 100644 --- a/src/Business/Response/Transformer/ResponseTransformerFactoryInterface.php +++ b/Business/Response/Transformer/ResponseTransformerFactoryInterface.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Response\Transformer; +namespace Micro\Plugin\HttpCore\Business\Response\Transformer; /** * @author Stanislau Komar diff --git a/src/Business/Response/Transformer/ResponseTransformerInterface.php b/Business/Response/Transformer/ResponseTransformerInterface.php similarity index 89% rename from src/Business/Response/Transformer/ResponseTransformerInterface.php rename to Business/Response/Transformer/ResponseTransformerInterface.php index 2012720..e9f7736 100644 --- a/src/Business/Response/Transformer/ResponseTransformerInterface.php +++ b/Business/Response/Transformer/ResponseTransformerInterface.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Response\Transformer; +namespace Micro\Plugin\HttpCore\Business\Response\Transformer; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; diff --git a/src/Business/Route/Route.php b/Business/Route/Route.php similarity index 81% rename from src/Business/Route/Route.php rename to Business/Route/Route.php index 0982645..d21002c 100644 --- a/src/Business/Route/Route.php +++ b/Business/Route/Route.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Route; +namespace Micro\Plugin\HttpCore\Business\Route; /** * @author Stanislau Komar @@ -20,8 +20,8 @@ { /** * @param array|class-string|\Closure|object $controller - * @param string|null $pattern - * @param array|null $parameters + * @param array $methods + * @param array|null $parameters * * @phpstan-ignore-next-line */ @@ -35,9 +35,6 @@ public function __construct( ) { } - /** - * {@inheritDoc} - */ public function getUri(): string { return $this->uri; @@ -59,17 +56,11 @@ public function getMethods(): array return $this->methods; } - /** - * {@inheritDoc} - */ public function getName(): string|null { return $this->name; } - /** - * {@inheritDoc} - */ public function getPattern(): string|null { return $this->pattern; diff --git a/src/Business/Route/RouteBuilder.php b/Business/Route/RouteBuilder.php similarity index 97% rename from src/Business/Route/RouteBuilder.php rename to Business/Route/RouteBuilder.php index 98d0d98..6015cf4 100644 --- a/src/Business/Route/RouteBuilder.php +++ b/Business/Route/RouteBuilder.php @@ -11,9 +11,9 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Route; +namespace Micro\Plugin\HttpCore\Business\Route; -use Micro\Plugin\Http\Exception\RouteInvalidConfigurationException; +use Micro\Plugin\HttpCore\Exception\RouteInvalidConfigurationException; /** * @author Stanislau Komar diff --git a/src/Business/Route/RouteBuilderFactory.php b/Business/Route/RouteBuilderFactory.php similarity index 91% rename from src/Business/Route/RouteBuilderFactory.php rename to Business/Route/RouteBuilderFactory.php index 0391a6a..a7359fa 100644 --- a/src/Business/Route/RouteBuilderFactory.php +++ b/Business/Route/RouteBuilderFactory.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Route; +namespace Micro\Plugin\HttpCore\Business\Route; /** * @author Stanislau Komar diff --git a/src/Business/Route/RouteBuilderFactoryInterface.php b/Business/Route/RouteBuilderFactoryInterface.php similarity index 89% rename from src/Business/Route/RouteBuilderFactoryInterface.php rename to Business/Route/RouteBuilderFactoryInterface.php index 2d43f46..321f463 100644 --- a/src/Business/Route/RouteBuilderFactoryInterface.php +++ b/Business/Route/RouteBuilderFactoryInterface.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Route; +namespace Micro\Plugin\HttpCore\Business\Route; /** * @author Stanislau Komar diff --git a/src/Business/Route/RouteBuilderInterface.php b/Business/Route/RouteBuilderInterface.php similarity index 90% rename from src/Business/Route/RouteBuilderInterface.php rename to Business/Route/RouteBuilderInterface.php index 5b74517..c5ef3e5 100644 --- a/src/Business/Route/RouteBuilderInterface.php +++ b/Business/Route/RouteBuilderInterface.php @@ -11,9 +11,9 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Route; +namespace Micro\Plugin\HttpCore\Business\Route; -use Micro\Plugin\Http\Exception\RouteInvalidConfigurationException; +use Micro\Plugin\HttpCore\Exception\RouteInvalidConfigurationException; /** * @author Stanislau Komar diff --git a/src/Business/Route/RouteCollection.php b/Business/Route/RouteCollection.php similarity index 94% rename from src/Business/Route/RouteCollection.php rename to Business/Route/RouteCollection.php index 608eee2..e7ba35d 100644 --- a/src/Business/Route/RouteCollection.php +++ b/Business/Route/RouteCollection.php @@ -11,10 +11,10 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Route; +namespace Micro\Plugin\HttpCore\Business\Route; -use Micro\Plugin\Http\Exception\RouteAlreadyDeclaredException; -use Micro\Plugin\Http\Exception\RouteNotFoundException; +use Micro\Plugin\HttpCore\Exception\RouteAlreadyDeclaredException; +use Micro\Plugin\HttpCore\Exception\RouteNotFoundException; /** * @author Stanislau Komar diff --git a/src/Business/Route/RouteCollectionFactory.php b/Business/Route/RouteCollectionFactory.php similarity index 89% rename from src/Business/Route/RouteCollectionFactory.php rename to Business/Route/RouteCollectionFactory.php index 504211a..69d1fd3 100644 --- a/src/Business/Route/RouteCollectionFactory.php +++ b/Business/Route/RouteCollectionFactory.php @@ -11,9 +11,9 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Route; +namespace Micro\Plugin\HttpCore\Business\Route; -use Micro\Plugin\Http\Business\Locator\RouteLocatorFactoryInterface; +use Micro\Plugin\HttpCore\Business\Locator\RouteLocatorFactoryInterface; /** * @author Stanislau Komar diff --git a/src/Business/Route/RouteCollectionFactoryInterface.php b/Business/Route/RouteCollectionFactoryInterface.php similarity index 90% rename from src/Business/Route/RouteCollectionFactoryInterface.php rename to Business/Route/RouteCollectionFactoryInterface.php index 6fa08ee..d8dfe9e 100644 --- a/src/Business/Route/RouteCollectionFactoryInterface.php +++ b/Business/Route/RouteCollectionFactoryInterface.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Route; +namespace Micro\Plugin\HttpCore\Business\Route; /** * @author Stanislau Komar diff --git a/src/Business/Route/RouteCollectionInterface.php b/Business/Route/RouteCollectionInterface.php similarity index 86% rename from src/Business/Route/RouteCollectionInterface.php rename to Business/Route/RouteCollectionInterface.php index 5b6e120..a67cd1b 100644 --- a/src/Business/Route/RouteCollectionInterface.php +++ b/Business/Route/RouteCollectionInterface.php @@ -11,10 +11,10 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Route; +namespace Micro\Plugin\HttpCore\Business\Route; -use Micro\Plugin\Http\Exception\RouteAlreadyDeclaredException; -use Micro\Plugin\Http\Exception\RouteNotFoundException; +use Micro\Plugin\HttpCore\Exception\RouteAlreadyDeclaredException; +use Micro\Plugin\HttpCore\Exception\RouteNotFoundException; /** * @author Stanislau Komar diff --git a/src/Business/Route/RouteInterface.php b/Business/Route/RouteInterface.php similarity index 94% rename from src/Business/Route/RouteInterface.php rename to Business/Route/RouteInterface.php index e6995ac..7869902 100644 --- a/src/Business/Route/RouteInterface.php +++ b/Business/Route/RouteInterface.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Business\Route; +namespace Micro\Plugin\HttpCore\Business\Route; /** * @author Stanislau Komar diff --git a/src/Configuration/HttpCorePluginConfigurationInterface.php b/Configuration/HttpCorePluginConfigurationInterface.php similarity index 90% rename from src/Configuration/HttpCorePluginConfigurationInterface.php rename to Configuration/HttpCorePluginConfigurationInterface.php index a4670b5..a5c0609 100644 --- a/src/Configuration/HttpCorePluginConfigurationInterface.php +++ b/Configuration/HttpCorePluginConfigurationInterface.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Configuration; +namespace Micro\Plugin\HttpCore\Configuration; /** * @author Stanislau Komar diff --git a/src/Exception/HttpBadRequestException.php b/Exception/HttpBadRequestException.php similarity index 93% rename from src/Exception/HttpBadRequestException.php rename to Exception/HttpBadRequestException.php index 15b3c1a..71608c5 100644 --- a/src/Exception/HttpBadRequestException.php +++ b/Exception/HttpBadRequestException.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Exception; +namespace Micro\Plugin\HttpCore\Exception; /** * @author Stanislau Komar diff --git a/src/Exception/HttpException.php b/Exception/HttpException.php similarity index 93% rename from src/Exception/HttpException.php rename to Exception/HttpException.php index 8428073..c1724f1 100644 --- a/src/Exception/HttpException.php +++ b/Exception/HttpException.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Exception; +namespace Micro\Plugin\HttpCore\Exception; /** * @author Stanislau Komar diff --git a/src/Exception/HttpForbiddenException.php b/Exception/HttpForbiddenException.php similarity index 92% rename from src/Exception/HttpForbiddenException.php rename to Exception/HttpForbiddenException.php index effc77d..03e112f 100644 --- a/src/Exception/HttpForbiddenException.php +++ b/Exception/HttpForbiddenException.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Exception; +namespace Micro\Plugin\HttpCore\Exception; /** * @author Stanislau Komar diff --git a/src/Exception/HttpInternalServerException.php b/Exception/HttpInternalServerException.php similarity index 92% rename from src/Exception/HttpInternalServerException.php rename to Exception/HttpInternalServerException.php index 84db8ea..90d4bd9 100644 --- a/src/Exception/HttpInternalServerException.php +++ b/Exception/HttpInternalServerException.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Exception; +namespace Micro\Plugin\HttpCore\Exception; /** * @author Stanislau Komar diff --git a/src/Exception/HttpNotFoundException.php b/Exception/HttpNotFoundException.php similarity index 92% rename from src/Exception/HttpNotFoundException.php rename to Exception/HttpNotFoundException.php index 7395c0f..e3a5956 100644 --- a/src/Exception/HttpNotFoundException.php +++ b/Exception/HttpNotFoundException.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Exception; +namespace Micro\Plugin\HttpCore\Exception; /** * @author Stanislau Komar diff --git a/src/Exception/HttpUnauthorizedException.php b/Exception/HttpUnauthorizedException.php similarity index 92% rename from src/Exception/HttpUnauthorizedException.php rename to Exception/HttpUnauthorizedException.php index dda1e8b..46f9344 100644 --- a/src/Exception/HttpUnauthorizedException.php +++ b/Exception/HttpUnauthorizedException.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Exception; +namespace Micro\Plugin\HttpCore\Exception; /** * @author Stanislau Komar diff --git a/src/Exception/ResponseInvalidException.php b/Exception/ResponseInvalidException.php similarity index 94% rename from src/Exception/ResponseInvalidException.php rename to Exception/ResponseInvalidException.php index d6bc9ee..6638b1e 100644 --- a/src/Exception/ResponseInvalidException.php +++ b/Exception/ResponseInvalidException.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Exception; +namespace Micro\Plugin\HttpCore\Exception; /** * @author Stanislau Komar diff --git a/src/Exception/RouteAlreadyDeclaredException.php b/Exception/RouteAlreadyDeclaredException.php similarity index 93% rename from src/Exception/RouteAlreadyDeclaredException.php rename to Exception/RouteAlreadyDeclaredException.php index 3965803..abad645 100644 --- a/src/Exception/RouteAlreadyDeclaredException.php +++ b/Exception/RouteAlreadyDeclaredException.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Exception; +namespace Micro\Plugin\HttpCore\Exception; /** * @author Stanislau Komar diff --git a/src/Exception/RouteConfigurationException.php b/Exception/RouteConfigurationException.php similarity index 90% rename from src/Exception/RouteConfigurationException.php rename to Exception/RouteConfigurationException.php index 6868698..d20e1cb 100644 --- a/src/Exception/RouteConfigurationException.php +++ b/Exception/RouteConfigurationException.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Exception; +namespace Micro\Plugin\HttpCore\Exception; /** * @author Stanislau Komar diff --git a/src/Exception/RouteInvalidConfigurationException.php b/Exception/RouteInvalidConfigurationException.php similarity index 96% rename from src/Exception/RouteInvalidConfigurationException.php rename to Exception/RouteInvalidConfigurationException.php index 5d79ca8..c239d02 100644 --- a/src/Exception/RouteInvalidConfigurationException.php +++ b/Exception/RouteInvalidConfigurationException.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Exception; +namespace Micro\Plugin\HttpCore\Exception; /** * @author Stanislau Komar diff --git a/src/Exception/RouteLocatorNotException.php b/Exception/RouteLocatorNotException.php similarity index 89% rename from src/Exception/RouteLocatorNotException.php rename to Exception/RouteLocatorNotException.php index 3027aea..e746f26 100644 --- a/src/Exception/RouteLocatorNotException.php +++ b/Exception/RouteLocatorNotException.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Exception; +namespace Micro\Plugin\HttpCore\Exception; /** * @author Stanislau Komar diff --git a/src/Exception/RouteNotFoundException.php b/Exception/RouteNotFoundException.php similarity index 89% rename from src/Exception/RouteNotFoundException.php rename to Exception/RouteNotFoundException.php index 6e009b1..5e2c8da 100644 --- a/src/Exception/RouteNotFoundException.php +++ b/Exception/RouteNotFoundException.php @@ -11,9 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Exception; - -use phpDocumentor\Reflection\DocBlock\Tags\Throws; +namespace Micro\Plugin\HttpCore\Exception; /** * @author Stanislau Komar diff --git a/src/Facade/HttpFacade.php b/Facade/HttpFacade.php similarity index 79% rename from src/Facade/HttpFacade.php rename to Facade/HttpFacade.php index fed9aa0..df5b699 100644 --- a/src/Facade/HttpFacade.php +++ b/Facade/HttpFacade.php @@ -11,15 +11,15 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Facade; +namespace Micro\Plugin\HttpCore\Facade; -use Micro\Plugin\Http\Business\Executor\RouteExecutorFactoryInterface; -use Micro\Plugin\Http\Business\Generator\UrlGeneratorFactoryInterface; -use Micro\Plugin\Http\Business\Matcher\UrlMatcherFactoryInterface; -use Micro\Plugin\Http\Business\Route\RouteBuilderFactoryInterface; -use Micro\Plugin\Http\Business\Route\RouteBuilderInterface; -use Micro\Plugin\Http\Business\Route\RouteCollectionFactoryInterface; -use Micro\Plugin\Http\Business\Route\RouteInterface; +use Micro\Plugin\HttpCore\Business\Executor\RouteExecutorFactoryInterface; +use Micro\Plugin\HttpCore\Business\Generator\UrlGeneratorFactoryInterface; +use Micro\Plugin\HttpCore\Business\Matcher\UrlMatcherFactoryInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteBuilderFactoryInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteBuilderInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteCollectionFactoryInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; diff --git a/src/Facade/HttpFacadeInterface.php b/Facade/HttpFacadeInterface.php similarity index 66% rename from src/Facade/HttpFacadeInterface.php rename to Facade/HttpFacadeInterface.php index 8de96c0..9ed231e 100644 --- a/src/Facade/HttpFacadeInterface.php +++ b/Facade/HttpFacadeInterface.php @@ -11,12 +11,12 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Facade; +namespace Micro\Plugin\HttpCore\Facade; -use Micro\Plugin\Http\Business\Executor\RouteExecutorInterface; -use Micro\Plugin\Http\Business\Generator\UrlGeneratorInterface; -use Micro\Plugin\Http\Business\Matcher\UrlMatcherInterface; -use Micro\Plugin\Http\Business\Route\RouteBuilderInterface; +use Micro\Plugin\HttpCore\Business\Executor\RouteExecutorInterface; +use Micro\Plugin\HttpCore\Business\Generator\UrlGeneratorInterface; +use Micro\Plugin\HttpCore\Business\Matcher\UrlMatcherInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteBuilderInterface; /** * @author Stanislau Komar diff --git a/src/HttpCorePlugin.php b/HttpCorePlugin.php similarity index 67% rename from src/HttpCorePlugin.php rename to HttpCorePlugin.php index 39362bf..66859cd 100644 --- a/src/HttpCorePlugin.php +++ b/HttpCorePlugin.php @@ -11,37 +11,37 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http; +namespace Micro\Plugin\HttpCore; -use Micro\Component\DependencyInjection\Autowire\AutowireHelperFactory; -use Micro\Component\DependencyInjection\Autowire\AutowireHelperFactoryInterface; -use Micro\Component\DependencyInjection\Container; +use Micro\Framework\Autowire\AutowireHelperFactory; +use Micro\Framework\Autowire\AutowireHelperFactoryInterface; +use Micro\Framework\DependencyInjection\Container; use Micro\Framework\Kernel\KernelInterface; -use Micro\Framework\Kernel\Plugin\ConfigurableInterface; -use Micro\Framework\Kernel\Plugin\DependencyProviderInterface; -use Micro\Framework\Kernel\Plugin\PluginConfigurationTrait; -use Micro\Framework\Kernel\Plugin\PluginDependedInterface; -use Micro\Plugin\Http\Business\Executor\RouteExecutorFactory; -use Micro\Plugin\Http\Business\Executor\RouteExecutorFactoryInterface; -use Micro\Plugin\Http\Business\Generator\UrlGeneratorFactory; -use Micro\Plugin\Http\Business\Generator\UrlGeneratorFactoryInterface; -use Micro\Plugin\Http\Business\Locator\RouteLocatorFactory; -use Micro\Plugin\Http\Business\Locator\RouteLocatorFactoryInterface; -use Micro\Plugin\Http\Business\Matcher\Route\RouteMatcherFactory; -use Micro\Plugin\Http\Business\Matcher\Route\RouteMatcherFactoryInterface; -use Micro\Plugin\Http\Business\Matcher\UrlMatcherFactory; -use Micro\Plugin\Http\Business\Matcher\UrlMatcherFactoryInterface; -use Micro\Plugin\Http\Business\Response\Callback\ResponseCallbackFactory; -use Micro\Plugin\Http\Business\Response\Callback\ResponseCallbackFactoryInterface; -use Micro\Plugin\Http\Business\Response\Transformer\ResponseTransformerFactory; -use Micro\Plugin\Http\Business\Response\Transformer\ResponseTransformerFactoryInterface; -use Micro\Plugin\Http\Business\Route\RouteBuilderFactory; -use Micro\Plugin\Http\Business\Route\RouteBuilderFactoryInterface; -use Micro\Plugin\Http\Business\Route\RouteCollectionFactory; -use Micro\Plugin\Http\Business\Route\RouteCollectionFactoryInterface; -use Micro\Plugin\Http\Configuration\HttpCorePluginConfigurationInterface; -use Micro\Plugin\Http\Facade\HttpFacade; -use Micro\Plugin\Http\Facade\HttpFacadeInterface; +use Micro\Framework\BootConfiguration\Plugin\ConfigurableInterface; +use Micro\Framework\BootDependency\Plugin\DependencyProviderInterface; +use Micro\Framework\BootConfiguration\Plugin\PluginConfigurationTrait; +use Micro\Framework\BootPluginDependent\Plugin\PluginDependedInterface; +use Micro\Plugin\HttpCore\Business\Executor\RouteExecutorFactory; +use Micro\Plugin\HttpCore\Business\Executor\RouteExecutorFactoryInterface; +use Micro\Plugin\HttpCore\Business\Generator\UrlGeneratorFactory; +use Micro\Plugin\HttpCore\Business\Generator\UrlGeneratorFactoryInterface; +use Micro\Plugin\HttpCore\Business\Locator\RouteLocatorFactory; +use Micro\Plugin\HttpCore\Business\Locator\RouteLocatorFactoryInterface; +use Micro\Plugin\HttpCore\Business\Matcher\Route\RouteMatcherFactory; +use Micro\Plugin\HttpCore\Business\Matcher\Route\RouteMatcherFactoryInterface; +use Micro\Plugin\HttpCore\Business\Matcher\UrlMatcherFactory; +use Micro\Plugin\HttpCore\Business\Matcher\UrlMatcherFactoryInterface; +use Micro\Plugin\HttpCore\Business\Response\Callback\ResponseCallbackFactory; +use Micro\Plugin\HttpCore\Business\Response\Callback\ResponseCallbackFactoryInterface; +use Micro\Plugin\HttpCore\Business\Response\Transformer\ResponseTransformerFactory; +use Micro\Plugin\HttpCore\Business\Response\Transformer\ResponseTransformerFactoryInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteBuilderFactory; +use Micro\Plugin\HttpCore\Business\Route\RouteBuilderFactoryInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteCollectionFactory; +use Micro\Plugin\HttpCore\Business\Route\RouteCollectionFactoryInterface; +use Micro\Plugin\HttpCore\Configuration\HttpCorePluginConfigurationInterface; +use Micro\Plugin\HttpCore\Facade\HttpFacade; +use Micro\Plugin\HttpCore\Facade\HttpFacadeInterface; use Micro\Plugin\Locator\LocatorPlugin; /** diff --git a/src/HttpCorePluginConfiguration.php b/HttpCorePluginConfiguration.php similarity index 80% rename from src/HttpCorePluginConfiguration.php rename to HttpCorePluginConfiguration.php index 78a4834..66c6be8 100644 --- a/src/HttpCorePluginConfiguration.php +++ b/HttpCorePluginConfiguration.php @@ -11,10 +11,10 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http; +namespace Micro\Plugin\HttpCore; -use Micro\Framework\Kernel\Configuration\PluginConfiguration; -use Micro\Plugin\Http\Configuration\HttpCorePluginConfigurationInterface; +use Micro\Framework\BootConfiguration\Configuration\PluginConfiguration; +use Micro\Plugin\HttpCore\Configuration\HttpCorePluginConfigurationInterface; /** * @author Stanislau Komar diff --git a/src/Plugin/HttpResponseTransformerPlugin.php b/Plugin/HttpResponseTransformerPlugin.php similarity index 79% rename from src/Plugin/HttpResponseTransformerPlugin.php rename to Plugin/HttpResponseTransformerPlugin.php index fa97db5..3f9299e 100644 --- a/src/Plugin/HttpResponseTransformerPlugin.php +++ b/Plugin/HttpResponseTransformerPlugin.php @@ -11,9 +11,9 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Plugin; +namespace Micro\Plugin\HttpCore\Plugin; -use Micro\Plugin\Http\Business\Response\Transformer\ResponseTransformerInterface; +use Micro\Plugin\HttpCore\Business\Response\Transformer\ResponseTransformerInterface; /** * @author Stanislau Komar diff --git a/src/Plugin/HttpRouteLocatorPluginInterface.php b/Plugin/HttpRouteLocatorPluginInterface.php similarity index 82% rename from src/Plugin/HttpRouteLocatorPluginInterface.php rename to Plugin/HttpRouteLocatorPluginInterface.php index 59fc1d5..0311656 100644 --- a/src/Plugin/HttpRouteLocatorPluginInterface.php +++ b/Plugin/HttpRouteLocatorPluginInterface.php @@ -11,9 +11,9 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Plugin; +namespace Micro\Plugin\HttpCore\Plugin; -use Micro\Plugin\Http\Business\Locator\RouteLocatorInterface; +use Micro\Plugin\HttpCore\Business\Locator\RouteLocatorInterface; /** * @author Stanislau Komar diff --git a/tests/Unit/Business/Executor/RouteExecutorFactoryTest.php b/Tests/Unit/Business/Executor/RouteExecutorFactoryTest.php similarity index 62% rename from tests/Unit/Business/Executor/RouteExecutorFactoryTest.php rename to Tests/Unit/Business/Executor/RouteExecutorFactoryTest.php index d04c0f8..ad6eed6 100644 --- a/tests/Unit/Business/Executor/RouteExecutorFactoryTest.php +++ b/Tests/Unit/Business/Executor/RouteExecutorFactoryTest.php @@ -9,14 +9,14 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Business\Executor; +namespace Micro\Plugin\HttpCore\Tests\Unit\Business\Executor; -use Micro\Component\DependencyInjection\ContainerRegistryInterface; -use Micro\Plugin\Http\Business\Executor\RouteExecutorFactory; -use Micro\Plugin\Http\Business\Executor\RouteExecutorInterface; -use Micro\Plugin\Http\Business\Matcher\UrlMatcherFactoryInterface; -use Micro\Plugin\Http\Business\Response\Callback\ResponseCallbackFactoryInterface; -use Micro\Plugin\Http\Business\Response\Transformer\ResponseTransformerFactoryInterface; +use Micro\Framework\DependencyInjection\ContainerRegistryInterface; +use Micro\Plugin\HttpCore\Business\Executor\RouteExecutorFactory; +use Micro\Plugin\HttpCore\Business\Executor\RouteExecutorInterface; +use Micro\Plugin\HttpCore\Business\Matcher\UrlMatcherFactoryInterface; +use Micro\Plugin\HttpCore\Business\Response\Callback\ResponseCallbackFactoryInterface; +use Micro\Plugin\HttpCore\Business\Response\Transformer\ResponseTransformerFactoryInterface; use PHPUnit\Framework\TestCase; class RouteExecutorFactoryTest extends TestCase diff --git a/tests/Unit/Business/Executor/RouteExecutorTest.php b/Tests/Unit/Business/Executor/RouteExecutorTest.php similarity index 82% rename from tests/Unit/Business/Executor/RouteExecutorTest.php rename to Tests/Unit/Business/Executor/RouteExecutorTest.php index 778bfad..7049900 100644 --- a/tests/Unit/Business/Executor/RouteExecutorTest.php +++ b/Tests/Unit/Business/Executor/RouteExecutorTest.php @@ -9,17 +9,17 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Business\Executor; +namespace Micro\Plugin\HttpCore\Tests\Unit\Business\Executor; -use Micro\Component\DependencyInjection\ContainerRegistryInterface; -use Micro\Plugin\Http\Business\Executor\RouteExecutor; -use Micro\Plugin\Http\Business\Matcher\UrlMatcherInterface; -use Micro\Plugin\Http\Business\Response\Callback\ResponseCallbackFactoryInterface; -use Micro\Plugin\Http\Business\Response\Callback\ResponseCallbackInterface; -use Micro\Plugin\Http\Business\Response\Transformer\ResponseTransformerFactoryInterface; -use Micro\Plugin\Http\Business\Route\RouteInterface; -use Micro\Plugin\Http\Exception\HttpException; -use Micro\Plugin\Http\Exception\ResponseInvalidException; +use Micro\Framework\DependencyInjection\ContainerRegistryInterface; +use Micro\Plugin\HttpCore\Business\Executor\RouteExecutor; +use Micro\Plugin\HttpCore\Business\Matcher\UrlMatcherInterface; +use Micro\Plugin\HttpCore\Business\Response\Callback\ResponseCallbackFactoryInterface; +use Micro\Plugin\HttpCore\Business\Response\Callback\ResponseCallbackInterface; +use Micro\Plugin\HttpCore\Business\Response\Transformer\ResponseTransformerFactoryInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteInterface; +use Micro\Plugin\HttpCore\Exception\HttpException; +use Micro\Plugin\HttpCore\Exception\ResponseInvalidException; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; diff --git a/tests/Unit/Business/Generator/UrlGeneratorFactoryTest.php b/Tests/Unit/Business/Generator/UrlGeneratorFactoryTest.php similarity index 69% rename from tests/Unit/Business/Generator/UrlGeneratorFactoryTest.php rename to Tests/Unit/Business/Generator/UrlGeneratorFactoryTest.php index 3128bb8..2395763 100644 --- a/tests/Unit/Business/Generator/UrlGeneratorFactoryTest.php +++ b/Tests/Unit/Business/Generator/UrlGeneratorFactoryTest.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Business\Generator; +namespace Micro\Plugin\HttpCore\Tests\Unit\Business\Generator; -use Micro\Plugin\Http\Business\Generator\UrlGeneratorFactory; -use Micro\Plugin\Http\Business\Generator\UrlGeneratorInterface; -use Micro\Plugin\Http\Business\Route\RouteCollectionFactoryInterface; +use Micro\Plugin\HttpCore\Business\Generator\UrlGeneratorFactory; +use Micro\Plugin\HttpCore\Business\Generator\UrlGeneratorInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteCollectionFactoryInterface; use PHPUnit\Framework\TestCase; class UrlGeneratorFactoryTest extends TestCase diff --git a/tests/Unit/Business/Generator/UrlGeneratorTest.php b/Tests/Unit/Business/Generator/UrlGeneratorTest.php similarity index 88% rename from tests/Unit/Business/Generator/UrlGeneratorTest.php rename to Tests/Unit/Business/Generator/UrlGeneratorTest.php index ee058aa..64137ba 100644 --- a/tests/Unit/Business/Generator/UrlGeneratorTest.php +++ b/Tests/Unit/Business/Generator/UrlGeneratorTest.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Business\Generator; +namespace Micro\Plugin\HttpCore\Tests\Unit\Business\Generator; -use Micro\Plugin\Http\Business\Generator\UrlGenerator; -use Micro\Plugin\Http\Business\Route\RouteCollectionInterface; -use Micro\Plugin\Http\Business\Route\RouteInterface; +use Micro\Plugin\HttpCore\Business\Generator\UrlGenerator; +use Micro\Plugin\HttpCore\Business\Route\RouteCollectionInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteInterface; use PHPUnit\Framework\TestCase; class UrlGeneratorTest extends TestCase diff --git a/tests/Unit/Business/Locator/RouteLocatorFactoryTest.php b/Tests/Unit/Business/Locator/RouteLocatorFactoryTest.php similarity index 87% rename from tests/Unit/Business/Locator/RouteLocatorFactoryTest.php rename to Tests/Unit/Business/Locator/RouteLocatorFactoryTest.php index 689e8c0..5f1498f 100644 --- a/tests/Unit/Business/Locator/RouteLocatorFactoryTest.php +++ b/Tests/Unit/Business/Locator/RouteLocatorFactoryTest.php @@ -9,13 +9,13 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Business\Locator; +namespace Micro\Plugin\HttpCore\Tests\Unit\Business\Locator; use Micro\Framework\Kernel\KernelInterface; -use Micro\Plugin\Http\Business\Locator\RouteLocatorFactory; -use Micro\Plugin\Http\Business\Locator\RouteLocatorInterface; -use Micro\Plugin\Http\Configuration\HttpCorePluginConfigurationInterface; -use Micro\Plugin\Http\Plugin\HttpRouteLocatorPluginInterface; +use Micro\Plugin\HttpCore\Business\Locator\RouteLocatorFactory; +use Micro\Plugin\HttpCore\Business\Locator\RouteLocatorInterface; +use Micro\Plugin\HttpCore\Configuration\HttpCorePluginConfigurationInterface; +use Micro\Plugin\HttpCore\Plugin\HttpRouteLocatorPluginInterface; use PHPUnit\Framework\TestCase; class RouteLocatorFactoryTest extends TestCase diff --git a/tests/Unit/Business/Matcher/Route/Matchers/MethodMatcherTest.php b/Tests/Unit/Business/Matcher/Route/Matchers/MethodMatcherTest.php similarity index 87% rename from tests/Unit/Business/Matcher/Route/Matchers/MethodMatcherTest.php rename to Tests/Unit/Business/Matcher/Route/Matchers/MethodMatcherTest.php index 9d461c7..2e8890e 100644 --- a/tests/Unit/Business/Matcher/Route/Matchers/MethodMatcherTest.php +++ b/Tests/Unit/Business/Matcher/Route/Matchers/MethodMatcherTest.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Business\Matcher\Route\Matchers; +namespace Micro\Plugin\HttpCore\Tests\Unit\Business\Matcher\Route\Matchers; -use Micro\Plugin\Http\Business\Matcher\Route\Matchers\MethodMatcher; -use Micro\Plugin\Http\Business\Route\RouteInterface; +use Micro\Plugin\HttpCore\Business\Matcher\Route\Matchers\MethodMatcher; +use Micro\Plugin\HttpCore\Business\Route\RouteInterface; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; diff --git a/tests/Unit/Business/Matcher/Route/Matchers/UriMatcherTest.php b/Tests/Unit/Business/Matcher/Route/Matchers/UriMatcherTest.php similarity index 90% rename from tests/Unit/Business/Matcher/Route/Matchers/UriMatcherTest.php rename to Tests/Unit/Business/Matcher/Route/Matchers/UriMatcherTest.php index f4ea0d8..51399f6 100644 --- a/tests/Unit/Business/Matcher/Route/Matchers/UriMatcherTest.php +++ b/Tests/Unit/Business/Matcher/Route/Matchers/UriMatcherTest.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Business\Matcher\Route\Matchers; +namespace Micro\Plugin\HttpCore\Tests\Unit\Business\Matcher\Route\Matchers; -use Micro\Plugin\Http\Business\Matcher\Route\Matchers\UriMatcher; -use Micro\Plugin\Http\Business\Route\RouteInterface; +use Micro\Plugin\HttpCore\Business\Matcher\Route\Matchers\UriMatcher; +use Micro\Plugin\HttpCore\Business\Route\RouteInterface; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; diff --git a/tests/Unit/Business/Matcher/Route/RouteMatcherFactoryTest.php b/Tests/Unit/Business/Matcher/Route/RouteMatcherFactoryTest.php similarity index 70% rename from tests/Unit/Business/Matcher/Route/RouteMatcherFactoryTest.php rename to Tests/Unit/Business/Matcher/Route/RouteMatcherFactoryTest.php index 6e5a16c..2fc68e8 100644 --- a/tests/Unit/Business/Matcher/Route/RouteMatcherFactoryTest.php +++ b/Tests/Unit/Business/Matcher/Route/RouteMatcherFactoryTest.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Business\Matcher\Route; +namespace Micro\Plugin\HttpCore\Tests\Unit\Business\Matcher\Route; -use Micro\Plugin\Http\Business\Matcher\Route\RouteMatcherFactory; -use Micro\Plugin\Http\Business\Matcher\Route\RouteMatcherInterface; +use Micro\Plugin\HttpCore\Business\Matcher\Route\RouteMatcherFactory; +use Micro\Plugin\HttpCore\Business\Matcher\Route\RouteMatcherInterface; use PHPUnit\Framework\TestCase; class RouteMatcherFactoryTest extends TestCase diff --git a/tests/Unit/Business/Matcher/Route/RouteMatcherTest.php b/Tests/Unit/Business/Matcher/Route/RouteMatcherTest.php similarity index 84% rename from tests/Unit/Business/Matcher/Route/RouteMatcherTest.php rename to Tests/Unit/Business/Matcher/Route/RouteMatcherTest.php index 72365ab..59fd098 100644 --- a/tests/Unit/Business/Matcher/Route/RouteMatcherTest.php +++ b/Tests/Unit/Business/Matcher/Route/RouteMatcherTest.php @@ -9,11 +9,11 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Business\Matcher\Route; +namespace Micro\Plugin\HttpCore\Tests\Unit\Business\Matcher\Route; -use Micro\Plugin\Http\Business\Matcher\Route\RouteMatcher; -use Micro\Plugin\Http\Business\Matcher\Route\RouteMatcherInterface; -use Micro\Plugin\Http\Business\Route\RouteInterface; +use Micro\Plugin\HttpCore\Business\Matcher\Route\RouteMatcher; +use Micro\Plugin\HttpCore\Business\Matcher\Route\RouteMatcherInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteInterface; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; diff --git a/tests/Unit/Business/Matcher/UrlMatcherFactoryTest.php b/Tests/Unit/Business/Matcher/UrlMatcherFactoryTest.php similarity index 65% rename from tests/Unit/Business/Matcher/UrlMatcherFactoryTest.php rename to Tests/Unit/Business/Matcher/UrlMatcherFactoryTest.php index 4d382bc..7047e15 100644 --- a/tests/Unit/Business/Matcher/UrlMatcherFactoryTest.php +++ b/Tests/Unit/Business/Matcher/UrlMatcherFactoryTest.php @@ -9,12 +9,12 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Business\Matcher; +namespace Micro\Plugin\HttpCore\Tests\Unit\Business\Matcher; -use Micro\Plugin\Http\Business\Matcher\Route\RouteMatcherFactoryInterface; -use Micro\Plugin\Http\Business\Matcher\UrlMatcherFactory; -use Micro\Plugin\Http\Business\Matcher\UrlMatcherInterface; -use Micro\Plugin\Http\Business\Route\RouteCollectionFactoryInterface; +use Micro\Plugin\HttpCore\Business\Matcher\Route\RouteMatcherFactoryInterface; +use Micro\Plugin\HttpCore\Business\Matcher\UrlMatcherFactory; +use Micro\Plugin\HttpCore\Business\Matcher\UrlMatcherInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteCollectionFactoryInterface; use PHPUnit\Framework\TestCase; class UrlMatcherFactoryTest extends TestCase diff --git a/tests/Unit/Business/Matcher/UrlMatcherTest.php b/Tests/Unit/Business/Matcher/UrlMatcherTest.php similarity index 86% rename from tests/Unit/Business/Matcher/UrlMatcherTest.php rename to Tests/Unit/Business/Matcher/UrlMatcherTest.php index f9d97a1..241425e 100644 --- a/tests/Unit/Business/Matcher/UrlMatcherTest.php +++ b/Tests/Unit/Business/Matcher/UrlMatcherTest.php @@ -9,14 +9,14 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Business\Matcher; - -use Micro\Plugin\Http\Business\Matcher\Route\RouteMatcherFactory; -use Micro\Plugin\Http\Business\Matcher\Route\RouteMatcherInterface; -use Micro\Plugin\Http\Business\Matcher\UrlMatcher; -use Micro\Plugin\Http\Business\Route\Route; -use Micro\Plugin\Http\Business\Route\RouteCollectionInterface; -use Micro\Plugin\Http\Exception\HttpNotFoundException; +namespace Micro\Plugin\HttpCore\Tests\Unit\Business\Matcher; + +use Micro\Plugin\HttpCore\Business\Matcher\Route\RouteMatcherFactory; +use Micro\Plugin\HttpCore\Business\Matcher\Route\RouteMatcherInterface; +use Micro\Plugin\HttpCore\Business\Matcher\UrlMatcher; +use Micro\Plugin\HttpCore\Business\Route\Route; +use Micro\Plugin\HttpCore\Business\Route\RouteCollectionInterface; +use Micro\Plugin\HttpCore\Exception\HttpNotFoundException; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; diff --git a/tests/Unit/Business/Response/CallbackTest.php b/Tests/Unit/Business/Response/CallbackTest.php similarity index 90% rename from tests/Unit/Business/Response/CallbackTest.php rename to Tests/Unit/Business/Response/CallbackTest.php index eb658ec..ac5e69a 100644 --- a/tests/Unit/Business/Response/CallbackTest.php +++ b/Tests/Unit/Business/Response/CallbackTest.php @@ -11,7 +11,7 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Business\Response; +namespace Micro\Plugin\HttpCore\Tests\Unit\Business\Response; use Symfony\Component\HttpFoundation\Response; diff --git a/tests/Unit/Business/Response/ResponseCallbackFactoryTest.php b/Tests/Unit/Business/Response/ResponseCallbackFactoryTest.php similarity index 74% rename from tests/Unit/Business/Response/ResponseCallbackFactoryTest.php rename to Tests/Unit/Business/Response/ResponseCallbackFactoryTest.php index cbda4db..33eb8ac 100644 --- a/tests/Unit/Business/Response/ResponseCallbackFactoryTest.php +++ b/Tests/Unit/Business/Response/ResponseCallbackFactoryTest.php @@ -9,12 +9,12 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Business\Response; +namespace Micro\Plugin\HttpCore\Tests\Unit\Business\Response; use Micro\Component\DependencyInjection\Autowire\AutowireHelperFactoryInterface; -use Micro\Plugin\Http\Business\Response\Callback\ResponseCallbackFactory; -use Micro\Plugin\Http\Business\Response\Callback\ResponseCallbackInterface; -use Micro\Plugin\Http\Business\Route\RouteInterface; +use Micro\Plugin\HttpCore\Business\Response\Callback\ResponseCallbackFactory; +use Micro\Plugin\HttpCore\Business\Response\Callback\ResponseCallbackInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteInterface; use PHPUnit\Framework\TestCase; class ResponseCallbackFactoryTest extends TestCase diff --git a/tests/Unit/Business/Response/ResponseCallbackTest.php b/Tests/Unit/Business/Response/ResponseCallbackTest.php similarity index 95% rename from tests/Unit/Business/Response/ResponseCallbackTest.php rename to Tests/Unit/Business/Response/ResponseCallbackTest.php index afe01c8..bc0d7e1 100644 --- a/tests/Unit/Business/Response/ResponseCallbackTest.php +++ b/Tests/Unit/Business/Response/ResponseCallbackTest.php @@ -9,12 +9,12 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Business\Response; +namespace Micro\Plugin\HttpCore\Tests\Unit\Business\Response; use Micro\Component\DependencyInjection\Autowire\AutowireHelperInterface; -use Micro\Plugin\Http\Business\Response\Callback\ResponseCallback; -use Micro\Plugin\Http\Business\Route\RouteInterface; -use Micro\Plugin\Http\Exception\RouteInvalidConfigurationException; +use Micro\Plugin\HttpCore\Business\Response\Callback\ResponseCallback; +use Micro\Plugin\HttpCore\Business\Route\RouteInterface; +use Micro\Plugin\HttpCore\Exception\RouteInvalidConfigurationException; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Response; diff --git a/tests/Unit/Business/Route/RouteBuilderFactoryTest.php b/Tests/Unit/Business/Route/RouteBuilderFactoryTest.php similarity index 74% rename from tests/Unit/Business/Route/RouteBuilderFactoryTest.php rename to Tests/Unit/Business/Route/RouteBuilderFactoryTest.php index 331b357..3aac1c3 100644 --- a/tests/Unit/Business/Route/RouteBuilderFactoryTest.php +++ b/Tests/Unit/Business/Route/RouteBuilderFactoryTest.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Business\Route; +namespace Micro\Plugin\HttpCore\Tests\Unit\Business\Route; -use Micro\Plugin\Http\Business\Route\RouteBuilderFactory; -use Micro\Plugin\Http\Business\Route\RouteBuilderInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteBuilderFactory; +use Micro\Plugin\HttpCore\Business\Route\RouteBuilderInterface; use PHPUnit\Framework\TestCase; class RouteBuilderFactoryTest extends TestCase diff --git a/tests/Unit/Business/Route/RouteBuilderTest.php b/Tests/Unit/Business/Route/RouteBuilderTest.php similarity index 94% rename from tests/Unit/Business/Route/RouteBuilderTest.php rename to Tests/Unit/Business/Route/RouteBuilderTest.php index a452ee4..9ce165e 100644 --- a/tests/Unit/Business/Route/RouteBuilderTest.php +++ b/Tests/Unit/Business/Route/RouteBuilderTest.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Business\Route; +namespace Micro\Plugin\HttpCore\Tests\Unit\Business\Route; -use Micro\Plugin\Http\Business\Route\RouteBuilder; -use Micro\Plugin\Http\Exception\RouteInvalidConfigurationException; +use Micro\Plugin\HttpCore\Business\Route\RouteBuilder; +use Micro\Plugin\HttpCore\Exception\RouteInvalidConfigurationException; use PHPUnit\Framework\TestCase; class RouteBuilderTest extends TestCase diff --git a/tests/Unit/Business/Route/RouteCollectionFactoryTest.php b/Tests/Unit/Business/Route/RouteCollectionFactoryTest.php similarity index 79% rename from tests/Unit/Business/Route/RouteCollectionFactoryTest.php rename to Tests/Unit/Business/Route/RouteCollectionFactoryTest.php index 8a41044..65f952f 100644 --- a/tests/Unit/Business/Route/RouteCollectionFactoryTest.php +++ b/Tests/Unit/Business/Route/RouteCollectionFactoryTest.php @@ -9,13 +9,13 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Business\Route; +namespace Micro\Plugin\HttpCore\Tests\Unit\Business\Route; -use Micro\Plugin\Http\Business\Locator\RouteLocatorFactoryInterface; -use Micro\Plugin\Http\Business\Locator\RouteLocatorInterface; -use Micro\Plugin\Http\Business\Route\RouteCollectionFactory; -use Micro\Plugin\Http\Business\Route\RouteCollectionInterface; -use Micro\Plugin\Http\Business\Route\RouteInterface; +use Micro\Plugin\HttpCore\Business\Locator\RouteLocatorFactoryInterface; +use Micro\Plugin\HttpCore\Business\Locator\RouteLocatorInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteCollectionFactory; +use Micro\Plugin\HttpCore\Business\Route\RouteCollectionInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteInterface; use PHPUnit\Framework\TestCase; class RouteCollectionFactoryTest extends TestCase diff --git a/tests/Unit/Business/Route/RouteCollectionTest.php b/Tests/Unit/Business/Route/RouteCollectionTest.php similarity index 88% rename from tests/Unit/Business/Route/RouteCollectionTest.php rename to Tests/Unit/Business/Route/RouteCollectionTest.php index 6384e83..ced1247 100644 --- a/tests/Unit/Business/Route/RouteCollectionTest.php +++ b/Tests/Unit/Business/Route/RouteCollectionTest.php @@ -9,13 +9,13 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Business\Route; +namespace Micro\Plugin\HttpCore\Tests\Unit\Business\Route; -use Micro\Plugin\Http\Business\Route\RouteCollection; -use Micro\Plugin\Http\Business\Route\RouteCollectionInterface; -use Micro\Plugin\Http\Business\Route\RouteInterface; -use Micro\Plugin\Http\Exception\RouteAlreadyDeclaredException; -use Micro\Plugin\Http\Exception\RouteNotFoundException; +use Micro\Plugin\HttpCore\Business\Route\RouteCollection; +use Micro\Plugin\HttpCore\Business\Route\RouteCollectionInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteInterface; +use Micro\Plugin\HttpCore\Exception\RouteAlreadyDeclaredException; +use Micro\Plugin\HttpCore\Exception\RouteNotFoundException; use PHPUnit\Framework\TestCase; class RouteCollectionTest extends TestCase diff --git a/tests/Unit/Business/Route/RouteTest.php b/Tests/Unit/Business/Route/RouteTest.php similarity index 90% rename from tests/Unit/Business/Route/RouteTest.php rename to Tests/Unit/Business/Route/RouteTest.php index 187aabe..0701fc7 100644 --- a/tests/Unit/Business/Route/RouteTest.php +++ b/Tests/Unit/Business/Route/RouteTest.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Business\Route; +namespace Micro\Plugin\HttpCore\Tests\Unit\Business\Route; -use Micro\Plugin\Http\Business\Route\Route; -use Micro\Plugin\Http\Business\Route\RouteInterface; +use Micro\Plugin\HttpCore\Business\Route\Route; +use Micro\Plugin\HttpCore\Business\Route\RouteInterface; use PHPUnit\Framework\TestCase; class RouteTest extends TestCase diff --git a/tests/Unit/Exception/AbstractHttpExceptionTest.php b/Tests/Unit/Exception/AbstractHttpExceptionTest.php similarity index 86% rename from tests/Unit/Exception/AbstractHttpExceptionTest.php rename to Tests/Unit/Exception/AbstractHttpExceptionTest.php index 9929507..dd2a5c0 100644 --- a/tests/Unit/Exception/AbstractHttpExceptionTest.php +++ b/Tests/Unit/Exception/AbstractHttpExceptionTest.php @@ -11,9 +11,9 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Exception; +namespace Micro\Plugin\HttpCore\Tests\Unit\Exception; -use Micro\Plugin\Http\Exception\HttpException; +use Micro\Plugin\HttpCore\Exception\HttpException; use PHPUnit\Framework\TestCase; /** diff --git a/tests/Unit/Exception/HttpBadRequestExceptionTest.php b/Tests/Unit/Exception/HttpBadRequestExceptionTest.php similarity index 81% rename from tests/Unit/Exception/HttpBadRequestExceptionTest.php rename to Tests/Unit/Exception/HttpBadRequestExceptionTest.php index 5637ad2..b4970aa 100644 --- a/tests/Unit/Exception/HttpBadRequestExceptionTest.php +++ b/Tests/Unit/Exception/HttpBadRequestExceptionTest.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Exception; +namespace Micro\Plugin\HttpCore\Tests\Unit\Exception; -use Micro\Plugin\Http\Exception\HttpBadRequestException; +use Micro\Plugin\HttpCore\Exception\HttpBadRequestException; class HttpBadRequestExceptionTest extends AbstractHttpExceptionTest { diff --git a/tests/Unit/Exception/HttpExceptionTest.php b/Tests/Unit/Exception/HttpExceptionTest.php similarity index 83% rename from tests/Unit/Exception/HttpExceptionTest.php rename to Tests/Unit/Exception/HttpExceptionTest.php index 0ddd605..1edd1e1 100644 --- a/tests/Unit/Exception/HttpExceptionTest.php +++ b/Tests/Unit/Exception/HttpExceptionTest.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Exception; +namespace Micro\Plugin\HttpCore\Tests\Unit\Exception; -use Micro\Plugin\Http\Exception\HttpException; +use Micro\Plugin\HttpCore\Exception\HttpException; class HttpExceptionTest extends AbstractHttpExceptionTest { diff --git a/tests/Unit/Exception/HttpForbiddenExceptionTest.php b/Tests/Unit/Exception/HttpForbiddenExceptionTest.php similarity index 81% rename from tests/Unit/Exception/HttpForbiddenExceptionTest.php rename to Tests/Unit/Exception/HttpForbiddenExceptionTest.php index 1525f7a..75e7eff 100644 --- a/tests/Unit/Exception/HttpForbiddenExceptionTest.php +++ b/Tests/Unit/Exception/HttpForbiddenExceptionTest.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Exception; +namespace Micro\Plugin\HttpCore\Tests\Unit\Exception; -use Micro\Plugin\Http\Exception\HttpForbiddenException; +use Micro\Plugin\HttpCore\Exception\HttpForbiddenException; class HttpForbiddenExceptionTest extends AbstractHttpExceptionTest { diff --git a/tests/Unit/Exception/HttpInternalServerExceptionTest.php b/Tests/Unit/Exception/HttpInternalServerExceptionTest.php similarity index 81% rename from tests/Unit/Exception/HttpInternalServerExceptionTest.php rename to Tests/Unit/Exception/HttpInternalServerExceptionTest.php index e65e7e9..f88c56a 100644 --- a/tests/Unit/Exception/HttpInternalServerExceptionTest.php +++ b/Tests/Unit/Exception/HttpInternalServerExceptionTest.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Exception; +namespace Micro\Plugin\HttpCore\Tests\Unit\Exception; -use Micro\Plugin\Http\Exception\HttpInternalServerException; +use Micro\Plugin\HttpCore\Exception\HttpInternalServerException; class HttpInternalServerExceptionTest extends AbstractHttpExceptionTest { diff --git a/tests/Unit/Exception/HttpNotFoundExceptionTest.php b/Tests/Unit/Exception/HttpNotFoundExceptionTest.php similarity index 81% rename from tests/Unit/Exception/HttpNotFoundExceptionTest.php rename to Tests/Unit/Exception/HttpNotFoundExceptionTest.php index 9da288f..b7b91ea 100644 --- a/tests/Unit/Exception/HttpNotFoundExceptionTest.php +++ b/Tests/Unit/Exception/HttpNotFoundExceptionTest.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Exception; +namespace Micro\Plugin\HttpCore\Tests\Unit\Exception; -use Micro\Plugin\Http\Exception\HttpNotFoundException; +use Micro\Plugin\HttpCore\Exception\HttpNotFoundException; class HttpNotFoundExceptionTest extends AbstractHttpExceptionTest { diff --git a/tests/Unit/Exception/HttpUnauthorizedExceptionTest.php b/Tests/Unit/Exception/HttpUnauthorizedExceptionTest.php similarity index 81% rename from tests/Unit/Exception/HttpUnauthorizedExceptionTest.php rename to Tests/Unit/Exception/HttpUnauthorizedExceptionTest.php index 3f877b0..56992e2 100644 --- a/tests/Unit/Exception/HttpUnauthorizedExceptionTest.php +++ b/Tests/Unit/Exception/HttpUnauthorizedExceptionTest.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Exception; +namespace Micro\Plugin\HttpCore\Tests\Unit\Exception; -use Micro\Plugin\Http\Exception\HttpUnauthorizedException; +use Micro\Plugin\HttpCore\Exception\HttpUnauthorizedException; class HttpUnauthorizedExceptionTest extends AbstractHttpExceptionTest { diff --git a/tests/Unit/Facade/HttpFacadeTest.php b/Tests/Unit/Facade/HttpFacadeTest.php similarity index 80% rename from tests/Unit/Facade/HttpFacadeTest.php rename to Tests/Unit/Facade/HttpFacadeTest.php index 00f9516..7510182 100644 --- a/tests/Unit/Facade/HttpFacadeTest.php +++ b/Tests/Unit/Facade/HttpFacadeTest.php @@ -9,20 +9,20 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit\Facade; - -use Micro\Plugin\Http\Business\Executor\RouteExecutorFactoryInterface; -use Micro\Plugin\Http\Business\Executor\RouteExecutorInterface; -use Micro\Plugin\Http\Business\Generator\UrlGeneratorFactoryInterface; -use Micro\Plugin\Http\Business\Matcher\UrlMatcherFactoryInterface; -use Micro\Plugin\Http\Business\Matcher\UrlMatcherInterface; -use Micro\Plugin\Http\Business\Route\RouteBuilderFactoryInterface; -use Micro\Plugin\Http\Business\Route\RouteBuilderInterface; -use Micro\Plugin\Http\Business\Route\RouteCollectionFactoryInterface; -use Micro\Plugin\Http\Business\Route\RouteCollectionInterface; -use Micro\Plugin\Http\Business\Route\RouteInterface; -use Micro\Plugin\Http\Facade\HttpFacade; -use Micro\Plugin\Http\Facade\HttpFacadeInterface; +namespace Micro\Plugin\HttpCore\Tests\Unit\Facade; + +use Micro\Plugin\HttpCore\Business\Executor\RouteExecutorFactoryInterface; +use Micro\Plugin\HttpCore\Business\Executor\RouteExecutorInterface; +use Micro\Plugin\HttpCore\Business\Generator\UrlGeneratorFactoryInterface; +use Micro\Plugin\HttpCore\Business\Matcher\UrlMatcherFactoryInterface; +use Micro\Plugin\HttpCore\Business\Matcher\UrlMatcherInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteBuilderFactoryInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteBuilderInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteCollectionFactoryInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteCollectionInterface; +use Micro\Plugin\HttpCore\Business\Route\RouteInterface; +use Micro\Plugin\HttpCore\Facade\HttpFacade; +use Micro\Plugin\HttpCore\Facade\HttpFacadeInterface; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; diff --git a/tests/Unit/HttpCorePluginConfigurationTest.php b/Tests/Unit/HttpCorePluginConfigurationTest.php similarity index 85% rename from tests/Unit/HttpCorePluginConfigurationTest.php rename to Tests/Unit/HttpCorePluginConfigurationTest.php index 1c9f835..d0c7ce1 100644 --- a/tests/Unit/HttpCorePluginConfigurationTest.php +++ b/Tests/Unit/HttpCorePluginConfigurationTest.php @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit; +namespace Micro\Plugin\HttpCore\Tests\Unit; -use Micro\Framework\Kernel\Configuration\ApplicationConfigurationInterface; -use Micro\Plugin\Http\HttpCorePluginConfiguration; +use Micro\Framework\BootConfiguration\Configuration\ApplicationConfigurationInterface; +use Micro\Plugin\HttpCore\HttpCorePluginConfiguration; use PHPUnit\Framework\TestCase; class HttpCorePluginConfigurationTest extends TestCase diff --git a/tests/Unit/HttpCorePluginTest.php b/Tests/Unit/HttpCorePluginTest.php similarity index 84% rename from tests/Unit/HttpCorePluginTest.php rename to Tests/Unit/HttpCorePluginTest.php index 019af25..8941ba7 100644 --- a/tests/Unit/HttpCorePluginTest.php +++ b/Tests/Unit/HttpCorePluginTest.php @@ -9,12 +9,12 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit; +namespace Micro\Plugin\HttpCore\Tests\Unit; -use Micro\Framework\Kernel\Configuration\DefaultApplicationConfiguration; -use Micro\Kernel\App\AppKernel; -use Micro\Plugin\Http\Exception\HttpException; -use Micro\Plugin\Http\Facade\HttpFacadeInterface; +use Micro\Framework\BootConfiguration\Configuration\DefaultApplicationConfiguration; +use Micro\Framework\KernelApp\AppKernel; +use Micro\Plugin\HttpCore\Exception\HttpException; +use Micro\Plugin\HttpCore\Facade\HttpFacadeInterface; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; diff --git a/tests/Unit/HttpTestPlugin.php b/Tests/Unit/HttpTestPlugin.php similarity index 80% rename from tests/Unit/HttpTestPlugin.php rename to Tests/Unit/HttpTestPlugin.php index b2431a6..7c35048 100644 --- a/tests/Unit/HttpTestPlugin.php +++ b/Tests/Unit/HttpTestPlugin.php @@ -11,18 +11,18 @@ * file that was distributed with this source code. */ -namespace Micro\Plugin\Http\Test\Unit; - -use Micro\Component\DependencyInjection\Container; -use Micro\Framework\Kernel\Plugin\DependencyProviderInterface; -use Micro\Framework\Kernel\Plugin\PluginDependedInterface; -use Micro\Plugin\Http\Business\Locator\RouteLocatorInterface; -use Micro\Plugin\Http\Business\Response\Transformer\ResponseTransformerInterface; -use Micro\Plugin\Http\Exception\HttpBadRequestException; -use Micro\Plugin\Http\Facade\HttpFacadeInterface; -use Micro\Plugin\Http\HttpCorePlugin; -use Micro\Plugin\Http\Plugin\HttpResponseTransformerPlugin; -use Micro\Plugin\Http\Plugin\HttpRouteLocatorPluginInterface; +namespace Micro\Plugin\HttpCore\Tests\Unit; + +use Micro\Framework\DependencyInjection\Container; +use Micro\Framework\BootDependency\Plugin\DependencyProviderInterface; +use Micro\Framework\BootPluginDependent\Plugin\PluginDependedInterface; +use Micro\Plugin\HttpCore\Business\Locator\RouteLocatorInterface; +use Micro\Plugin\HttpCore\Business\Response\Transformer\ResponseTransformerInterface; +use Micro\Plugin\HttpCore\Exception\HttpBadRequestException; +use Micro\Plugin\HttpCore\Facade\HttpFacadeInterface; +use Micro\Plugin\HttpCore\HttpCorePlugin; +use Micro\Plugin\HttpCore\Plugin\HttpResponseTransformerPlugin; +use Micro\Plugin\HttpCore\Plugin\HttpRouteLocatorPluginInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; diff --git a/composer.json b/composer.json index fbd2b44..7b41c37 100644 --- a/composer.json +++ b/composer.json @@ -10,33 +10,24 @@ } ], "require": { - "micro/autowire": "^1.6", - "micro/kernel": "^1.6", - "micro/kernel-boot-configuration": "^1.6", - "micro/kernel-boot-dependency": "^1.6", - "micro/kernel-boot-plugin-depended": "^1.6", - "micro/plugin-locator": "^1.6", - "symfony/http-foundation": "^6.2" + "micro/autowire": "^2.0", + "micro/kernel": "^2.0", + "micro/kernel-boot-configuration": "^2.0", + "micro/kernel-boot-dependency": "^2.0", + "micro/kernel-boot-plugin-depended": "^2.0", + "micro/plugin-locator": "^2.0", + "symfony/http-foundation": "^6.2 || ^6.3" }, "require-dev": { - "ergebnis/composer-normalize": "^2.29", - "friendsofphp/php-cs-fixer": "^3.13", - "micro/kernel-app": "^1.6", - "phpstan/phpstan": "^1.9", - "phpunit/php-code-coverage": "^9.2", - "phpunit/phpunit": "^9.5", - "vimeo/psalm": "^5.2" + "ergebnis/composer-normalize": "^2.34" }, - "minimum-stability": "dev", "autoload": { "psr-4": { - "Micro\\Plugin\\Http\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "Micro\\Plugin\\Http\\Test\\Unit\\": "tests/Unit" - } + "Micro\\Plugin\\HttpCore\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "config": { "allow-plugins": { @@ -44,23 +35,5 @@ }, "sort-packages": true }, - "scripts": { - "coverage": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-text", - "php-cs-fix": "PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --verbose --using-cache=no", - "php-cs-try": "PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --verbose --dry-run --using-cache=no", - "phpstan": "./vendor/bin/phpstan analyze --no-progress", - "phpunit": "./vendor/bin/phpunit", - "psalm": "./vendor/bin/psalm --no-progress --show-info=true", - "statics": [ - "@phpstan", - "@psalm", - "@php-cs-try" - ], - "test": [ - "@statics", - "composer validate --strict", - "composer normalize", - "@coverage" - ] - } + "minimum-stability": "dev" } diff --git a/phpstan.neon.dist b/phpstan.neon.dist deleted file mode 100644 index 18d77f7..0000000 --- a/phpstan.neon.dist +++ /dev/null @@ -1,4 +0,0 @@ -parameters: - level: 7 - paths: - - src \ No newline at end of file diff --git a/psalm.xml b/psalm.xml deleted file mode 100644 index bf709d3..0000000 --- a/psalm.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file