Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- "8.3"
- "8.4"
- "8.5"
- "8.6"

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/qodana_code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
checks: write
strategy:
matrix:
php-versions: [ '8.3', '8.4', '8.5' ]
php-versions: [ '8.3', '8.4', '8.5', '8.6' ]
steps:
- uses: actions/checkout@v7
with:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
name: Run PHPStan checks

jobs:
mutation:
phpstan:
name: PHPStan ${{ matrix.php }}-${{ matrix.os }}

runs-on: ${{ matrix.os }}
Expand All @@ -18,6 +18,7 @@ jobs:
- "8.3"
- "8.4"
- "8.5"
- "8.6"

steps:
- name: Checkout
Expand Down
112 changes: 112 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,117 @@
# Changelog

## 1.6.0 - TBD

### Changed

* Widened `dotkernel/dot-errorhandler` to `^5.1.0 || ^6.0.0`
* Bumped the lower bounds of `laminas/*`, `mezzio/*` and dev dependencies
* Moved the page routes from `local.php.dist` to `Light\Page\ConfigProvider`
* `GetPageViewHandler` throws a `RuntimeException` when no route matched
* Masked session and authorization values in the error log
* Composer clears the configuration cache after install and update
* Tests use real `Route` and `RouteResult` objects
* PHPUnit fails on deprecations, notices, warnings and risky tests
* Vite config and npm vulnerability fixes by [@georgeStan](https://github.com/georgeStan) in [#120](https://github.com/dotkernel/light/pull/120) and [#123](https://github.com/dotkernel/light/pull/123)
* Aligned README with dotkernel.com wording by [@arhimede](https://github.com/arhimede) in [#119](https://github.com/dotkernel/light/pull/119)
* Renovate dependency and action updates in #118 to #127

### Added

* Support for PHP 8.6
* `dotkernel/dot-log`, `laminas/laminas-diactoros` and `laminas/laminas-servicemanager` as direct requirements
* Tests for the App module, the factories and the page routes

### Deprecated

* Nothing

### Removed

* Nothing

### Fixed

* `composer check` failed because the tests doubled final `mezzio-router` classes

## 1.5.0 - 2026-08-03

### Changed

* Issue [#72](https://github.com/dotkernel/light/issues/72): Bumped `phpunit/phpunit` to `^12.5.23` by [@OStefan2001](https://github.com/OStefan2001) in [#73](https://github.com/dotkernel/light/pull/73)
* Updated the Qodana action by [@arhimede](https://github.com/arhimede) in [#71](https://github.com/dotkernel/light/pull/71) and [#74](https://github.com/dotkernel/light/pull/74)
* Updated README and `package.json` by [@bidi47](https://github.com/bidi47) in [#95](https://github.com/dotkernel/light/pull/95)
* Cleaned branch `1.0` by [@georgeStan](https://github.com/georgeStan) in [#114](https://github.com/dotkernel/light/pull/114)
* Fixed ambiguities in README by [@arhimede](https://github.com/arhimede) in [#116](https://github.com/dotkernel/light/pull/116)
* Renovate dependency and action updates in #76 to #113

### Added

* Issue [#97](https://github.com/dotkernel/light/issues/97): Workflow that builds the JS and CSS assets by [@alexmerlin](https://github.com/alexmerlin) in [#98](https://github.com/dotkernel/light/pull/98)
* Renovate configuration in [#75](https://github.com/dotkernel/light/pull/75)

### Deprecated

* Nothing

### Removed

* Nothing

### Fixed

* Nothing

## 1.4.0 - 2025-10-31

### Changed

* Issue [#61](https://github.com/dotkernel/light/issues/61): Increased PHPStan level by [@Howriq](https://github.com/Howriq) in [#63](https://github.com/dotkernel/light/pull/63)
* Updated the Qodana workflow by [@arhimede](https://github.com/arhimede) in [#64](https://github.com/dotkernel/light/pull/64)
* Updated the Mezzio version by [@arhimede](https://github.com/arhimede) in [#65](https://github.com/dotkernel/light/pull/65)
* Updated the Packagist dependency badge by [@arhimede](https://github.com/arhimede) in [#66](https://github.com/dotkernel/light/pull/66)

### Added

* Support for PHP 8.5 by [@arhimede](https://github.com/arhimede) in [#68](https://github.com/dotkernel/light/pull/68)

### Deprecated

* Nothing

### Removed

* Nothing

### Fixed

* Nothing

## 1.3.0 - 2025-04-29

### Changed

* Replaced webpack with Vite by [@georgeStan](https://github.com/georgeStan) in [#50](https://github.com/dotkernel/light/pull/50)
* Updated the title and added PSR-15 on the index page by [@arhimede](https://github.com/arhimede) in [#54](https://github.com/dotkernel/light/pull/54)
* Updated `.gitignore` by [@alexmerlin](https://github.com/alexmerlin) in [#55](https://github.com/dotkernel/light/pull/55)
* Updated the README section about static modules by [@bidi47](https://github.com/bidi47) in [#60](https://github.com/dotkernel/light/pull/60)

### Added

* Nothing

### Deprecated

* Nothing

### Removed

* Removed `.DS_Store` files by [@arhimede](https://github.com/arhimede) in [#56](https://github.com/dotkernel/light/pull/56) and [#57](https://github.com/dotkernel/light/pull/57)

### Fixed

* Nothing

## 1.2.0 - 2025-03-03

Implemented `PSR-15`-compliant request handlers, which replace request controllers.
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ Documentation is available at: https://docs.dotkernel.org/light-documentation/

## Requirements

- **PHP** 8.3, 8.4 or 8.5 (`~8.3.0 || ~8.4.0 || ~8.5.0`).
All three versions are covered by CI.
- **PHP** 8.3, 8.4, 8.5 or 8.6 (`~8.3.0 || ~8.4.0 || ~8.5.0 || ~8.6.0`).
All four versions are covered by CI.
- **Node.js** `^20.19.0 || >=22.12.0` — required by the Vite and Sass versions used to build the interface.

npm ships bundled with Node.js, so any supported Node.js release provides a compatible npm.
Expand Down Expand Up @@ -143,7 +143,8 @@ cp config/autoload/local.php.dist config/autoload/local.php
```

> A Composer hook normally creates this file for you, but it is registered on `post-update-cmd` only, so it does not run for installs performed from an existing `composer.lock`.
> The file is git-ignored and holds your local settings — `application.url` and the page routes are defined here and nowhere else.
> The file is git-ignored and holds your local settings, for example `application.url`.
> The page routes are defined in `src/Page/src/ConfigProvider.php`.

## Development Mode

Expand Down Expand Up @@ -209,6 +210,7 @@ You should see the `Dotkernel Light` welcome page.

**NOTE:**

- `composer install` and `composer update` clear the configuration cache automatically.
- If you are getting exceptions or errors regarding some missing services, clear the configuration cache:

```shell
Expand Down
37 changes: 22 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,27 @@
}
},
"require": {
"php": "~8.3.0 || ~8.4.0 || ~8.5.0",
"dotkernel/dot-errorhandler": "^5.0.0",
"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"
"php": "~8.3.0 || ~8.4.0 || ~8.5.0 || ~8.6.0",
"dotkernel/dot-log": "^5.4.0",
"dotkernel/dot-errorhandler": "^6.0.0",
"laminas/laminas-component-installer": "^3.9.0",
"laminas/laminas-config-aggregator": "^1.21.0",
"laminas/laminas-diactoros": "^3.10.0",
"laminas/laminas-servicemanager": "^4.6.0",
"mezzio/mezzio": "^3.29.0",
"mezzio/mezzio-fastroute": "^3.15.0",
"mezzio/mezzio-twigrenderer": "^2.21.0"
},
"require-dev": {
"filp/whoops": "^2.17.0",
"laminas/laminas-coding-standard": "^3.0.1",
"laminas/laminas-development-mode": "^3.13.0",
"phpstan/phpstan": "^2.1.2",
"phpstan/phpstan-phpunit": "^2.0.4",
"filp/whoops": "^2.19.0",
"laminas/laminas-coding-standard": "^3.1.0",
"laminas/laminas-development-mode": "^3.16.0",
"phpstan/phpstan": "^2.4.0",
"phpstan/phpstan-phpunit": "^2.1.7",
"phpunit/phpunit": "^12.5.23",
"roave/security-advisories": "dev-master",
"symfony/var-dumper": "^7.2.3",
"vincentlanglet/twig-cs-fixer": "^4.0.0"
"symfony/var-dumper": "^7.2.3 || ^8.0.0",
"vincentlanglet/twig-cs-fixer": "^4.2.0"
},
"autoload": {
"psr-4": {
Expand All @@ -61,7 +64,11 @@
"@development-enable"
],
"post-update-cmd": [
"php bin/composer-post-install-script.php"
"php bin/composer-post-install-script.php",
"@clear-config-cache"
],
"post-install-cmd": [
"@clear-config-cache"
],
"development-disable": "laminas-development-mode disable",
"development-enable": "laminas-development-mode enable",
Expand Down
103 changes: 57 additions & 46 deletions config/autoload/error-handling.global.php
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
<?php

/**
* Uncomment below configurations and customize extra providers according to your project's needs.
* Configure the extra providers according to your project's needs.
*
* Improve extra data processors by extending them via a custom class and configure it under *Provider.processor.class.
* Overwrite extra data processors by creating a custom class and configure it under *Provider.processor.class.
* Each enabled provider adds data to the error log. Its processor masks the sensitive values.
* Put the lower-case names of your own sensitive cookies, headers or parameters in 'sensitiveParameters'.
* To change a processor, extend it or write a new class, and set it under the 'processor.class' key.
*
* Read more about providers/processors here: https://docs.dotkernel.org/dot-errorhandler/v4/extra/introduction/
* Read more about providers and processors: https://docs.dotkernel.org/dot-errorhandler/v6/extra/introduction/
*/

declare(strict_types=1);

use Dot\ErrorHandler\Extra\ExtraProvider;
use Dot\ErrorHandler\Extra\Processor\CookieProcessor;
use Dot\ErrorHandler\Extra\Processor\HeaderProcessor;
use Dot\ErrorHandler\Extra\Processor\ProcessorInterface;
use Dot\ErrorHandler\Extra\Processor\RequestProcessor;
use Dot\ErrorHandler\Extra\Processor\ServerProcessor;
use Dot\ErrorHandler\Extra\Processor\SessionProcessor;
use Dot\ErrorHandler\Extra\Processor\TraceProcessor;
use Dot\ErrorHandler\Extra\Provider\CookieProvider;
use Dot\ErrorHandler\Extra\Provider\HeaderProvider;
use Dot\ErrorHandler\Extra\Provider\RequestProvider;
use Dot\ErrorHandler\Extra\Provider\ServerProvider;
use Dot\ErrorHandler\Extra\Provider\SessionProvider;
use Dot\ErrorHandler\Extra\Provider\TraceProvider;
use Dot\ErrorHandler\Extra\ReplacementStrategy;
use Dot\Log\Formatter\Json;
use Dot\Log\Logger;

Expand All @@ -27,58 +36,60 @@
'logger' => 'dot-log.default_logger',
ExtraProvider::CONFIG_KEY => [
CookieProvider::class => [
'enabled' => false,
// 'processor' => [
// 'class' => \Dot\ErrorHandler\Extra\Processor\CookieProcessor::class,
// 'replacementStrategy' => \Dot\ErrorHandler\Extra\ReplacementStrategy::Full,
// 'sensitiveParameters' => [
// \Dot\ErrorHandler\Extra\Processor\ProcessorInterface::ALL,
// ],
// ],
'enabled' => false,
'processor' => [
'class' => CookieProcessor::class,
'replacementStrategy' => ReplacementStrategy::Full,
'sensitiveParameters' => [
ProcessorInterface::ALL,
],
],
],
HeaderProvider::class => [
'enabled' => false,
// 'processor' => [
// 'class' => \Dot\ErrorHandler\Extra\Processor\HeaderProcessor::class,
// 'replacementStrategy' => \Dot\ErrorHandler\Extra\ReplacementStrategy::Full,
// 'sensitiveParameters' => [],
// ],
'enabled' => false,
'processor' => [
'class' => HeaderProcessor::class,
'replacementStrategy' => ReplacementStrategy::Full,
'sensitiveParameters' => [
'authorization',
'proxy-authorization',
],
],
],
RequestProvider::class => [
'enabled' => false,
// 'processor' => [
// 'class' => \Dot\ErrorHandler\Extra\Processor\RequestProcessor::class,
// 'replacementStrategy' => \Dot\ErrorHandler\Extra\ReplacementStrategy::Full,
// 'sensitiveParameters' => [
// 'password',
// ],
// ],
'enabled' => false,
'processor' => [
'class' => RequestProcessor::class,
'replacementStrategy' => ReplacementStrategy::Full,
'sensitiveParameters' => [
'password',
],
],
],
ServerProvider::class => [
'enabled' => true,
// 'processor' => [
// 'class' => \Dot\ErrorHandler\Extra\Processor\ServerProcessor::class,
// 'replacementStrategy' => \Dot\ErrorHandler\Extra\ReplacementStrategy::Full,
// 'sensitiveParameters' => [
// \Dot\ErrorHandler\Extra\Processor\ProcessorInterface::ALL,
// ],
// ],
'enabled' => true,
'processor' => [
'class' => ServerProcessor::class,
'replacementStrategy' => ReplacementStrategy::Full,
'sensitiveParameters' => [
'phpsessid',
'php_auth_pw',
'http_authorization',
'http_proxy_authorization',
],
],
],
SessionProvider::class => [
'enabled' => false,
// 'processor' => [
// 'class' => \Dot\ErrorHandler\Extra\Processor\SessionProcessor::class,
// 'replacementStrategy' => \Dot\ErrorHandler\Extra\ReplacementStrategy::Full,
// 'sensitiveParameters' => [],
// ],
'enabled' => false,
'processor' => [
'class' => SessionProcessor::class,
],
],
TraceProvider::class => [
'enabled' => true,
// 'processor' => [
// 'class' => \Dot\ErrorHandler\Extra\Processor\TraceProcessor::class,
// 'replacementStrategy' => \Dot\ErrorHandler\Extra\ReplacementStrategy::Full,
// 'sensitiveParameters' => [],
// ],
'enabled' => true,
'processor' => [
'class' => TraceProcessor::class,
],
],
],
],
Expand Down
6 changes: 0 additions & 6 deletions config/autoload/local.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,4 @@ return [
'application' => [
'url' => $baseUrl,
],
'routes' => [
'page' => [
'about' => 'about',
'who-we-are' => 'who-we-are',
],
],
];
Loading