Skip to content

Commit

Permalink
Init 5.x upgrade.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Sep 21, 2023
1 parent fc6a5ff commit 4c278d8
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 18 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"php": ">=8.1",
"spryker/cakephp-statemachine": "dev-cake5",
"cakephp/plugin-installer": "^2.0.1",
"cakephp/cakephp": "^5.0.0",
"cakephp/cakephp": "5.x-dev as 5.0.0",
"cakephp/bake": "^3.0.2",
"mobiledetect/mobiledetectlib": "3.*",
"dereuromark/cakephp-tinyauth": "dev-cake5",
Expand Down
17 changes: 12 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
*/
'Error' => [
'errorLevel' => E_ALL & ~E_USER_DEPRECATED & ~E_DEPRECATED,
'exceptionRenderer' => 'Cake\Error\ExceptionRenderer',
//'exceptionRenderer' => 'Cake\Error\ExceptionRenderer',
'skipLog' => [],
'log' => true,
'trace' => true,
Expand Down
2 changes: 1 addition & 1 deletion config/app_custom.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
],
'generatorTasks' => [
ServiceTask::class,
FormatIconFontAwesome4Task::class,
//FormatIconFontAwesome4Task::class,
IconRenderTask::class,
],
'classAnnotatorTasks' => [
Expand Down
30 changes: 22 additions & 8 deletions config/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,21 @@
use Detection\MobileDetect;
use Tools\Mailer\Mailer;

/**
* Load global functions.
*/
require CAKE . 'functions.php';

if (!defined('SECOND')) {
define('SECOND', 1);
define('MINUTE', 60);
define('HOUR', 3600);
define('DAY', 86400);
define('WEEK', 604800);
define('MONTH', 2592000);
define('YEAR', 31536000);
}

/**
* Read configuration file and inject configuration into various
* CakePHP classes.
Expand Down Expand Up @@ -172,20 +187,19 @@
FrozenDate::setToStringFormat('yyyy-MM-dd'); // For any immutable Date

TypeFactory::build('time')
->useImmutable()->setLocaleFormat('HH:mm:ss');
->setLocaleFormat('HH:mm:ss');
TypeFactory::build('date')
->useImmutable()->setLocaleFormat('dd.MM.YYYY');
->setLocaleFormat('dd.MM.YYYY');
TypeFactory::build('datetime')
->useImmutable()->setLocaleFormat('dd.MM.YYYY HH:mm:ss');
TypeFactory::build('timestamp')
->useImmutable();
->setLocaleFormat('dd.MM.YYYY HH:mm:ss');
TypeFactory::build('timestamp');
/*
Type::build('time')
->useImmutable()->setLocaleFormat('HH:mm:ss');
->setLocaleFormat('HH:mm:ss');
Type::build('date')
->useImmutable()->setLocaleFormat('dd.MM.YYYY');
->setLocaleFormat('dd.MM.YYYY');
Type::build('datetime')
->useImmutable()->setLocaleFormat('dd.MM.YYYY HH:mm:ss');
->setLocaleFormat('dd.MM.YYYY HH:mm:ss');
FrozenTime::setToStringFormat('dd.MM.YYYY HH:mm:ss');
Time::setToStringFormat('dd.MM.YYYY HH:mm:ss');
Expand Down
2 changes: 1 addition & 1 deletion src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function bootstrap(): void {
$this->addPlugin('Markup');
$this->addPlugin('Feedback');
$this->addPlugin('Icings/Menu');
$this->addPlugin('Menu');
//$this->addPlugin('Menu');
$this->addPlugin('Expose');

// inside /plugins
Expand Down
1 change: 0 additions & 1 deletion src/Controller/AppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class AppController extends Controller {
public function initialize(): void {
parent::initialize();

$this->loadComponent('RequestHandler');
$this->loadComponent('Tools.Common');
$this->loadComponent('Flash.Flash');
$this->loadComponent('TinyAuth.Auth');
Expand Down

0 comments on commit 4c278d8

Please sign in to comment.