Skip to content

Commit bcb4b8e

Browse files
authored
Merge pull request #403 from dotkernel/issue-402
Issue #402: Core Sync and update codebase
2 parents 68be6c5 + 86e8770 commit bcb4b8e

File tree

107 files changed

+713
-522
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+713
-522
lines changed

.github/workflows/qodana_code_quality.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- '6.0'
7+
- '7.0'
88
- 'releases/*'
99

1010
jobs:

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Dotkernel Admin is an application (skeleton) intended for quickly setting up an
44
It's a fast and reliable way to manage records in your database with a simple table-based approach, and also to build reports and graphs to monitor your platform.
55
The many graphical components at your disposal ensure an intuitive user experience.
66

7-
> Check out our [demo](https://admin6.dotkernel.net/).
7+
> Check out our [demo](https://admin7.dotkernel.net/).
88
>
99
> Submit user `admin` and password `dotadmin` to authenticate yourself.
1010
@@ -16,7 +16,8 @@ Documentation is available at: https://docs.dotkernel.org/admin-documentation/
1616

1717
| Branch | Release | PSR-11 | OSS Lifecycle | PHP Version |
1818
|--------|----------|--------|----------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|
19-
| 6.0 | `>= 6.0` | 1 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fadmin%2Fblob%2F6.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/admin/6.2.0) |
19+
| 7.0 | `>= 7.0` | 1 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fadmin%2Fblob%2F7.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/admin/7.0.0) |
20+
| 6.0 | `< 7.0` | 1 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fadmin%2Fblob%2F6.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/admin/6.2.0) |
2021
| 5.0 | `< 6.0` | 1 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fadmin%2Fblob%2F5.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/admin/5.0.3) |
2122
| 4.0 | `< 5.0` | 1 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fadmin%2Fblob%2F4.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/admin/4.3.1) |
2223
| 3.0 | `< 4.0` | 1 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fadmin%2Fblob%2F3.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/admin/3.2.1) |
@@ -29,12 +30,12 @@ Documentation is available at: https://docs.dotkernel.org/admin-documentation/
2930
[![GitHub issues](https://img.shields.io/github/issues/dotkernel/admin)](https://github.com/dotkernel/admin/issues)
3031
[![GitHub forks](https://img.shields.io/github/forks/dotkernel/admin)](https://github.com/dotkernel/admin/network)
3132
[![GitHub stars](https://img.shields.io/github/stars/dotkernel/admin)](https://github.com/dotkernel/admin/stargazers)
32-
[![GitHub license](https://img.shields.io/github/license/dotkernel/admin)](https://github.com/dotkernel/admin/blob/6.0/LICENSE.md)
33+
[![GitHub license](https://img.shields.io/github/license/dotkernel/admin)](https://github.com/dotkernel/admin/blob/7.0/LICENSE.md)
3334

34-
[![Build Static](https://github.com/dotkernel/admin/actions/workflows/continuous-integration.yml/badge.svg?branch=6.0)](https://github.com/dotkernel/admin/actions/workflows/continuous-integration.yml)
35+
[![Build Static](https://github.com/dotkernel/admin/actions/workflows/continuous-integration.yml/badge.svg?branch=7.0)](https://github.com/dotkernel/admin/actions/workflows/continuous-integration.yml)
3536
[![codecov](https://codecov.io/gh/dotkernel/admin/graph/badge.svg?token=BQS43UWAM4)](https://codecov.io/gh/dotkernel/admin)
36-
[![Qodana](https://github.com/dotkernel/admin/actions/workflows/qodana_code_quality.yml/badge.svg?branch=6.0)](https://github.com/dotkernel/admin/actions/workflows/qodana_code_quality.yml)
37-
[![PHPStan](https://github.com/dotkernel/admin/actions/workflows/static-analysis.yml/badge.svg?branch=6.0)](https://github.com/dotkernel/admin/actions/workflows/static-analysis.yml)
37+
[![Qodana](https://github.com/dotkernel/admin/actions/workflows/qodana_code_quality.yml/badge.svg?branch=7.0)](https://github.com/dotkernel/admin/actions/workflows/qodana_code_quality.yml)
38+
[![PHPStan](https://github.com/dotkernel/admin/actions/workflows/static-analysis.yml/badge.svg?branch=7.0)](https://github.com/dotkernel/admin/actions/workflows/static-analysis.yml)
3839

3940
## Getting Started
4041

@@ -242,7 +243,7 @@ php ./bin/clear-config-cache.php
242243
Open a web browser and visit `http://localhost:8080/`.
243244
244245
You should see the **Dotkernel Admin** login page.
245-
If you ran the migrations you will have an admin user in the database with the following credentials:
246+
If you ran the migrations, you will have an admin user in the database with the following credentials:
246247
247248
* **Identity**: `admin`
248249
* **Password**: `dotadmin`

SECURITY.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,29 @@
44

55
| Branch | OSS Lifecycle | PHP Version |
66
|--------|----------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|
7+
| 7.0 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fadmin%2Fblob%2F7.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/admin/7.0.0) |
78
| 6.0 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fadmin%2Fblob%2F6.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/admin/6.2.0) |
89
| 5.0 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fadmin%2Fblob%2F5.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/admin/5.0.3) |
910
| 4.0 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fadmin%2Fblob%2F4.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/admin/4.3.1) |
1011
| 3.0 | ![OSS Lifecycle](https://img.shields.io/osslifecycle?file_url=https%3A%2F%2Fgithub.com%2Fdotkernel%2Fadmin%2Fblob%2F3.0%2FOSSMETADATA) | ![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/admin/3.2.1) |
1112

1213
## Reporting Potential Security Issues
1314

14-
If you have encountered a potential security vulnerability in this project,
15-
please report it to us at <security@dotkernel.com>. We will work with you to
16-
verify the vulnerability and patch it.
15+
If you have encountered a potential security vulnerability in this project, please report it to us at <security@dotkernel.com>.
16+
We will work with you to verify the vulnerability and patch it.
1717

1818
When reporting issues, please provide the following information:
1919

2020
- Component(s) affected
2121
- A description indicating how to reproduce the issue
2222
- A summary of the security vulnerability and impact
2323

24-
We request that you contact us via the email address above and give the
25-
project contributors a chance to resolve the vulnerability and issue a new
26-
release prior to any public exposure; this helps protect the project's
27-
users, and provides them with a chance to upgrade and/or update in order to
28-
protect their applications.
24+
We request that you contact us via the email address above and give the project contributors a chance to resolve the vulnerability and issue a new release prior to any public exposure;
25+
this helps protect the project's users and provides them with a chance to upgrade and/or update to protect their applications.
2926

3027
## Policy
3128

3229
If we verify a reported security vulnerability, our policy is:
3330

34-
- We will patch the current release branch, as well as the immediate prior minor
35-
release branch.
36-
37-
- After patching the release branches, we will immediately issue new security
38-
fix releases for each patched release branch.
31+
- We will patch the current release branch, as well as the immediate prior minor release branch.
32+
- After patching the release branches, we will immediately issue new security fix releases for each patched release branch.

config/autoload/app.global.php

Lines changed: 0 additions & 14 deletions
This file was deleted.

config/autoload/cors.global.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
], // Custom headers
2323
'allowed_max_age' => '600', // 10 minutes
2424
'credentials_allowed' => true, // Allow cookies
25-
'exposed_headers' => [], // Tell client that the API will always return this header
25+
'exposed_headers' => [], // Tell the client that the API will always return this header
2626
],
2727
];

config/autoload/dependencies.global.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99

1010
return [
1111
// Provides application-wide services.
12-
// We recommend using fully-qualified class names whenever possible as service names.
12+
// We recommend using fully qualified class names whenever possible as service names.
1313
'dependencies' => [
1414
// Use 'aliases' to alias a service name to another service.
1515
// The key is the alias name, the value is the service to which it points.
1616
'aliases' => [
1717
AuthorizationInterface::class => AuthorizationService::class,
1818
],
19-
// Use 'invokables' for constructor-less services, or services that do not require arguments to the constructor.
19+
// Use 'invokables' for constructorless services, or services that do not require arguments to the constructor.
2020
// Map a service name to the class name.
2121
'invokables' => [
2222
// Fully\Qualified\InterfaceName::class => Fully\Qualified\ClassName::class,

config/autoload/local.php.dist

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,41 +9,63 @@
99

1010
declare(strict_types=1);
1111

12+
$appName = 'Dotkernel Admin v7';
1213
$baseUrl = 'http://localhost:8080';
1314

1415
$databases = [
15-
'default' => [
16+
/**
17+
* You can add more database connections to this array.
18+
* Only one active connection is allowed at a time.
19+
* By default, the application uses the 'mariadb' connection.
20+
* You can switch to another connection by activating it under doctrine->connection->orm_default-->params.
21+
*/
22+
'mariadb' => [
1623
'host' => 'localhost',
1724
'dbname' => 'dotkernel',
1825
'user' => '',
1926
'password' => '',
2027
'port' => 3306,
2128
'driver' => 'pdo_mysql',
22-
'charset' => 'utf8mb4',
23-
'collate' => 'utf8mb4_general_ci',
29+
'collation' => 'utf8mb4_general_ci',
30+
'table_prefix' => '',
31+
],
32+
'postgresql' => [
33+
'host' => 'localhost',
34+
'dbname' => 'dotkernel',
35+
'user' => '',
36+
'password' => '',
37+
'port' => 5432,
38+
'driver' => 'pdo_pgsql',
39+
'collation' => 'utf8mb4_general_ci',
2440
'table_prefix' => '',
2541
],
26-
// you can add more database connections to this array
2742
];
2843

2944
return [
3045
'application' => [
31-
'name' => $app['name'] ?? '',
32-
'url' => $baseUrl,
33-
],
34-
'routes' => [
35-
'page' => [
36-
'component' => 'components',
37-
],
46+
'name' => $appName,
47+
'version' => 7.0,
48+
'url' => $baseUrl,
3849
],
3950
'databases' => $databases,
4051
'doctrine' => [
4152
'connection' => [
4253
'orm_default' => [
43-
'params' => $databases['default'],
54+
'params' => $databases['mariadb'],
55+
// 'params' => $databases['postgresql'],
4456
],
4557
],
4658
],
59+
'routes' => [
60+
'page' => [
61+
'component' => 'components',
62+
],
63+
],
64+
'twig' => [
65+
'globals' => [
66+
'appName' => $appName,
67+
],
68+
],
4769
'uploads' => [
4870
'user' => [
4971
'url' => $baseUrl . '/uploads/user',

config/autoload/mezzio.global.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@
55
use Laminas\ConfigAggregator\ConfigAggregator;
66

77
return [
8-
// Toggle the configuration cache. Set this to boolean false, or remove the
9-
// directive, to disable configuration caching. Toggling development mode
10-
// will also disable it by default; clear the configuration cache using
11-
// `composer clear-config-cache`.
8+
// Toggle the configuration cache.
9+
// Set this to boolean false or remove the directive to disable configuration caching.
10+
// Toggling development mode will also disable it by default;
11+
// clear the configuration cache using `composer clear-config-cache`.
1212
ConfigAggregator::ENABLE_CACHE => true,
1313

1414
// Enable debugging; typically used to provide debugging information within templates.
1515
'debug' => false,
1616
'mezzio' => [
17-
// Provide templates for the error handling middleware to use when
18-
// generating responses.
17+
// Provide templates for the error handling middleware to use when generating responses.
1918
'error_handler' => [
2019
'template_404' => 'error::404',
2120
'template_error' => 'error::error',

config/autoload/navigation.global.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
return [
66
'dot_navigation' => [
7-
//enable menu item active if any child is active
7+
// enable menu item active if any child is active
88
'active_recursion' => true,
99
'containers' => [
1010
'main_menu' => [
@@ -100,7 +100,7 @@
100100
],
101101
],
102102
],
103-
//register custom providers here
103+
// register custom providers here
104104
'provider_manager' => [],
105105
],
106106
];

config/autoload/session.global.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121
'dot_session' => [
2222
/**
23-
* Amount of seconds of inactivity for which the system will extend session.
23+
* Number of seconds of inactivity for which the system will extend the session.
2424
*
2525
* While the difference between now and LAST_ACTIVITY stored in session is less than rememberMeInactive,
2626
* the session will be extended => user will not be logged out due to inactivity.
@@ -48,7 +48,7 @@
4848
'cookie_lifetime' => 3600 * 24 * 30,
4949

5050
/**
51-
* Specifies path to set in the session cookie.
51+
* Specifies a path to set in the session cookie.
5252
*/
5353
'cookie_path' => '/',
5454

@@ -63,7 +63,7 @@
6363
'cookie_secure' => false,
6464

6565
/**
66-
* Specifies the name of the session which is used as cookie name.
66+
* Specifies the name of the session which is used as a cookie name.
6767
*/
6868
'name' => 'ADMIN_SESSID',
6969

0 commit comments

Comments
 (0)