From 9b62371d0dc19f99638e36d1b65867eab6e97855 Mon Sep 17 00:00:00 2001 From: OStefan2001 Date: Mon, 3 Aug 2026 11:53:45 +0300 Subject: [PATCH 01/10] Issue 49 --- config/pipeline.php | 2 ++ src/App/src/ConfigProvider.php | 3 ++ .../Factory/PoweredByMiddlewareFactory.php | 18 ++++++++++++ .../src/Middleware/PoweredByMiddleware.php | 28 +++++++++++++++++++ 4 files changed, 51 insertions(+) create mode 100644 src/App/src/Factory/PoweredByMiddlewareFactory.php create mode 100644 src/App/src/Middleware/PoweredByMiddleware.php diff --git a/config/pipeline.php b/config/pipeline.php index a21f948..03703c5 100644 --- a/config/pipeline.php +++ b/config/pipeline.php @@ -3,6 +3,7 @@ declare(strict_types=1); use Dot\ErrorHandler\ErrorHandlerInterface; +use Light\App\Middleware\PoweredByMiddleware; use Mezzio\Application; use Mezzio\Handler\NotFoundHandler; use Mezzio\Helper\ServerUrlMiddleware; @@ -18,6 +19,7 @@ // all Exceptions. $app->pipe(ErrorHandlerInterface::class); $app->pipe(ServerUrlMiddleware::class); + $app->pipe(PoweredByMiddleware::class); // Pipe more middleware here that you want to execute on every request: // - bootstrapping diff --git a/src/App/src/ConfigProvider.php b/src/App/src/ConfigProvider.php index c7157af..dde2f9b 100644 --- a/src/App/src/ConfigProvider.php +++ b/src/App/src/ConfigProvider.php @@ -16,9 +16,11 @@ use Light\App\Factory\GetFeedViewHandlerFactory; use Light\App\Factory\GetIndexViewHandlerFactory; use Light\App\Factory\GetMarkdownArticleHandlerFactory; +use Light\App\Factory\PoweredByMiddlewareFactory; use Light\App\Handler\GetFeedViewHandler; use Light\App\Handler\GetIndexViewHandler; use Light\App\Handler\GetMarkdownArticleHandler; +use Light\App\Middleware\PoweredByMiddleware; use Light\App\Resolver\EntityListenerResolver; use Light\App\Service\FeedGenerator; use Mezzio\Application; @@ -118,6 +120,7 @@ public function getDependencies(): array GetFeedViewHandler::class => GetFeedViewHandlerFactory::class, GetMarkdownArticleHandler::class => GetMarkdownArticleHandlerFactory::class, FeedGenerator::class => FeedGeneratorFactory::class, + PoweredByMiddleware::class => PoweredByMiddlewareFactory::class, ], 'aliases' => [ EntityManager::class => 'doctrine.entity_manager.orm_default', diff --git a/src/App/src/Factory/PoweredByMiddlewareFactory.php b/src/App/src/Factory/PoweredByMiddlewareFactory.php new file mode 100644 index 0000000..946c00a --- /dev/null +++ b/src/App/src/Factory/PoweredByMiddlewareFactory.php @@ -0,0 +1,18 @@ +get('config'); + + return new PoweredByMiddleware($config['application']['meta']['siteName'] ?? ''); + } +} diff --git a/src/App/src/Middleware/PoweredByMiddleware.php b/src/App/src/Middleware/PoweredByMiddleware.php new file mode 100644 index 0000000..a08176d --- /dev/null +++ b/src/App/src/Middleware/PoweredByMiddleware.php @@ -0,0 +1,28 @@ +handle($request); + + if ($this->siteName === '') { + return $response; + } + + return $response->withHeader('X-Powered-By', $this->siteName); + } +} From bd0330e2bfca7726da7c5ff319123e8d8371b912 Mon Sep 17 00:00:00 2001 From: OStefan2001 Date: Mon, 3 Aug 2026 11:57:58 +0300 Subject: [PATCH 02/10] Issue 49 --- LICENSE | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/LICENSE b/LICENSE index 7d6e18d..e69de29 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 Dotkernel - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. From 687a3dacce7e3266d97070840495a02e1263e5da Mon Sep 17 00:00:00 2001 From: OStefan2001 Date: Mon, 3 Aug 2026 13:57:21 +0300 Subject: [PATCH 03/10] siteName used into the headers --- composer.json | 11 ++++---- config/autoload/local.php.dist | 20 +++++++++---- config/config.php | 1 + config/pipeline.php | 4 +-- src/App/src/ConfigProvider.php | 3 -- .../Factory/PoweredByMiddlewareFactory.php | 18 ------------ .../src/Middleware/PoweredByMiddleware.php | 28 ------------------- src/App/templates/app/index.html.twig | 12 ++++---- 8 files changed, 29 insertions(+), 68 deletions(-) delete mode 100644 src/App/src/Factory/PoweredByMiddlewareFactory.php delete mode 100644 src/App/src/Middleware/PoweredByMiddleware.php 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 03703c5..ba6c27c 100644 --- a/config/pipeline.php +++ b/config/pipeline.php @@ -3,7 +3,7 @@ declare(strict_types=1); use Dot\ErrorHandler\ErrorHandlerInterface; -use Light\App\Middleware\PoweredByMiddleware; +use Dot\ResponseHeader\Middleware\ResponseHeaderMiddleware; use Mezzio\Application; use Mezzio\Handler\NotFoundHandler; use Mezzio\Helper\ServerUrlMiddleware; @@ -19,7 +19,6 @@ // all Exceptions. $app->pipe(ErrorHandlerInterface::class); $app->pipe(ServerUrlMiddleware::class); - $app->pipe(PoweredByMiddleware::class); // Pipe more middleware here that you want to execute on every request: // - bootstrapping @@ -42,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/src/ConfigProvider.php b/src/App/src/ConfigProvider.php index dde2f9b..c7157af 100644 --- a/src/App/src/ConfigProvider.php +++ b/src/App/src/ConfigProvider.php @@ -16,11 +16,9 @@ use Light\App\Factory\GetFeedViewHandlerFactory; use Light\App\Factory\GetIndexViewHandlerFactory; use Light\App\Factory\GetMarkdownArticleHandlerFactory; -use Light\App\Factory\PoweredByMiddlewareFactory; use Light\App\Handler\GetFeedViewHandler; use Light\App\Handler\GetIndexViewHandler; use Light\App\Handler\GetMarkdownArticleHandler; -use Light\App\Middleware\PoweredByMiddleware; use Light\App\Resolver\EntityListenerResolver; use Light\App\Service\FeedGenerator; use Mezzio\Application; @@ -120,7 +118,6 @@ public function getDependencies(): array GetFeedViewHandler::class => GetFeedViewHandlerFactory::class, GetMarkdownArticleHandler::class => GetMarkdownArticleHandlerFactory::class, FeedGenerator::class => FeedGeneratorFactory::class, - PoweredByMiddleware::class => PoweredByMiddlewareFactory::class, ], 'aliases' => [ EntityManager::class => 'doctrine.entity_manager.orm_default', diff --git a/src/App/src/Factory/PoweredByMiddlewareFactory.php b/src/App/src/Factory/PoweredByMiddlewareFactory.php deleted file mode 100644 index 946c00a..0000000 --- a/src/App/src/Factory/PoweredByMiddlewareFactory.php +++ /dev/null @@ -1,18 +0,0 @@ -get('config'); - - return new PoweredByMiddleware($config['application']['meta']['siteName'] ?? ''); - } -} diff --git a/src/App/src/Middleware/PoweredByMiddleware.php b/src/App/src/Middleware/PoweredByMiddleware.php deleted file mode 100644 index a08176d..0000000 --- a/src/App/src/Middleware/PoweredByMiddleware.php +++ /dev/null @@ -1,28 +0,0 @@ -handle($request); - - if ($this->siteName === '') { - return $response; - } - - return $response->withHeader('X-Powered-By', $this->siteName); - } -} diff --git a/src/App/templates/app/index.html.twig b/src/App/templates/app/index.html.twig index d0d0e2a..f8a72a8 100644 --- a/src/App/templates/app/index.html.twig +++ b/src/App/templates/app/index.html.twig @@ -93,12 +93,12 @@ 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 repositorie. 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 repositorie. 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.

