Skip to content

Commit d0b569b

Browse files
authored
Merge pull request #955 from cakephp/5.x-merge-4.x
merge 4.x into 5.x
2 parents 99fac0b + 20b7abb commit d0b569b

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
pull_request:
99
branches:
1010
- '*'
11+
workflow_dispatch:
1112

1213
permissions:
1314
contents: read

.github/workflows/deploy_docs_4x.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
push:
66
branches:
77
- 4.x
8+
workflow_dispatch:
89

910
jobs:
1011
deploy:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "cakephp/debug_kit",
33
"description": "CakePHP Debug Kit",
44
"type": "cakephp-plugin",
5-
"keywords": ["cakephp", "debug", "kit"],
5+
"keywords": ["cakephp", "debug", "kit", "dev"],
66
"homepage": "https://github.com/cakephp/debug_kit",
77
"license": "MIT",
88
"authors": [

templates/MailPreview/index.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,13 @@ class UserMailer extends Mailer
4747
{
4848
public function welcome($user)
4949
{
50-
return $this // Returning the chain is a good idea :)
51-
->to($user->email)
52-
->subject(sprintf("Welcome %s", $user->name))
53-
->template("welcome_mail") // By default template with same name as method name is used.
54-
->layout("custom")
55-
->set(["user" => $user]);
50+
$mailer = $this->setTo($user->email)
51+
->setSubject(sprintf("Welcome %s", $user->name))
52+
->setViewVars(["user" => $user]);
53+
$mailer->viewBuilder()
54+
->setTemplate("welcome_mail") // By default template with same name as method name is used.
55+
->setLayout("custom");
56+
return $mailer;
5657
}
5758
}';
5859
highlight_string($code);
@@ -75,9 +76,10 @@ public function welcome()
7576
{
7677
$this->loadModel("Users");
7778
$user = $this->Users->find()->first();
79+
7880
return $this->getMailer("User")
7981
->welcome($user)
80-
->set(["activationToken" => "dummy-token"]);
82+
->setViewVars(["activationToken" => "dummy-token"]);
8183
}
8284
}';
8385
highlight_string($code);

0 commit comments

Comments
 (0)