Skip to content

Commit 52274f7

Browse files
committed
refactor: move HTTP infrastructure to Core\Http and Visibility to App\Policy
- Move generic HTTP building blocks (DTOs, exceptions, ErrorResponseFactory, PingHandler, SwaggerUIHandler, middleware, RouteIdent) from App\Http to Core\Http. - Move Visibility enum and VisibilityInput to App\Policy. - Adjust ConfigProviders, autoloading (composer.json), pipeline/routes and migrations accordingly; remove App\Http and old shared Visibility.
1 parent cc96df1 commit 52274f7

65 files changed

Lines changed: 112 additions & 101 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@
8282
"psr-4": {
8383
"ownHackathon\\App\\Account\\Identity\\": "src/App/Account/Identity/",
8484
"ownHackathon\\App\\Event\\": "src/App/Event/",
85-
"ownHackathon\\App\\Http\\": "src/App/Http/",
8685
"ownHackathon\\App\\Mailing\\": "src/App/Mailing/",
8786
"ownHackathon\\App\\Policy\\": "src/App/Policy/",
8887
"ownHackathon\\App\\Token\\": "src/App/Token/",
8988
"ownHackathon\\App\\Workspace\\": "src/App/Workspace/",
9089
"ownHackathon\\Core\\Clock\\": "src/Core/Clock/",
90+
"ownHackathon\\Core\\Http\\": "src/Core/Http/",
9191
"ownHackathon\\Core\\Observability\\": "src/Core/Observability/",
9292
"ownHackathon\\Core\\Persistence\\": "src/Core/Persistence/",
9393
"ownHackathon\\Core\\Serialization\\": "src/Core/Serialization/",

config/autoload/project.global.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,7 @@
2323
'subscribe_delay' => Duration::HALF_MINUTE,
2424
],
2525
],
26+
'swagger_ui' => [
27+
'index_file' => __DIR__ . '/../../public/api/docs/index.html',
28+
],
2629
];

config/pipeline.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
use ownHackathon\App\Account\Identity\Middleware\Account\LastActivityUpdaterMiddleware;
1818
use ownHackathon\App\Account\Identity\Middleware\Account\RequestAuthenticationMiddleware;
1919
use ownHackathon\App\Account\Identity\Middleware\ClientIdentification\ClientIdentificationMiddleware;
20-
use ownHackathon\App\Http\Middleware\ApiErrorHandlerMiddleware;
21-
use ownHackathon\App\Http\Middleware\RouteNotFoundMiddleware;
20+
use ownHackathon\Core\Http\Middleware\ApiErrorHandlerMiddleware;
21+
use ownHackathon\Core\Http\Middleware\RouteNotFoundMiddleware;
2222
use Psr\Container\ContainerInterface;
2323

2424
/**

config/routes.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
use Mezzio\Application;
44
use Mezzio\MiddlewareFactory;
5-
use ownHackathon\App\Http\Enum\RouteIdent;
6-
use ownHackathon\App\Http\Handler\PingHandler;
7-
use ownHackathon\App\Http\Handler\SwaggerUIHandler;
5+
use ownHackathon\Core\Http\Enum\RouteIdent;
6+
use ownHackathon\Core\Http\Handler\PingHandler;
7+
use ownHackathon\Core\Http\Handler\SwaggerUIHandler;
88
use Psr\Container\ContainerInterface;
99

1010
return static function (Application $app, MiddlewareFactory $factory, ContainerInterface $container): void {

database/migrations/Version20260121203207_CreateWorkspaceTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Doctrine\DBAL\Schema\Schema;
77
use Doctrine\DBAL\Types\Types;
88
use Doctrine\Migrations\AbstractMigration;
9-
use ownHackathon\Core\SharedKernel\Domain\Enum\Visibility;
9+
use ownHackathon\App\Policy\Domain\Enum\Visibility;
1010

1111
final class Version20260121203207_CreateWorkspaceTable extends AbstractMigration
1212
{

src/App/Account/Identity/Handler/AccessTokenHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use ownHackathon\App\Account\Identity\DTO\Token\AccessToken;
1010
use ownHackathon\App\Account\Identity\DTO\Token\RefreshToken;
1111
use ownHackathon\App\Account\Identity\Infrastructure\Service\Token\RefreshTokenService;
12-
use ownHackathon\App\Http\DTO\HttpResponseMessage;
12+
use ownHackathon\Core\Http\DTO\HttpResponseMessage;
1313
use Psr\Http\Message\ResponseInterface;
1414
use Psr\Http\Message\ServerRequestInterface;
1515
use Psr\Http\Server\RequestHandlerInterface;

src/App/Account/Identity/Handler/AccountActivationHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use ownHackathon\App\Account\Identity\DTO\Account\Account as AccountResponse;
1010
use ownHackathon\App\Account\Identity\DTO\Account\AccountRegistration;
1111
use ownHackathon\App\Account\Identity\Infrastructure\Service\Account\AccountCreatorService;
12-
use ownHackathon\App\Http\DTO\HttpResponseMessage;
12+
use ownHackathon\Core\Http\DTO\HttpResponseMessage;
1313
use Psr\Http\Message\ResponseInterface;
1414
use Psr\Http\Message\ServerRequestInterface;
1515
use Psr\Http\Server\RequestHandlerInterface;

src/App/Account/Identity/Handler/AccountPasswordForgottenHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use ownHackathon\App\Account\Identity\Infrastructure\Service\Account\PasswordService;
99
use ownHackathon\App\Mailing\Domain\EmailType;
1010
use ownHackathon\App\Mailing\DTO\EMail;
11-
use ownHackathon\App\Http\DTO\HttpResponseMessage;
11+
use ownHackathon\Core\Http\DTO\HttpResponseMessage;
1212
use Psr\Http\Message\ResponseInterface;
1313
use Psr\Http\Message\ServerRequestInterface;
1414
use Psr\Http\Server\RequestHandlerInterface;

src/App/Account/Identity/Handler/AccountPasswordHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace ownHackathon\App\Account\Identity\Handler;
44

5-
use ownHackathon\App\Http\DTO\HttpResponseMessage;
5+
use ownHackathon\Core\Http\DTO\HttpResponseMessage;
66
use ownHackathon\App\Token\DTO\Token;
77
use ownHackathon\App\Account\Identity\DTO\Account\AccountPassword;
88
use ownHackathon\App\Account\Identity\Infrastructure\Service\Account\PasswordChangeService;

src/App/Account/Identity/Handler/AccountRegisterHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use ownHackathon\App\Account\Identity\Application\Port\AccountRegisterServiceInterface;
99
use ownHackathon\App\Mailing\Domain\EmailType;
1010
use ownHackathon\App\Mailing\DTO\EMail;
11-
use ownHackathon\App\Http\DTO\HttpResponseMessage;
11+
use ownHackathon\Core\Http\DTO\HttpResponseMessage;
1212
use Psr\Http\Message\ResponseInterface;
1313
use Psr\Http\Message\ServerRequestInterface;
1414
use Psr\Http\Server\RequestHandlerInterface;

0 commit comments

Comments
 (0)