Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: laravel/framework
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v6.18.13
Choose a base ref
...
head repository: laravel/framework
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v6.18.14
Choose a head ref
  • 20 commits
  • 15 files changed
  • 12 contributors

Commits on May 5, 2020

  1. [6.x] update changelog

    TBlindaruk committed May 5, 2020
    Copy the full SHA
    7a13d60 View commit details

Commits on May 6, 2020

  1. [6.x] Fix Faker Unique caching issue (#32703)

    * Fix Faker Unique caching issue
    
    * StyleCI
    deleugpn authored May 6, 2020
    Copy the full SHA
    5624bfc View commit details
  2. Copy the full SHA
    7187708 View commit details

Commits on May 7, 2020

  1. Copy the full SHA
    6b83045 View commit details
  2. Copy the full SHA
    c2e3c45 View commit details
  3. Copy the full SHA
    d1e7f85 View commit details

Commits on May 10, 2020

  1. [7.x] update changelog

    TBlindaruk committed May 10, 2020
    Copy the full SHA
    a71964c View commit details

Commits on May 11, 2020

  1. [6.x] Fixed deprecated "Doctrine/Common/Inflector/Inflector" class (#…

    …32734)
    
    * [6.x] Fixed deprecated "Doctrine/Common/Inflector/Inflector::pluralize" method
    
    * Cache the inflector properly
    
    * Added missing phpdoc
    
    * Update composer.json
    
    * Update Pluralizer.php
    
    Co-authored-by: Graham Campbell <GrahamCampbell@users.noreply.github.com>
    Co-authored-by: Taylor Otwell <taylor@laravel.com>
    3 people authored May 11, 2020
    Copy the full SHA
    95b34d4 View commit details
  2. Copy the full SHA
    4a4a7e1 View commit details
  3. fix style

    themsaid committed May 11, 2020
    Copy the full SHA
    5e8afc5 View commit details
  4. wip

    themsaid committed May 11, 2020
    Copy the full SHA
    b1b0b5d View commit details
  5. Removed sneaky type

    GrahamCampbell committed May 11, 2020
    Copy the full SHA
    f907731 View commit details

Commits on May 12, 2020

  1. wip

    themsaid committed May 12, 2020
    Copy the full SHA
    018c33f View commit details
  2. chore: update artisan docblock to be nullable (#32771)

    Since the `artisan` property doesn't have a default and isn't set in the constructor, technically it is nullable. That is why we use the `getArtisan` getter instead.
    mr-feek authored May 12, 2020
    Copy the full SHA
    a58d8a7 View commit details
  3. formatting

    taylorotwell committed May 12, 2020
    Copy the full SHA
    772e401 View commit details
  4. Copy the full SHA
    c202d73 View commit details
  5. Copy the full SHA
    28b8111 View commit details
  6. remove strval

    themsaid committed May 12, 2020
    Copy the full SHA
    1c76a6f View commit details
  7. Copy the full SHA
    12b6599 View commit details
  8. patch

    taylorotwell committed May 12, 2020
    Copy the full SHA
    503d151 View commit details
26 changes: 21 additions & 5 deletions CHANGELOG-6.x.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
# Release Notes for 6.x

## [Unreleased](https://github.com/laravel/framework/compare/v6.18.11...6.x)
## [Unreleased](https://github.com/laravel/framework/compare/v6.18.13...6.x)

### Added
- Added SSL SYSCALL EOF as a lost connection message ([#32697](https://github.com/laravel/framework/pull/32697))

### Fixed
- Fixed `FakerGenerator` Unique caching issue ([#32703](https://github.com/laravel/framework/pull/32703))
- Added boolean to types that don't need character options ([#32716](https://github.com/laravel/framework/pull/32716))
- Fixed `Illuminate\Foundation\Testing\PendingCommand` that do not resolve 'OutputStyle::class' from the container ([#32687](https://github.com/laravel/framework/pull/32687))
- Clear resolved event facade on `Illuminate\Foundation\Testing\Concerns\MocksApplicationServices::withoutEvents()` ([d1e7f85](https://github.com/laravel/framework/commit/d1e7f85dfd79abbe4f5e01818f620f6ecc67de4d))


## [v6.18.13 (2020-05-05)](https://github.com/laravel/framework/compare/v6.18.12...v6.18.13)

### Fixed
- Fixed `Illuminate\Database\Eloquent\Collection::getQueueableRelations()` ([7b32460](https://github.com/laravel/framework/commit/7b32469420258e9e52b24b2ffa7f491e79a3a870))


## [v6.18.12 (2020-05-05)](https://github.com/laravel/framework/compare/v6.18.11...v6.18.12)

### Added
- Add pdo try again as lost connection message ([#32605](https://github.com/laravel/framework/pull/32605))
@@ -19,10 +37,8 @@
- Restore оnly common relations ([#32613](https://github.com/laravel/framework/pull/32613), [d82f78b](https://github.com/laravel/framework/commit/d82f78b13631c4a04b9595099da0022ca3d8b94e), [48e4d60](https://github.com/laravel/framework/commit/48e4d602d4f8fe9304e8998c5893206f67504dbf))
- Use single space if plain email is empty in `Illuminate\Mail\Mailer::addContent()` ([0557622](https://github.com/laravel/framework/commit/055762286132d545cbc064dce645562c0d51532f))
- Remove wasted file read when loading package manifest in `Illuminate\Foundation\PackageManifest::getManifest()` ([#32646](https://github.com/laravel/framework/pull/32646))

### TODO
- Cache Faker instances ([#32585](https://github.com/laravel/framework/pull/32585))
- Character and collation not needed for some columns on change ([fccdf7c](https://github.com/laravel/framework/commit/fccdf7c42d5ceb50985b3e8243d7ba650de996d6))
- Cache `FakerGenerator` instances ([#32585](https://github.com/laravel/framework/pull/32585))
- Do not change `character` and `collation` for some columns on change ([fccdf7c](https://github.com/laravel/framework/commit/fccdf7c42d5ceb50985b3e8243d7ba650de996d6))


## [v6.18.11 (2020-04-28)](https://github.com/laravel/framework/compare/v6.18.10...v6.18.11)
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@
"ext-json": "*",
"ext-mbstring": "*",
"ext-openssl": "*",
"doctrine/inflector": "^1.1",
"doctrine/inflector": "^1.4|^2.0",
"dragonmantank/cron-expression": "^2.0",
"egulias/email-validator": "^2.1.10",
"league/commonmark": "^1.3",
2 changes: 2 additions & 0 deletions src/Illuminate/Database/DatabaseServiceProvider.php
Original file line number Diff line number Diff line change
@@ -88,6 +88,8 @@ protected function registerEloquentFactory()
static::$fakers[$locale] = FakerFactory::create($locale);
}

static::$fakers[$locale]->unique(true);

return static::$fakers[$locale];
});

1 change: 1 addition & 0 deletions src/Illuminate/Database/DetectsLostConnections.php
Original file line number Diff line number Diff line change
@@ -44,6 +44,7 @@ protected function causedByLostConnection(Throwable $e)
'running with the --read-only option so it cannot execute this statement',
'The connection is broken and recovery is not possible. The connection is marked by the client driver as unrecoverable. No attempt was made to restore the connection.',
'SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Try again',
'SQLSTATE[HY000]: General error: 7 SSL SYSCALL error: EOF detected',
]);
}
}
1 change: 1 addition & 0 deletions src/Illuminate/Database/Schema/Grammars/ChangeColumn.php
Original file line number Diff line number Diff line change
@@ -189,6 +189,7 @@ protected static function doesntNeedCharacterOptions($type)
return in_array($type, [
'bigInteger',
'binary',
'boolean',
'date',
'decimal',
'double',
Original file line number Diff line number Diff line change
@@ -886,7 +886,7 @@ protected function typeMultiPolygonZ(Fluent $column)
* @param \Illuminate\Support\Fluent $column
* @return string
*/
private function formatPostGisType(string $type, Fluent $column)
private function formatPostGisType($type, Fluent $column)
{
if ($column->isGeometry === null) {
return sprintf('geography(%s, %s)', $type, $column->projection ?? '4326');
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Application.php
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
*
* @var string
*/
const VERSION = '6.18.13';
const VERSION = '6.18.14';

/**
* The base path for the Laravel installation.
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Console/Kernel.php
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ class Kernel implements KernelContract
/**
* The Artisan application instance.
*
* @var \Illuminate\Console\Application
* @var \Illuminate\Console\Application|null
*/
protected $artisan;

Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcherContract;
use Illuminate\Contracts\Events\Dispatcher as EventsDispatcherContract;
use Illuminate\Contracts\Notifications\Dispatcher as NotificationDispatcher;
use Illuminate\Support\Facades\Event;
use Mockery;

trait MocksApplicationServices
@@ -102,6 +103,8 @@ protected function withoutEvents()
$this->firedEvents[] = $called;
});

Event::clearResolvedInstances();

$this->app->instance('events', $mock);

return $this;
8 changes: 5 additions & 3 deletions src/Illuminate/Foundation/Testing/PendingCommand.php
Original file line number Diff line number Diff line change
@@ -131,10 +131,10 @@ public function run()
{
$this->hasExecuted = true;

$this->mockConsoleOutput();
$mock = $this->mockConsoleOutput();

try {
$exitCode = $this->app[Kernel::class]->call($this->command, $this->parameters);
$exitCode = $this->app[Kernel::class]->call($this->command, $this->parameters, $mock);
} catch (NoMatchingExpectationException $e) {
if ($e->getMethodName() === 'askQuestion') {
$this->test->fail('Unexpected question "'.$e->getActualArguments()[0]->getQuestion().'" was asked.');
@@ -156,7 +156,7 @@ public function run()
/**
* Mock the application's console output.
*
* @return void
* @return \Mockery\MockInterface
*/
protected function mockConsoleOutput()
{
@@ -181,6 +181,8 @@ protected function mockConsoleOutput()
$this->app->bind(OutputStyle::class, function () use ($mock) {
return $mock;
});

return $mock;
}

/**
32 changes: 29 additions & 3 deletions src/Illuminate/Support/Pluralizer.php
Original file line number Diff line number Diff line change
@@ -2,7 +2,10 @@

namespace Illuminate\Support;

use Doctrine\Common\Inflector\Inflector;
use Doctrine\Inflector\CachedWordInflector;
use Doctrine\Inflector\Inflector;
use Doctrine\Inflector\Rules\English;
use Doctrine\Inflector\RulesetInflector;

class Pluralizer
{
@@ -70,7 +73,7 @@ public static function plural($value, $count = 2)
return $value;
}

$plural = Inflector::pluralize($value);
$plural = static::inflector()->pluralize($value);

return static::matchCase($plural, $value);
}
@@ -83,7 +86,7 @@ public static function plural($value, $count = 2)
*/
public static function singular($value)
{
$singular = Inflector::singularize($value);
$singular = static::inflector()->singularize($value);

return static::matchCase($singular, $value);
}
@@ -118,4 +121,27 @@ protected static function matchCase($value, $comparison)

return $value;
}

/**
* Get the inflector instance.
*
* @return \Doctrine\Inflector\Inflector
*/
public static function inflector()
{
static $inflector;

if (is_null($inflector)) {
$inflector = new Inflector(
new CachedWordInflector(new RulesetInflector(
English\Rules::getSingularRuleset()
)),
new CachedWordInflector(new RulesetInflector(
English\Rules::getPluralRuleset()
))
);
}

return $inflector;
}
}
2 changes: 1 addition & 1 deletion src/Illuminate/Support/composer.json
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
"php": "^7.2",
"ext-json": "*",
"ext-mbstring": "*",
"doctrine/inflector": "^1.1",
"doctrine/inflector": "^1.4|^2.0",
"illuminate/contracts": "^6.0",
"nesbot/carbon": "^2.0"
},
2 changes: 1 addition & 1 deletion src/Illuminate/Validation/ValidationRuleParser.php
Original file line number Diff line number Diff line change
@@ -131,7 +131,7 @@ protected function explodeWildcardRules($results, $attribute, $rules)
foreach ($data as $key => $value) {
if (Str::startsWith($key, $attribute) || (bool) preg_match('/^'.$pattern.'\z/', $key)) {
foreach ((array) $rules as $rule) {
$this->implicitAttributes[$attribute][] = strval($key);
$this->implicitAttributes[$attribute][] = $key;

$results = $this->mergeRules($results, $key, $rule);
}
21 changes: 18 additions & 3 deletions src/Illuminate/Validation/Validator.php
Original file line number Diff line number Diff line change
@@ -213,6 +213,13 @@ class Validator implements ValidatorContract
*/
protected $numericRules = ['Numeric', 'Integer'];

/**
* The current placeholder for dots in rule keys.
*
* @var string
*/
protected $dotPlaceholder;

/**
* Create a new Validator instance.
*
@@ -226,6 +233,8 @@ class Validator implements ValidatorContract
public function __construct(Translator $translator, array $data, array $rules,
array $messages = [], array $customAttributes = [])
{
$this->dotPlaceholder = Str::random();

$this->initialRules = $rules;
$this->translator = $translator;
$this->customMessages = $messages;
@@ -250,7 +259,11 @@ public function parseData(array $data)
$value = $this->parseData($value);
}

$key = str_replace(['.', '*'], ['->', '__asterisk__'], $key);
$key = str_replace(
['.', '*'],
[$this->dotPlaceholder, '__asterisk__'],
$key
);

$newData[$key] = $value;
}
@@ -288,8 +301,6 @@ public function passes()
// rule. Any error messages will be added to the containers with each of
// the other error messages, returning true if we don't have messages.
foreach ($this->rules as $attribute => $rules) {
$attribute = str_replace('\.', '->', $attribute);

if ($this->shouldBeExcluded($attribute)) {
$this->removeAttribute($attribute);

@@ -908,6 +919,10 @@ public function getRules()
*/
public function setRules(array $rules)
{
$rules = collect($rules)->mapWithKeys(function ($value, $key) {
return [str_replace('\.', $this->dotPlaceholder, $key) => $value];
})->toArray();

$this->initialRules = $rules;

$this->rules = [];
Loading