From 7fae02c1d8c8f3490664dd27b0a1bf8a0a40a1e8 Mon Sep 17 00:00:00 2001 From: Kevin Pfeifer Date: Sat, 12 Aug 2023 18:12:50 +0200 Subject: [PATCH 1/3] allow manually dispatching ci workflow --- .github/workflows/ci.yml | 1 + .github/workflows/deploy_docs_4x.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c11821d70..024a03cfc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,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: From cd16d1ace6acda0329558111c441ba1fee05938e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=BCrth?= Date: Fri, 1 Sep 2023 11:00:34 +0200 Subject: [PATCH 2/3] Add "dev" keyword This will make Composer recommend this package for "require-dev". https://php.watch/articles/composer-prompt-require-dev-dev-packages --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 2504f45e3..144752595 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": [ From c380dc9d8c6b39191e0db71c67004102d941607c Mon Sep 17 00:00:00 2001 From: Mark Story Date: Sat, 2 Sep 2023 23:19:29 -0400 Subject: [PATCH 3/3] Update examples in code snippets Fixes #951 --- templates/MailPreview/index.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) 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);