8000 Merge branch '6.x' into 7.x · laravel/framework@7f7c057 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7f7c057

Browse files
committed
Merge branch '6.x' into 7.x
# Conflicts: # src/Illuminate/Foundation/Application.php # src/Illuminate/Support/Facades/DB.php # src/Illuminate/View/Engines/CompilerEngine.php
2 parents c7c9d4e + a817662 commit 7f7c057

File tree

14 files changed

+152
-17
lines changed

14 files changed

+152
-17
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
linux_tests:
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-18.04
1212

1313
services:
1414
memcached:
@@ -31,7 +31,7 @@ jobs:
3131
strategy:
3232
fail-fast: true
3333
matrix:
34-
php: [7.2, 7.3, 7.4, 8.0]
34+
php: ['7.2', '7.3', '7.4', '8.0']
3535
stability: [prefer-lowest, prefer-stable]
3636

3737
name: PHP ${{ matrix.php }} - ${{ matrix.stability }}
@@ -48,9 +48,6 @@ jobs:
4848
tools: composer:v2
4949
coverage: none
5050

51-
- name: Setup problem matchers
52-
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
53-
5451
- name: Set Minimum Guzzle Version
5552
uses: nick-invision/retry@v1
5653
with:
@@ -78,7 +75,7 @@ jobs:
7875
strategy:
7976
fail-fast: true
8077
matrix:
81-
php: [7.2, 7.3, 7.4, 8.0]
78+
php: ['7.2', '7.3', '7.4', '8.0']
8279
stability: [prefer-lowest, prefer-stable]
8380

8481
name: PHP ${{ matrix.php }} - ${{ matrix.stability }} - Windows
@@ -100,9 +97,6 @@ jobs:
10097
tools: composer:v2
10198
coverage: none
10299

103-
- name: Setup problem matchers
104-
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
105-
106100
- name: Set Minimum Guzzle Version
107101
uses: nick-invision/retry@v1
108102
with:

CHANGELOG-6.x.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,35 @@
11
# Release Notes for 6.x
22

