-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for using plugin error controller within prefixes
When within a plugin + prefix routing scope if there isn't an ErrorController for the plugin + prefix, fallback to just the plugin before falling back to the application/core error controller. This allows plugins to provide error handling for all of their routes if they need it. Fixes #17025
- Loading branch information
Showing
3 changed files
with
64 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
tests/test_app/Plugin/TestPlugin/src/Controller/ErrorController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
/** | ||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org) | ||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) | ||
* | ||
* Licensed under The MIT License | ||
* Redistributions of files must retain the above copyright notice. | ||
* | ||
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) | ||
* @link https://cakephp.org CakePHP(tm) Project | ||
* @since 4.5.0 | ||
* @license https://opensource.org/licenses/mit-license.php MIT License | ||
*/ | ||
namespace TestPlugin\Controller; | ||
|
||
use Cake\Controller\ErrorController as CoreErrorController; | ||
|
||
/** | ||
* Error Handling Controller | ||
* | ||
* Controller used by ErrorHandler to render error views. | ||
*/ | ||
class ErrorController extends CoreErrorController | ||
{ | ||
} |