diff --git a/composer.json b/composer.json index f0b2ea8..36215ad 100644 --- a/composer.json +++ b/composer.json @@ -30,16 +30,17 @@ "ext-dom": "*", "doctrine/data-fixtures": "^2.2", "doctrine/doctrine-fixtures-bundle": "^4.3", - "dotkernel/dot-errorhandler": "^5.0.0", "dotkernel/dot-cache": "^4.0", - "ramsey/uuid": "^4.5.0", - "ramsey/uuid-doctrine": "^2.1.0", - "roave/psr-container-doctrine": "^5.2.2 || ^6.0.0", + "dotkernel/dot-errorhandler": "^5.0.0", + "dotkernel/dot-response-header": "^3.6", "laminas/laminas-component-installer": "^3.5.0", "laminas/laminas-config-aggregator": "^1.17.0", "mezzio/mezzio": "^3.24.0", "mezzio/mezzio-fastroute": "^3.13.0", - "mezzio/mezzio-twigrenderer": "^2.17.0" + "mezzio/mezzio-twigrenderer": "^2.17.0", + "ramsey/uuid": "^4.5.0", + "ramsey/uuid-doctrine": "^2.1.0", + "roave/psr-container-doctrine": "^5.2.2 || ^6.0.0" }, "require-dev": { "filp/whoops": "^2.17.0", diff --git a/config/autoload/local.php.dist b/config/autoload/local.php.dist index 6772dc2..69ee230 100644 --- a/config/autoload/local.php.dist +++ b/config/autoload/local.php.dist @@ -39,25 +39,33 @@ $app = [ ]; return [ - 'application' => $app, - 'databases' => $databases, - 'doctrine' => [ + 'application' => $app, + 'databases' => $databases, + 'dot_response_headers' => [ + '*' => [ + 'X-Powered-By' => [ + 'value' => $app['meta']['siteName'], + 'overwrite' => true, + ], + ], + ], + 'doctrine' => [ 'connection' => [ 'orm_default' => [ 'params' => $databases['default'], ], ], ], - 'feed' => [ + 'feed' => [ 'path' => realpath(__DIR__ . '/../../public/feed.xml'), ], - 'routes' => [ + 'routes' => [ 'page' => [ 'contact' => 'contact', 'dotkernel-packages-oss-lifecycle' => 'dotkernel-packages-oss-lifecycle', ], ], - 'twig' => [ + 'twig' => [ 'globals' => [ 'app' => $app, ], diff --git a/config/config.php b/config/config.php index 310630c..7120efe 100644 --- a/config/config.php +++ b/config/config.php @@ -28,6 +28,7 @@ \Dot\ErrorHandler\ConfigProvider::class, \Dot\Log\ConfigProvider::class, \Dot\Cache\ConfigProvider::class, + \Dot\ResponseHeader\ConfigProvider::class, // Default App module config \Light\App\ConfigProvider::class, diff --git a/config/pipeline.php b/config/pipeline.php index a21f948..ba6c27c 100644 --- a/config/pipeline.php +++ b/config/pipeline.php @@ -3,6 +3,7 @@ declare(strict_types=1); use Dot\ErrorHandler\ErrorHandlerInterface; +use Dot\ResponseHeader\Middleware\ResponseHeaderMiddleware; use Mezzio\Application; use Mezzio\Handler\NotFoundHandler; use Mezzio\Helper\ServerUrlMiddleware; @@ -40,6 +41,7 @@ // Register the routing middleware in the middleware pipeline. // This middleware registers the Mezzio\Router\RouteResult request attribute. $app->pipe(RouteMiddleware::class); + $app->pipe(ResponseHeaderMiddleware::class); // The following handle routing failures for common conditions: // - HEAD request but no routes answer that method diff --git a/src/App/templates/app/index.html.twig b/src/App/templates/app/index.html.twig index 6aba3e9..eaa0267 100644 --- a/src/App/templates/app/index.html.twig +++ b/src/App/templates/app/index.html.twig @@ -93,12 +93,14 @@ Three deployables that scale independently and never disagree about the domain.

-
- Shared domain layer - Core\App Core\Admin Core\User - Core\Security Core\Setting -

One set of entities and repository. Committed in each repo so a single-component start just works — lift it into its own repo and share it as a Git submodule when you add a second.

-
+ + +
+ Shared domain layer + Core\App Core\Admin Core\User + Core\Security Core\Setting +

One set of entities and repository. Committed in each repo so a single-component start just works — lift it into its own repo and share it as a Git submodule when you add a second.

+
diff --git a/src/App/templates/partial/meta.html.twig b/src/App/templates/partial/meta.html.twig index 33e44df..c8b3971 100644 --- a/src/App/templates/partial/meta.html.twig +++ b/src/App/templates/partial/meta.html.twig @@ -3,16 +3,16 @@ {{ meta.title ?? meta.name ?? app.meta.title }} - + - + - - + + - +