3-
## [Unreleased](https://github.com/laravel/framework/compare/v6.20.13...6.x)
3+
## [Unreleased](https://github.com/laravel/framework/compare/v6.20.17...6.x)
4+
5+
6+
## [v6.20.17 (2021-03-02)](https://github.com/laravel/framework/compare/v6.20.16...v6.20.17)
7+
8+
### Added
9+
- Added new line to `DetectsLostConnections` ([#36373](https://github.com/laravel/framework/pull/36373))
10+
11+
12+
## [v6.20.16 (2021-02-02)](https://github.com/laravel/framework/compare/v6.20.15...v6.20.16)
13+
14+
### Fixed
15+
- Fixed `Illuminate\View\ViewException::report()` ([#36110](https://github.com/laravel/framework/pull/36110))
16+
- Fixed `Illuminate\Redis\Connections\PhpRedisConnection::spop()` ([#36106](https://github.com/laravel/framework/pull/36106))
17+
18+
### Changed
19+
- Typecast page number as integer in `Illuminate\Pagination\AbstractPaginator::resolveCurrentPage()` ([#36055](https://github.com/laravel/framework/pull/36055))
20+
21+
22+
## [v6.20.15 (2021-01-26)](https://github.com/laravel/framework/compare/v6.20.14...v6.20.15)
23+
24+
### Changed
25+
- Pipe new through render and report exception methods ([#36037](https://github.com/laravel/framework/pull/36037))
26+
27+
28+
## [v6.20.14 (2021-01-21)](https://github.com/laravel/framework/compare/v6.20.13...v6.20.14)
29+
30+
### Fixed
31+
- Fixed type error in `Illuminate\Http\Concerns\InteractsWithContentTypes::isJson()` ([#35956](https://github.com/laravel/framework/pull/35956))
32+
- Limit expected bindings ([#35972](https://github.com/laravel/framework/pull/35972), [006873d](https://github.com/laravel/framework/commit/006873df411d28bfd03fea5e7f91a2afe3918498))
433

534

635
## [v6.20.13 (2021-01-19)](https://github.com/laravel/framework/compare/v6.20.12...v6.20.13)

src/Illuminate/Database/DetectsLostConnections.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ protected function causedByLostConnection(Throwable $e)
4949
'SQLSTATE[HY000] [2002] Connection timed out',
5050
'SSL: Connection timed out',
5151
'SQLSTATE[HY000]: General error: 1105 The last transaction was aborted due to Seamless Scaling. Please retry.',
52+
'Temporary failure in name resolution',
5253
]);
5354
}
5455
}

src/Illuminate/Foundation/Console/stubs/exception-render-report.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class DummyClass extends Exception
99
/**
1010
* Report the exception.
1111
*
12-
* @return void
12+
* @return bool|null
1313
*/
1414
public function report()
1515
{

src/Illuminate/Foundation/Console/stubs/exception-report.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class DummyClass extends Exception
99
/**
1010
* Report the exception.
1111
*
12-
* @return void
12+
* @return bool|null
1313
*/
1414
public function report()
1515
{

src/Illuminate/Pagination/AbstractPaginator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ public static function currentPathResolver(Closure $resolver)
481481
public static function resolveCurrentPage($pageName = 'page', $default = 1)
482482
{
483483
if (isset(static::$currentPageResolver)) {
484-
return call_user_func(static::$currentPageResolver, $pageName);
484+
return (int) call_user_func(static::$currentPageResolver, $pageName);
485485
}
486486

487487
return $default;

src/Illuminate/Redis/Connections/PhpRedisConnection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public function brpop(...$arguments)
198198
*/
199199
public function spop($key, $count = 1)
200200
{
201-
return $this->command('spop', [$key, $count]);
201+
return $this->command('spop', func_get_args());
202202
}
203203

204204
/**

src/Illuminate/Support/Facades/DB.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
* @method static \Illuminate\Database\ConnectionInterface connection(string $name = null)
77
* @method static \Illuminate\Database\Query\Builder table(string $table, string $as = null)
88
* @method static \Illuminate\Database\Query\Expression raw($value)
9+
* @method static array getQueryLog()
910
* @method static array prepareBindings(array $bindings)
1011
* @method static array pretend(\Closure $callback)
1112
* @method static array select(string $query, array $bindings = [], bool $useReadPdo = true)
1213
* @method static bool insert(string $query, array $bindings = [])
14+
* @method static bool logging()
1315
* @method static bool statement(string $query, array $bindings = [])
1416
* @method static bool unprepared(string $query)
1517
* @method static int affectingStatement(string $query, array $bindings = [])
@@ -21,6 +23,9 @@
2123
* @method static string getDefaultConnection()
2224
* @method static void beginTransaction()
2325
* @method static void commit()
26+
* @method static void enableQueryLog()
27+
* @method static void disableQueryLog()
28+
* @method static void flushQueryLog()
2429
* @method static void listen(\Closure $callback)
2530
* @method static void rollBack(int $toLevel = null)
2631
* @method static void setDefaultConnection(string $name)

src/Illuminate/View/Engines/CompilerEngine.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace Illuminate\View\Engines;
44

5-
use ErrorException;
65
use Illuminate\View\Compilers\CompilerInterface;
76
use Throwable;
7+
use Illuminate\View\ViewException;
88

99
class CompilerEngine extends PhpEngine
1010
{
@@ -72,7 +72,7 @@ public function get($path, array $data = [])
7272
*/
7373
protected function handleViewException(Throwable $e, $obLevel)
7474
{
75-
$e = new ErrorException($this->getMessage($e), 0, 1, $e->getFile(), $e->getLine(), $e);
75+
$e = new ViewException($this->getMessage($e), 0, 1, $e->getFile(), $e->getLine(), $e);
7676

7777
parent::handleViewException($e, $obLevel);
7878
}

src/Illuminate/View/ViewException.php

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
3+
namespace Illuminate\View;
4+
5+
use ErrorException;
6+
use Illuminate\Container\Container;
7+
use Illuminate\Support\Reflector;
8+
9+
class ViewException extends ErrorException
10+
{
11+
/**
12+
* Report the exception.
13+
*
14+
* @return bool|null
15+
*/
16+
public function report()
17+
{
18+
$exception = $this->getPrevious();
19+
20+
if (Reflector::isCallable($reportCallable = [$exception, 'report'])) {
21+
return Container::getInstance()->call($reportCallable);
22+
}
23+
24+
return false;
25+
}
26+
27+
/**
28+
* Render the exception into an HTTP response.
29+
*
30+
* @param \Illuminate\Http\Request $request
31+
* @return \Illuminate\Http\Response
32+
*/
33+
public function render($request)
34+
{
35+
$exception = $this->getPrevious();
36+
37+
if ($exception && method_exists($exception, 'render')) {
38+
return $exception->render($request);
39+
}
40+
}
41+
}

0 commit comments

Comments
 (0)
0