diff --git a/app/src/Controller/StandardPluginController.php b/app/src/Controller/StandardPluginController.php index 54940b816..66f8a1ee2 100644 --- a/app/src/Controller/StandardPluginController.php +++ b/app/src/Controller/StandardPluginController.php @@ -82,7 +82,7 @@ public function beforeFilter(\Cake\Event\EventInterface $event) { */ public function beforeRender(\Cake\Event\EventInterface $event) { - /** var string $modelsName */ (ie: from ModelsTable, eg FileProvisionersTable) + /** var string $modelsName (ie: from ModelsTable, eg FileProvisionersTable) */ $modelsName = $this->getName(); /** var Cake\ORM\Table $table */ $table = $this->fetchTable($modelsName); diff --git a/app/src/Lib/Traits/LabeledLogTrait.php b/app/src/Lib/Traits/LabeledLogTrait.php index 6a1a8161a..c0b511934 100644 --- a/app/src/Lib/Traits/LabeledLogTrait.php +++ b/app/src/Lib/Traits/LabeledLogTrait.php @@ -70,7 +70,7 @@ public function cliLogPercentage(int $done, int $total): void { * @param string $msg Log message */ - public function llog(string $level, string $msg, int|string $id=null) { + public function llog(string $level, string $msg, mixed $id=null) { self::slog($level, $msg, $id); } @@ -80,7 +80,7 @@ public function llog(string $level, string $msg, int|string $id=null) { * @since COmanage Registry v5.0.0 */ - public static function slog(string $level, string $msg, int|string $id=null) { + public static function slog(string $level, string $msg, mixed $id=null) { $bt = debug_backtrace(0, 2); $m = getmypid() . " " . $bt[1]['class'] . "::" . $bt[1]['function'] diff --git a/app/src/Model/Table/MostlyStaticPagesTable.php b/app/src/Model/Table/MostlyStaticPagesTable.php index af7b50b6d..bcbd2189d 100644 --- a/app/src/Model/Table/MostlyStaticPagesTable.php +++ b/app/src/Model/Table/MostlyStaticPagesTable.php @@ -324,7 +324,7 @@ public function validationDefault(Validator $validator): Validator { // AR-MostlyStaticPage-2 A Mostly Static Page name may consist only of lowercase alphanumeric // characters and dashes $validator->add('name', [ - 'filter' => [ + 'slugfilter' => [ 'rule' => ['custom', '/^[a-z0-9-]+$/'], 'message' => __d('error', 'MostlyStaticPages.slug.invalid') ] diff --git a/app/src/Model/Table/ServersTable.php b/app/src/Model/Table/ServersTable.php index f4c44827a..d766ff225 100644 --- a/app/src/Model/Table/ServersTable.php +++ b/app/src/Model/Table/ServersTable.php @@ -73,7 +73,9 @@ public function initialize(array $config): void { ->setForeignKey('match_server_id'); // XXX Note this will bind to (eg) CoreServer but not (eg) SqlProvisioner - $this->setPluginRelations(); +// As of Cake 5 this is causing errors with the Servers alias already being set, +// it's not clear that we need this anymore? + // $this->setPluginRelations(); $this->setDisplayField('description');