mirror of
https://github.com/flarum/core.git
synced 2025-08-13 03:44:32 +02:00
Merge branch 'refs/heads/v0.1.0-beta.12'
# Conflicts: # composer.json
This commit is contained in:
@@ -36,7 +36,19 @@ class MailSettingsSerializer extends AbstractSerializer
|
||||
|
||||
private function serializeDriver(DriverInterface $driver)
|
||||
{
|
||||
return $driver->availableSettings();
|
||||
$settings = $driver->availableSettings();
|
||||
|
||||
if (key($settings) === 0) {
|
||||
// BACKWARDS COMPATIBILITY: Support a simple list of fields (without
|
||||
// type or additional metadata).
|
||||
// Turns ["f1", "f2"] into {"f1": "", "f2": ""}
|
||||
// @deprecated since 0.1.0-beta.12
|
||||
$settings = array_reduce($settings, function ($memo, $key) {
|
||||
return [$key => ''] + $memo;
|
||||
}, []);
|
||||
}
|
||||
|
||||
return $settings;
|
||||
}
|
||||
|
||||
public function getId($model)
|
||||
|
@@ -23,7 +23,7 @@ class Application extends Container implements ApplicationContract
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '0.1.0-beta.11.1';
|
||||
const VERSION = '0.1.0-beta.12';
|
||||
|
||||
/**
|
||||
* The base path for the Flarum installation.
|
||||
|
23
src/Util/Str.php
Normal file
23
src/Util/Str.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
* For detailed copyright and license information, please view the
|
||||
* LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Util;
|
||||
|
||||
use Illuminate\Support\Str as Laravel;
|
||||
|
||||
class Str
|
||||
{
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
public static function slug($str)
|
||||
{
|
||||
return Laravel::slug($str);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user