From fe876b6db128b5d834db6183d257042716e923f7 Mon Sep 17 00:00:00 2001 From: bgehrels Date: Mon, 18 Sep 2023 20:35:18 +0200 Subject: [PATCH] cake 5 upgrade - implement pr feedback --- config/bootstrap.php | 4 ---- phpunit.xml.dist | 1 - src/{Plugin.php => CakePdfPlugin.php} | 9 ++++++++- src/View/PdfView.php | 6 +++--- 4 files changed, 11 insertions(+), 9 deletions(-) delete mode 100644 config/bootstrap.php rename src/{Plugin.php => CakePdfPlugin.php} (73%) diff --git a/config/bootstrap.php b/config/bootstrap.php deleted file mode 100644 index fdd1f7b..0000000 --- a/config/bootstrap.php +++ /dev/null @@ -1,4 +0,0 @@ - - ./tests/TestCase diff --git a/src/Plugin.php b/src/CakePdfPlugin.php similarity index 73% rename from src/Plugin.php rename to src/CakePdfPlugin.php index be71a1f..6bcb90e 100644 --- a/src/Plugin.php +++ b/src/CakePdfPlugin.php @@ -5,8 +5,15 @@ use Cake\Core\BasePlugin; -class Plugin extends BasePlugin +class CakePdfPlugin extends BasePlugin { + /** + * Do bootstrap or not + * + * @var bool + */ + protected bool $bootstrapEnabled = false; + /** * Load routes or not * diff --git a/src/View/PdfView.php b/src/View/PdfView.php index 5924413..3260c29 100644 --- a/src/View/PdfView.php +++ b/src/View/PdfView.php @@ -46,9 +46,9 @@ class PdfView extends View /** * Constructor * - * @param ?\Cake\Http\ServerRequest $request Request instance. - * @param ?\Cake\Http\Response $response Response instance. - * @param ?\Cake\Event\EventManager $eventManager Event manager instance. + * @param \Cake\Http\ServerRequest|null $request Request instance. + * @param \Cake\Http\Response|null $response Response instance. + * @param \Cake\Event\EventManager|null $eventManager Event manager instance. * @param array $viewOptions View options. See View::$_passedVars for list of * options which get set as class properties. * @throws \Cake\Core\Exception\CakeException