Skip to content
Merged
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
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,14 @@ This will enable dev mode by turning debug flag to `true` and turning configurat

> Charset recommendation: utf8mb4_general_ci

## Using DebugBar

DotKernel comes with its own DebugBar already installed and configured, but disabled by default.

In order to enable it, you need to clone the config file `config/autoload/debugbar.local.php.dist` as `config/autoload/debugbar.local.php`.

More about DebugBar [here](https://github.com/dotkernel/dot-debugbar).

## Email Templates

These are the email templates provided on a fresh installation, all present in the User module
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
"dotkernel/dot-annotated-services": "^3.2.1",
"dotkernel/dot-authorization": "^3.2.0",
"dotkernel/dot-controller": "^3.2.1",
"dotkernel/dot-data-fixtures": "^1.0",
"dotkernel/dot-debugbar": "^1.0",
"dotkernel/dot-errorhandler": "^3.2.0",
"dotkernel/dot-flashmessenger": "^3.2.0",
"dotkernel/dot-form": "^4.0.1",
Expand All @@ -59,7 +61,6 @@
"dotkernel/dot-response-header": "^3.1.0",
"dotkernel/dot-session": "^4.3.0",
"dotkernel/dot-twigrenderer": "^3.2.1",
"dotkernel/dot-data-fixtures": "^1.0",
"laminas/laminas-component-installer": "^2.8.0",
"laminas/laminas-config-aggregator": "^1.8.0",
"laminas/laminas-i18n": "^2.17.0",
Expand Down
30 changes: 30 additions & 0 deletions config/autoload/debugbar.local.php.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

declare(strict_types=1);

return [
Dot\DebugBar\DebugBar::class => [
/**
* Enable/Disable DebugBar
*/
'enabled' => true,

/**
* Enable DebugBar by whitelisting your IP address
*/
'ipWhitelist' => [
'127.0.0.1',
],

/**
* @see \DebugBar\JavascriptRenderer::setOptions()
*/
'javascript_renderer' => [
'base_url' => '',
'base_path' => '',
'disable_jquery' => false,
'disable_fontawesome' => false,
'disable_highlightjs' => false,
],
],
];
42 changes: 21 additions & 21 deletions config/autoload/local.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,50 +20,50 @@ $databases = [
'port' => 3306,
'driver' => 'pdo_mysql',
'charset' => 'utf8mb4',
'collate' => 'utf8mb4_general_ci'
]
'collate' => 'utf8mb4_general_ci',
],
// you can add more database connections into this array
];

return [
'annotations_cache_dir' => getcwd() . '/data/cache/annotations',
'application' => [
'name' => 'DotKernel',
'url' => $baseUrl
'url' => $baseUrl,
],
'databases' => $databases,
'doctrine' => [
'connection' => [
'orm_default' => [
'params' => $databases['default']
]
]
'params' => $databases['default'],
],
],
],
'uploads' => [
'user' => [
'url' => $baseUrl . '/uploads/user',
'path' => \realpath(__DIR__ . '/../../public/uploads/user'),
]
],
],
'contact' => [
'notification_receivers' => [
],
'message_receivers' => [
'to' => [
'tech@example.com'
'tech@example.com',
],
'cc' => [
'tech@example.com'
]
]
'tech@example.com',
],
],
],
'translator' => [
'cookie' => [
'name' => 'dk30Translator',
'lifetime' => 3600 * 24 * 30,
'samesite' => 'Lax',
'secure' => true,
'httponly' => true
'httponly' => true,
],

'default' => 'en',
Expand All @@ -76,19 +76,19 @@ return [
'base_dir' => getcwd() . '/data/language',
],
'recaptcha' => [
'scoreThreshold' => (float) 0.5,
'scoreThreshold' => 0.5,
'siteKey' => '',
'secretKey' => '',
'verifyUrl' => 'https://www.google.com/recaptcha/api/siteverify'
'verifyUrl' => 'https://www.google.com/recaptcha/api/siteverify',
],

'rememberMe' => [
'cookie' => [
'name' => 'rememberMe',
'lifetime' => 3600 * 24 * 30,
'samesite' => 'Lax',
'secure' => false,
'httponly' => true
]
'cookie' => [
'name' => 'rememberMe',
'lifetime' => 3600 * 24 * 30,
'samesite' => 'Lax',
'secure' => false,
'httponly' => true,
],
],
];
8 changes: 5 additions & 3 deletions config/autoload/templates.global.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

use Dot\DebugBar\Extension\DebugBarExtension;
use Frontend\Slug\Factory\RouteExtensionFactory;
use Twig\Environment;
use Mezzio\Twig\TwigEnvironmentFactory;
Expand All @@ -22,7 +23,7 @@
],
'debug' => false,
'templates' => [
'extension' => 'html.twig'
'extension' => 'html.twig',
],
'twig' => [
'assets_url' => '/',
Expand All @@ -33,13 +34,14 @@
'extensions' => [
DateExtension::class,
TranslationExtension::class,
RouteExtension::class
RouteExtension::class,
DebugBarExtension::class,
],
'optimizations' => -1,
'runtime_loaders' => [],
//'timezone' => '',
'globals' => [
'appName' => $app['name']
'appName' => $app['name'],
],
]
];
1 change: 1 addition & 0 deletions config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class_exists(\Mezzio\Swoole\ConfigProvider::class)
: function(){ return[]; },

// DotKernel packages
\Dot\DebugBar\ConfigProvider::class,
\Dot\Mail\ConfigProvider::class,
\Dot\Form\ConfigProvider::class,
\Dot\Log\ConfigProvider::class,
Expand Down
2 changes: 2 additions & 0 deletions config/pipeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

declare(strict_types=1);

use Dot\DebugBar\Middleware\DebugBarMiddleware;
use Dot\ErrorHandler\ErrorHandlerInterface;
use Dot\ResponseHeader\Middleware\ResponseHeaderMiddleware;
use Frontend\App\Middleware\RememberMeMiddleware;
Expand Down Expand Up @@ -31,6 +32,7 @@
// all Exceptions.
$app->pipe(ErrorHandlerInterface::class);
$app->pipe(ServerUrlMiddleware::class);
$app->pipe(DebugBarMiddleware::class);
$app->pipe(CorsMiddleware::class);

// Pipe more middleware here that you want to execute on every request:
Expand Down
Loading