The changes made to the Dotkernel Light skeleton between releases 1.0.0 and 1.5.0, split into updates that affect a project created from the skeleton and updates you can safely skip.
This page covers every release from 1.0.0 to 1.5.0 (1.0.1, 1.1.0, 1.1.1, 1.2.0, 1.3.0, 1.4.0 and 1.5.0), all published from the 1.0 branch of dotkernel/light.
Version numbers on this page are the ones in composer.json and package.json at tag 1.5.0.
Apply the changes to your own project by comparing it with the skeleton at tag 1.5.0.
The supported PHP versions changed from ~8.2.0 || ~8.3.0 to ~8.3.0 || ~8.4.0 || ~8.5.0.
phpunit.xml and two tests.If you run PHP 8.2, upgrade PHP before upgrading the skeleton. If you have your own tests, they must run on PHPUnit 12.
Two pull requests raise the framework requirements:
composer.json: it removes friendsofphp/proxy-manager-lts and raises the minimum version of most requirements.mezzio/mezzio and mezzio/mezzio-fastroute.The require block at tag 1.5.0, which also reflects the changes described in the sections below:
"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"
}
dotkernel/dot-controller and dotkernel/dot-twigrenderer are no longer required.
Both are covered below.
psalm.xml, adds phpstan.neon and adds phpstan/phpstan, phpstan/phpstan-phpunit and symfony/var-dumper to require-dev.
The static-analysis script now runs PHPStan, at level 8 in phpstan.neon.phpstan analyse --memory-limit 1G.test-coverage script.bin/composer-post-install-script.php and a post-update-cmd script that runs it.
The script copies config/autoload/local.php.dist to config/autoload/local.php if the latter does not exist yet."post-update-cmd": [
"php bin/composer-post-install-script.php"
],
"static-analysis": "phpstan analyse --memory-limit 1G"
routes configurationdotkernel/dot-controller is removed and request controllers are replaced by PSR-15 request handlers.
dot-controller and replaces the controllers with handlers.
It also adds the routes key to config/autoload/local.php.dist and removes 403.html.twig.Light\Page\Controller\PageController is removed and Light\Page\Handler\GetPageViewHandler is added.
The same pull request renames the dot_log writer keys from priority to level, raises dot-errorhandler to 4.2.1 and removes the mezzio Composer script.GetPageViewHandlerFactory and GetIndexViewHandlerFactory.The classes at tag 1.5.0 are:
Light\App\Handler\GetIndexViewHandler, with Light\App\Factory\GetIndexViewHandlerFactoryLight\Page\Handler\GetPageViewHandler, with Light\Page\Factory\GetPageViewHandlerFactoryRouting changed as well:
Light\App\RoutesDelegator under the route name app::index, which replaces the route name home.
The template is now app::index (index.html.twig), which replaces app::home./page[/{action}] route is removed.Light\Page\RoutesDelegator reads the routes key of the configuration and registers a /<prefix>/<uri> route for each entry, named <prefix>::<template>.If your config/autoload/local.php was copied from the 1.0.0 local.php.dist, add the routes key, otherwise the About and Who We Are pages are not registered:
'routes' => [
'page' => [
'about' => 'about',
'who-we-are' => 'who-we-are',
],
],
The application.name key is no longer in local.php.dist.
Update the dot_log writer configuration in config/autoload/error-handling.global.php to the new keys:
'FileWriter' => [
'name' => 'stream',
'level' => Logger::ALERT,
'options' => [
'stream' => __DIR__ . '/../../log/error-log-{Y}-{m}-{d}.log',
'filters' => [
'allMessages' => [
'name' => 'level',
'options' => [
'operator' => '>=',
'level' => Logger::EMERG,
],
],
],
],
],
#22 replaces dotkernel/dot-twigrenderer with mezzio/mezzio-twigrenderer.
config/autoload/templates.global.php no longer declares dependencies, debug, the DateExtension or the appName global.
It now sets timezone to UTC and extensions and globals to empty arrays.config/config.php no longer lists \Dot\Twig\ConfigProvider and \Dot\FlashMessenger\ConfigProvider.config/twig-cs-fixer.php no longer registers the Dot DateExtension.extra.laminas and extra.mezzio component whitelists are removed from composer.json, and laminas/laminas-component-installer moved to the end of the allow-plugins list.If your templates use Twig extensions or the flash messenger that came with dot-twigrenderer, require and register them yourself.
dot-errorhandler configuration to config/autoload/error-handling.global.php: the cookie, header, request, server, session and trace providers, each with its commented-out processor options.
The server and trace providers are enabled, the others are disabled.dotkernel/dot-errorhandler from 4 to 5.
This is a major version, so check the dot-errorhandler documentation for changes before upgrading.The frontend build moved from webpack to Vite.
webpack.config.js is removed, vite.config.js is added and the package.json scripts are now build and watch.devDependencies, stops committing lock files and git-ignores the built public/css/app.css and public/js/app.js.
It also removes tsconfig.json and the browserconfig.xml and mstile-150x150.png favicon files.engines.node to package.json, so Node.js must be ^20.19.0 || >=22.12.0.vite to ^8.0.0.
It only matters if you build assets with the skeleton's package.json.Because the built files are no longer committed, build them after checkout:
npm install
npm run build
None of the following changes how the application runs.
laminas/laminas-coding-standard to ^3.0. Run composer cs-check to see new findings.vincentlanglet/twig-cs-fixer to ^4.0.0.ConfigProvider classes.cross-env to v10.pre-commit to v2.vite-plugin-css-injected-by-js to v5.vite-plugin-minify to v3.vite-plugin-static-copy to ^4.1.0, plus README tool versions.The following Renovate updates are for npm packages that are not in the package.json at tag 1.5.0, so they have no net effect:
@rollup/plugin-alias to v6.babel-loader to v10.jquery to v4.npm to v11.sass-loader to v17.typescript to v6.typescript to v7.npm to v12.app.global.php, and a Documentation link in the top menu.LICENSE link in README.md.README.md..gitignore.public/.DS_Store.public/images/app/.DS_Store.renovate.json.build-assets.yml workflow that builds the JS and CSS assets.actions/cache to v5 and v6.actions/checkout to v6 and v7.codecov/codecov-action to v6 and v7.actions/setup-node to v7.PHP 8.3, 8.4 and 8.5. PHP 8.2, supported by 1.0.0, was dropped together with the move to PHPUnit 12.
No. The changes between 1.0.0 and 1.5.0 do not touch entities or migrations.
config/autoload/local.php: add the routes key and remove application.name if you copied the file from 1.0.0.config/autoload/error-handling.global.php: the dot_log writer keys priority are now level, and the dot-errorhandler provider configuration is added.config/autoload/templates.global.php and config/config.php: changed with the Twig renderer package swap.config/twig-cs-fixer.php and phpcs.xml: changed with the same swap.No. Skipping them does not change how the application runs.
Run npm install and then npm run build with a supported Node.js version.
Use npm run watch during development.