+
From 49f55fb6d6405b9699465adedef599b9b0232c11 Mon Sep 17 00:00:00 2001 From: OStefan2001 Date: Mon, 3 Aug 2026 15:05:57 +0300 Subject: [PATCH 04/10] fix meta code --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/LICENSE b/LICENSE index e69de29..7d6e18d 100644 --- a/LICENSE +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Dotkernel + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From 402cef8275a99d385295bf81496d8a276dcfd45e Mon Sep 17 00:00:00 2001 From: OStefan2001 Date: Mon, 3 Aug 2026 15:25:26 +0300 Subject: [PATCH 05/10] Update CI --- bin/composer-post-install-script.php | 35 +++++++++++++++++----- config/autoload/local.test.php.dist | 2 +- src/App/src/ConfigProvider.php | 14 ++++----- src/Page/src/ConfigProvider.php | 29 ++++++++++-------- test/Common/TestCase.php | 8 +++++ test/Unit/App/ConfigProviderTest.php | 12 ++++++-- test/Unit/Page/ConfigProviderTest.php | 12 ++++++-- test/Unit/Page/Handler/PageHandlerTest.php | 4 +-- test/Unit/Page/RoutesDelegatorTest.php | 4 +-- test/Unit/Page/Service/PageServiceTest.php | 4 +-- 10 files changed, 83 insertions(+), 41 deletions(-) diff --git a/bin/composer-post-install-script.php b/bin/composer-post-install-script.php index 79ec95a..abd465d 100644 --- a/bin/composer-post-install-script.php +++ b/bin/composer-post-install-script.php @@ -2,29 +2,50 @@ declare(strict_types=1); +const ENVIRONMENT_DEVELOPMENT = 'development'; +const ENVIRONMENT_PRODUCTION = 'production'; // phpcs:disable PSR1.Files.SideEffects.FoundWithSymbols /** - * @param array{source: string, destination: string} $file + * @param array{source: string, destination: string, environment: array} $file */ function copyFile(array $file): void { + if (! in_array(getEnvironment(), $file['environment'])) { + echo "Skipping the copy of {$file['source']} due to environment settings." . PHP_EOL; + return; + } + if (is_readable($file['destination'])) { - echo "File {$file['destination']} already exists." . PHP_EOL; + echo "File {$file['destination']} already exists. Skipping..." . PHP_EOL; + return; + } + + if (! copy($file['source'], $file['destination'])) { + echo "Cannot copy {$file['source']} file to {$file['destination']}" . PHP_EOL; } else { - if (! copy($file['source'], $file['destination'])) { - echo "Cannot copy {$file['source']} file to {$file['destination']}" . PHP_EOL; - } else { - echo "File {$file['source']} copied successfully to {$file['destination']}." . PHP_EOL; - } + echo "File {$file['source']} copied successfully to {$file['destination']}." . PHP_EOL; } } +function getEnvironment(): string +{ + return getenv('COMPOSER_DEV_MODE') === '1' ? ENVIRONMENT_DEVELOPMENT : ENVIRONMENT_PRODUCTION; +} + $files = [ [ 'source' => 'config/autoload/local.php.dist', 'destination' => 'config/autoload/local.php', + 'environment' => [ENVIRONMENT_DEVELOPMENT, ENVIRONMENT_PRODUCTION], + ], + [ + 'source' => 'config/autoload/local.test.php.dist', + 'destination' => 'config/autoload/local.test.php', + 'environment' => [ENVIRONMENT_DEVELOPMENT], ], ]; +echo "Using environment setting: " . getEnvironment() . PHP_EOL; + array_walk($files, 'copyFile'); diff --git a/config/autoload/local.test.php.dist b/config/autoload/local.test.php.dist index 8f9543a..d0f65d8 100644 --- a/config/autoload/local.test.php.dist +++ b/config/autoload/local.test.php.dist @@ -4,7 +4,7 @@ declare(strict_types=1); use LightTest\Common\TestMode; -if (! TestMode::class::isEnabled()) { +if (! TestMode::isEnabled()) { return []; } diff --git a/src/App/src/ConfigProvider.php b/src/App/src/ConfigProvider.php index c7157af..55171be 100644 --- a/src/App/src/ConfigProvider.php +++ b/src/App/src/ConfigProvider.php @@ -31,6 +31,7 @@ * @phpstan-type ConfigType array{ * dependencies: DependenciesType, * doctrine: DoctrineConfigType, + * templates: TemplatesType, * resultCacheLifetime: int, * } * @phpstan-type DoctrineConfigType array{ @@ -84,6 +85,9 @@ * factories: array, * aliases: array, * } + * @phpstan-type TemplatesType array{ + * paths: non-empty-array, + * } **/ class ConfigProvider { @@ -127,15 +131,7 @@ public function getDependencies(): array } /** - * @return array{ - * paths: array{ - * app: array{literal-string&non-falsy-string}, - * error: array{literal-string&non-falsy-string}, - * jsonld: array{literal-string&non-falsy-string}, - * layout: array{literal-string&non-falsy-string}, - * partial: array{literal-string&non-falsy-string}, - * } - * } + * @return TemplatesType */ public function getTemplates(): array { diff --git a/src/Page/src/ConfigProvider.php b/src/Page/src/ConfigProvider.php index 6041f62..d241aa1 100644 --- a/src/Page/src/ConfigProvider.php +++ b/src/Page/src/ConfigProvider.php @@ -11,13 +11,24 @@ use Light\Page\Service\PageServiceInterface; use Mezzio\Application; +/** + * @phpstan-type ConfigType array{ + * dependencies: DependenciesType, + * templates: TemplatesType, + * } + * @phpstan-type DependenciesType array{ + * delegators: non-empty-array>, + * factories: array, + * aliases: array, + * } + * @phpstan-type TemplatesType array{ + * paths: non-empty-array, + * } + **/ class ConfigProvider { /** - @return array{ - * dependencies: array, - * templates: array, - * } + * @return ConfigType */ public function __invoke(): array { @@ -28,11 +39,7 @@ public function __invoke(): array } /** - @return array{ - * delegators: array>, - * factories: array, - * aliases: array - * } + * @return DependenciesType */ public function getDependencies(): array { @@ -53,9 +60,7 @@ public function getDependencies(): array } /** - @return array{ - * paths: array{page: array{literal-string&non-falsy-string}} - * } + * @return TemplatesType */ public function getTemplates(): array { diff --git a/test/Common/TestCase.php b/test/Common/TestCase.php index f386ea9..686815e 100644 --- a/test/Common/TestCase.php +++ b/test/Common/TestCase.php @@ -17,12 +17,20 @@ class TestCase extends \PHPUnit\Framework\TestCase protected ?ContainerInterface $container = null; protected ?EntityManagerInterface $entityManager = null; + /** + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface + */ protected function setUp(): void { TestMode::enable(); $this->ensureTestMode(); } + /** + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface + */ private function ensureTestMode(): void { if (! TestMode::isEnabled()) { diff --git a/test/Unit/App/ConfigProviderTest.php b/test/Unit/App/ConfigProviderTest.php index 827e927..86aa9b3 100644 --- a/test/Unit/App/ConfigProviderTest.php +++ b/test/Unit/App/ConfigProviderTest.php @@ -6,11 +6,17 @@ use Light\App\ConfigProvider; use Light\App\Handler\GetIndexViewHandler; -use PHPUnit\Framework\TestCase; +use LightTest\Unit\UnitTest; -class ConfigProviderTest extends TestCase +/** + * @phpstan-import-type ConfigType from ConfigProvider + */ +class ConfigProviderTest extends UnitTest { - /** @var array */ + /** + * @phpstan-var ConfigType $config + * @phpstan-ignore property.defaultValue + */ protected array $config = []; protected function setup(): void diff --git a/test/Unit/Page/ConfigProviderTest.php b/test/Unit/Page/ConfigProviderTest.php index 67cd02f..5e0a7ca 100644 --- a/test/Unit/Page/ConfigProviderTest.php +++ b/test/Unit/Page/ConfigProviderTest.php @@ -8,12 +8,18 @@ use Light\Page\RoutesDelegator; use Light\Page\Service\PageService; use Light\Page\Service\PageServiceInterface; +use LightTest\Unit\UnitTest; use Mezzio\Application; -use PHPUnit\Framework\TestCase; -class ConfigProviderTest extends TestCase +/** + * @phpstan-import-type ConfigType from ConfigProvider + */ +class ConfigProviderTest extends UnitTest { - /** @var array>*/ + /** + * @phpstan-var ConfigType $config + * @phpstan-ignore property.defaultValue + */ protected array $config = []; protected function setup(): void diff --git a/test/Unit/Page/Handler/PageHandlerTest.php b/test/Unit/Page/Handler/PageHandlerTest.php index ebf25a4..02a4bcf 100644 --- a/test/Unit/Page/Handler/PageHandlerTest.php +++ b/test/Unit/Page/Handler/PageHandlerTest.php @@ -8,14 +8,14 @@ use Light\Blog\Repository\CategoryRepository; use Light\Blog\Repository\PostRepository; use Light\Page\Handler\GetPageViewHandler; +use LightTest\Unit\UnitTest; use Mezzio\Router\RouteResult; use Mezzio\Template\TemplateRendererInterface; use PHPUnit\Framework\MockObject\Exception; -use PHPUnit\Framework\TestCase; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Server\RequestHandlerInterface; -class PageHandlerTest extends TestCase +class PageHandlerTest extends UnitTest { /** * @throws Exception diff --git a/test/Unit/Page/RoutesDelegatorTest.php b/test/Unit/Page/RoutesDelegatorTest.php index 46aca7d..a529cd3 100644 --- a/test/Unit/Page/RoutesDelegatorTest.php +++ b/test/Unit/Page/RoutesDelegatorTest.php @@ -6,17 +6,17 @@ use Light\Page\Handler\GetPageViewHandler; use Light\Page\RoutesDelegator; +use LightTest\Unit\UnitTest; use Mezzio\Application; use Mezzio\Router\Route; use PHPUnit\Framework\MockObject\Exception; -use PHPUnit\Framework\TestCase; use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerInterface; use Psr\Container\NotFoundExceptionInterface; use function sprintf; -class RoutesDelegatorTest extends TestCase +class RoutesDelegatorTest extends UnitTest { /** * @throws ContainerExceptionInterface diff --git a/test/Unit/Page/Service/PageServiceTest.php b/test/Unit/Page/Service/PageServiceTest.php index db69d7a..eb15edb 100644 --- a/test/Unit/Page/Service/PageServiceTest.php +++ b/test/Unit/Page/Service/PageServiceTest.php @@ -6,9 +6,9 @@ use Light\Page\Service\PageService; use Light\Page\Service\PageServiceInterface; -use PHPUnit\Framework\TestCase; +use LightTest\Unit\UnitTest; -class PageServiceTest extends TestCase +class PageServiceTest extends UnitTest { public function testWillInstantiate(): void { From 8720c251df90c751a0674e2955c017280238499f Mon Sep 17 00:00:00 2001 From: OStefan2001 Date: Mon, 3 Aug 2026 15:40:52 +0300 Subject: [PATCH 06/10] Update CI --- bin/composer-post-install-script.php | 4 ++++ src/App/src/ConfigProvider.php | 4 ++-- src/App/templates/app/index.html.twig | 12 ++++++------ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/bin/composer-post-install-script.php b/bin/composer-post-install-script.php index abd465d..3718b5c 100644 --- a/bin/composer-post-install-script.php +++ b/bin/composer-post-install-script.php @@ -4,6 +4,10 @@ const ENVIRONMENT_DEVELOPMENT = 'development'; const ENVIRONMENT_PRODUCTION = 'production'; + + + + // phpcs:disable PSR1.Files.SideEffects.FoundWithSymbols /** diff --git a/src/App/src/ConfigProvider.php b/src/App/src/ConfigProvider.php index 55171be..8798e27 100644 --- a/src/App/src/ConfigProvider.php +++ b/src/App/src/ConfigProvider.php @@ -86,8 +86,8 @@ * aliases: array, * } * @phpstan-type TemplatesType array{ - * paths: non-empty-array, - * } + * paths: non-empty-array, + * } **/ class ConfigProvider { diff --git a/src/App/templates/app/index.html.twig b/src/App/templates/app/index.html.twig index f8a72a8..b699306 100644 --- a/src/App/templates/app/index.html.twig +++ b/src/App/templates/app/index.html.twig @@ -93,12 +93,12 @@ 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 repositorie. 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.

