diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e410c8a5..c2c6b791b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,7 @@ on: pull_request: branches: - '*' + workflow_dispatch: permissions: contents: read diff --git a/.github/workflows/deploy_docs_4x.yml b/.github/workflows/deploy_docs_4x.yml index b438a5440..b745cc92c 100644 --- a/.github/workflows/deploy_docs_4x.yml +++ b/.github/workflows/deploy_docs_4x.yml @@ -5,6 +5,7 @@ on: push: branches: - 4.x + workflow_dispatch: jobs: deploy: diff --git a/composer.json b/composer.json index 97e2ddbb7..c7a4df2cc 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "cakephp/debug_kit", "description": "CakePHP Debug Kit", "type": "cakephp-plugin", - "keywords": ["cakephp", "debug", "kit"], + "keywords": ["cakephp", "debug", "kit", "dev"], "homepage": "https://github.com/cakephp/debug_kit", "license": "MIT", "authors": [ diff --git a/templates/MailPreview/index.php b/templates/MailPreview/index.php index e47487c0c..6e7d49dfa 100644 --- a/templates/MailPreview/index.php +++ b/templates/MailPreview/index.php @@ -47,12 +47,13 @@ class UserMailer extends Mailer { public function welcome($user) { - return $this // Returning the chain is a good idea :) - ->to($user->email) - ->subject(sprintf("Welcome %s", $user->name)) - ->template("welcome_mail") // By default template with same name as method name is used. - ->layout("custom") - ->set(["user" => $user]); + $mailer = $this->setTo($user->email) + ->setSubject(sprintf("Welcome %s", $user->name)) + ->setViewVars(["user" => $user]); + $mailer->viewBuilder() + ->setTemplate("welcome_mail") // By default template with same name as method name is used. + ->setLayout("custom"); + return $mailer; } }'; highlight_string($code); @@ -75,9 +76,10 @@ public function welcome() { $this->loadModel("Users"); $user = $this->Users->find()->first(); + return $this->getMailer("User") ->welcome($user) - ->set(["activationToken" => "dummy-token"]); + ->setViewVars(["activationToken" => "dummy-token"]); } }'; highlight_string($code);