Skip to content

Commit 958d91e

Browse files
committed
Upgrade to Phalcon v5
1 parent 6ec3d6e commit 958d91e

Some content is hidden

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

53 files changed

+16205
-273
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ pass: Demo2020
1515

1616
### Requirements
1717

18-
* PHP >= 7.3
18+
* PHP >= 8.1
1919
* [Apache][1] Web Server with [mod_rewrite][2] enabled or [Nginx][3] Web Server
20-
* Phalcon >= 4.0.6 [Phalcon Framework release][4] extension enabled
20+
* Phalcon >= 5.3.1 [Phalcon Framework release][4] extension enabled
2121
* [MariaDB][5] >= 10.3
2222

2323
### Installation

app/config/config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* NOTE: please remove this comment.
66
*/
77

8-
use Phalcon\Config;
8+
use Phalcon\Config\Config;
99

1010
defined('BASE_PATH') || define('BASE_PATH', getenv('BASE_PATH') ?: realpath(dirname(__FILE__) . '/../..'));
1111
defined('APP_PATH') || define('APP_PATH', BASE_PATH . '/app');

app/config/loader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?php
22

3-
use Phalcon\Loader;
3+
use Phalcon\Autoload\Loader;
44

55
$loader = new Loader();
66

77
/**
88
* We're a registering a set of directories taken from the configuration file
99
*/
10-
$loader->registerNamespaces([
10+
$loader->setNamespaces([
1111
'PSA\Controllers' => $config->application->controllersDir,
1212
'PSA\Forms' => $config->application->formsDir,
1313
'PSA\Helpers' => $config->application->helpersDir,

app/config/privateResources.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
declare(strict_types=1);
33

4-
use Phalcon\Config;
4+
use Phalcon\Config\Config;
55

66
return new Config([
77
'privateResources' => [

app/config/services.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
<?php
22
declare(strict_types=1);
33

4-
use Phalcon\Escaper;
4+
use Phalcon\Html\Escaper;
55
use Phalcon\Events\Manager;
66
use Phalcon\Flash\Direct as Flash;
77
use Phalcon\Flash\Session as FlashSession;
8-
use Phalcon\Logger;
9-
use Phalcon\Logger\Adapter\Stream;
8+
use Phalcon\Logger\Logger;
109
use Phalcon\Logger\Formatter\Line;
10+
use Phalcon\Logger\Adapter\Stream;
1111
use Phalcon\Mvc\Model\Metadata\Memory as MetaDataAdapter;
1212
use Phalcon\Mvc\Dispatcher;
1313
use Phalcon\Mvc\View;
1414
use Phalcon\Mvc\View\Engine\Php as PhpEngine;
1515
use Phalcon\Mvc\View\Engine\Volt as VoltEngine;
1616
use Phalcon\Session\Adapter\Stream as SessionAdapter;
1717
use Phalcon\Session\Manager as SessionManager;
18-
use Phalcon\Url as UrlResolver;
18+
use Phalcon\Mvc\Url as UrlResolver;
1919
use Phalcon\Crypt;
2020
use PSA\Auth\Auth;
2121
use PSA\Acl\Acl;

app/controllers/ChangeHistoryController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ChangeHistoryController extends ControllerBase
1818
public function initialize()
1919
{
2020
$this->view->setTemplateBefore('private');
21-
$this->tag->setTitle(' Change History');
21+
$this->tag->title()->set(' Change History');
2222
}
2323

2424
/**

app/controllers/DashboardController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ public function initialize()
1818
*/
1919
public function indexAction()
2020
{
21-
$this->tag->setTitle('Simple Admin');
21+
$this->tag->title()->set('Simple Admin');
2222
}
2323
}

app/controllers/ErrorController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ public function initialize()
2121

2222
public function show404Action()
2323
{
24-
$this->tag->setTitle('Error 404');
24+
$this->tag->title()->set('Error 404');
2525
$this->response->setStatusCode(404, 'Not Found');
2626
}
2727

2828
public function show500Action()
2929
{
30-
$this->tag->setTitle('Error 500');
30+
$this->tag->title()->set('Error 500');
3131
$this->response->setStatusCode(500, 'Internal Server Error');
3232
}
3333
}

app/controllers/IndexController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class IndexController extends ControllerBase
2323
public function initialize()
2424
{
2525
$this->view->setTemplateBefore('public');
26-
$this->tag->setTitle('Simple Admin');
26+
$this->tag->title()->set('Simple Admin');
2727
// check auth users
2828
if ($this->auth->getIdentity()) {
2929
$this->response->redirect('dashboard');

app/controllers/RolesController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class RolesController extends ControllerBase
2323
public function initialize()
2424
{
2525
$this->view->setTemplateBefore('private');
26-
$this->tag->setTitle('Roles');
26+
$this->tag->title()->set('Roles');
2727
}
2828

2929
/**

0 commit comments

Comments
 (0)