Skip to content

Commit ade46d4

Browse files
Merge pull request #1 from pabloelcolombiano/master
PB-14812 Upgrade the app to CakePHP 4.3
2 parents 56faddc + 9f52b72 commit ade46d4

8 files changed

+13
-24
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"source": "https://github.com/passbolt/passbolt"
2323
},
2424
"require": {
25-
"cakephp/cakephp": "^4.0"
25+
"cakephp/cakephp": "^4.3"
2626
},
2727
"require-dev": {
2828
"phpunit/phpunit": "^8.5 || ^9.3"

config/routes.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,16 @@
1212
* @link https://www.passbolt.com Passbolt(tm)
1313
* @since 2.0.0
1414
*/
15-
use Cake\Routing\Router;
15+
16+
/** @var \Cake\Routing\RouteBuilder $routes */
1617

1718
/**
1819
* Selenium tests routes
1920
*/
20-
Router::plugin('PassboltSeleniumApi', ['path' => '/seleniumtests'], function ($routes) {
21+
$routes->plugin('PassboltSeleniumApi', ['path' => '/seleniumtests'], function ($routes) {
2122
$routes->setExtensions(['json']);
2223

23-
$routes->connect('/resetInstance/:dataset', ['controller' => 'ResetInstance', 'action' => 'resetInstance'])
24+
$routes->connect('/resetInstance/{dataset}', ['controller' => 'ResetInstance', 'action' => 'resetInstance'])
2425
->setPass(['dataset'])
2526
->setMethods(['GET']);
2627

@@ -45,12 +46,12 @@
4546
$routes->connect('/error500', ['controller' => 'SimulateError', 'action' => 'error500'])
4647
->setMethods(['GET']);
4748

48-
$routes->connect('/showlastemail/:username', ['controller' => 'Email', 'action' => 'showLastEmail'])
49+
$routes->connect('/showlastemail/{username}', ['controller' => 'Email', 'action' => 'showLastEmail'])
4950
->setPass(['username'])
5051
->setMethods(['GET']);
5152

5253
// Legacy v1 backward compatibility routes
53-
$routes->connect('/showLastEmail/:username', ['controller' => 'Email', 'action' => 'showLastEmail'])
54+
$routes->connect('/showLastEmail/{username}', ['controller' => 'Email', 'action' => 'showLastEmail'])
5455
->setPass(['username'])
5556
->setMethods(['GET']);
5657
});

src/Controller/ConfigController.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ class ConfigController extends AppController
3030
const EXTRA_CONFIG_FILE = self::EXTRA_CONFIG_PATH . self::EXTRA_CONFIG_FILENAME;
3131

3232
/**
33-
* Before filter
34-
*
35-
* @param \Cake\Event\EventInterface $event An Event instance
36-
* @return \Cake\Http\Response|null
33+
* @inheritDoc
3734
*/
3835
public function beforeFilter(EventInterface $event)
3936
{

src/Controller/EmailController.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@
2525
class EmailController extends AppController
2626
{
2727
/**
28-
* Before filter
29-
*
30-
* @param \Cake\Event\EventInterface $event An Event instance
31-
* @return \Cake\Http\Response|null
28+
* @inheritDoc
3229
*/
3330
public function beforeFilter(EventInterface $event)
3431
{

src/Controller/ResetInstanceController.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@ class ResetInstanceController extends AppController
2525
use ConsoleIntegrationTestTrait;
2626

2727
/**
28-
* Before filter
29-
*
30-
* @param \Cake\Event\EventInterface $event An Event instance
31-
* @return \Cake\Http\Response|null
28+
* @inheritDoc
3229
*/
3330
public function beforeFilter(EventInterface $event)
3431
{

src/Controller/SimulateErrorController.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@
2424
class SimulateErrorController extends AppController
2525
{
2626
/**
27-
* Before filter
28-
*
29-
* @param \Cake\Event\EventInterface $event An Event instance
30-
* @return \Cake\Http\Response|null
27+
* @inheritDoc
3128
*/
3229
public function beforeFilter(EventInterface $event)
3330
{

tests/TestCase/Controller/ConfigControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* @link https://www.passbolt.com Passbolt(tm)
1313
* @since 2.0.0
1414
*/
15-
namespace PassboltSeleniumApi\Test\TestCase\Controller\SeleniumTests;
15+
namespace PassboltSeleniumApi\Test\TestCase\Controller;
1616

1717
use App\Test\Lib\AppIntegrationTestCase;
1818
use PassboltSeleniumApi\Controller\ConfigController;

tests/TestCase/Controller/SimulateErrorsControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* @link https://www.passbolt.com Passbolt(tm)
1313
* @since 2.0.0
1414
*/
15-
namespace PassboltSeleniumApi\Test\TestCase\Controller\SeleniumTests;
15+
namespace PassboltSeleniumApi\Test\TestCase\Controller;
1616

1717
use App\Test\Lib\AppIntegrationTestCase;
1818
use Cake\Core\Configure;

0 commit comments

Comments
 (0)