+
From 035e8d1aab6405c41261f87a741b21d2c848f6c6 Mon Sep 17 00:00:00 2001 From: OStefan2001 Date: Mon, 3 Aug 2026 15:41:30 +0300 Subject: [PATCH 07/10] Update CI --- bin/composer-post-install-script.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/bin/composer-post-install-script.php b/bin/composer-post-install-script.php index 3718b5c..abd465d 100644 --- a/bin/composer-post-install-script.php +++ b/bin/composer-post-install-script.php @@ -4,10 +4,6 @@ const ENVIRONMENT_DEVELOPMENT = 'development'; const ENVIRONMENT_PRODUCTION = 'production'; - - - - // phpcs:disable PSR1.Files.SideEffects.FoundWithSymbols /** From 81925e2869106b4dd4dec07acb5f6bc1c7b0f9b6 Mon Sep 17 00:00:00 2001 From: OStefan2001 Date: Mon, 3 Aug 2026 15:42:20 +0300 Subject: [PATCH 08/10] Update CI --- bin/composer-post-install-script.php | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/composer-post-install-script.php b/bin/composer-post-install-script.php index abd465d..f8740d5 100644 --- a/bin/composer-post-install-script.php +++ b/bin/composer-post-install-script.php @@ -4,6 +4,7 @@ const ENVIRONMENT_DEVELOPMENT = 'development'; const ENVIRONMENT_PRODUCTION = 'production'; + // phpcs:disable PSR1.Files.SideEffects.FoundWithSymbols /** From 9f761df5c2c0afdc68485d4c835ae725d294c0fa Mon Sep 17 00:00:00 2001 From: OStefan2001 Date: Mon, 3 Aug 2026 15:43:17 +0300 Subject: [PATCH 09/10] Fix conflicts --- src/App/templates/app/index.html.twig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/App/templates/app/index.html.twig b/src/App/templates/app/index.html.twig index b699306..9c87b57 100644 --- a/src/App/templates/app/index.html.twig +++ b/src/App/templates/app/index.html.twig @@ -10,7 +10,7 @@ PSR-15 . middleware-first architecture

