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
6 changes: 0 additions & 6 deletions bin/clear-config-cache.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
<?php

/**
* @see https://github.com/mezzio/mezzio-skeleton for the canonical source repository
* @copyright https://github.com/mezzio/mezzio-skeleton/blob/master/COPYRIGHT.md
* @license https://github.com/mezzio/mezzio-skeleton/blob/master/LICENSE.md New BSD License
*/

declare(strict_types=1);

chdir(__DIR__ . '/../');
Expand Down
2 changes: 2 additions & 0 deletions bin/doctrine
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env php
<?php

declare(strict_types=1);

use Doctrine\ORM\Tools\Console\ConsoleRunner;
use Doctrine\ORM\Tools\Console\EntityManagerProvider\SingleManagerProvider;

Expand Down
57 changes: 29 additions & 28 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "dotkernel/frontend",
"type": "project",
"description": "Dotkernel Frontend Application",
"description": "DotKernel Frontend Application",
"license": "MIT",
"homepage": "https://github.com/dotkernel/frontend",
"keywords": [
Expand Down Expand Up @@ -45,40 +45,41 @@
"require": {
"php": "~8.1.0 || ~8.2.0",
"ext-curl": "*",
"ext-json": "*",
"ext-gettext": "*",
"dotkernel/dot-annotated-services": "^3.2.1",
"dotkernel/dot-authorization": "^3.2.0",
"dotkernel/dot-controller": "^3.2.1",
"ext-json": "*",
"dotkernel/dot-annotated-services": "^3.2",
"dotkernel/dot-authorization": "^3.2",
"dotkernel/dot-controller": "^3.2",
"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",
"dotkernel/dot-errorhandler": "^3.2",
"dotkernel/dot-flashmessenger": "^3.2",
"dotkernel/dot-form": "^4.0",
"dotkernel/dot-mail": "~3.4 || ~4.0",
"dotkernel/dot-navigation": "^3.2.0",
"dotkernel/dot-rbac-guard": "^3.2.1",
"dotkernel/dot-response-header": "^3.1.0",
"dotkernel/dot-session": "^5.2.0",
"dotkernel/dot-twigrenderer": "^3.2.1",
"laminas/laminas-component-installer": "^2.8.0",
"laminas/laminas-config-aggregator": "^1.8.0",
"laminas/laminas-i18n": "^2.17.0",
"mezzio/mezzio": "^3.11.0",
"mezzio/mezzio-authorization-rbac": "^1.3.0",
"mezzio/mezzio-cors": "^1.3.0",
"mezzio/mezzio-fastroute": "^3.5.0",
"ramsey/uuid-doctrine": "^1.8.1",
"roave/psr-container-doctrine": "^3.5.0"
"dotkernel/dot-navigation": "^3.2",
"dotkernel/dot-rbac-guard": "^3.2",
"dotkernel/dot-response-header": "^3.1",
"dotkernel/dot-session": "^5.2",
"dotkernel/dot-twigrenderer": "^3.2",
"friendsofphp/proxy-manager-lts": "^1.0",
"laminas/laminas-component-installer": "^2.8",
"laminas/laminas-config-aggregator": "^1.8",
"laminas/laminas-i18n": "^2.17",
"mezzio/mezzio": "^3.11",
"mezzio/mezzio-authorization-rbac": "^1.3",
"mezzio/mezzio-cors": "^1.3",
"mezzio/mezzio-fastroute": "^3.5",
"ramsey/uuid-doctrine": "^1.8",
"roave/psr-container-doctrine": "^3.5"
},
"require-dev": {
"laminas/laminas-development-mode": "^3.10.0",
"mezzio/mezzio-tooling": "^2.6.0",
"phpunit/phpunit": "^9.5.26",
"laminas/laminas-development-mode": "^3.10",
"mezzio/mezzio-tooling": "^2.6",
"phpunit/phpunit": "^9.5",
"roave/security-advisories": "dev-master",
"squizlabs/php_codesniffer": "^3.7.1",
"filp/whoops": "^2.14.5",
"vimeo/psalm": "^4.30.0"
"squizlabs/php_codesniffer": "^3.7",
"filp/whoops": "^2.14",
"vimeo/psalm": "^4.30"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 2 additions & 0 deletions config/autoload/authentication.global.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use Frontend\User\Entity\User;
use Frontend\App\Common\Message;

Expand Down
2 changes: 2 additions & 0 deletions config/autoload/authorization.global.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

return [
'dependencies' => [],
'dot_authorization' => [
Expand Down
4 changes: 3 additions & 1 deletion config/autoload/dependencies.global.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

declare(strict_types=1);

use Dot\Authorization\AuthorizationInterface;
use Dot\Mail\Factory\MailOptionsAbstractFactory;
use Dot\Mail\Factory\MailServiceAbstractFactory;
use Dot\Mail\Service\MailService;
use Dot\ErrorHandler\ErrorHandlerInterface;
use Dot\ErrorHandler\LogErrorHandler;
use Dot\Rbac\Authorization\AuthorizationService;
use Frontend\App\Middleware\AuthMiddleware;
use Frontend\App\Factory\AuthMiddlewareFactory;

Expand All @@ -19,7 +21,7 @@
// key is the alias name, the value is the service to which it points.
'aliases' => [
ErrorHandlerInterface::class => LogErrorHandler::class,
\Dot\Authorization\AuthorizationInterface::class => \Dot\Rbac\Authorization\AuthorizationService::class,
AuthorizationInterface::class => AuthorizationService::class,
MailService::class => 'dot-mail.service.default',
],
// Use 'invokables' for constructor-less services, or services that do
Expand Down
13 changes: 8 additions & 5 deletions config/autoload/doctrine.global.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?php

declare(strict_types=1);

use Doctrine\Common\Cache\PhpFileCache;
use Ramsey\Uuid\Doctrine\UuidBinaryOrderedTimeType;
use Ramsey\Uuid\Doctrine\UuidBinaryType;
use Ramsey\Uuid\Doctrine\UuidType;
Expand All @@ -25,9 +28,9 @@
'configuration' => [
'orm_default' => [
'entity_listener_resolver' => EntityListenerResolver::class,
'query_cache' => \Doctrine\Common\Cache\PhpFileCache::class,
'metadata_cache' => \Doctrine\Common\Cache\PhpFileCache::class,
'result_cache' => \Doctrine\Common\Cache\PhpFileCache::class
'query_cache' => PhpFileCache::class,
'metadata_cache' => PhpFileCache::class,
'result_cache' => PhpFileCache::class
]
],
'connection' => [
Expand All @@ -52,8 +55,8 @@
UuidBinaryOrderedTimeType::NAME => UuidBinaryOrderedTimeType::class,
],
'cache' => [
\Doctrine\Common\Cache\PhpFileCache::class => [
'class' => \Doctrine\Common\Cache\PhpFileCache::class,
PhpFileCache::class => [
'class' => PhpFileCache::class,
'directory' => getcwd() . '/data/cache/doctrine'
]
],
Expand Down
2 changes: 2 additions & 0 deletions config/autoload/error-handling.global.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use Laminas\Log\Formatter\Json;
use Laminas\Log\Logger;

Expand Down
1 change: 1 addition & 0 deletions config/autoload/mail.local.php.dist
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

declare(strict_types=1);

return [
Expand Down
2 changes: 2 additions & 0 deletions config/autoload/session.global.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

return [
'dot_flashmessenger' => [
'options' => [
Expand Down
2 changes: 2 additions & 0 deletions config/autoload/slug.global.php.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

return [

/**
Expand Down
2 changes: 2 additions & 0 deletions config/autoload/templates.global.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use Dot\DebugBar\Extension\DebugBarExtension;
use Frontend\Slug\Factory\RouteExtensionFactory;
use Twig\Environment;
Expand Down
2 changes: 2 additions & 0 deletions config/cli-config.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use Doctrine\Migrations\Configuration\EntityManager\ExistingEntityManager;
use Doctrine\Migrations\Configuration\Migration\PhpFile;
use Doctrine\Migrations\DependencyFactory;
Expand Down
2 changes: 2 additions & 0 deletions config/migrations.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

return [
'table_storage' => [
'table_name' => 'migrations',
Expand Down
2 changes: 1 addition & 1 deletion config/pipeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/**
* Setup middleware pipeline:
*/
return function (Application $app, MiddlewareFactory $factory, ContainerInterface $container) : void {
return function (Application $app, MiddlewareFactory $factory, ContainerInterface $container): void {
// The error handler should be the first (most outer) middleware to catch
// all Exceptions.
$app->pipe(DebugBarMiddleware::class);
Expand Down
2 changes: 1 addition & 1 deletion config/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
use Mezzio\MiddlewareFactory;
use Psr\Container\ContainerInterface;

return function (Application $app, MiddlewareFactory $factory, ContainerInterface $container) : void {
return function (Application $app, MiddlewareFactory $factory, ContainerInterface $container): void {
};
96 changes: 50 additions & 46 deletions public/debugbar/dotkernel.css
Original file line number Diff line number Diff line change
@@ -1,46 +1,50 @@
.phpdebugbar-header {
background-color: #C60B31 !important;
}

.phpdebugbar-tab, .phpdebugbar-indicator {
color: #FFFFFF !important;
}

.phpdebugbar-badge {
vertical-align: baseline !important;
}

.phpdebugbar-active {
color: #000000 !important;
}

.phpdebugbar-panel {
background-color: #F8F8F8 !important;
}

.phpdebugbar-widgets-kvlist {
font-size: .75rem !important;
}

.phpdebugbar-widgets-key {
text-align: right !important;
}

.phpdebugbar-widgets-value {
border-left: 1px solid #DDDDDD !important;
background-color: #FFFFFF !important;
}

.phpdebugbar-widgets-list-item {
background-color: #FFFFFF !important;
padding: .75rem .5rem !important;
}

.phpdebugbar-widgets-params tr > td:nth-child(1) {
background-color: #F8F8F8 !important;
text-align: right !important;
}

.phpdebugbar-widgets-params tr > td:nth-child(2) {
background-color: #FFFFFF !important;
}
.phpdebugbar-header {
background-color: #C60B31 !important;
}

.phpdebugbar-tab, .phpdebugbar-indicator {
color: #FFFFFF !important;
}

.phpdebugbar-badge {
vertical-align: baseline !important;
}

.phpdebugbar-active {
color: #000000 !important;
}

.phpdebugbar-panel {
background-color: #F8F8F8 !important;
}

.phpdebugbar-widgets-kvlist {
font-size: .75rem !important;
}

.phpdebugbar-widgets-sql {
font-size: .75rem !important;
}

.phpdebugbar-widgets-key {
text-align: right !important;
}

.phpdebugbar-widgets-value {
border-left: 1px solid #DDDDDD !important;
background-color: #FFFFFF !important;
}

.phpdebugbar-widgets-list-item {
background-color: #FFFFFF !important;
padding: .75rem .5rem !important;
}

.phpdebugbar-widgets-params tr > td:nth-child(1) {
background-color: #F8F8F8 !important;
text-align: right !important;
}

.phpdebugbar-widgets-params tr > td:nth-child(2) {
background-color: #FFFFFF !important;
}
12 changes: 8 additions & 4 deletions public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

declare(strict_types=1);

use Mezzio\Application;
use Mezzio\MiddlewareFactory;
use Psr\Container\ContainerInterface;

// Delegate static file requests back to the PHP built-in webserver
if (PHP_SAPI === 'cli-server' && $_SERVER['SCRIPT_FILENAME'] !== __FILE__) {
return false;
Expand All @@ -14,12 +18,12 @@
* Self-called anonymous function that creates its own scope and keep the global namespace clean.
*/
(function () {
/** @var \Psr\Container\ContainerInterface $container */
/** @var ContainerInterface $container */
$container = require 'config/container.php';

/** @var \Mezzio\Application $app */
$app = $container->get(\Mezzio\Application::class);
$factory = $container->get(\Mezzio\MiddlewareFactory::class);
/** @var Application $app */
$app = $container->get(Application::class);
$factory = $container->get(MiddlewareFactory::class);

// Execute programmatic/declarative middleware pipeline and routing
// configuration statements
Expand Down
4 changes: 2 additions & 2 deletions src/App/src/Common/AbstractEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

/**
* Class AbstractEntity
* @package Core\Common
* @package Frontend\App\Common
*/
abstract class AbstractEntity implements UuidAwareInterface, TimestampAwareInterface
{
Expand All @@ -31,7 +31,7 @@ public function __construct()
* @param array $data
* @return void
*/
public function exchangeArray(array $data)
public function exchangeArray(array $data): void
{
foreach ($data as $property => $values) {
if (is_array($values)) {
Expand Down
Loading