Skip to content

Commit fa3ac1e

Browse files
committed
fix conflicts
2 parents 0e4292c + 5c1d1ec commit fa3ac1e

File tree

8 files changed

+71
-21
lines changed

8 files changed

+71
-21
lines changed

CHANGELOG-5.7.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Release Notes for 5.7.x
22

3+
## [v5.7.18 (2018-12-17)](https://github.com/laravel/framework/compare/v5.7.17...v5.7.18)
4+
5+
### Added
6+
- Added missing `starts_with` validation message ([#26822](https://github.com/laravel/framework/pull/26822))
7+
- Added `Facade::resolved()` method to register pending callback until the service is available. ([#26824](https://github.com/laravel/framework/pull/26824))
8+
- Added env var `APP_CONFIG_CACHE` to control cache config path ([578bc83](https://github.com/laravel/framework/commit/578bc83f0247b97ec87fefe39a8da7e9bbfd4a66))
9+
10+
### Changed
11+
- Changed `TransportManager::createMailDriver` ([#26846](https://github.com/laravel/framework/pull/26846))
12+
13+
### Fixed
14+
- Fixed of using `illuminate/mail` outside of Laravel with driver log ([#26842](https://github.com/laravel/framework/pull/26842))
15+
- Fixed some bugs for `app()->call()` ([#26852](https://github.com/laravel/framework/pull/26852))
16+
- Added workaround for PHP-bug related to [incorrect variable values when Opcache enabled in PHP v 7.3.0](https://github.com/laravel/framework/issues/26819) ([36d3436](https://github.com/laravel/framework/commit/36d343682d25570946ff22397a720727e0c1dcd7))
17+
18+
319
## [v5.7.17 (2018-12-12)](https://github.com/laravel/framework/compare/v5.7.16...v5.7.17)
420

521
### Added

src/Illuminate/Container/Container.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public function resolved($abstract)
195195
public function isShared($abstract)
196196
{
197197
return isset($this->instances[$abstract]) ||
198-
(isset($this->bindings[$abstract]['shared']) &&
198+
(isset($this->bindings[$abstract]['shared']) &&
199199
$this->bindings[$abstract]['shared'] === true);
200200
}
201201

@@ -782,7 +782,7 @@ public function build($concrete)
782782
$reflector = new ReflectionClass($concrete);
783783

784784
// If the type is not instantiable, the developer is attempting to resolve
785-
// an abstract type such as an Interface of Abstract Class and there is
785+
// an abstract type such as an Interface or Abstract Class and there is
786786
// no binding registered for the abstractions so we need to bail out.
787787
if (! $reflector->isInstantiable()) {
788788
return $this->notInstantiable($concrete);

src/Illuminate/Database/Connection.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,8 @@ protected function tryAgainIfCausedByLostConnection(QueryException $e, $query, $
751751
public function reconnect()
752752
{
753753
if (is_callable($this->reconnector)) {
754+
$this->doctrineConnection = null;
755+
754756
return call_user_func($this->reconnector, $this);
755757
}
756758

src/Illuminate/Mail/MailServiceProvider.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ class MailServiceProvider extends ServiceProvider
2525
public function register()
2626
{
2727
$this->registerSwiftMailer();
28-
2928
$this->registerIlluminateMailer();
30-
3129
$this->registerMarkdownRenderer();
3230
}
3331

@@ -38,18 +36,20 @@ public function register()
3836
*/
3937
protected function registerIlluminateMailer()
4038
{
41-
$this->app->singleton('mailer', function ($app) {
42-
$config = $app->make('config')->get('mail');
39+
$this->app->singleton('mailer', function () {
40+
$config = $this->app->make('config')->get('mail');
4341

4442
// Once we have create the mailer instance, we will set a container instance
4543
// on the mailer. This allows us to resolve mailer classes via containers
4644
// for maximum testability on said classes instead of passing Closures.
4745
$mailer = new Mailer(
48-
$app['view'], $app['swift.mailer'], $app['events']
46+
$this->app['view'],
47+
$this->app['swift.mailer'],
48+
$this->app['events']
4949
);
5050

51-
if ($app->bound('queue')) {
52-
$mailer->setQueue($app['queue']);
51+
if ($this->app->bound('queue')) {
52+
$mailer->setQueue($this->app['queue']);
5353
}
5454

5555
// Next we will set all of the global addresses on this mailer, which allows
@@ -92,14 +92,14 @@ public function registerSwiftMailer()
9292
// Once we have the transporter registered, we will register the actual Swift
9393
// mailer instance, passing in the transport instances, which allows us to
9494
// override this transporter instances during app start-up if necessary.
95-
$this->app->singleton('swift.mailer', function ($app) {
96-
if ($domain = $app->make('config')->get('mail.domain')) {
95+
$this->app->singleton('swift.mailer', function () {
96+
if ($domain = $this->app->make('config')->get('mail.domain')) {
9797
Swift_DependencyContainer::getInstance()
9898
->register('mime.idgenerator.idright')
9999
->asValue($domain);
100100
}
101101

102-
return new Swift_Mailer($app['swift.transport']->driver());
102+
return new Swift_Mailer($this->app['swift.transport']->driver());
103103
});
104104
}
105105

@@ -110,8 +110,8 @@ public function registerSwiftMailer()
110110
*/
111111
protected function registerSwiftTransport()
112112
{
113-
$this->app->singleton('swift.transport', function ($app) {
114-
return new TransportManager($app);
113+
$this->app->singleton('swift.transport', function () {
114+
return new TransportManager($this->app);
115115
});
116116
}
117117

@@ -128,10 +128,10 @@ protected function registerMarkdownRenderer()
128128
], 'laravel-mail');
129129
}
130130

131-
$this->app->singleton(Markdown::class, function ($app) {
132-
$config = $app->make('config');
131+
$this->app->singleton(Markdown::class, function () {
132+
$config = $this->app->make('config');
133133

134-
return new Markdown($app->make('view'), [
134+
return new Markdown($this->app->make('view'), [
135135
'theme' => $config->get('mail.markdown.theme', 'default'),
136136
'paths' => $config->get('mail.markdown.paths', []),
137137
]);

src/Illuminate/Support/Collection.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,18 @@ public function whereInStrict($key, $values)
678678
return $this->whereIn($key, $values, true);
679679
}
680680

681+
/**
682+
* Filter items where the given key between values.
683+
*
684+
* @param string $key
685+
* @param array $values
686+
* @return static
687+
*/
688+
public function whereBetween($key, $values)
689+
{
690+
return $this->where($key, '>=', reset($values))->where($key, '<=', end($values));
691+
}
692+
681693
/**
682694
* Filter items by the given key value pair.
683695
*
@@ -800,7 +812,7 @@ public function get($key, $default = null)
800812
/**
801813
* Group an associative array by a field or using a callback.
802814
*
803-
* @param callable|string $groupBy
815+
* @param array|callable|string $groupBy
804816
* @param bool $preserveKeys
805817
* @return static
806818
*/

src/Illuminate/Translation/Translator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function has($key, $locale = null, $fallback = true)
9494
* @param string $key
9595
* @param array $replace
9696
* @param string $locale
97-
* @return string|array|null
97+
* @return string|array
9898
*/
9999
public function trans($key, array $replace = [], $locale = null)
100100
{
@@ -108,7 +108,7 @@ public function trans($key, array $replace = [], $locale = null)
108108
* @param array $replace
109109
* @param string|null $locale
110110
* @param bool $fallback
111-
* @return string|array|null
111+
* @return string|array
112112
*/
113113
public function get($key, array $replace = [], $locale = null, $fallback = true)
114114
{
@@ -144,7 +144,7 @@ public function get($key, array $replace = [], $locale = null, $fallback = true)
144144
* @param string $key
145145
* @param array $replace
146146
* @param string $locale
147-
* @return string|array|null
147+
* @return string|array
148148
*/
149149
public function getFromJson($key, array $replace = [], $locale = null)
150150
{

tests/Mail/MailLogTransportTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Illuminate\Tests\Mail;
44

55
use Monolog\Logger;
6+
use Psr\Log\NullLogger;
67
use Psr\Log\LoggerInterface;
78
use Orchestra\Testbench\TestCase;
89
use Monolog\Handler\StreamHandler;
@@ -30,4 +31,13 @@ public function testGetLogTransportWithConfiguredChannel()
3031
$this->assertCount(1, $handlers = $monolog->getHandlers());
3132
$this->assertInstanceOf(StreamHandler::class, $handler = $handlers[0]);
3233
}
34+
35+
public function testGetLogTransportWithPsrLogger()
36+
{
37+
$logger = $this->app->instance('log', new NullLogger());
38+
39+
$manager = $this->app['swift.transport'];
40+
41+
$this->assertAttributeEquals($logger, 'logger', $manager->driver('log'));
42+
}
3343
}

tests/Support/SupportCollectionTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,16 @@ public function testValues()
543543
})->values()->all());
544544
}
545545

546+
public function testBetween()
547+
{
548+
$c = new Collection([['v' => 1], ['v' => 2], ['v' => 3], ['v' => '3'], ['v' => 4]]);
549+
550+
$this->assertEquals([['v' => 2], ['v' => 3], ['v' => '3'], ['v' => 4]],
551+
$c->whereBetween('v', [2, 4])->values()->all());
552+
$this->assertEquals([['v' => 1]], $c->whereBetween('v', [-1, 1])->all());
553+
$this->assertEquals([['v' => 3], ['v' => '3']], $c->whereBetween('v', [3, 3])->values()->all());
554+
}
555+
546556
public function testFlatten()
547557
{
548558
// Flat arrays are unaffected

0 commit comments

Comments
 (0)