A headless platform for building modern web applications

Dotkernel is a set of open-source PHP applications — REST API, admin, and queue — that ship assembled on Mezzio and Laminas, over one shared Doctrine domain layer called Core. - OAuth2, RBAC, HAL, and a generated OpenAPI spec are wired together on install, not left for you to choose.

+ OAuth2, RBAC, HAL, and a generated OpenAPI spec are wired together on install, not left for you to choose.

@@ -88,9 +88,9 @@
Headless Platform

Three applications, one platform

-

API, Admin and Queue declare the same Core namespaces — the same entities, repositories and services. - A User means the same thing to the endpoint that creates it, the admin screen that moderates it and the worker that emails it. - Three deployables that scale independently and never disagree about the domain.

+

API, Admin and Queue declare the same Core namespaces — the same entities, repositories and services. + A User means the same thing to the endpoint that creates it, the admin screen that moderates it and the worker that emails it. + Three deployables that scale independently and never disagree about the domain.

@@ -113,7 +113,7 @@ Stars

An alternative to legacy Laminas API Tools (Apigility). REST APIs on a readable PSR-15 middleware pipeline — no kernel, no facades, no runtime magic. - OAuth2, RBAC and OpenAPI included.

+ OAuth2, RBAC and OpenAPI included.

GitHub Demo From 13727ee8927cf5ce6e78f9e152d17ebdcde873e0 Mon Sep 17 00:00:00 2001 From: OStefan2001 Date: Mon, 3 Aug 2026 16:28:02 +0300 Subject: [PATCH 10/10] fixed index conflict --- src/App/templates/app/index.html.twig | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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.

+