Skip to content

Commit

Permalink
Merge branch 'release/3.0.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Mar 5, 2020
2 parents 3546c99 + 597b853 commit 6bfad9d
Show file tree
Hide file tree
Showing 18 changed files with 278 additions and 83 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# v3.0.7
## 03/05/2020

1. [](#improved)
* Updated email validator library
1. [](#bugfix)
* Fixed `Invalid resource theme://` on CLI command `test-email` on Grav 1.6.21 and later versions [#128](https://github.com/getgrav/grav-plugin-email/issues/128)

# v3.0.6
## 02/11/2020

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Email
version: 3.0.6
version: 3.0.7
testing: false
description: Enables the emailing system for Grav
icon: envelope
Expand Down
5 changes: 5 additions & 0 deletions cli/ClearQueueFailuresCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ protected function configure()
*/
protected function serve()
{
// TODO: remove when requiring Grav 1.7+
if (method_exists($this, 'initializeGrav')) {
$this->initializeGrav();
}

$grav = Grav::instance();

$this->output->writeln('');
Expand Down
5 changes: 5 additions & 0 deletions cli/FlushQueueCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ protected function configure()
*/
protected function serve()
{
// TODO: remove when requiring Grav 1.7+
if (method_exists($this, 'initializeGrav')) {
$this->initializeGrav();
}

$grav = Grav::instance();

$this->output->writeln('');
Expand Down
9 changes: 5 additions & 4 deletions cli/TestEmailCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ protected function configure()
*/
protected function serve()
{
// TODO: remove when requiring Grav 1.7+
if (method_exists($this, 'initializeGrav')) {
$this->initializeThemes();
}

$grav = Grav::instance();

$this->output->writeln('');
Expand All @@ -69,8 +74,6 @@ protected function serve()

$this->output->writeln('');

require_once __DIR__ . '/../vendor/autoload.php';

$grav['Email'] = new Email();

$to = $this->input->getOption('to') ?: $grav['config']->get('plugins.email.to');
Expand All @@ -86,8 +89,6 @@ protected function serve()
$body = $grav['language']->translate(['PLUGIN_EMAIL.TEST_EMAIL_BODY', $configuration]);
}

// This is the old way....
// $sent = EmailUtils::sendEmail($subject, $body, $email_to);
$sent = EmailUtils::sendEmail(['subject'=>$subject, 'body'=>$body, 'to'=>$to]);

if ($sent) {
Expand Down
60 changes: 30 additions & 30 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public function isClassMapAuthoritative()
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
}

/**
Expand Down Expand Up @@ -377,7 +377,7 @@ private function findFileWithExtension($class, $ext)
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath.'\\';
$search = $subPath . '\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
Expand Down
Loading

0 comments on commit 6bfad9d

Please sign in to comment.