Skip to content

Commit 234fd6b

Browse files
authored
Merge pull request #382 from sergeyklay/3.x
3.x
2 parents c4ef754 + 3a1f05a commit 234fd6b

File tree

7 files changed

+5092
-10
lines changed

7 files changed

+5092
-10
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# https://help.github.com/articles/ignoring-files/#create-a-global-gitignore
77

88
/vendor
9-
.env
9+
/.env
1010
/public/robots.txt
1111
/public/sitemap.xml
12-
!.env.example

app/model/Posts.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,10 @@ public function afterCreate()
260260
* Queue notifications to be sent
261261
*/
262262
/** @var Beanstalk $queue */
263-
$queue = $this->getDI()->getShared('queue');
263+
$queue = container('queue');
264264
$queue->choose('notifications');
265265
/** @var DiscordComponent $discord */
266-
$discord = $this->getDI()->getShared('discord');
266+
$discord = container('discord');
267267
$queue->put($toNotify);
268268
$discord->addMessageAboutDiscussion($this);
269269
}

app/model/PostsReplies.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,11 @@ public function afterCreate()
235235
* Queue notifications to be sent
236236
*/
237237
/** @var Beanstalk $queue */
238-
$queue = $this->getDI()->getShared('queue');
238+
$queue = container('queue');
239239
$queue->choose('notifications');
240240
$queue->put($toNotify);
241241
/** @var DiscordComponent $discord */
242-
$discord = $this->getDI()->getShared('discord');
242+
$discord = container('discord');
243243
$discord->addMessageAboutReply($this);
244244
}
245245
}
@@ -257,7 +257,7 @@ public function afterSave()
257257
$history->save();
258258
if ($this->hasUpdated('accepted') && $this->accepted == 'Y') {
259259
/** @var DiscordComponent $discord */
260-
$discord = $this->getDI()->getShared('discord');
260+
$discord = container('discord');
261261
$discord->addMessageAboutSolvedDiscussion($this);
262262
}
263263
}

app/provider/ErrorHandler/ServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ function () {
6565
$this->serviceName,
6666
function () use ($service) {
6767
$run = new Run();
68-
$run->pushHandler(container("{$service}.loggerHandler"));
69-
7068
$mode = container('bootstrap')->getMode();
7169

7270
switch ($mode) {
@@ -95,6 +93,8 @@ function () use ($service) {
9593
);
9694
}
9795

96+
$run->pushHandler(container("{$service}.loggerHandler"));
97+
9898
return $run;
9999
}
100100
);

app/provider/Queue/Fake.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,6 @@ public function peekReady()
6161

6262
public function choose($tube)
6363
{
64-
singleton('logger')->debug('Chosen tube: $tube');
64+
singleton('logger')->debug("Chosen tube: {$tube}");
6565
}
6666
}

0 commit comments

Comments
 (0)