diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index b738967..be1f11a 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -15,8 +15,6 @@ jobs: - ubuntu-latest php: - - "8.3" - - "8.4" - "8.5" steps: diff --git a/.github/workflows/qodana_code_quality.yml b/.github/workflows/qodana_code_quality.yml deleted file mode 100644 index ed41b3c..0000000 --- a/.github/workflows/qodana_code_quality.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Qodana -on: - workflow_dispatch: - pull_request: - push: - branches: - - '1.0' - - 'releases/*' - -jobs: - qodana: - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - checks: write - strategy: - matrix: - php-versions: [ '8.3', '8.4', '8.5' ] - steps: - - uses: actions/checkout@v6 - with: - # to check out the actual pull request commit, not the merge commit - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 # a full history is required for pull request analysis - - name: Install PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - coverage: pcov - ini-values: assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On - tools: composer:v2, cs2pr - - - name: Determine composer cache directory - run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV - - - name: Cache dependencies installed with composer - uses: actions/cache@v5 - with: - path: ${{ env.COMPOSER_CACHE_DIR }} - key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: | - php${{ matrix.php }}-composer- - - name: Install dependencies with composer - run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi - - name: 'Qodana Scan' - uses: JetBrains/qodana-action@v2026.1.0 - env: - QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 94fbdf8..16bc8bd 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -15,8 +15,6 @@ jobs: - ubuntu-latest php: - - "8.3" - - "8.4" - "8.5" steps: diff --git a/composer.json b/composer.json index 9327930..e74e4e2 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ } }, "require": { - "php": "~8.3.0 || ~8.4.0 || ~8.5.0", + "php": "~8.5.0", "doctrine/data-fixtures": "^2.2", "doctrine/doctrine-fixtures-bundle": "^4.3", "dotkernel/dot-errorhandler": "^4.4.0", diff --git a/src/App/src/RoutesDelegator.php b/src/App/src/RoutesDelegator.php index 491ddae..f505d50 100644 --- a/src/App/src/RoutesDelegator.php +++ b/src/App/src/RoutesDelegator.php @@ -4,6 +4,7 @@ namespace Light\App; +use Laminas\Diactoros\Response\RedirectResponse; use Light\App\Handler\GetIndexViewHandler; use Mezzio\Application; use Psr\Container\ContainerInterface; @@ -16,9 +17,17 @@ public function __invoke(ContainerInterface $container, string $serviceName, cal { $app = $callback(); assert($app instanceof Application); - $app->get('/', [GetIndexViewHandler::class], 'app::index'); + $app->get('/{first}', function ($request) { + $uri = $request->getUri(); + return new RedirectResponse((string) $uri . '/', 301); + }); + $app->get('/{first}/{second}', function ($request) { + $uri = $request->getUri(); + return new RedirectResponse((string) $uri . '/', 301); + }); + return $app; } } diff --git a/src/App/templates/app/index.html.twig b/src/App/templates/app/index.html.twig index a1373d9..2a8b06e 100644 --- a/src/App/templates/app/index.html.twig +++ b/src/App/templates/app/index.html.twig @@ -130,4 +130,4 @@ -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/src/App/templates/layout/default.html.twig b/src/App/templates/layout/default.html.twig index ed0d11a..2b9131c 100644 --- a/src/App/templates/layout/default.html.twig +++ b/src/App/templates/layout/default.html.twig @@ -1,23 +1,21 @@ - + {{ include('@partial/meta.html.twig') }} - {% block canonical %}{% endblock %} - + {% block canonical %} + {% endblock %} - - - {% block stylesheets %}{% endblock %} + {% block stylesheets %} + {% endblock %} -
+

+ Page {{ data.currentPage }} of {{ data.lastPage }} +  ·  + {{ data.count }} articles total +

+ {% endif %} + + {% endblock %} diff --git a/src/Blog/templates/page/contact.html.twig b/src/Blog/templates/page/contact.html.twig new file mode 100644 index 0000000..5d8d8df --- /dev/null +++ b/src/Blog/templates/page/contact.html.twig @@ -0,0 +1,48 @@ +{% extends '@layout/default.html.twig' %} + +{% block page_title %}

Contact Us

{% endblock %} + +{% block content %} +
+
+
+
+ +
+

GitHub

+

+ Browse our repositories, open issues, or contribute to the DotKernel ecosystem. +

+ + Visit GitHub + +
+
+
+
+
+ +
+

Documentation

+

+ Read the guides, references, and best practices for building with DotKernel. +

+ + Read the Docs + +
+
+
+

Our Approach

+

+ Dotkernel is a Headless Platform for building modern web applications. + + The Dotkernel Headless Platform is made up of Open Source components aimed at businesses that need custom solutions.

+
+{% endblock %} diff --git a/src/Page/src/RoutesDelegator.php b/src/Page/src/RoutesDelegator.php index e5e2b86..e31b454 100644 --- a/src/Page/src/RoutesDelegator.php +++ b/src/Page/src/RoutesDelegator.php @@ -28,7 +28,7 @@ public function __invoke(ContainerInterface $container, string $serviceName, cal foreach ($routes as $prefix => $moduleRoutes) { foreach ($moduleRoutes as $routeUri => $templateName) { $app->get( - sprintf('/%s/%s', $prefix, $routeUri), + sprintf('/%s/', $routeUri), GetPageViewHandler::class, sprintf('%s::%s', $prefix, $templateName) ); diff --git a/src/Page/templates/page/contact.html.twig b/src/Page/templates/page/contact.html.twig new file mode 100644 index 0000000..5d8d8df --- /dev/null +++ b/src/Page/templates/page/contact.html.twig @@ -0,0 +1,48 @@ +{% extends '@layout/default.html.twig' %} + +{% block page_title %}

Contact Us

{% endblock %} + +{% block content %} +
+
+
+
+ +
+

GitHub

+

+ Browse our repositories, open issues, or contribute to the DotKernel ecosystem. +

+ + Visit GitHub + +
+
+
+
+
+ +
+

Documentation

+

+ Read the guides, references, and best practices for building with DotKernel. +

+ + Read the Docs + +
+
+
+

Our Approach

+

+ Dotkernel is a Headless Platform for building modern web applications. + + The Dotkernel Headless Platform is made up of Open Source components aimed at businesses that need custom solutions.

+
+{% endblock %} diff --git a/src/Page/templates/page/dotkernel-packages-oss-lifecycle.html.twig b/src/Page/templates/page/dotkernel-packages-oss-lifecycle.html.twig new file mode 100644 index 0000000..4597ebc --- /dev/null +++ b/src/Page/templates/page/dotkernel-packages-oss-lifecycle.html.twig @@ -0,0 +1,9 @@ +{% extends '@layout/default.html.twig' %} + +{% block page_title %} +

Dotkernel packages OSS Lifecycle

+{% endblock %} + +{% block content %} + +{% endblock %} diff --git a/test/Unit/Page/RoutesDelegatorTest.php b/test/Unit/Page/RoutesDelegatorTest.php index bd94d63..46aca7d 100644 --- a/test/Unit/Page/RoutesDelegatorTest.php +++ b/test/Unit/Page/RoutesDelegatorTest.php @@ -25,9 +25,9 @@ class RoutesDelegatorTest extends TestCase */ public function testWillInvoke(): void { - $moduleName = 'test'; + $moduleName = 'test_module_name'; $routeName = 'test_route_name'; - $routeUri = sprintf('/%s/%s', $moduleName, $routeName); + $routeUri = sprintf('/%s/', $routeName); $templateName = sprintf('%s::%s', $moduleName, $routeName); $container = $this->createStub(ContainerInterface::class);